Click or drag to resize

ScriptingPlaySound Method

Plays a sound file.

Namespace:  RRAutoLib.Scripting
Assembly:  RRAutoLib (in RRAutoLib.dll) Version: 4.0.8678.28884
Syntax
Public Shared Function PlaySound ( 
	strSoundFile As String,
	sinVolume As Single,
	Optional sctCancelToken As CancellationToken = Nothing
) As Task

Parameters

strSoundFile
Type: SystemString
Qualified path and file name of the sound file. Supported file types are: .wav and .mp3
sinVolume
Type: SystemSingle
Volume of this sound channel. Full volume is 1.0 and 0.5 is half volume.
sctCancelToken (Optional)
Type: System.ThreadingCancellationToken
Token provided by a controlling source to notify this method that it should cancel its execution.

Return Value

Type: Task
The Task that can be awaited, if execution must halt while the sound is playing.
Remarks
This method was designed specifically for use within the scripting context.
See Also