Browse Source

Timeline: Fix diskstream flushing/shutdown.

tags/non-daw-v1.2.0
Jonathan Moore Liles 9 years ago
parent
commit
963d926659
5 changed files with 10 additions and 4 deletions
  1. +1
    -3
      timeline/src/Engine/Disk_Stream.C
  2. +2
    -0
      timeline/src/Engine/Playback_DS.C
  3. +2
    -0
      timeline/src/Engine/Playback_DS.H
  4. +2
    -0
      timeline/src/Engine/Record_DS.C
  5. +3
    -1
      timeline/src/Engine/Record_DS.H

+ 1
- 3
timeline/src/Engine/Disk_Stream.C View File

@@ -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();


+ 2
- 0
timeline/src/Engine/Playback_DS.C View File

@@ -183,6 +183,8 @@ done:
free(buf);
free(cbuf);

// flush();

_terminate = false;

_thread.exit();


+ 2
- 0
timeline/src/Engine/Playback_DS.H View File

@@ -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 );


+ 2
- 0
timeline/src/Engine/Record_DS.C View File

@@ -152,6 +152,8 @@ Record_DS::disk_thread ( void )

delete c;

flush();

_terminate = false;

DMESSAGE( "capture thread gone" );


+ 3
- 1
timeline/src/Engine/Record_DS.H View File

@@ -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…
Cancel
Save