QAudio Namespace

The QAudio namespace contains enums used by the audio classes. More...

Header: #include <QAudio>
qmake: QT += multimedia


enum Error { NoError, OpenError, IOError, UnderrunError, FatalError }
enum Mode { AudioOutput, AudioInput }
enum Role { UnknownRole, MusicRole, VideoRole, VoiceCommunicationRole, ..., GameRole }
enum State { ActiveState, SuspendedState, StoppedState, IdleState }

Detailed Description

The QAudio namespace contains enums used by the audio classes.

Type Documentation

enum QAudio::Error

QAudio::NoError0No errors have occurred
QAudio::OpenError1An error occurred opening the audio device
QAudio::IOError2An error occurred during read/write of audio device
QAudio::UnderrunError3Audio data is not being fed to the audio device at a fast enough rate
QAudio::FatalError4A non-recoverable error has occurred, the audio device is not usable at this time.

enum QAudio::Mode

QAudio::AudioOutput1audio output device
QAudio::AudioInput0audio input device

enum QAudio::Role

This enum describes the role of an audio stream.

QAudio::UnknownRole0The role is unknown or undefined
QAudio::VideoRole2Soundtrack from a movie or a video
QAudio::VoiceCommunicationRole3Voice communications, such as telephony
QAudio::NotificationRole5Notification, such as an incoming e-mail or a chat request
QAudio::AccessibilityRole7For accessibility, such as with a screen reader
QAudio::SonificationRole8Sonification, such as with user interface sounds
QAudio::GameRole9Game audio

This enum was introduced or modified in Qt 5.6.

See also QMediaPlayer::setAudioRole().

enum QAudio::State

QAudio::ActiveState0Audio data is being processed, this state is set after start() is called and while audio data is available to be processed.
QAudio::SuspendedState1The audio device is in a suspended state, this state will only be entered after suspend() is called.
QAudio::StoppedState2The audio device is closed, and is not processing any audio data
QAudio::IdleState3The QIODevice passed in has no data and audio system's buffer is empty, this state is set after start() is called and while no audio data is available to be processed.

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