QAudioRecorder ClassThe QAudioRecorder class is used for the recording of audio. More... #include <QAudioRecorder> Inherits: QMediaRecorder. Properties
Public Functions
Public Slots
Signals
Protected Functions
Additional Inherited Members
Detailed DescriptionThe QAudioRecorder class is used for the recording of audio. The QAudioRecorder class is a high level media recording class and contains the same functionality as QMediaRecorder. audioRecorder = new QAudioRecorder; QAudioEncoderSettings audioSettings; audioSettings.setCodec("audio/amr"); audioSettings.setQuality(QtMultimedia::HighQuality); audioRecorder->setEncodingSettings(audioSettings); audioRecorder->setOutputLocation(QUrl::fromLocalFile("test.amr")); audioRecorder->record(); In addition QAudioRecorder provides functionality for selecting the audio input from available audio endpoints. 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 QMediaRecorder and QAudioEndpointSelector. Property Documentation
|
QString | audioInput() const |
void | setAudioInput(const QString & name) |
Notifier signal:
void | audioInputChanged(const QString & name) |
Constructs an audio recorder. The parent is passed to QMediaObject.
Destroys an audio recorder object.
Returns the readable translated description of the audio input device with name.
Returns a list of available audio inputs
Signal is emitted when the available audio inputs change.
Returns the default audio input name.