WAVEFORMATEX 格式说明
来源:互联网 发布:wlan流量和数据流量 编辑:程序博客网 时间:2024/06/04 19:48
WAVEFORMATEX
The WAVEFORMATEX structure specifies the data format of a wave audio stream.
WAVEFORMATEX 为波形音频流格式的数据结构
typedef struct
{
WORD wFormatTag;
WORD nChannels;
DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec;
WORD nBlockAlign;
WORD wBitsPerSample;
WORD cbSize;
} WAVEFORMATEX; *PWAVEFORMATEX;
- wFormatTag
- Specifies the waveform audio format type. For more information, see the followingComments section.
- 设置波形声音的格式,更多的信息请参考说明部分。
- nChannels
- Specifies the number of channels of audio data. For monophonic audio, set this member to 1. For stereo, set this member to 2.
- 设置音频文件的通道数量,对于单声道的声音,此此值为1。对于立体声,此值为2.
- nSamplesPerSec
- Specifies the sample frequency at which each channel should be played or recorded. IfwFormatTag = WAVE_FORMAT_PCM, then common values fornSamplesPerSec are 8.0 kHz, 11.025 kHz, 22.05 kHz, and 44.1 kHz. For example, to specify a sample frequency of 11.025 kHz, setnSamplesPerSec to 11025. For non-PCM formats, this member should be computed according to the manufacturer's specification of the format tag.
- 设置每个声道播放和记录时的样本频率。
- 如果wFormatTag = WAVE_FORMAT_PCM,那么nSamplesPerSec通常为8.0 kHz, 11.025 kHz, 22.05 kHz和44.1 kHz。例如对于采样率为11.025 kHz的音频,nSamplesPerSec 将被设为11025。对于非PCM格式的,请根据厂商的设定计算。
- nAvgBytesPerSec
- Specifies the required average data transfer rate in bytes per second. This value is useful for estimating buffer size.
- 设置请求的平均数据传输率,单位byte/s。这个值对于创建缓冲大小是很有用的。
- nBlockAlign
- Specifies the block alignment in bytes. The block alignment is the size of the minimum atomic unit of data for thewFormatTag format type. IfwFormatTag = WAVE_FORMAT_PCM, setnBlockAlign to (nChannels*wBitsPerSample)/8, which is the size of a single audio frame. For non-PCM formats, this member should be computed according to the manufacturer's specification for the format tag.
Playback and record software should process a multiple of nBlockAlign bytes of data at a time. Data written to and read from a device should always start at the beginning of a block.
以字节为单位设置块对齐。块对齐是指最小数据的原子大小。如果wFormatTag = WAVE_FORMAT_PCM,nBlockAlign 为(nChannels*wBitsPerSample)/8。对于非PCM格式请根据厂商的说明计算。
- wBitsPerSample
- Specifies the number of bits per sample for the format type specified by wFormatTag. If wFormatTag = WAVE_FORMAT_PCM, then wBitsPerSample should be set to either 8 or 16. For non-PCM formats, this member should be set according to the manufacturer's specification for the format tag. Some compression schemes cannot define a value forwBitsPerSample. In this case, set wBitsPerSample to zero.
- 根据wFormatTag的类型设置每个样本的位深(即每次采样样本的大小,以bit为单位)。如果wFormatTag = WAVE_FORMAT_PCM,此值应该设为8或16,对于非PCM格式,根据厂商的说明设置。一些压缩的架构不能设置此值,此时wBitsPerSample应该为零。
- cbSize
- Specifies the size, in bytes, of extra format information appended to the end of the WAVEFORMATEX structure. This information can be used by non-PCM formats to store extra attributes for thewFormatTag. If no extra information is required by the wFormatTag, this member must be set to zero. For WAVE_FORMAT_PCM formats, this member is ignored.
- 额外信息的大小,以字节为单位,额外信息添加在WAVEFORMATEX结构的结尾。这个信息可以作为非PCM格式的wFormatTag额外属性,如果wFormatTag不需要额外的信息,此值必需为0,对于PCM格式此值被忽略。
Members
- WAVEFORMATEX 格式说明
- WAVEFORMATEX 格式说明
- WAVEFORMATEX 格式说明
- WAVEFORMATEX格式说明
- WAVEFORMATEX 格式说明
- WAVEFORMATEX结构的说明
- WAVEFORMATEX结构的说明
- WAVEFORMATEX
- WAVEFORMATEX
- WAVEFORMATEX
- WAVEFORMATEX wFormatTag
- WAVEFORMATEX 解析
- AVI文件格式-WAVEFORMATEX
- AVI文件格式-WAVEFORMATEX
- GeoTIFF格式说明
- String.Format格式说明
- GUID格式符说明
- CHM格式说明
- Cisco Catalyst 3560-E配置说明(下)
- ASP.NET中Image控件不能自动刷新
- C#向前台页面中输出JS代码
- 'log4j:ERROR LogMananger.repositorySelector was null'解决方法
- HDU 4293--Groups
- WAVEFORMATEX 格式说明
- vc工程配置积累
- GZIP简单压缩与解压
- [OK]ecshop二次开发:商品分类添加图片显示功能
- 【翻译】Windows下文件的命名
- android 获取联系人代码样例
- iPhone开发 地图线路
- oracle with子句
- 大型网站系统架构分析