The DX_XPB data structure contains parameters for the Input/Output Transfer Parameter Block.
Use the I/O Transfer Parameter Block (DX_XPB) data structure to specify the file format, data format, sampling rate, and resolution for the extended play and record functions, dx_playvox( ), dx_recvox( ), dx_playiottdata( ), dx_reciottdata( ), and dx_recwav( ).
The dx_playwav( ) convenience function does not specify a DX_XPB structure because the WAVE file header contains the necessary format information.
The G.726 and GSM voice coders are supported by the I/O functions that use a DX_XPB data structure:
When you play a voice file recorded in GSM or G.726, you must specify the format (this is necessary even for the GSM WAVE files, although you can normally play WAVE files without specifying the format because it is stored in the header).
5.14.2. DX_XPB DefinitionThe typedef for the structure is as follows:
typedef struct {
USHORT wFileFormat; // file format
USHORT wDataFormat; // audio data format
ULONG nSamplesPerSec; // sampling rate
ULONG wBitsPerSample; // bits per sample
} DX_XPB;
5.14.3. DX_XPB Parameters
Parameter |
Description | |
Specifies one of the following audio file formats. Note that this field is ignored by the convenience functions dx_recwav( ), dx_recvox( ), and dx_playvox( ). | ||
FILE_FORMAT_VOX |
Dialogic VOX file format | |
FILE_FORMAT_WAVE |
Microsoft WAVE file format | |
Specifies one of the following data formats: | ||
DATA_FORMAT_DIALOGIC_ADPCM |
4-bit OKI ADPCM (Dialogic registered) | |
DATA_FORMAT_MULAW |
8-bit mu-law PCM | |
DATA_FORMAT_ALAW |
8-bit a-law PCM | |
DATA_FORMAT_PCM |
8-bit Linear PCM | |
DATA_FORMAT_G726 |
G.726 bit-exact coder | |
DATA_FORMAT_GSM610_ |
GSM 6.10 WAVE full-rate coder (Microsoft Windows compatible format)* | |
DATA_FORMAT_GSM610_ |
GSM 6.10 WAVE full-rate coder (TIPHON format)** | |
Specifies one of the following sampling rates: | ||
DRT_6KHZ |
6 KHz sampling rate. | |
DRT_8KHZ |
8 KHz sampling rate. | |
DRT_11KHZ |
11 KHz sampling rate. Note: 11KHz OKI ADPCM is not supported. | |
Specifies the number of bits per sample. This field must be set to 8 for MULAW, ALAW, and PCM. Set the field to 4 for ADPCM. For G.726 and GSM, refer to the following information. | ||
*Microsoft Windows Media Recorder Audio Compression Codec: GSM 6.10 Audio CODEC
**See ETSI (European Telecommications Standards Institute) Technical Specification TS 101 318: Telecommunications and Internet Protocol Harmonization Over Networks; Using GSM speech codecs within ITU-T Recommendation H.323
G.726 Voice Coder SupportThe G.726 voice coder is supported through the following parameters:
FILE_FORMAT_VOX |
||
DATA_FORMAT_G726 |
||
DRT_8KHZ |
||
4 |
(Note: 32 Kb/s.) |
GSM Voice Coder SupportThe GSM voice coder is supported through the following parameters:
FILE_FORMAT_WAVE |
||
DATA_FORMAT_GSM610_MICROSOFT |
||
DATA_FORMAT_GSM610_TIPHON |
||
DRT_8KHZ |
||
0 (can be any numeric value; ignored; recommended setting is 0) |
(Note: 13 Kb/s.) |
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation