summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiooutput_mac_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudiooutput_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp
index 4364704..f23db80 100644
--- a/src/multimedia/audio/qaudiooutput_mac_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp
@@ -551,6 +551,9 @@ qint64 QAudioOutputPrivate::totalTime() const
qint64 QAudioOutputPrivate::clock() const
{
+ if (stateCode == QAudio::StopState)
+ return 0;
+
return (AudioGetCurrentHostTime() - startTime) / (clockFrequency / 1000);
}