C# Class ManagedBass.MediaPlayer

A Reusable Channel which can Load files like a Player.

MediaPlayer is perfect for UIs, as it implements INotifyPropertyChanged.

Also, unlike normal, Properties/Effects/DSP set on a MediaPlayer persist through subsequent loads.

Inheritance: INotifyPropertyChanged, IDisposable
Exibir arquivo Open project: ManagedBass/ManagedBass Class Usage Examples

Private Properties

Property Type Description
GetSyncProcedure SyncProcedure
MediaPlayer ManagedBass.Tags
OnStateChanged void

Public Methods

Method Description
Dispose ( ) : void

Frees all resources used by the player.

Load ( string FileName ) : bool

Loads a file into the player.

Pause ( ) : bool

Pauses the Channel Playback.

Play ( ) : bool

Starts the Channel Playback.

Stop ( ) : bool

Stops the Channel Playback.

Difference from Bass.ChannelStop: Playback is restarted when Play is called.

Protected Methods

Method Description
InitProperties ( ) : void

Initializes Properties on every call to Load.

OnLoad ( string FileName ) : int

Override this method for custom loading procedure.

OnPropertyChanged ( [ PropertyName = null ) : void

Fires the PropertyChanged event.

Private Methods

Method Description
GetSyncProcedure ( System.Action Handler ) : SyncProcedure
MediaPlayer ( ) : ManagedBass.Tags
OnStateChanged ( ) : void

Method Details

Dispose() public method

Frees all resources used by the player.
public Dispose ( ) : void
return void

InitProperties() protected method

Initializes Properties on every call to Load.
protected InitProperties ( ) : void
return void

Load() public method

Loads a file into the player.
public Load ( string FileName ) : bool
FileName string Path to the file to Load.
return bool

OnLoad() protected method

Override this method for custom loading procedure.
protected OnLoad ( string FileName ) : int
FileName string Path to the File to Load.
return int

OnPropertyChanged() protected method

Fires the PropertyChanged event.
protected OnPropertyChanged ( [ PropertyName = null ) : void
PropertyName [
return void

Pause() public method

Pauses the Channel Playback.
public Pause ( ) : bool
return bool

Play() public method

Starts the Channel Playback.
public Play ( ) : bool
return bool

Stop() public method

Stops the Channel Playback.
Difference from Bass.ChannelStop: Playback is restarted when Play is called.
public Stop ( ) : bool
return bool