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

📄 wavec.htm

📁 各种文件格式说明及程序描述
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!doctype html public "-//ietf//dtd html//en">
<html>

<head>
<meta name="premium" content="msdn">
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
<meta name="ms.locale" content="en-us">
<meta name="description" content>
<meta name="generator" content="microsoft frontpage 3.0">
<title>new wave types</title>
</head>

<body bgcolor="#ffffff" link="#003399" vlink="#996699"
background="../jpg/di1.JPG">
<font face="verdana, arial, helvetica" size="2"><!--toolbar_start-->
<!--toolbar_exempt-->
<!--toolbar_end-->
<!--sync_start-->


<p><font size="5" face="arial"><b>new wave types</b></font></p>

<p>&nbsp;</p>

<hr noshade color="#000000">

<blockquote>
<p><font size="2" face="arial">the necessary type, structure and constant defintions are
in <i>mmreg.h</i>.</font></p>
<p><font size="2" face="arial">all newly defined wave types must contain both a fact chunk
and an extended wave format description within the 'fmt' chunk. riff wave files of type
wave_format_pcm need not have the extra chunk nor the extended wave format description.</font></p>
</blockquote>

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

<p><font size="2" face="arial">this chunk stores file dependent information about the
contents of the wave file. it currently specifies the length of the file in samples.</font></p>

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

<blockquote>
<p><font size="2" face="arial">the extended wave format structure is used to defined all
non-pcm format wave data, and is described as follows in the include file <i>mmreg.h</i>:</font></p>
<p><font size="2" face="courier new">/* general extended waveform format structure */</font></p>
<p><font size="2" face="courier new">/* use this for all non pcm formats */</font></p>
<p><font size="2" face="courier new">/* (information common to all formats) */</font></p>
<p><font size="2" face="courier new">typedef struct waveformat_extended_tag {</font></p>
<p><font size="2" face="courier new">word wformattag; /* format type */</font></p>
<p><font size="2" face="courier new">word nchannels; /* number of channels (i.e. mono,
stereo...) */</font></p>
<p><font size="2" face="courier new">dword nsamplespersec; /* sample rate */</font></p>
<p><font size="2" face="courier new">dword navgbytespersec; /* for buffer estimation */</font></p>
<p><font size="2" face="courier new">word nblockalign; /* block size of data */</font></p>
<p><font size="2" face="courier new">word wbitspersample; /* number of bits per sample of
mono data */</font></p>
<p><font size="2" face="courier new">word cbsize; /* the count in bytes of the extra size
*/} waveformatex;</font></p>
</blockquote>

<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">defines the type of wave file.</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, 2
for stereo</font></td>
</tr>
<tr>
<td width="25%"><font size="2" face="arial">nsamplespersec</font></td>
<td width="75%"><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.
this rate is also used by the sample size entry in the fact chunk to determine the length
in time of the data.</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">the block alignment (in bytes) of the data in <!--webbot
bot="htmlmarkup" startspan --><<b><!--webbot bot="htmlmarkup" endspan -->data-<b>ck</b>&gt;.<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 per
channel data. each channel is assumed to have the same sample resolution. if this field is
not needed, then it should be set to zero.img</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 wave format header not including the size of the waveformatex structure.. as an
example, in the ima adpcm format cbsize is calculated as sizeof(imaadpcmwaveformat) -
sizeof(waveformatex) which yeilds two.</font></td>
</tr>
</table>

<p>&nbsp;</p>

<p><font size="2" face="arial"><b>defined wformattags</b></font></p>

