diff options
author | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2012-01-31 20:43:13 +0000 |
---|---|---|
committer | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2012-01-31 20:43:13 +0000 |
commit | b6962bd0d77073e5e869b457dfae2cb77292b892 (patch) | |
tree | 0b334b423fc501b6321220dd5eac019915180fd2 /common/JackAudioDriver.cpp | |
parent | 41d8bd5b1cae17fb5341da0cf0725116844c7a30 (diff) | |
download | jack2-b6962bd0d77073e5e869b457dfae2cb77292b892.tar.gz |
Correct client time-out setting.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4759 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'common/JackAudioDriver.cpp')
-rw-r--r-- | common/JackAudioDriver.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/common/JackAudioDriver.cpp b/common/JackAudioDriver.cpp index 337afe84..3cb0f56f 100644 --- a/common/JackAudioDriver.cpp +++ b/common/JackAudioDriver.cpp @@ -46,25 +46,20 @@ int JackAudioDriver::SetBufferSize(jack_nframes_t buffer_size) // Update engine and graph manager state fEngineControl->fBufferSize = buffer_size; fGraphManager->SetBufferSize(buffer_size); - fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // in microsec - if (!fEngineControl->fTimeOut) { - fEngineControl->fTimeOutUsecs = jack_time_t(2.f * fEngineControl->fPeriodUsecs); - } - + + fEngineControl->UpdateTimeOut(); UpdateLatencies(); - // Redirect on slaves drivers... + // Redirected on slaves drivers... return JackDriver::SetBufferSize(buffer_size); } int JackAudioDriver::SetSampleRate(jack_nframes_t sample_rate) { fEngineControl->fSampleRate = sample_rate; - fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // in microsec - if (!fEngineControl->fTimeOut) { - fEngineControl->fTimeOutUsecs = jack_time_t(2.f * fEngineControl->fPeriodUsecs); - } + fEngineControl->UpdateTimeOut(); + // Redirected on slaves drivers... return JackDriver::SetSampleRate(sample_rate); } |