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. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If purgeBeforeSpeak parameter is true, Play clears the queue and removes all pending speak and play requests prior to this play call. In effect, Play call with purgeBeforeSpeak set to true stops the currently playing file or text and starts playing the new file passed in file parameter.
| Exception | Condition |
|---|---|
| TapiDisconnectException | The call has been already disconnected. |
Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)