C# Class cadencii.media.MediaPlayer

Sound player using mciSendSring command operation
Inheritance: IDisposable
Afficher le fichier Open project: cadencii/cadencii

Méthodes publiques

Méthode Description
Close ( ) : bool

Closes sound file

Dispose ( ) : void
GetLength ( ) : int

Gets the sound length in millisecond

GetPosition ( ) : int

Gets the current playing position in millisecond

Load ( string filename ) : bool

Opens sound file

Pause ( ) : bool

Pauses sound

Play ( ) : bool

Plays sound from time 0 second

PlayFrom ( double time ) : bool

Plays sound from specified second

ReLoad ( ) : void

Opens sound file which was closed with "UnLoad" method

Seek ( double pos_second ) : bool

Seeks to specified position

Stop ( ) : bool

Stops sound

UnLoad ( ) : void

Closes sound file temporary

Private Methods

Méthode Description
GetVolume ( ) : int

Gets the volume (0 <= volume <= 1000)

SetSpeed ( float speed ) : void

Sets the speed

SetVolume ( int value ) : void

Sets the volume (0 >= volume >= 1000)

mciSendString ( string s1, StringBuilder s2, int i1, int i2 ) : int
w_mciSendString ( string command ) : bool
w_mciSendString ( string command, string &result ) : bool

mciSendString wrapper with exception handling

Method Details

Close() public méthode

Closes sound file
public Close ( ) : bool
Résultat bool

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetLength() public méthode

Gets the sound length in millisecond
public GetLength ( ) : int
Résultat int

GetPosition() public méthode

Gets the current playing position in millisecond
public GetPosition ( ) : int
Résultat int

Load() public méthode

Opens sound file
public Load ( string filename ) : bool
filename string Path of sound file to open
Résultat bool

Pause() public méthode

Pauses sound
public Pause ( ) : bool
Résultat bool

Play() public méthode

Plays sound from time 0 second
public Play ( ) : bool
Résultat bool

PlayFrom() public méthode

Plays sound from specified second
public PlayFrom ( double time ) : bool
time double Sound position start to play
Résultat bool

ReLoad() public méthode

Opens sound file which was closed with "UnLoad" method
public ReLoad ( ) : void
Résultat void

Seek() public méthode

Seeks to specified position
public Seek ( double pos_second ) : bool
pos_second double position to seek in second
Résultat bool

Stop() public méthode

Stops sound
public Stop ( ) : bool
Résultat bool

UnLoad() public méthode

Closes sound file temporary
public UnLoad ( ) : void
Résultat void