QAudio¶

PyQt5.QtMultimedia.QAudio

Description¶

TODO

Enums¶

Error

Member

Value

Description

FatalError

4

A non-recoverable error has occurred, the audio device is not usable at this time.

IOError

2

An error occurred during read/write of audio device

NoError

0

No errors have occurred

OpenError

1

An error occurred opening the audio device

UnderrunError

3

Audio data is not being fed to the audio device at a fast enough rate


Mode

Member

Value

Description

AudioInput

0

audio input device

AudioOutput

1

audio output device


Role

This enum describes the role of an audio stream.

See also

setAudioRole().

Member

Value

Description

AccessibilityRole

7

For accessibility, such as with a screen reader

AlarmRole

4

Alarm

CustomRole

10

The role is specified by customAudioRole()

GameRole

9

Game audio

MusicRole

1

Music

NotificationRole

5

Notification, such as an incoming e-mail or a chat request

RingtoneRole

6

Ringtone

SonificationRole

8

Sonification, such as with user interface sounds

UnknownRole

0

The role is unknown or undefined

VideoRole

2

Soundtrack from a movie or a video

VoiceCommunicationRole

3

Voice communications, such as telephony


State

Member

Value

Description

ActiveState

0

Audio data is being processed, this state is set after start() is called and while audio data is available to be processed.

IdleState

3

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

InterruptedState

TODO

This stream is in a suspended state because another higher priority stream currently has control of the audio device. Playback cannot resume until the higher priority stream relinquishes control of the audio device.

StoppedState

2

The audio device is closed, and is not processing any audio data

SuspendedState

1

The audio stream is in a suspended state. Entered after suspend() is called or when another stream takes control of the audio device. In the later case, a call to resume will return control of the audio device to this stream. This should usually only be done upon user request.


VolumeScale

This enum defines the different audio volume scales.

See also

convertVolume().

Member

Value

Description

CubicVolumeScale

1

Cubic scale. 0.0 (0%) is silence and 1.0 (100%) is full volume.

DecibelVolumeScale

3

Decibel (dB, amplitude) logarithmic scale. -200 is silence and 0 is full volume.

LinearVolumeScale

0

Linear scale. 0.0 (0%) is silence and 1.0 (100%) is full volume. All Qt Multimedia classes that have an audio volume use a linear scale.

LogarithmicVolumeScale

2

Logarithmic Scale. 0.0 (0%) is silence and 1.0 (100%) is full volume. UI volume controls should usually use a logarithmic scale.

Methods¶

@staticmethod
convertVolume(float, VolumeScale, VolumeScale) → float

TODO