Method: StartPlaying


Function:

 

Start playing the wave file from the current position of the current wave file.

     

Parameters:

 

nDevice: The equip to use.

    0: Use the telephony line (modem)

    1: Use the Sound Card
    2: Use speakerphone
    3: Simulate call progress by playing the wave file on the sound card.

 

bGetWaveData: Indicate whether to get wave data when playing.

True: When playing, OnWaveData event will occur each time the play buffer returns. Wave data will be offered in the event. You can use it to draw the data curve.

False: OnWaveData event won't occur while playing. If you are not intending to display wave data, use this value to use less resource.

     

Description:

 

Transmits specified wave file down the line or to the Sound Card. If the nDevice is set 3, it will take the sound in the wave file as ring back tone and fire CallStatus event when some event are "guessed" to have occured.
A text log file with the same name of the current wave file will be created in the same folder of the wave file to give some detailed information about the call progress. This can be helpful to analyze the call progress and find suitable parameters for call progress analysis.

     

Dependencies:

 

The current wave file should exist before the execution of this method . The current wave file can be created by calling OpenWaveFile or NewWaveFile . Stop can be used to stop playing.

     

Events Raised:

 

None

     

Sample Code In Visual Basic:

'Following codes play a wave file when the call is connected.
Private Sub VoiceAngel1_CallStatus(ByVal LineIndex As Long, ByVal EventID As Long, ByVal Param1 As Long, ByVal Param2 As String)
If EventID=CALLSTATUS_CONNECTED then

 VoiceAngel1.CurrentLineIndex = LineIndex

 VoiceAngel1.OpenWaveFile "welcome.wav"

 VoiceAngel1.StartPlaying 0,false

end if

End sub