src/multimedia/audio/qaudiooutput.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/multimedia/audio/qaudiooutput.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/multimedia/audio/qaudiooutput.cpp	Wed Aug 18 10:37:55 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