Browse Source

Timeline: Defer creation of audio file for recording until blocks are ready to be written.

This prevents unnecessary file creation in punch mode.
tags/non-daw-v1.2.0
Jonathan Moore Liles 10 years ago
parent
commit
7770610d32
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      timeline/src/Engine/Record_DS.C

+ 7
- 3
timeline/src/Engine/Record_DS.C View File

@@ -60,6 +60,11 @@ Record_DS::write_block ( sample_t *buf, nframes_t nframes )
if ( ! ( timeline && sequence() ) )
return;


if ( ! _capture->audio_file )
/* create the file */
track()->record( _capture, _frame );

track()->write( _capture, buf, nframes );

_frames_written += nframes;
@@ -72,8 +77,6 @@ Record_DS::disk_thread ( void )

DMESSAGE( "capture thread running..." );

track()->record( _capture, _frame );

const nframes_t nframes = _nframes;

/* buffer to hold the interleaved data returned by the track reader */
@@ -148,7 +151,8 @@ Record_DS::disk_thread ( void )

/* now finalize the recording */

track()->finalize( c, _stop_frame );
if ( c->audio_file )
track()->finalize( c, _stop_frame );

delete c;



Loading…
Cancel
Save