Timeline: Fix peak display while recording.
This commit is contained in:
parent
1fc7c2eed2
commit
c351700be0
|
@ -602,18 +602,17 @@ Audio_Region::draw ( void )
|
||||||
|
|
||||||
if ( start != ostart || end != oend )
|
if ( start != ostart || end != oend )
|
||||||
{
|
{
|
||||||
if ( _clip->peaks()->peakfile_ready() )
|
_clip->peaks()->peakfile_ready();
|
||||||
{
|
|
||||||
if ( _clip->read_peaks( timeline->fpp(),
|
if ( _clip->read_peaks( timeline->fpp(),
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
&peaks, &pbuf, &channels ) )
|
&peaks, &pbuf, &channels ) )
|
||||||
{
|
{
|
||||||
Waveform::scale( pbuf, peaks * channels, _scale );
|
Waveform::scale( pbuf, peaks * channels, _scale );
|
||||||
|
|
||||||
ostart = start;
|
ostart = start;
|
||||||
oend = end;
|
oend = end;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( _clip->peaks()->needs_more_peaks() && ! transport->rolling )
|
if ( _clip->peaks()->needs_more_peaks() && ! transport->rolling )
|
||||||
|
|
|
@ -429,7 +429,7 @@ Peaks::peakfile_ready ( void ) const
|
||||||
_rescan_needed = false;
|
_rescan_needed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return current() && ! _first_block_pending;
|
return _first_block_pending || current();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** start building peaks and/or peak mipmap in another thread. It is
|
/** start building peaks and/or peak mipmap in another thread. It is
|
||||||
|
@ -640,6 +640,7 @@ Peaks::prepare_for_writing ( void )
|
||||||
|
|
||||||
char *pn = peakname( _clip->filename() );
|
char *pn = peakname( _clip->filename() );
|
||||||
|
|
||||||
|
_first_block_pending = true;
|
||||||
_peak_writer = new Peaks::Streamer( pn, _clip->channels(), cache_minimum );
|
_peak_writer = new Peaks::Streamer( pn, _clip->channels(), cache_minimum );
|
||||||
|
|
||||||
free( pn );
|
free( pn );
|
||||||
|
@ -652,6 +653,8 @@ Peaks::finish_writing ( void )
|
||||||
|
|
||||||
delete _peak_writer;
|
delete _peak_writer;
|
||||||
_peak_writer = NULL;
|
_peak_writer = NULL;
|
||||||
|
|
||||||
|
_first_block_pending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue