AudioDataOutput Class

( Phonon::AudioDataOutput )

The AudioDataOutput class provides access to audio data. 更多...

Since: Qt 4.7
繼承: QObject and MediaNode

公共類型

enum Channel { LeftChannel, RightChannel, CenterChannel, LeftSurroundChannel, RightSurroundChannel, SubwooferChannel }

特性

公共函數

int dataSize () const
int sampleRate () const

公共槽

void setDataSize (int size )

信號

void dataReady (const QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > & data )
void endOfMedia (int remainingSamples )

額外繼承成員

詳細描述

The AudioDataOutput class provides access to audio data.

This class is used to obtain audio data, typically for the purpose of visualizing it.

Although it is not designed for realtime performance, the latencies associated with accessing the data should be low enough for applications that provide visualizations of the data. This class can also be used to save the audio data for further processing.

成員類型文檔編製

enum AudioDataOutput:: Channel

This enum describes the channel audio data belongs to.

常量
Phonon::AudioDataOutput::LeftChannel 0
Phonon::AudioDataOutput::RightChannel 1
Phonon::AudioDataOutput::CenterChannel 2
Phonon::AudioDataOutput::LeftSurroundChannel 3
Phonon::AudioDataOutput::RightSurroundChannel 4
Phonon::AudioDataOutput::SubwooferChannel 5

特性文檔編製

dataSize : int

This property holds the number of samples passed via the dataReady() signal.

訪問函數:

int dataSize () const
void setDataSize (int size )

成員函數文檔編製

[signal] void AudioDataOutput:: dataReady (const QMap < Phonon::AudioDataOutput::Channel , QVector < qint16 > > & data )

This signal is emitted whenever there is data available to read. The data sent by the signal is supplied in the form of a map that holds the data for different output channels.

[signal] void AudioDataOutput:: endOfMedia ( int remainingSamples )

This signal is emitted before the final dataReady () signal is emitted for a media. The remainingSamples value sent by the signal contains the number of samples that will be sent in the final dataReady () signal for the media.

int AudioDataOutput:: sampleRate () const

Returns the sample rate measured in Hertz, as reported by the backend. If the backend is unavailable -1 is returned.