From 787e9d163dea6b9423c21fbcbe4a7b82f06cb4b3 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 19 May 2010 11:10:39 +1000 Subject: The documentation for processedUSecs() is ambiguous Task-number:QTBUG-10759 Reviewed-by:Justin McPherson --- src/multimedia/audio/qaudiooutput.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v0.12