diff options
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r-- | src/JackDriver.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index ddb6744..77625bc 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -459,14 +459,24 @@ JackDriver::reset_xruns() } -void +bool JackDriver::set_buffer_size(jack_nframes_t size) { - if (buffer_size() == size) - return; + if (buffer_size() == size) { + return true; + } + + if (!m_client) { + m_buffer_size = size; + return true; + } - if (m_client && jack_set_buffer_size(m_client, size)) + if (jack_set_buffer_size(m_client, size)) { m_app->status_message("[JACK] ERROR: Unable to set buffer size"); + return false; + } else { + return true; + } } void |