satya@sipl
19th July 2012, 12:52
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);
QString fileName =QFileDialog::getSaveFileName();
capture->setOutputLocation(QUrl(fileName));
outputLocationSet = true;
capture->record();
Now, while running on simulator, it is working fine. But on device the
capture 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.
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);
QString fileName =QFileDialog::getSaveFileName();
capture->setOutputLocation(QUrl(fileName));
outputLocationSet = true;
capture->record();
Now, while running on simulator, it is working fine. But on device the
capture 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.