QAudioInput Class

Represents an input channel for audio. More...

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

Properties

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.

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)

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.