From e52375aa4019a8adfb1960e9364f4650c0479b74 Mon Sep 17 00:00:00 2001 From: GZharun Date: Wed, 28 Jan 2015 16:41:12 +0200 Subject: [Summary] Moved session buffers adjustment during butler thread set up to the place we are ready to handle them. --- libs/ardour/butler.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libs/ardour/butler.cc') diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index 8e68eed7c4..2e79825978 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -104,6 +104,7 @@ Butler::config_changed (std::string p) int Butler::start_thread() { + // set up capture and playback buffering Diskstream::set_buffering_parameters (Config->get_buffering_preset()); /* size is in Samples, not bytes */ @@ -111,9 +112,6 @@ Butler::start_thread() audio_dstream_capture_buffer_size = (uint32_t) floor (Config->get_audio_capture_buffer_seconds() * rate); audio_dstream_playback_buffer_size = (uint32_t) floor (Config->get_audio_playback_buffer_seconds() * rate); - _session.adjust_capture_buffering (); - _session.adjust_playback_buffering (); - /* size is in bytes * XXX: Jack needs to tell us the MIDI buffer size * (i.e. how many MIDI bytes we might see in a cycle) @@ -131,6 +129,11 @@ Butler::start_thread() //pthread_detach (thread); have_thread = true; + + // we are ready to request buffer adjustments + _session.adjust_capture_buffering (); + _session.adjust_playback_buffering (); + return 0; } -- cgit v1.2.3