The information in this article applies to:
SUMMARYRealtime GSM recording using the low-level waveXXX API can be accomplished by filling in an appropriated struct and then calling waveInOpen() with the WAVE_MAPPER option so that the GSM format specified in the struct will be used. MORE INFORMATION
Along with the usual set of low-level waveXXX calls used in recording, and
illustrated in such samples as DDREC, the code fragments shown below
provide information on the steps needed to record audio compressed in the
GSM format.
Declare a handle for memory allocation and a pointer to a GSM610WAVEFORMAT
struct similar to the following:
Allocate and lock memory for the GSM610WAVEFORMAT struct similar to
the following:
Fill in the GSM610WAVEFORMAT struct's members using the values shown in
assigning data to the struct's members. The exception is that pgsmwavefmt-
>wfx.nSamplesPerSec can be a rate other than 8000, in which case
pgsmwavefmt->wfx.nAvgBytesPerSec is computed as (pgsmwavefmt-
>wfx.nSamplesPerSec)/320*65. When using a value for pgsmwavefmt-
>wfx.nSamplesPerSec other than 8000, be sure it is a multiple of the 320
block size, and falls within the limits supported by the sound card. For
example, pgsmwavefmt->wfx.nSamplesPerSec = 9920 is valid because it is a
multiple of 320 and does not fall below the minimum sampling rate of 8000
found on many sound cards:
Call waveInOpen() with the WAVE_MAPPER option, and be sure the third
parameter is just the address of the GSM610WAVEFORMAT struct's
WAVEFORMATEX struct:
Additional query words: 3.51 4.00
Keywords : kbmm MMWave |
Last Reviewed: December 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |