Previous PageTable Of Contents../index.htmlIndexNext Page

dx_bldtngen( )

Description | Cautions | Example | Errors | See Also

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 ms units

Returns:

none

Includes:

srllib.h
dxxxlib.h

Category:

Global Tone Generation

Top Of PageDescription

The dx_bldtngen( ) function is a convenience function that defines a tone for generation by setting up the tone generation template (TN_GEN) 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 dx_playtone( ) function to generate the tone.

Parameter

Description

tngenp

points to the TN_GEN 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.

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.

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.

duration

specifies the duration of the tone in 10 ms units. A value of -1 specifies infinite duration (the tone will only terminate upon an external terminating condition).

Generating a tone with a high frequency component (approximately 700 Hz or higher) will cause the amplitude of the tone to increase. The increase will be approximately 1 dB at 1000 Hz. Also, the amplitude of the tone will increase by 2 dB if an analog (loop start) device is used, such as the LSI/120 board or the analog device on a D/4xD, D/41E, D/41ESC, or D/160SC-LS board.

Top Of PageCautions

None.

Top Of PageExample

Top Of PageErrors

None.

Top Of PageSee Also

Generating Tones:

R2MF functions:


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002