(Page 21 of 41 in this chapter) Version
typedef struct
{
DWORD size;
WORD format;
WORD nchannels;
DWORD samplespersec;
DWORD datarate;
WORD blocksize;
DWORD bitspersample;
} VCE_ WAVE_INFO;
/* Display contents of wave info table */
/* Sample output:
*
* Encoding Wave Type M/S SampleRate DataRate Block Bits
* ----------------------------------------------------------
* 1 56 M 8000 2100 42 2
*/
void myShowWaveInfo (CTAHD ctahd)
{
unsigned encoding;
VCE_WAVE_INFO waveinfo;
printf("Encoding Wave Type M/S" " SampleRate DataRate Block Bits\n");
printf("------------------------" "---------------------------------\n");
for (encoding = 0; encoding < 256; encoding ++)
{
if (vceGetWaveInfo(ctahd,encoding,&waveinfo,sizeof waveinfo)!= SUCCESS)
continue;
printf(" %3d %3d %c" " %6d %6d %3d %2d\n",
encoding,
waveinfo.format,
waveinfo.nchannels == 1 ? 'M' : 'S',
waveinfo.samplespersec,
waveinfo.datarate,
waveinfo.blocksize,
waveinfo.bitspersample); }
}
Encoding Wave Type M/S SampleRate DataRate Block Bits
----------------------------------------------------------
1 56 M 8000 2100 42 2
2 56 M 8000 3100 62 3
3 56 M 8000 4100 82 4
4 56 M 8000 8200 162 8
10 7 M 8000 8000 1 8
11 6 M 8000 8000 1 8
13 1 M 8000 16000 2 16
14 23 M 6000 3000 1 4
15 23 M 8000 4000 1 4
16 1 M 11025 11025 1 8
17 1 M 11025 22050 2 16
22 17 M 6000 6600 244 4
23 17 M 8000 8800 244 4
(Page 21 of 41 in this chapter) Version