QAudioOutput

Represents an output channel for audio. More

Inheritance diagram of PySide6.QtMultimedia.QAudioOutput

Synopsis

Functions

Slots

Signals

Detailed Description

This class represents an output channel that can be used together with QMediaPlayer or QMediaCaptureSession . It enables the selection of the physical output device to be used, muting the channel, and changing the channel’s volume.

class PySide6.QtMultimedia.QAudioOutput([parent=None])

PySide6.QtMultimedia.QAudioOutput(device[, parent=None])

Parameters
PySide6.QtMultimedia.QAudioOutput.device()
Return type

PySide6.QtMultimedia.QAudioDevice

This property holds The audio device connected to this output..

The device property represents the audio device this output is connected to. This property can be used to select an output device from the audioOutputs() list. You can select the system default audio output by setting this property to a default constructed QAudioDevice object.

PySide6.QtMultimedia.QAudioOutput.deviceChanged()
PySide6.QtMultimedia.QAudioOutput.isMuted()
Return type

bool

This property holds The muted state of the current media..

The value will be true if the output is muted; otherwise false.

PySide6.QtMultimedia.QAudioOutput.mutedChanged(muted)
Parameters

muted – bool

PySide6.QtMultimedia.QAudioOutput.setDevice(device)
Parameters

devicePySide6.QtMultimedia.QAudioDevice

This property holds The audio device connected to this output..

The device property represents the audio device this output is connected to. This property can be used to select an output device from the audioOutputs() list. You can select the system default audio output by setting this property to a default constructed QAudioDevice object.

PySide6.QtMultimedia.QAudioOutput.setMuted(muted)
Parameters

muted – bool

This property holds The muted state of the current media..

The value will be true if the output is muted; otherwise false.

PySide6.QtMultimedia.QAudioOutput.setVolume(volume)
Parameters

volume – float

This property holds The current volume..

The volume is scaled linearly, ranging from 0 (silence) to 1 (full volume).

Note

values outside this range will be clamped.

By default the volume is 1.

UI volume controls should usually be scaled non-linearly. For example, using a logarithmic scale will produce linear changes in perceived loudness, which is what a user would normally expect from a volume control.

See also

convertVolume()

PySide6.QtMultimedia.QAudioOutput.volume()
Return type

float

This property holds The current volume..

The volume is scaled linearly, ranging from 0 (silence) to 1 (full volume).

Note

values outside this range will be clamped.

By default the volume is 1.

UI volume controls should usually be scaled non-linearly. For example, using a logarithmic scale will produce linear changes in perceived loudness, which is what a user would normally expect from a volume control.

See also

convertVolume()

PySide6.QtMultimedia.QAudioOutput.volumeChanged(volume)
Parameters

volume – float