src/multimedia/audio/qaudiooutput.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   367 {
   367 {
   368     return d->notifyInterval();
   368     return d->notifyInterval();
   369 }
   369 }
   370 
   370 
   371 /*!
   371 /*!
   372     Returns the amount of audio data processed since start()
   372     Returns the amount of audio data processed by the class 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
   374 */
   383 */
   375 
   384 
   376 qint64 QAudioOutput::processedUSecs() const
   385 qint64 QAudioOutput::processedUSecs() const
   377 {
   386 {
   378     return d->processedUSecs();
   387     return d->processedUSecs();