Table of Contents

Class WindowsPlayer

Namespace
Alis.Core.Audio.Players
Assembly
Alis.dll

The windows player class

internal class WindowsPlayer : IPlayer

Inheritance

Implements

Inherited Members

Fields

_fileName

The file name

private string _fileName

Field Value

string

_playStopwatch

The play stopwatch

private Stopwatch _playStopwatch

Field Value

Stopwatch

_playbackTimer

The playback timer

private Timer _playbackTimer

Field Value

Timer

Properties

Paused

Gets or sets the value of the paused

public bool Paused { get; private set; }

Property Value

bool

Playing

Gets or sets the value of the playing

public bool Playing { get; private set; }

Property Value

bool

Methods

ExecuteMsiCommand(string)

Executes the msi command using the specified command string

private Task ExecuteMsiCommand(string commandString)

Parameters

commandString string

The command string

Returns

Task

Exceptions

Exception

HandlePlaybackFinished(object, ElapsedEventArgs)

Handles the playback finished using the specified sender

private void HandlePlaybackFinished(object sender, ElapsedEventArgs e)

Parameters

sender object

The sender

e ElapsedEventArgs

The

Pause()

Pauses this instance

public Task Pause()

Returns

Task

Play(string)

Plays the file name

public Task Play(string fileName)

Parameters

fileName string

The file name

Returns

Task

Resume()

Resumes this instance

public Task Resume()

Returns

Task

SetVolume(byte)

Sets the volume using the specified percent

public Task SetVolume(byte percent)

Parameters

percent byte

The percent

Returns

Task

Stop()

Stops this instance

public Task Stop()

Returns

Task

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

errorCode int

The error code

errorText StringBuilder

The error text

errorTextSize int

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

command string

The command

stringReturn StringBuilder

The string return

returnLength int

The return length

hwndCallback IntPtr

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

hwo IntPtr

The hwo

dwVolume uint

The dw volume

Returns

int

The int

PlaybackFinished

playback

public event EventHandler PlaybackFinished

Event Type

EventHandler

See Also