请问.wav格式音频文件使用的是A律PCM还是u律PCM?

chinalupin 2007-10-18 05:21:40
实在不知道应该去哪个区问,于是就在这问了
...全文
1170 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
welldeep 2010-01-11
  • 打赏
  • 举报
回复
pcm是原始数据原封不动地量化编码(这种量化的位宽大),A律pcm是经过压扩后的非均匀量化(小信号细量化大信号粗量化),U律pcm是经过压扩后的均匀量化(A/U律量化的位宽小)。
chunlai 2007-10-23
  • 打赏
  • 举报
回复
我的理解.一般的都是pcm的格式。
chinalupin 2007-10-19
  • 打赏
  • 举报
回复
我查了下,头文件里定义wav文件的文件头中Format Chunk中的FormatTag字段如下
0x0001 pcm
0x0006 A 律PCM
0x0007 u 律PCM

那么0x0001到底是A律还是u律呢?

附定义:
defined wformattags

expr1 wave form registration no - hex expr2
#define wave_format_g723_adpcm 0x0014 /* antex electronics corporation */
#define wave_format_antex_adpcme 0x0033 /* antex electronics corporation */
#define wave_format_g721_adpcm 0x0040 /* antex electronics corporation */
#define wave_format_aptx 0x0025 /* audio processing technology */
#define wave_format_audiofile_af36 0x0024 /* audiofile, inc. */
#define wave_format_audiofile_af10 0x0026 /* audiofile, inc. */
#define wave_format_control_res_vqlpc 0x0034 /* control resources limited */
#define wave_format_control_res_cr10 0x0037 /* control resources limited */
#define wave_format_creative_adpcm 0x0200 /* creative labs, inc */
#define wave_format_dolby_ac2 0x0030 /* dolby laboratories */
#define wave_format_dspgroup_truespeech 0x0022 /* dsp group, inc */
#define wave_format_digistd 0x0015 /* dsp solutions, inc. */
#define wave_format_digifix 0x0016 /* dsp solutions, inc. */
#define wave_format_digireal 0x0035 /* dsp solutions, inc. */
#define wave_format_digiadpcm 0x0036 /* dsp solutions, inc. */
#define wave_format_echosc1 0x0023 /* echo speech corporation */
#define wave_format_fm_towns_snd 0x0300 /* fujitsu corp. */
#define wave_format_ibm_cvsd 0x0005 /* ibm corporation */
#define wave_format_oligsm 0x1000 /* ing c. olivetti & c., s.p.a. */
#define wave_format_oliadpcm 0x1001 /* ing c. olivetti & c., s.p.a. */
#define wave_format_olicelp 0x1002 /* ing c. olivetti & c., s.p.a. */
#define wave_format_olisbc 0x1003 /* ing c. olivetti & c., s.p.a. */
#define wave_format_oliopr 0x1004 /* ing c. olivetti & c., s.p.a. */
#define wave_format_ima_adpcm (wave_form_dvi_adpcm) /* intel corporation */
#define wave_format_dvi_adpcm 0x0011 /* intel corporation */
#define wave_format_unknown 0x0000 /* microsoft corporation */
#define wave_format_pcm 0x0001 /* microsoft corporation */
#define wave_format_adpcm 0x0002 /* microsoft corporation */
#define wave_format_alaw 0x0006 /* microsoft corporation */
#define wave_format_mulaw 0x0007 /* microsoft corporation */
#define wave_format_gsm610 0x0031 /* microsoft corporation */
#define wave_format_mpeg 0x0050 /* microsoft corporation */
#define wave_format_nms_vbxadpcm 0x0038 /* natural microsystems */
#define wave_format_oki_adpcm 0x0010 /* oki */
#define wave_format_sierra_adpcm 0x0013 /* sierra semiconductor corp */
#define wave_format_sonarc 0x0021 /* speech compression */
#define wave_format_mediaspace_adpcm 0x0012 /* videologic */
#define wave_format_yamaha_adpcm 0x0020 /* yamaha corporation of america */
bluesen 2007-10-19
  • 打赏
  • 举报
回复
1的线性PCM格式嘛,6是A率,7是U率,不是都很清楚了吗。
bluesen 2007-10-18
  • 打赏
  • 举报
回复
打开头文件mmreg.h、mmsystem.h,里面有定义:
#define WAVE_FORMAT_ALAW 0x0006 /* Microsoft Corporation */
#define WAVE_FORMAT_MULAW 0x0007 /* Microsoft Corporation */

chinalupin 2007-10-18
  • 打赏
  • 举报
回复
您能不能再讲详细点,那个字段是不是FarmatTag?如果是,那么它的哪个值对应A律,哪个值对应u律
bluesen 2007-10-18
  • 打赏
  • 举报
回复
.wav文件有文件头,在文件头里面有个字段指示编码格式。
到win32的帮助文件看看WAVEFORMATEX结构就知道了。

16,548

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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