Click or drag to resize
TapiCallPlay Method (String)
Plays a wave file. Pending speak and play requests are not purged.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public void Play(
	string file
)

Parameters

file
Type: SystemString
Filename (including path) of the file to be played.
Exceptions
ExceptionCondition
TapiDisconnectExceptionThe call has been already disconnected.
Remarks

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.

See Also