<table border="1" cellpadding="7" width="619">
<tr>
<td width="46%"><font size="2" face="arial"><b>expr1</b></font></td>
<td width="27%"><font size="2" face="arial"><b>wave form registration no - hex</b></font></td>
<td width="27%"><font size="2" face="arial"><b>expr2</b></font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_g723_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0014</font></td>
<td width="27%"><font size="2" face="arial">/* antex electronics corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_antex_adpcme</font></td>
<td width="27%"><font size="2" face="arial">0x0033</font></td>
<td width="27%"><font size="2" face="arial">/* antex electronics corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_g721_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0040</font></td>
<td width="27%"><font size="2" face="arial">/* antex electronics corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_aptx</font></td>
<td width="27%"><font size="2" face="arial">0x0025</font></td>
<td width="27%"><font size="2" face="arial">/* audio processing technology */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_audiofile_af36</font></td>
<td width="27%"><font size="2" face="arial">0x0024</font></td>
<td width="27%"><font size="2" face="arial">/* audiofile, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_audiofile_af10</font></td>
<td width="27%"><font size="2" face="arial">0x0026</font></td>
<td width="27%"><font size="2" face="arial">/* audiofile, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_control_res_vqlpc</font></td>
<td width="27%"><font size="2" face="arial">0x0034</font></td>
<td width="27%"><font size="2" face="arial">/* control resources limited */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_control_res_cr10</font></td>
<td width="27%"><font size="2" face="arial">0x0037</font></td>
<td width="27%"><font size="2" face="arial">/* control resources limited */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_creative_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0200</font></td>
<td width="27%"><font size="2" face="arial">/* creative labs, inc */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_dolby_ac2</font></td>
<td width="27%"><font size="2" face="arial">0x0030</font></td>
<td width="27%"><font size="2" face="arial">/* dolby laboratories */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_dspgroup_truespeech</font></td>
<td width="27%"><font size="2" face="arial">0x0022</font></td>
<td width="27%"><font size="2" face="arial">/* dsp group, inc */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_digistd</font></td>
<td width="27%"><font size="2" face="arial">0x0015</font></td>
<td width="27%"><font size="2" face="arial">/* dsp solutions, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_digifix</font></td>
<td width="27%"><font size="2" face="arial">0x0016</font></td>
<td width="27%"><font size="2" face="arial">/* dsp solutions, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_digireal</font></td>
<td width="27%"><font size="2" face="arial">0x0035</font></td>
<td width="27%"><font size="2" face="arial">/* dsp solutions, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_digiadpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0036</font></td>
<td width="27%"><font size="2" face="arial">/* dsp solutions, inc. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_echosc1</font></td>
<td width="27%"><font size="2" face="arial">0x0023</font></td>
<td width="27%"><font size="2" face="arial">/* echo speech corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_fm_towns_snd</font></td>
<td width="27%"><font size="2" face="arial">0x0300</font></td>
<td width="27%"><font size="2" face="arial">/* fujitsu corp. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_ibm_cvsd</font></td>
<td width="27%"><font size="2" face="arial">0x0005</font></td>
<td width="27%"><font size="2" face="arial">/* ibm corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_oligsm</font></td>
<td width="27%"><font size="2" face="arial">0x1000</font></td>
<td width="27%"><font size="2" face="arial">/* ing c. olivetti &amp; c., s.p.a. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_oliadpcm</font></td>
<td width="27%"><font size="2" face="arial">0x1001</font></td>
<td width="27%"><font size="2" face="arial">/* ing c. olivetti &amp; c., s.p.a. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_olicelp</font></td>
<td width="27%"><font size="2" face="arial">0x1002</font></td>
<td width="27%"><font size="2" face="arial">/* ing c. olivetti &amp; c., s.p.a. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_olisbc</font></td>
<td width="27%"><font size="2" face="arial">0x1003</font></td>
<td width="27%"><font size="2" face="arial">/* ing c. olivetti &amp; c., s.p.a. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_oliopr</font></td>
<td width="27%"><font size="2" face="arial">0x1004</font></td>
<td width="27%"><font size="2" face="arial">/* ing c. olivetti &amp; c., s.p.a. */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_ima_adpcm</font></td>
<td width="27%"><font size="2" face="arial">(wave_form_dvi_adpcm)</font></td>
<td width="27%"><font size="2" face="arial">/* intel corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_dvi_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0011</font></td>
<td width="27%"><font size="2" face="arial">/* intel corporation */</font></td>
</tr>
<tr>
<td width="46%"><font size="2" face="arial">#define wave_format_unknown</font></td>
<td width="27%"><font size="2" face="arial">0x0000</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_pcm</font></td>
<td width="27%"><font size="2" face="arial">0x0001</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_adpcm</font></td>
<td width="27%"><font size="2" face="arial">0x0002</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_alaw</font></td>
<td width="27%"><font size="2" face="arial">0x0006</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_mulaw</font></td>
<td width="27%"><font size="2" face="arial">0x0007</font></td>
<td width="27%"><font size="2" face="arial">/* microsoft corporation */</font></td>
</tr>
<tr>

⌨️ 快捷键说明

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