AudioInput QML Type
An audio input to be used for capturing audio in a capture session. More...
Import Statement: | import QtMultimedia |
Instantiates: | QAudioInput |
Properties
Detailed Description
CaptureSession { id: playMusic audioInput: AudioInput { volume: slider.value } recorder: MediaRecorder { ... } } Slider { id: slider from: 0. to: 1. }
You can use AudioInput together with a QtMultiMedia::CaptureSession to capture audio from an audio input device.
See also Camera and AudioOutput.
Property Documentation
device : AudioDevice |
This property describes the audio device connected to this input.
The device property represents the audio device this input is connected to. This property can be used to select an output device from the QtMultimedia::MediaDevices::audioInputs() list.
muted : bool |
This property holds whether the audio input is muted.
Defaults to false
.
volume : real |
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 QtAudio::convertVolume().
© 2024 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.