开发者

byte[] to wav file

开发者 https://www.devze.com 2023-01-03 01:11 出处:网络
It would be great if you could tell me how I could save a byte[] to a wav file. Sometimes I need to set different开发者_StackOverflow samplerate, number of bits and channels.

It would be great if you could tell me how I could save a byte[] to a wav file. Sometimes I need to set different开发者_StackOverflow samplerate, number of bits and channels.

Thanks for your help.


You have to set up the wav header data which contains info about sample rate, file size, sample size, stereo or mono etc. Then write the actual audio data. Then you just have to write it out as a binary file with '.wav' file extension.

0

精彩评论

暂无评论...
验证码 换一张
取 消