Intel 05-1832-002 User Manual
![Intel](https://files.manualsbrain.com/attachments/5a71b1e7f60391972dadeef20435931cbf4621a5/common/fit/150/50/86c99b5f14aeb2708e9a9e1b5305af4ccf882c1af0155dad25413c2ed84e/brand_logo.png)
148
Voice API for Windows Operating Systems Library Reference — November 2003
dx_bldtngen( ) — define a tone for generation
dx_bldtngen( )
define a tone for generation
!
!
!
! Description
The dx_bldtngen( ) function is a convenience function that defines a tone for generation by setting
up the tone generation template (
up the tone generation template (
) and assigning specified values to the appropriate fields.
The tone generation template is placed in the user’s return buffer and can then be used by the
function to generate the tone.
For more information about Global Tone Generation, see the Voice API Programming Guide.
Name:
void dx_bldtngen(tngenp, freq1, freq2, ampl1, ampl2, duration)
Inputs:
TN_GEN *tngenp
•
pointer to tone generation structure
unsigned short freq1
•
frequency of tone 1 in Hz
unsigned short freq2
•
frequency of tone 2 in Hz
short ampl1
•
amplitude of tone 1 in dB
short ampl2
•
amplitude of tone 2 in dB
short duration
•
duration of tone in 10 msec units
Returns:
none
Includes:
srllib.h
dxxxlib.h
dxxxlib.h
Category:
Global Tone Generation
Mode:
synchronous
Platform:
DM3, Springware
Parameter
Description
tngenp
points to the
data structure where the tone generation template is
output
freq1
specifies the frequency of tone 1 in Hz. Valid range is 200 to 3000 Hz.
freq2
specifies the frequency of tone 2 in Hz. Valid range is 200 to 3000 Hz. To
define a single tone, set freq1 to the desired frequency and set freq2 to 0.
define a single tone, set freq1 to the desired frequency and set freq2 to 0.
ampl1
specifies the amplitude of tone 1 in dB. Valid range is 0 to -40 dB. Calling this
function with ampl1 set to R2_DEFAMPL will set the amplitude to -10 dB.
function with ampl1 set to R2_DEFAMPL will set the amplitude to -10 dB.
ampl2
specifies the amplitude of tone 2 in dB. Valid range is 0 to -40 dB. Calling this
function with ampl2 set to R2_DEFAMPL will set the amplitude to -10 dB.
function with ampl2 set to R2_DEFAMPL will set the amplitude to -10 dB.
duration
specifies the duration of the tone in 10 msec units. A value of -1 specifies
infinite duration (the tone will only terminate upon an external terminating
condition).
infinite duration (the tone will only terminate upon an external terminating
condition).