kumari arpita
2nd August 2012, 11:22
Hi,
I am tried to do recording and playback .its working in the simulator but not in the device .
so please go through my code .Please suggest me what i need to change in my code.
void MyTajweedScr::toggleRecord()
{
QString fileName;
if (capture->state() == QMediaRecorder::StoppedState)
{
if (!outputLocationSet)
// capture->setOutputLocation(generateAudioFilePath());
// QAudioEncoderSettings settings;
QAudioEncoderSettings audioSettings;
capture->setEncodingSettings(audioSettings);
capture->setOutputLocation(QUrl::fromLocalFile(fileName));
capture->record();
}
else
{
capture->stop();
}
}
void MyTajweedScr::setOutputLocation()
{
QString fileName =QFileDialog::getSaveFileName();//"E:/New folder/Project6 - Copy/IQRAV1/song/text.pcm";////;
capture->setOutputLocation(QUrl(fileName));
outputLocationSet = true;
}
void MyTajweedScr::on_Record_tb_clicked()
{
setOutputLocation();
toggleRecord();
}
Regards,
Arpita
I am tried to do recording and playback .its working in the simulator but not in the device .
so please go through my code .Please suggest me what i need to change in my code.
void MyTajweedScr::toggleRecord()
{
QString fileName;
if (capture->state() == QMediaRecorder::StoppedState)
{
if (!outputLocationSet)
// capture->setOutputLocation(generateAudioFilePath());
// QAudioEncoderSettings settings;
QAudioEncoderSettings audioSettings;
capture->setEncodingSettings(audioSettings);
capture->setOutputLocation(QUrl::fromLocalFile(fileName));
capture->record();
}
else
{
capture->stop();
}
}
void MyTajweedScr::setOutputLocation()
{
QString fileName =QFileDialog::getSaveFileName();//"E:/New folder/Project6 - Copy/IQRAV1/song/text.pcm";////;
capture->setOutputLocation(QUrl(fileName));
outputLocationSet = true;
}
void MyTajweedScr::on_Record_tb_clicked()
{
setOutputLocation();
toggleRecord();
}
Regards,
Arpita