Qt 5.11 | Qt Multimedia | C++ Classes | QAudioDecoderControl

Qt 5.11.3 Reference Documentation

# QAudioDecoderControl Class

The QAudioDecoderControl class provides access to the audio decoding functionality of a QMediaService. More...

Header: | #include <QAudioDecoderControl>
qmake: | QT += multimedia
Inherits: | QMediaControl

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Functions

virtual | ~QAudioDecoderControl()
virtual QAudioFormat | audioFormat() const = 0
virtual bool | bufferAvailable() const = 0
virtual qint64 | duration() const = 0
virtual qint64 | position() const = 0
virtual QAudioBuffer | read() = 0
virtual void | setAudioFormat(const QAudioFormat &format) = 0
virtual void | setSourceDevice(QIODevice *device) = 0
virtual void | setSourceFilename(const QString &fileName) = 0
virtual QIODevice * | sourceDevice() const = 0
virtual QString | sourceFilename() const = 0
virtual void | start() = 0
virtual QAudioDecoder::State | state() const = 0
virtual void | stop() = 0

## Signals

void | bufferAvailableChanged(bool available)
void | bufferReady()
void | durationChanged(qint64 duration)
void | error(int error, const QString &errorString)
void | finished()
void | formatChanged(const QAudioFormat &format)
void | positionChanged(qint64 position)
void | sourceChanged()
void | stateChanged(QAudioDecoder::State newState)

## Protected Functions

| QAudioDecoderControl(QObject *parent = nullptr)

## Macros

| QAudioDecoderControl_iid

## Detailed Description

The QAudioDecoderControl class provides access to the audio decoding functionality of a QMediaService.

The functionality provided by this control is exposed to application code through the QAudioDecoder class.

The interface name of QAudioDecoderControl is `org.qt-project.qt.audiodecodercontrol/5.0` as defined in QAudioDecoderControl_iid.

See also QMediaService::requestControl() and QAudioDecoder.

## Member Function Documentation

### `[protected]` QAudioDecoderControl::QAudioDecoderControl(QObject *parent = nullptr)

Constructs a new audio decoder control with the given parent.

### `[virtual]` QAudioDecoderControl::~QAudioDecoderControl()

Destroys an audio decoder control.

### `[pure virtual]` QAudioFormat QAudioDecoderControl::audioFormat() const

See also setAudioFormat().

### `[pure virtual]` bool QAudioDecoderControl::bufferAvailable() const

### `[signal]` void QAudioDecoderControl::bufferAvailableChanged(bool available)

### `[signal]` void QAudioDecoderControl::bufferReady()

### `[pure virtual]` qint64 QAudioDecoderControl::duration() const

### `[signal]` void QAudioDecoderControl::durationChanged(qint64 duration)

### `[signal]` void QAudioDecoderControl::error(int error, const QString &errorString)

### `[signal]` void QAudioDecoderControl::finished()

### `[signal]` void QAudioDecoderControl::formatChanged(const QAudioFormat &format)

### `[pure virtual]` qint64 QAudioDecoderControl::position() const

### `[signal]` void QAudioDecoderControl::positionChanged(qint64 position)

### `[pure virtual]` QAudioBuffer QAudioDecoderControl::read()

### `[pure virtual]` void QAudioDecoderControl::setAudioFormat(const QAudioFormat &format)

See also audioFormat().

### `[pure virtual]` void QAudioDecoderControl::setSourceDevice(QIODevice *device)

See also sourceDevice().

### `[pure virtual]` void QAudioDecoderControl::setSourceFilename(const QString &fileName)

See also sourceFilename().

### `[signal]` void QAudioDecoderControl::sourceChanged()

### `[pure virtual]` QIODevice *QAudioDecoderControl::sourceDevice() const

See also setSourceDevice().

### `[pure virtual]` QString QAudioDecoderControl::sourceFilename() const

See also setSourceFilename().

### `[pure virtual]` void QAudioDecoderControl::start()

### `[pure virtual]` QAudioDecoder::State QAudioDecoderControl::state() const

### `[signal]` void QAudioDecoderControl::stateChanged(QAudioDecoder::State newState)

### `[pure virtual]` void QAudioDecoderControl::stop()

## Macro Documentation

### QAudioDecoderControl_iid

`org.qt-project.qt.audiodecodercontrol/5.0`

Defines the interface name of the QAudioDecoderControl class.