有谁知道使用waveIn***的windows音频API采样的得到的数据怎么个解释吗

cjjc 2003-08-20 09:38:58
有谁知道使用waveIn***的windows音频API采样的得到的数据怎么个解释吗
我使用了16位,双通道,44.1Khz来进行采样,采样后得到了指向采样数据的char类型的数据,我现在要把它转化成16位的整数,也就是要把两个char合成一个16位的有符合数,不知低8位和高8位分别对应那个char,哪位知道的能否指点一二呢
...全文
48 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zero100 2003-09-05
  • 打赏
  • 举报
回复
我的方式是:(short*)buffer;不知可否?
DarthVader 2003-09-05
  • 打赏
  • 举报
回复
Below is my concept about wave blending.:)

Formula: data1 * alpha + data2 * ( 1 - alpha )

Alpha is a value between 0 and 1.It can control the power-ratio of background and foreground sounds(the two chars you get from samples)
You can also use fixed calculation: assume that alpha has 256 levels,
then the blending equation is:
new_data = ( data1 * alpha + data2 * ( 255 - alpha ) )>>8
Note:(>>8 == /256)

2,542

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