将8位PCM转换为16位PCM [英] Converting a 8 bit PCM to 16 bit PCM
本文介绍了将8位PCM转换为16位PCM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从此问题开始,我了解了如何解交织我现在的问题是,8位PCM如何解交织并拉伸为16位的值
Starting from this question I was made to understand how to deinterleave the left and right channel of a 16 bit PCM data.
/ p>
My question now is, how will a 8 bit PCM be deinterleaved and "stretched" into a 16 bit value
推荐答案
16位PCM具有基本相同的数据位和最低有效位侧的附加位以指定值和添加精度和细节。然后8位PCM是通常未签名的值,中心点为 0x80
和16位(也适用于更高位)PCM是有符号整数,因此转换公式为:
16-bit PCM has basically the same data bits and additional bits on the least significant bit side to specify the value and add accuracy and detail. Then 8-bit PCM is typically unsigned value with a centerpoint of 0x80
, and 16-bit (also applicable to higher bitnesses) PCM is signed integer, so the conversion formula is:
UINT8 sample8 = ...;
INT16 sample16 = (INT16) (sample8 - 0x80) << 8;
这篇关于将8位PCM转换为16位PCM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文