diff options
author | GZharun <grygoriiz@wavesglobal.com> | 2015-01-28 12:44:38 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:13 -0400 |
commit | be92c927e8928eb56f10776ab9360373c293ec78 (patch) | |
tree | 14ef573f23486c8234f6ea32e073e08b71a22563 /libs/ardour/butler.cc | |
parent | 6878742d9f31432f00e215c6a48ee87caad19fa0 (diff) |
[Summary] HOT FIX: Fixed crash which happens on an attempt to load a session with audio after preferences removal, when buffer preset is set to Medium.
[Details] It happened because ARDOUR::Butler::thread_work() was called before Buttler::map_parameters() method was called, which sets up the correct buffering parameters (set_buffering_parameters () call) according to chosen preset.
I've added this calls into Butler::start_thread () to make sure everything is set up and ready for use for Butler.
This is a hot fix, because it requires the review from Paul Davis, and probably more gentle solution. But it's possible this commit may become the main solution itself.
Diffstat (limited to 'libs/ardour/butler.cc')
-rw-r--r-- | libs/ardour/butler.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index 67d7dd1617..8e68eed7c4 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -104,12 +104,16 @@ Butler::config_changed (std::string p) int Butler::start_thread() { - const float rate = (float)_session.frame_rate(); - + Diskstream::set_buffering_parameters (Config->get_buffering_preset()); + /* size is in Samples, not bytes */ + const float rate = (float)_session.frame_rate(); 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) |