Class WindowsPlayer
- Namespace
- Alis.Core.Audio.Players
- Assembly
- Alis.dll
The windows player class
internal class WindowsPlayer : IPlayerInheritance
Implements
Inherited Members
Fields
_fileName
The file name
private string _fileNameField Value
_playStopwatch
The play stopwatch
private Stopwatch _playStopwatchField Value
_playbackTimer
The playback timer
private Timer _playbackTimerField Value
Properties
Paused
Gets or sets the value of the paused
public bool Paused { get; private set; }Property Value
Playing
Gets or sets the value of the playing
public bool Playing { get; private set; }Property Value
Methods
ExecuteMsiCommand(string)
Executes the msi command using the specified command string
private Task ExecuteMsiCommand(string commandString)Parameters
commandStringstring-
The command string
Returns
Exceptions
HandlePlaybackFinished(object, ElapsedEventArgs)
Handles the playback finished using the specified sender
private void HandlePlaybackFinished(object sender, ElapsedEventArgs e)Parameters
senderobject-
The sender
eElapsedEventArgs-
The
Pause()
Pauses this instance
public Task Pause()Returns
Play(string)
Plays the file name
public Task Play(string fileName)Parameters
fileNamestring-
The file name
Returns
Resume()
Resumes this instance
public Task Resume()Returns
SetVolume(byte)
Sets the volume using the specified percent
public Task SetVolume(byte percent)Parameters
percentbyte-
The percent
Returns
Stop()
Stops this instance
public Task Stop()Returns
mciGetErrorString(int, StringBuilder, int)
Mcis the get error string using the specified error code
private static extern int mciGetErrorString(int errorCode, StringBuilder errorText, int errorTextSize)Parameters
errorCodeint-
The error code
errorTextStringBuilder-
The error text
errorTextSizeint-
The error text size
Returns
- int
-
The int
mciSendString(string, StringBuilder, int, IntPtr)
Mcis the send string using the specified command
private static extern int mciSendString(string command, StringBuilder stringReturn, int returnLength, IntPtr hwndCallback)Parameters
commandstring-
The command
stringReturnStringBuilder-
The string return
returnLengthint-
The return length
hwndCallbackIntPtr-
The hwnd callback
Returns
- int
-
The int
waveOutSetVolume(IntPtr, uint)
Waves the out set volume using the specified hwo
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume)Parameters
Returns
- int
-
The int
PlaybackFinished
playback
public event EventHandler PlaybackFinished