[Summary] Moved session buffers adjustment during butler thread set up to the place we are ready to handle them.

This commit is contained in:
GZharun 2015-01-28 16:41:12 +02:00
parent a6b202879f
commit 331a918633

View file

@ -124,6 +124,7 @@ Butler::setup_request_pipe ()
int
Butler::start_thread()
{
// set up capture and playback buffering
Diskstream::set_buffering_parameters (Config->get_buffering_preset());
/* size is in Samples, not bytes */
@ -131,9 +132,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)
@ -155,6 +153,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;
}