Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QAudioRecorder and output file name.

$
0
0
Hi, I’m confused by QAudioRecorder class. I’m trying to record audio, but when I’m saving file, extension are automatically generated (in my case .WAV). isn’t there any way to avoid this? // setup audio recording.     this->audioRecorder = new QAudioRecorder(this);       QStringList codecList = this->audioRecorder->supportedAudioCodecs();     if(!codecList.isEmpty())     {         // save audio codec.         this->audioCodec = codecList[0];           // configure settings.         this->audioSettings.setCodec(this->audioCodec);         this->audioSettings.setQuality(QMultimedia::HighQuality);         this->audioRecorder->setEncodingSettings(this->audioSettings);           this->audioRecorder->setContainerFormat("mp3");         this->audioRecorder->setOutputLocation(QUrl::fromLocalFile(this->savePath + "/test/capture.mp3"));         this->audioRecorder->record();     } in this case, file is saved as “capture.mp3.wav”. how to avoid this anyone please? Regards.

Viewing all articles
Browse latest Browse all 13965

Trending Articles