TapiCallPlay Method (String) |
Namespace: Traysoft.AddTapi
Exception | Condition |
---|---|
TapiDisconnectException | The call has been already disconnected. |
Play method plays a wave file (file with .WAV extension) on the call. file parameter should contain a fully-qualified name (including path) of the file to be played. AddTapi.NET supports all wave formats that can be played in Windows, including compressed formats for which the codecs are installed. For best results we recommend uncompressed 16-bit mono files with 22KHz or higher sampling rate.
Play is asynchronous and returns immediately after the play request is queued. AddTapi.NET will play and speak queued Play and Speak(String, Boolean) requests in the same order they were queued. The file passed to this Play call will be played after all outstaning speak and play requests are completed. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If you want to purge all outstanding requests and start to play the file immediately, use Play(String, Boolean) and set purgeBeforeSpeak parameter to true.