|TAPIEx ActiveX Control v3.6|
The PlaybackFile method playback wave file (or wave/out Redirection ). [asynchronous]
Function PlaybackFile( FileName As String ) As Boolean
It can also be the specific string represent wave/out Redirection
|ACCESS:WAVEOUTBUFFER||Users want to access the wave out buffer. It means that users can send the RAW PCM wave buffer data to the wave/out device. OnWaveOutBuffer() (For how to use it, please read the "Access wave/out buffer" demo for VB or Delphi)|
|TTY:SEND?[Text that want to sent]||Generate the TTY Baudot signal. (For detail about it, please read the "TTY/TDD Send/Receive" Demo.|
|DTMF:GENERATE?[DTMF keys]||Generate the DTMF key by software.|
|CUSTOM:TONES?[freq1|freq2|..|freqn@duration,...]||Generate a serial of custom tones follow the pattern like [freq@duration] by software, for more information, please see the example below.|
|REDIRECT:FROMWAVEIN||Redirect the wave stream from the recording on the fly. It must be used pair of Record("ACCESS:WAVEINBUFFER"). For more info, please refer the sample code below or the "Redirect Wave Stream" demo sample.|
|ERR_FILENOTEXIST||Play back wave file not exist.|
|ERR_NOTCONNECTED||Call not connected, this method can not perform.|
|ERR_PLAYBACKBUSY||Terminal is busy, Playing!|
|ERR_RECORDBUSY||Terminal is busy, Recording!|
|ERR_CANNOTPLAYBACKFILE||Can not play back the file through the device, either files have already been damaged , or the file format is incorrect.|
We had added the playlist function to the playbackfile() method , so all the playbackfile() request will accept, and the wave files in the playlist will play one by one.
Using StopPlayback() stop the playback and clear the all the items in the playlist.
.PlaybackFile("ACCESS:WAVEOUTBUFFER") .PlaybackFile("TTY:SEND?This is a test.") ' Send TTY signal .PlaybackFile("DTMF:GENERATE?0123456789*#") ' send DTMF keys .PlaybackFile("CUSTOM:TONES?350|440@8000ms,0@400ms") ' send custom tones, multi-frequency tone 350Hz and 440ms (US dial tone) follow by 400ms silence .PlaybackFile("CUSTOM:TONES?480|620@500,0@500ms") ' send custom tones, multi-frequency tone 480Hz and 620Hz in 500ms duration follow by 500ms silence ( US busy tone ) 'Redirect code sample : play the voice from the phone to the sound card mTAPIEx.WavePlayDeviceClass = "wave_mapper" mTAPIEx.WaveRecordDeviceClass = "wave/in" currCall.PlaybackFile "REDIRECT:FROMWAVEIN" ' start wave/out first currCall.Record "ACCESS:WAVEINBUFFER"