- class QAudioOutput#
Represents an output channel for audio. More…
Synopsis#
Properties#
Methods#
def
__init__()
def
device()
def
isMuted()
def
volume()
Slots#
def
setDevice()
def
setMuted()
def
setVolume()
Signals#
def
deviceChanged()
def
mutedChanged()
def
volumeChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
This class represents an output channel that can be used together with
QMediaPlayer
orQMediaCaptureSession
. It enables the selection of the physical output device to be used, muting the channel, and changing the channel’s volume.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property deviceᅟ: 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 constructedQAudioDevice
object.- Access functions:
Signal
deviceChanged()
- property mutedᅟ: bool#
This property holds The muted state of the current media..
The value will be
true
if the output is muted; otherwisefalse
.- Access functions:
Signal
mutedChanged()
- property volumeᅟ: float#
This property holds The current volume..
The volume is scaled linearly, ranging from
0
(silence) to1
(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
- Access functions:
Signal
volumeChanged()
- __init__(device[, parent=None])
- Parameters:
device –
QAudioDevice
parent –
QObject
- device()#
- Return type:
See also
Getter of property
deviceᅟ
.- deviceChanged()#
Notification signal of property
deviceᅟ
.- isMuted()#
- Return type:
bool
Getter of property
mutedᅟ
.- mutedChanged(muted)#
- Parameters:
muted – bool
Notification signal of property
mutedᅟ
.- setDevice(device)#
- Parameters:
device –
QAudioDevice
See also
Setter of property
deviceᅟ
.Setter of property
mutedᅟ
.Setter of property
volumeᅟ
.- volume()#
- Return type:
float
See also
Getter of property
volumeᅟ
.- volumeChanged(volume)#
- Parameters:
volume – float
Notification signal of property
volumeᅟ
.