How to solve problem for recording with QMediaRecorder?
Hello everyone,
I'm recording an audio file with extension(.mp3/.wav/.pcm). I'm using following code.
Code:
QAudioCaptureSource *audiosource = new QAudioCaptureSource(this);
QMediaRecorder *capture = new QMediaRecorder(audiosource, this);
capture
->setOutputLocation
(QUrl(fileName
));
outputLocationSet = true;
capture->record();
Now, while running on simulator, it is working fine. But on device the is storing the audio file with ".amr" extension automatically and while playing back it shows that the file is corrupted.
Please check the code snippet and rectify my logic.
Thank you in advance for your support.
Satya.
Re: How to solve problem for recording with QMediaRecorder?
Did you check what is supported by QMediaRecorder on your device?