I have a byte array with IMA ADCPM data stored, readed from a special file format. I would like to know how I could write it in a .WAV file. The rate/frequency is 32000 Hz and only has 1 channel (mono).
I'm not experimented in writing audio files and I don't know how to do it.
Thanks!
I can tell you how to write a wav file - that's not too hard. But I don't think it will work as you might expect.
If you've just opened the File as a byte[] and try to write that to a WAV, you're just going to get a lot of horrible noise, and not the sound you expect. The sound format IMA is a compressed sound format - and you'd need to know how to un-compress that stream into 'raw' sound. This 'raw' sound is what a WAV file is. it's just a header that describes what the raw data represents - such as playback speed and bytes per sample. https://alvas.net/ can handle this for you, saving you the hard work.
If however, you really want to try and write your own decoder, have a look here: https://wiki.multimedia.cx/index.php?title=IMA_ADPCM
I can't find the original source I used (many years ago) for creating a WAV file, but here's an old blog that seems to contain enough information.
https://m8051.blogspot.com/2010/08/wave-sound-file-in-pcm-format-long-lost.html
Good luck!