src/multimedia/audio/qaudiooutput.cpp
changeset 29 b72c6db6890b
parent 25 e24348a560a6
child 30 5dc02b23752f
--- a/src/multimedia/audio/qaudiooutput.cpp	Fri Jun 11 14:24:45 2010 +0300
+++ b/src/multimedia/audio/qaudiooutput.cpp	Wed Jun 23 19:07:03 2010 +0300
@@ -369,8 +369,17 @@
 }
 
 /*!
-    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