X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fbutler.cc;h=327665441ea0c127ddaa02d44753b9b0a90da520;hb=f6d29abfc75c460b9e35717f2907e4e61bf38058;hp=1fe15246183c89575782e5e4f505c562bcbf6bb7;hpb=bb826f4beebfcedc50570b818c305560d2233e47;p=ardour.git diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index 1fe1524618..327665441e 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -43,6 +43,7 @@ namespace ARDOUR { Butler::Butler(Session& s) : SessionHandleRef (s) , thread() + , have_thread (false) , audio_dstream_capture_buffer_size(0) , audio_dstream_playback_buffer_size(0) , midi_dstream_buffer_size(0) @@ -126,16 +127,18 @@ Butler::start_thread() } //pthread_detach (thread); - + have_thread = true; return 0; } void Butler::terminate_thread () { - void* status; - queue_request (Request::Quit); - pthread_join (thread, &status); + if (have_thread) { + void* status; + queue_request (Request::Quit); + pthread_join (thread, &status); + } } void * @@ -257,6 +260,14 @@ restart: _session.butler_transport_work (); } + frameoffset_t audition_seek; + if (should_run && _session.is_auditioning() + && (audition_seek = _session.the_auditioner()->seek_frame()) >= 0) { + boost::shared_ptr tr = boost::dynamic_pointer_cast (_session.the_auditioner()); + tr->seek(audition_seek); + _session.the_auditioner()->seek_response(audition_seek); + } + boost::shared_ptr rl = _session.get_routes(); RouteList rl_with_auditioner = *rl;