[Android-development] Recording a WAV file

Jason H jhihn at gmx.com
Wed Dec 11 19:36:32 CET 2019


Tracking it down: https://code.woboq.org/qt5/qtmultimedia/src/plugins/android/src/mediacapture/qandroidaudioencodersettingscontrol.cpp.html
Has an explicit list.


However according to Android:
https://developer.android.com/guide/topics/media/media-formats

Wav is REQUIRED for android 8.1 (And I'm sure eariler versions)



> Sent: Wednesday, December 11, 2019 at 12:29 PM
> From: "Jason H" <jhihn at gmx.com>
> To: "android development" <android-development at lists.qt-project.org>
> Subject: [Android-development] Recording a WAV file
>
> I previously was able to use QAudioRecorder and I am pretty sure I was able to record wav (riff) files.
> However I recently tried it and QAudioRecorder insists on giving me a MP4 so much so it even tacks on .mp4 to the file name I tell it to record.
>
> I was hoping there was a way I could in Qt record a wav, because I do analysis on it and using a lossy codec is 1) not ideal 2) harder than opening a file and reading raw samples.
>
> Does anyone know of a way to get wav?
> QAudioRecorer reports . (Samsung S9 (G960U)):
>  supportedContainers ("mp4", "3gp", "amr", "awb")
>  supportedCodecs ("amr-nb", "amr-wb", "aac")
>
> I was pretty sure wav used to me in that list.
>
> I am using:
> audioSettings.setSampleRate(44100);
> audioSettings.setChannelCount(1);
> audioSettings.setQuality(QMultimedia::HighQuality);
> audioSettings.setCodec("audio/wav");
>
> audioRecorder.setEncodingSettings(audioSettings);
>
> Help?
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> https://lists.qt-project.org/listinfo/android-development
>


More information about the Android-development mailing list