Hello everyone,
I'm recording an audio file with extension(.mp3/.wav/.pcm). I'm using following code.
QAudioCaptureSource *audiosource = new QAudioCaptureSource(this);
QMediaRecorder *capture = new QMediaRecorder(audiosource, this);
capture
->setOutputLocation
(QUrl(fileName
));
outputLocationSet = true;
capture->record();
QAudioCaptureSource *audiosource = new QAudioCaptureSource(this);
QMediaRecorder *capture = new QMediaRecorder(audiosource, this);
QString fileName =QFileDialog::getSaveFileName();
capture->setOutputLocation(QUrl(fileName));
outputLocationSet = true;
capture->record();
To copy to clipboard, switch view to plain text mode
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.
Bookmarks