The TN_GEN data structure contains parameters for the Tone Generation Template.
The tone generation template defines the frequency, amplitude, and duration of a single or dual frequency tone to be played. You can use the convenience function dx_bldtngen( ) to set up the structure for the user-defined tone.
Use dx_playtone( ) to play the tone.
5.15.2. TN_GEN DefinitionThe typedef for the structure is as follows:
typedef struct {
unsigned short tg_dflag; /* Dual Tone - 1, Single Tone - 0 */
unsigned short tg_freq1; /* Frequency for Tone 1 (HZ) */
unsigned short tg_freq2; /* Frequency for Tone 2 (HZ) */
short tg_ampl1; /* Amplitude for Tone 1 (dB) */
short tg_ampl2; /* Amplitude for Tone 2 (dB) */
short tg_dur; /* Duration of the Generated Tone */
/* Units = 10ms */
} TN_GEN;
5.15.3. TN_GEN Parameters
Parameter |
Description | |
Tone Generation Dual Tone Flag: Flag indicating single or dual tone definition. If single, the values in tg_freq2 and tg_ampl2 will be ignored. | ||
TN_SINGLE |
| |
TN_DUAL |
| |
Specifies the frequency for tone 1 in Hz (range 200 to 2000 Hz). | ||
Specifies the frequency for tone 2 in Hz (range 200 to 2000 Hz). | ||
Specifies the amplitude for tone 1 in dB (range -40 to 0 dB). | ||
Specifies the amplitude for tone 2 in dB (range -40 to 0 dB). | ||
tg_dur |
Specifies the duration of the tone in 10 ms units (-1 = infinite duration). | |
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation