Starts playback of a voice file on a channel.

Namespace:  Inkostar
Assembly:  DiaSpringWrapper (in DiaSpringWrapper.dll)
Version: 0.0.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 

Parameters

ChannelName
String
The Channel name on the Dialogic board on which to start playback.
fileName
String
The full path and name of the file to play.
VoiceFormat
DiaSpringWrapperCommon..::.VoiceFormat
A constant enumerator to indicate if the file format is VOX or WAV.
FileFormat
DiaSpringWrapperCommon..::.FileFormat
A constant enumerator to indicate the underlying encoding format: DIALOGIC_ADPCM (Dialogic native format), WAV_MICROSOFT (Microsoft native format), ALAW, MULAW or PCM.
Rate
DiaSpringWrapperCommon..::.SamplingRate
A constant enumerator to indicate the sampling rate: RATE_6KHZ (6Khz), RATE_8KHZ (8Khz) or RATE_11KHZ (11 Khz).
BitsPerSample
DiaSpringWrapperCommon..::.BitsPerSample
A constant enumerator to indicate the bits per sample: BPS_8 (8bps) or BPS_4 (4bps).
Mode
DiaSpringWrapperCommon..::.SyncMode
A constant enumerator to indicate whether the playback should be done synchronously or asynchronously. When play is asynchronous, any code following this function will execute immediately while the playback is performed as a background task.
InterruptOnDigit
Boolean
A boolean value to indicate whether or not the playback should be interrupted when any digit is pressed.

Remarks

This function will fail if invoked before the [device].Open() function.
When the encoding is set to WAV_MICROSOFT, the BitsPerSample defaults to 4bits

Examples

Play a voice prompt on the first channel asynchronously using a format of WAV and encoding of WAV_MICROSOFT at a sampling rate of 8khz. Playback will stop when a digit is pressed.
C#: objDevice.Play("dxxxB1C1", @"c:\test.wav", Inkostar.DiaSpringWrapperCommon.VoiceFormat.WAV, Inkostar.DiaSpringWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaSpringWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaSpringWrapperCommon.BitsPerSample.BPS_4, Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, true);
VB.NET: objDevice.Record("dxxxB1C1", "c:\test.wav", Inkostar.DiaSpringWrapperCommon.VoiceFormat.WAV, Inkostar.DiaSpringWrapperCommon.FileFormat.WAV_MICROSOFT, Inkostar.DiaSpringWrapperCommon.SamplingRate.RATE_11KHZ, Inkostar.DiaSpringWrapperCommon.BitsPerSample.BPS_4, Inkostar.DiaSpringWrapperCommon.SyncMode.Asynchronous, True)

See Also

Inkostar Namespace