diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-16 21:44:10 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-16 21:44:10 +0000 |
commit | 2aba860ba1603cb84efc5d0212bf97493aa0bf46 (patch) | |
tree | d7b1ff50796820902a960652001519265caf2e5d /libs/ardour/session_export.cc | |
parent | 3e369073533988b8536216389d52cc947535e51c (diff) |
fix errors in multi-range export (and possibly other export styles); compiler warnings patch from Carl
git-svn-id: svn://localhost/ardour2/trunk@1605 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_export.cc')
-rw-r--r-- | libs/ardour/session_export.cc | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 82dd23f724..87bf5a5b03 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -267,7 +267,7 @@ AudioExportSpecification::process (nframes_t nframes) char errbuf[256]; nframes_t to_write = 0; int cnt = 0; - + do { /* now do sample rate conversion */ @@ -427,8 +427,6 @@ AudioExportSpecification::process (nframes_t nframes) int Session::start_audio_export (AudioExportSpecification& spec) { - int ret; - if (spec.prepare (current_block_size, frame_rate())) { return -1; } @@ -436,40 +434,21 @@ Session::start_audio_export (AudioExportSpecification& spec) spec.pos = spec.start_frame; spec.end_frame = spec.end_frame; spec.total_frames = spec.end_frame - spec.start_frame; + spec.running = true; + spec.do_freewheel = false; /* force a call to ::prepare_to_export() before proceeding to normal operation */ spec.freewheel_connection = _engine.Freewheel.connect (sigc::bind (mem_fun (*this, &Session::process_export), &spec)); - if ((ret = _engine.freewheel (true)) == 0) { - spec.running = true; - spec.do_freewheel = false; - } - - return ret; + return _engine.freewheel (true); } int Session::stop_audio_export (AudioExportSpecification& spec) { - /* can't use stop_transport() here because we need - an immediate halt and don't require all the declick - stuff that stop_transport() implements. - */ - - realtime_stop (true); - schedule_butler_transport_work (); - - /* restart slaving */ + /* don't stop freewheeling but do stop paying attention to it for now */ - if (post_export_slave != None) { - Config->set_slave_source (post_export_slave); - } else { - locate (post_export_position, false, false, false); - } - - spec.clear (); - _exporting = false; - - spec.running = false; + spec.freewheel_connection.disconnect (); + spec.clear (); /* resets running/stop etc */ return 0; } @@ -639,3 +618,25 @@ Session::process_export (nframes_t nframes, AudioExportSpecification* spec) return ret; } +void +Session::finalize_audio_export () +{ + _engine.freewheel (false); + _exporting = false; + + /* can't use stop_transport() here because we need + an immediate halt and don't require all the declick + stuff that stop_transport() implements. + */ + + realtime_stop (true); + schedule_butler_transport_work (); + + /* restart slaving */ + + if (post_export_slave != None) { + Config->set_slave_source (post_export_slave); + } else { + locate (post_export_position, false, false, false); + } +} |