C# Class Espera.Core.Audio.LocalAudioPlayer

Provides methods for playing a song.
Inheritance: AudioPlayer
Mostra file Open project: gazwinter/Espera Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Load ( Song song ) : void

Loads the specified song into the LocalAudioPlayer. This is required before playing a new song.

LocalAudioPlayer ( ) : System

Initializes a new instance of the LocalAudioPlayer class.

Pause ( ) : void

Pauses the playback of the AudioPlayer.LoadedSong.

Play ( ) : void

Starts or continues the playback of the AudioPlayer.LoadedSong.

Stop ( ) : void

Stops the playback of the AudioPlayer.LoadedSong.

Private Methods

Method Description
CloseStream ( ) : void
CreateInputStream ( Song song ) : void
OpenMp3Stream ( Stream stream ) : NAudio.Wave.WaveChannel32
OpenSong ( Song song ) : void
OpenWavStream ( Stream stream ) : NAudio.Wave.WaveChannel32
RenewWavePlayer ( ) : void
UpdateSongState ( ) : void

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Load() public method

Loads the specified song into the LocalAudioPlayer. This is required before playing a new song.
song is null.
public Load ( Song song ) : void
song Song The song to load into the player.
return void

LocalAudioPlayer() public method

Initializes a new instance of the LocalAudioPlayer class.
public LocalAudioPlayer ( ) : System
return System

Pause() public method

Pauses the playback of the AudioPlayer.LoadedSong.
public Pause ( ) : void
return void

Play() public method

Starts or continues the playback of the AudioPlayer.LoadedSong.
The playback couldn't be started.
public Play ( ) : void
return void

Stop() public method

Stops the playback of the AudioPlayer.LoadedSong.
public Stop ( ) : void
return void