summaryrefslogtreecommitdiff
path: root/libs/ardour/butler.cc
diff options
context:
space:
mode:
authorGZharun <grygoriiz@wavesglobal.com>2015-01-28 16:41:12 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:13 -0400
commite52375aa4019a8adfb1960e9364f4650c0479b74 (patch)
tree8b8a3d3532ef79663885962eaa13ca3099af28b9 /libs/ardour/butler.cc
parentbe92c927e8928eb56f10776ab9360373c293ec78 (diff)
[Summary] Moved session buffers adjustment during butler thread set up to the place we are ready to handle them.
Diffstat (limited to 'libs/ardour/butler.cc')
-rw-r--r--libs/ardour/butler.cc9
1 files changed, 6 insertions, 3 deletions
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;
}