QAudioInput Class | Qt Multimedia | Qt 6.12.0
Description: Represents an input channel for audio.
Keywords: class

- Qt 6.12
- Qt Multimedia
- C++ Classes
- QtMultimedia
- QAudioInput
- Qt 6.12.0 Reference Documentation

# QAudioInput Class

Represents an input channel for audio. More...

Header: | `#include <QAudioInput>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Multimedia)` `target_link_libraries(mytarget PRIVATE Qt6::Multimedia)`
qmake: | `QT += multimedia`
In QML: | AudioInput
Inherits: | QObject

- List of all members, including inherited members

## Properties

- device : QAudioDevice
- muted : bool
- volume : float

## Public Functions

QAudioDevice | device() const
bool | isMuted() const
float | volume() const

## Public Slots

void | setDevice(const QAudioDevice &device)
void | setMuted(bool muted)
void | setVolume(float volume)

## Signals

void | deviceChanged()
void | mutedChanged(bool muted)
void | volumeChanged(float volume)

## Detailed Description

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

Note: On WebAssembly platform, due to its asynchronous nature, QMediaDevices::audioInputsChanged() signal is emitted when the list of audio inputs is ready. User permissions are required. Works only on secure https contexts.

See also QAudioOutput.

## Property Documentation

### device : QAudioDevice

This property holds the audio device connected to this input.

The device property represents the audio device connected to this input. This property can be used to select an input device from the QMediaDevices::audioInputs() list.

You can select the system default audio input by setting this property to a default constructed QAudioDevice object.

Access functions:

QAudioDevice | device() const
void | setDevice(const QAudioDevice &device)

Notifier signal:

void | deviceChanged()

### muted : bool

This property holds the muted state of the current media.

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

Access functions:

bool | isMuted() const
void | setMuted(bool muted)

Notifier signal:

void | mutedChanged(bool muted)

### volume : float

The property returns the volume of the audio input.

Access functions:

float | volume() const
void | setVolume(float volume)

Notifier signal:

void | volumeChanged(float volume)