QAudioRecorder¶
The
QAudioRecorder
class is used for the recording of audio. More…
Synopsis¶
Functions¶
def
audioInput
()def
audioInputDescription
(name)def
audioInputs
()def
defaultAudioInput
()
Slots¶
def
setAudioInput
(name)
Signals¶
def
audioInputChanged
(name)def
availableAudioInputsChanged
()
Detailed Description¶
The
QAudioRecorder
class is a high level media recording class and contains the same functionality asQMediaRecorder
.audioRecorder = new QAudioRecorder; QAudioEncoderSettings audioSettings; audioSettings.setCodec("audio/amr"); audioSettings.setQuality(QMultimedia::HighQuality); audioRecorder->setEncodingSettings(audioSettings); audioRecorder->setOutputLocation(QUrl::fromLocalFile("test.amr")); audioRecorder->record();In addition
QAudioRecorder
provides functionality for selecting the audio input.QStringList inputs = audioRecorder->audioInputs(); QString selectedInput = audioRecorder->defaultAudioInput(); foreach (QString input, inputs) { QString description = audioRecorder->audioInputDescription(input); // show descriptions to user and allow selection selectedInput = input; } audioRecorder->setAudioInput(selectedInput);The Audio Recorder Example shows how to use this class in more detail.
See also
-
class
QAudioRecorder
([parent=None])¶ - param parent
QObject
Constructs an audio recorder. The
parent
is passed toQMediaObject
.
-
PySide2.QtMultimedia.QAudioRecorder.
audioInput
()¶ - Return type
unicode
Returns the active audio input name.
See also
-
PySide2.QtMultimedia.QAudioRecorder.
audioInputChanged
(name)¶ - Parameters
name – unicode
-
PySide2.QtMultimedia.QAudioRecorder.
audioInputDescription
(name)¶ - Parameters
name – unicode
- Return type
unicode
Returns the readable translated description of the audio input device with
name
.
-
PySide2.QtMultimedia.QAudioRecorder.
audioInputs
()¶ - Return type
list of strings
Returns a list of available audio inputs
-
PySide2.QtMultimedia.QAudioRecorder.
availableAudioInputsChanged
()¶
-
PySide2.QtMultimedia.QAudioRecorder.
defaultAudioInput
()¶ - Return type
unicode
Returns the default audio input name.
-
PySide2.QtMultimedia.QAudioRecorder.
setAudioInput
(name)¶ - Parameters
name – unicode
Set the active audio input to
name
.See also
© 2018 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.