summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioinput_mac_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudioinput_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp9
1 files changed, 8 insertions, 1 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()