⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wavec.htm

📁 各种文件格式说明及程序描述
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<td width="46%"><font size="2" face="arial">#define wave_format_gsm610</font></td>
<td width="27%"><font size="2" face="arial">0x0031</font></td>
<td width="27%"><font size="2" face="arial">/* microsoft corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_mpeg</font></td>
<td width="27%"><font size="2" face="arial">0x0050</font></td>
<td width="27%"><font size="2" face="arial">/* microsoft corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_nms_vbxadpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0038</font></td>
<td width="27%"><font size="2" face="arial">/* natural microsystems */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_oki_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0010</font></td>
<td width="27%"><font size="2" face="arial">/* oki */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_sierra_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0013</font></td>
<td width="27%"><font size="2" face="arial">/* sierra semiconductor corp */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_sonarc</font></td>
<td width="27%"><font size="2" face="arial">0x0021</font></td>
<td width="27%"><font size="2" face="arial">/* speech compression */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_mediaspace_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0012</font></td>
<td width="27%"><font size="2" face="arial">/* videologic */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_yamaha_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0020</font></td>
<td width="27%"><font size="2" face="arial">/* yamaha corporation of america */</font></td>
</tr>
</table>

<p><font size="2" face="arial"><b>unknown wave type</b></font></p>

<blockquote>
<p><font size="2" face="arial">added: 05/01/92<br>
author: microsoft</font></p>
</blockquote>

<p><font size="2" face="arial"><b>fact chunk</b></font></p>

<p><font size="2" face="arial">this chunk is required for all wave formats other than
wave_format_pcm. it stores file dependent information about the contents of the wave data.
it currently specifies the time length of the data in samples.</font></p>

<p><font size="2" face="arial"><b>wave format header</b></font></p>

<blockquote>
<p><font size="2" face="arial">changed as of september 5, 1993: this wave format will not
be defined. for development purposes, do not use 0x0000. instead, use 0xffff until an id
has been obtained. </font></p>
</blockquote>

<p><font size="2" face="arial"><b># define wave_format_unknown (0x0000)</b></font></p>

<table border="1" cellpadding="7" width="576">
<tr>
<td width="25%"><font size="2" face="arial">wformattag</font></td>
<td width="75%"><font size="2" face="arial">this must be set to wave_format_unknown.</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">nchannels</font></td>
<td width="75%"><font size="2" face="arial">number of channels in the wave.(1 for mono)</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">nsamplespersec</font></td>
<td width="75%"><font size="2" face="arial">frequency the of the sample rate of wave file.
</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">navgbytespersec</font></td>
<td width="75%"><font size="2" face="arial">average data rate.<br>
playback software can estimate the buffer size using the <!--webbot bot="htmlmarkup"
startspan --><<b><!--webbot bot="htmlmarkup" endspan -->navgbytespersec&gt; value.</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">nblockalign</font></td>
<td width="75%"><font size="2" face="arial">block alignment of the data.<br>
playback software needs to process a multiple of <!--webbot bot="htmlmarkup" startspan --><<b><!--webbot
bot="htmlmarkup" endspan -->nblockalign&gt; bytes of data at a time, so that the value of <!--webbot
bot="htmlmarkup" startspan --><<b><!--webbot bot="htmlmarkup" endspan -->nblockalign&gt; can
be used for buffer alignment.</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">wbitspersample</font></td>
<td width="75%"><font size="2" face="arial">this is the number of bits per sample of data.</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">cbsize</font></td>
<td width="75%"><font size="2" face="arial">the size in bytes of the extra information in
the extended wave 'fmt' header.</font></td>
</tr>
</table>

<p><font size="2" face="arial"><b>microsoft adpcm</b></font></p>

<blockquote>
<p><font size="2" face="arial">added 05/01/92<br>
author: microsoft</font></p>
</blockquote>

<p><font size="2" face="arial"><b>fact chunk</b></font></p>

<p><font size="2" face="arial">this chunk is required for all wave formats other than
wave_format_pcm. it stores file dependent information about the contents of the wave data.
it currently specifies the time length of the data in samples.</font></p>

<p><font size="2" face="arial"><b>wave format header</b></font></p>

<p><font size="2" face="arial"><b># define wave_format_adpcm (0x0002)</b></font></p>

