AudioRawData PCM parameters

Hi All,
I am accessing raw audio data using AudioRawData::GetBuffer method and dumping it to a file. I want to convert this PCM binary files to wav files using ffmeg command.

fmpeg -f s16le -ar 32k -ac 1 -i file.pcm file.wav

I tried different options but failed to find the correct combination. Can someone point me to the right direction? My question mainly about byte order, resolution and sign of the PCM stream.

Thank You!!!

Finally managed to sort the issue, above command is correct. PCM data is 16 bit signed, mono channel and in little endian order. My issue was in file saving format, it has to be in binary format rather text format.

Thank you!!!

I’m glad to see you were able to figure this out, thanks for sharing the solution!