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 ( _clip->peaks()->peakfile_ready() )
|
||||
{
|
||||
if ( _clip->read_peaks( timeline->fpp(),
|
||||
_clip->peaks()->peakfile_ready();
|
||||
|
||||
if ( _clip->read_peaks( timeline->fpp(),
|
||||
start,
|
||||
end,
|
||||
&peaks, &pbuf, &channels ) )
|
||||
{
|
||||
Waveform::scale( pbuf, peaks * channels, _scale );
|
||||
{
|
||||
Waveform::scale( pbuf, peaks * channels, _scale );
|
||||
|
||||
ostart = start;
|
||||
oend = end;
|
||||
}
|
||||
ostart = start;
|
||||
oend = end;
|
||||
}
|
||||
|
||||
if ( _clip->peaks()->needs_more_peaks() && ! transport->rolling )
|
||||
|
|
|
@ -429,7 +429,7 @@ Peaks::peakfile_ready ( void ) const
|
|||
_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
|
||||
|
@ -640,6 +640,7 @@ Peaks::prepare_for_writing ( void )
|
|||
|
||||
char *pn = peakname( _clip->filename() );
|
||||
|
||||
_first_block_pending = true;
|
||||
_peak_writer = new Peaks::Streamer( pn, _clip->channels(), cache_minimum );
|
||||
|
||||
free( pn );
|
||||
|
@ -652,6 +653,8 @@ Peaks::finish_writing ( void )
|
|||
|
||||
delete _peak_writer;
|
||||
_peak_writer = NULL;
|
||||
|
||||
_first_block_pending = false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue