need help understanding data section of wav file

烈酒焚心 提交于 2019-12-11 13:59:10

问题


I was reading THIS TUTORIAL on wav files and I have some confusions.
Suppose I use PCM_16_BIT as my encoding format. So this should mean each of my sound samples need 16 bits to represent them shouldn't it?
But in this tutorial, the second figure shows 4 bytes as one sample. Why is that? I suppose because it is trying to show the format for a stereo recorded wav file, but what if I have a mono recorded wav file? Are the left and right channel values equal in this case, or one of the channel values is 0? How does it work?


回答1:


Yes, for 16bit stereo you need 4 bytes. For mono, you just need two bytes for 16bit PCM. Check this out:

http://www.codeproject.com/Articles/501521/How-to-convert-between-most-audio-formats-in-NET

Also read here:

http://wiki.multimedia.cx/index.php?title=PCM



来源:https://stackoverflow.com/questions/18375508/need-help-understanding-data-section-of-wav-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!