Timeline: Fix diskstream flushing/shutdown.
This commit is contained in:
parent
3ca72b4ac6
commit
963d926659
|
@ -77,8 +77,6 @@ Disk_Stream::~Disk_Stream ( )
|
|||
|
||||
// timeline->wrlock();
|
||||
|
||||
shutdown();
|
||||
|
||||
_track = NULL;
|
||||
|
||||
sem_destroy( &_blocks );
|
||||
|
@ -134,7 +132,7 @@ Disk_Stream::shutdown ( void )
|
|||
while ( _terminate )
|
||||
{
|
||||
block_processed();
|
||||
usleep( 1000 );
|
||||
usleep( 10 * 1000 );
|
||||
}
|
||||
|
||||
_thread.join();
|
||||
|
|
|
@ -183,6 +183,8 @@ done:
|
|||
free(buf);
|
||||
free(cbuf);
|
||||
|
||||
// flush();
|
||||
|
||||
_terminate = false;
|
||||
|
||||
_thread.exit();
|
||||
|
|
|
@ -39,6 +39,8 @@ public:
|
|||
run();
|
||||
}
|
||||
|
||||
virtual ~Playback_DS ( ) { shutdown(); }
|
||||
|
||||
bool seek_pending ( void );
|
||||
void seek ( nframes_t frame );
|
||||
nframes_t process ( nframes_t nframes );
|
||||
|
|
|
@ -152,6 +152,8 @@ Record_DS::disk_thread ( void )
|
|||
|
||||
delete c;
|
||||
|
||||
flush();
|
||||
|
||||
_terminate = false;
|
||||
|
||||
DMESSAGE( "capture thread gone" );
|
||||
|
|
|
@ -44,7 +44,7 @@ class Record_DS : public Disk_Stream
|
|||
void write_block ( sample_t *buf, nframes_t nframes );
|
||||
void disk_thread ( void );
|
||||
|
||||
void flush ( void ) { base_flush( false ); }
|
||||
virtual void flush ( void ) { base_flush( false ); }
|
||||
|
||||
public:
|
||||
|
||||
|
@ -60,6 +60,8 @@ public:
|
|||
_frames_written = 0;
|
||||
}
|
||||
|
||||
virtual ~Record_DS ( ) { shutdown(); }
|
||||
|
||||
/* bool seek_pending ( void ); */
|
||||
/* void seek ( nframes_t frame ); */
|
||||
const Audio_Region * capture_region ( void ) const;
|
||||
|
|
Loading…
Reference in New Issue