<blockquote>
<p><font size="2" face="courier new">typedef struct adpcmcoef_tag {</font></p>
<p><font size="2" face="courier new">int icoef1;</font></p>
<p><font size="2" face="courier new">int icoef2;</font></p>
<p><font size="2" face="courier new">} adpcmcoefset;</font></p>
<p>&nbsp;</p>
<p><font size="2" face="courier new">typedef struct adpcmwaveformat_tag {</font></p>
<p><font size="2" face="courier new">waveformatex wfxx;</font></p>
<p><font size="2" face="courier new">word wsamplesperblock;</font></p>
<p><font size="2" face="courier new">word wnumcoef;</font></p>
<p><font size="2" face="courier new">adpcmcoefset acoeff[wnumcoef];</font></p>
<p><font size="2" face="courier new">} adpcmwaveformat;</font></p>
</blockquote>

<table border="1" cellpadding="7" width="552">
<tr>
<td width="22%"><font size="2" face="arial">wformattag</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">this must be set to
wave_format_adpcm.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">nchannels</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">number of channels in the wave, 1
for mono, 2 for stereo.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">nsamplespersec</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">frequency of the sample rate of
the wave file. this should be 11025, 22050, or 44100. other sample rates are allowed, but
not encouraged.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">navgbytespersec</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">average data rate.
((nsamplespersec / nsamplesperblock) * nblockalign).<br>
playback software can estimate the buffer size using the <navgbytespersec> value.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">nblockalign</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">the block alignment (in bytes) of
the data in <data-ck>.</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="3" width="35%"><font size="2" face="arial">nsamplespersec x channels </font></td>
<td width="43%"><font size="2" face="arial">nblockalign</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="3" width="35%"><font size="2" face="arial">8k</font></td>
<td width="43%"><font size="2" face="arial">256</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="3" width="35%"><font size="2" face="arial">11k</font></td>
<td width="43%"><font size="2" face="arial">256</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="3" width="35%"><font size="2" face="arial">22k</font></td>
<td width="43%"><font size="2" face="arial">512</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="3" width="35%"><font size="2" face="arial">44k</font></td>
<td width="43%"><font size="2" face="arial">1024</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td colspan="4" width="78%"><font size="2" face="arial">playback software needs to process
a multiple of <!--webbot bot="htmlmarkup" startspan --><<b><!--webbot bot="htmlmarkup"
endspan -->nblockalign&gt; bytes of data at a time, so that the value of <!--webbot
bot="htmlmarkup" startspan --><<b><!--webbot bot="htmlmarkup" endspan -->nblockalign&gt; can
be used for buffer alignment.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">wbitspersample</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">this is the number of bits per
sample of adpcm. currently only 4 bits per sample is defined. other values are reserved.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">cbsize</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">the size in bytes of the extended
information after the waveformatex structure.<br>
for the standard wave_format_adpcm using the standard seven coefficient pairs, this is 32.
if extra coefficients are added, then this value will increase.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">nsamplesperblock</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">count of number of samples per
block. <br>
(((nblockalign - (7 * nchannels)) * 8) / (wbitspersample * nchannels)) + 2.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">nnumcoef</font></td>
<td colspan="4" width="78%"><font size="2" face="arial">count of the number of coefficient
sets defined in acoef.</font></td>
</tr>
<tr>
<td width="22%"><font size="2" face="arial">acoeff </font></td>
<td colspan="4" width="78%"><font size="2" face="arial">these are the coefficients used by
the wave to play. they may be interpreted as fixed point 8.8 signed values. currently
there are 7 preset coefficient sets. they must appear in the following order.</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">coef set</font></td>
<td width="9%"><font size="2" face="arial">coef1</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">coef2</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">0</font></td>
<td width="9%"><font size="2" face="arial">256</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">0</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">1</font></td>
<td width="9%"><font size="2" face="arial">512</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">-256</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">2</font></td>
<td width="9%"><font size="2" face="arial">0</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">0</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">3</font></td>
<td width="9%"><font size="2" face="arial">192</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">64</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">4</font></td>
<td width="9%"><font size="2" face="arial">240</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">0</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="17%"><font size="2" face="arial">5</font></td>
<td width="9%"><font size="2" face="arial">460</font></td>
<td colspan="2" width="52%"><font size="2" face="arial">-208</font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -