AudioOutput QML Type | Qt Multimedia | Qt 6.11.2
Description: An audio output to be used for playback or monitoring of a capture session.

- Qt 6.11
- Qt Multimedia
- QML Types
- AudioOutput
- Qt 6.11.2 Reference Documentation

# AudioOutput QML Type

An audio output to be used for playback or monitoring of a capture session. More...

Import Statement: | `import QtMultimedia`
In C++: | QAudioOutput

- List of all members, including inherited members

## Properties

- device : audioDevice
- muted : bool
- volume : real

## Signals

- void deviceChanged()
- void mutedChanged()
- void volumeChanged()

## Detailed Description

     MediaPlayer {
         id: playMusic
         source: "music.wav"
         audioOutput: AudioOutput {
             volume: slider.value
         }
     }
     Slider {
         id: slider
         from: 0.
         to: 1.
     }

You can use AudioOutput together with a MediaPlayer to play audio content, or you can use it in conjunction with a CaptureSession to monitor the audio processed by the capture session.

See also VideoOutput and AudioInput.

## Property Documentation

### device : audioDevice

This property describes 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 MediaDevices.audioOutputs list.

### muted : bool

This property holds whether the audio output is muted.

Defaults to `false`.

### volume : real

This property holds the volume of the audio output.

The volume is scaled linearly from `0.0` (silence) to `1.0` (full volume). Values outside this range will be clamped: a value lower than 0.0 is set to 0.0, a value higher than 1.0 will set to 1.0.

The default volume is `1.0`.

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 QtMultimedia.convertVolume() for more details.

## Signal Documentation

### void deviceChanged()

This signal is emitted when the device property is changed.

Note: The corresponding handler is `onDeviceChanged`.

### void mutedChanged()

This signal is emitted when the muted property is changed.

Note: The corresponding handler is `onMutedChanged`.

### void volumeChanged()

This signal is emitted when the volume property is changed.

Note: The corresponding handler is `onVolumeChanged`.