summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-05-19 01:10:39 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-05-19 01:10:39 (GMT)
commit787e9d163dea6b9423c21fbcbe4a7b82f06cb4b3 (patch)
treefc571239a2782d1d7fa5ec7327f6cbb0409cda5c /src/multimedia/audio
parentdc2e494acbd0a8e371c9fd92aef2da6975c5cccb (diff)
downloadQt-787e9d163dea6b9423c21fbcbe4a7b82f06cb4b3.zip
Qt-787e9d163dea6b9423c21fbcbe4a7b82f06cb4b3.tar.gz
Qt-787e9d163dea6b9423c21fbcbe4a7b82f06cb4b3.tar.bz2
The documentation for processedUSecs() is ambiguous
Task-number:QTBUG-10759 Reviewed-by:Justin McPherson
Diffstat (limited to 'src/multimedia/audio')
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index 371773c..cf3b79c 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -369,8 +369,17 @@ int QAudioOutput::notifyInterval() const
}
/*!
- Returns the amount of audio data processed since start()
+ Returns the amount of audio data processed by the class since start()
was called in microseconds.
+
+ Note: The amount of audio data played can be determined by subtracting
+ the microseconds of audio data still in the systems audio buffer.
+
+ \code
+ qint64 bytesInBuffer = bufferSize() - bytesFree();
+ qint64 usInBuffer = (qint64)(1000000) * bytesInBuffer / ( channels() * sampleSize() / 8 ) / frequency();
+ qint64 usPlayed = processedUSecs() - usInBuffer;
+ \endcode
*/
qint64 QAudioOutput::processedUSecs() const