Streaming audio is a process by which same audio files can be provided to different users simultaneously. You can make use of this sample when your customers want to start listening to an audio without having to wait for the entire file to get downloaded. In case of inconsistent Internet connections, streaming audio via our automated system introduces an effective approach.
After creating the script, you can run the script and it works as follows:
if ActivePorts() <= 1 MsgBox("You need multi-port license to run this script") return endif if find($devicename,"(WAVE)") >= 0 atomicset(1,"$mmdevice",$deviceid) endif sleep 2000 MAIN: if atomicget(1,"$mmdevice") = $deviceid answer 0 display "Audio streaming in progress.." while true sleepevent endwhile goto MAIN endif display "Waiting for call" answer 1 $displayprefix = "" if len($cli) <> 0 $displayprefix = concat("[", $cli, "] ") endif $audiodevice = atomicget(1,"$mmdevice") softstream($audiodevice,0) display "Audio streaming to " $audiodevice while true sleepevent endwhile goto MAIN ONHANGUP: hangup goto MAIN ONSYSTEMERROR: display $error log $error hangup goto MAIN