diff options
author | David Robillard <d@drobilla.net> | 2007-03-18 06:07:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-03-18 06:07:08 +0000 |
commit | 99904735e066804358f1d0bd138a84f1e9ecda91 (patch) | |
tree | 71a924cf1660b5b00231275bd481bbd27094dd9b /libs/ardour/session_export.cc | |
parent | eb270e70a12c410cdd98585ad25bb6d8e384a4f5 (diff) |
Merged with trunk R1612.
git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_export.cc')
-rw-r--r-- | libs/ardour/session_export.cc | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 6902a426c3..e2d79b86d3 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ /* see gdither.cc for why we have to do this */ @@ -269,7 +268,7 @@ AudioExportSpecification::process (nframes_t nframes) char errbuf[256]; nframes_t to_write = 0; int cnt = 0; - + do { /* now do sample rate conversion */ @@ -429,8 +428,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; } @@ -438,40 +435,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; } @@ -645,3 +623,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); + } +} |