src/multimedia/audio/qaudiooutput.cpp
changeset 30 5dc02b23752f
parent 29 b72c6db6890b
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   367 {
   367 {
   368     return d->notifyInterval();
   368     return d->notifyInterval();
   369 }
   369 }
   370 
   370 
   371 /*!
   371 /*!
   372     Returns the amount of audio data processed by the class since start()
   372     Returns the amount of audio data processed since start()
   373     was called in microseconds.
   373     was called in microseconds.
   374 
       
   375     Note: The amount of audio data played can be determined by subtracting
       
   376     the microseconds of audio data still in the systems audio buffer.
       
   377 
       
   378     \code
       
   379     qint64 bytesInBuffer = bufferSize() - bytesFree();
       
   380     qint64 usInBuffer = (qint64)(1000000) * bytesInBuffer / ( channels() * sampleSize() / 8 ) / frequency();
       
   381     qint64 usPlayed = processedUSecs() - usInBuffer;
       
   382     \endcode
       
   383 */
   374 */
   384 
   375 
   385 qint64 QAudioOutput::processedUSecs() const
   376 qint64 QAudioOutput::processedUSecs() const
   386 {
   377 {
   387     return d->processedUSecs();
   378     return d->processedUSecs();