CTI32 Class Library

cti.PlayTone Method 

Plays a customized tone out the voice resource.

[Visual Basic]
Public Shared Function PlayTone( _
   ByVal chdev As Integer, _
   ByVal freq1 As Integer, _
   ByVal freq2 As Integer, _
   ByVal amp1 As Integer, _
   ByVal amp2 As Integer, _
   ByVal duration As Integer, _
   ByVal TermDigits As String, _
   ByVal ClearDigitsBuffer As Integer _
) As TermCode
[C#]
public static TermCode PlayTone(
   int chdev,
   int freq1,
   int freq2,
   int amp1,
   int amp2,
   int duration,
   string TermDigits,
   int ClearDigitsBuffer
);

Parameters

chdev
Voice channel device
freq1
1st Frequency in Hz 200 to 2000
freq2
2nd Frequency in Hz 200 to 2000
amp1
1st Amplitude in dB (-40 to 0 dB)
amp2
2nd Amplitude in dB (-40 to 0 db)
duration
Duration in 10 ms units. (100 = 1 second)
TermDigits
This is a string of digits that will terminate playing the file if pressed. Valid digits are 1-9 and the # and * key. For example, if you wished to terminate on the 1 key OR the # key, send the string "1#". If you pass the string "ANY", playing will be terminated upon any press of a key. Pass the empty string ("") if you wish for the file NOT to be interrupted.
ClearDigitsBuffer
1 for TRUE or 0 for FALSE. If true, any digits sitting in the board's digit buffer are cleared before getting the new digits. Usually this is set to TRUE.

Return Value

TermCode

See Also

cti Class | CTI32NetLib Namespace