diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/audio/qaudioinput_mac_p.cpp | 9 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiooutput_mac_p.cpp | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp index 7ab8c27..1db5866 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.cpp +++ b/src/multimedia/audio/qaudioinput_mac_p.cpp @@ -807,6 +807,12 @@ int QAudioInputPrivate::bufferSize() const void QAudioInputPrivate::setNotifyInterval(int milliSeconds) { + if (intervalTimer->interval() == milliSeconds) + return; + + if (milliSeconds <= 0) + milliSeconds = 0; + intervalTimer->setInterval(milliSeconds); } @@ -886,7 +892,8 @@ void QAudioInputPrivate::audioDeviceError() void QAudioInputPrivate::startTimers() { audioBuffer->startFlushTimer(); - intervalTimer->start(); + if (intervalTimer->interval() > 0) + intervalTimer->start(); } void QAudioInputPrivate::stopTimers() diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp index b457fed..9689101 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.cpp +++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp @@ -536,6 +536,12 @@ int QAudioOutputPrivate::bufferSize() const void QAudioOutputPrivate::setNotifyInterval(int milliSeconds) { + if (intervalTimer->interval() == milliSeconds) + return; + + if (milliSeconds <= 0) + milliSeconds = 0; + intervalTimer->setInterval(milliSeconds); } @@ -622,7 +628,8 @@ void QAudioOutputPrivate::audioDeviceError() void QAudioOutputPrivate::startTimers() { audioBuffer->startFillTimer(); - intervalTimer->start(); + if (intervalTimer->interval() > 0) + intervalTimer->start(); } void QAudioOutputPrivate::stopTimers() |