AudioDataOutput Class

(Phonon::AudioDataOutput)

The AudioDataOutput class provides access to audio data. More...

Since: Qt 4.7
Inherits: QObject and MediaNode

Public Types

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

Properties

  • 1 property inherited from QObject

Public Functions

int dataSize() const
int sampleRate() const

Public Slots

void setDataSize(int size)
  • 1 public slot inherited from QObject

Signals

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

Additional Inherited Members

  • 7 static public members inherited from QObject
  • 8 protected functions inherited from QObject

Detailed Description

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.

Member Type Documentation

enum AudioDataOutput::Channel

This enum describes the channel audio data belongs to.

ConstantValue
Phonon::AudioDataOutput::LeftChannel0
Phonon::AudioDataOutput::RightChannel1
Phonon::AudioDataOutput::CenterChannel2
Phonon::AudioDataOutput::LeftSurroundChannel3
Phonon::AudioDataOutput::RightSurroundChannel4
Phonon::AudioDataOutput::SubwooferChannel5

Property Documentation

dataSize : int

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

Access functions:

int dataSize() const
void setDataSize(int size)

Member Function Documentation

[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.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.