C# Класс cadencii.media.MediaPlayer

Sound player using mciSendSring command operation
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Close() публичный Метод

Closes sound file
public Close ( ) : bool
Результат bool

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetLength() публичный Метод

Gets the sound length in millisecond
public GetLength ( ) : int
Результат int

GetPosition() публичный Метод

Gets the current playing position in millisecond
public GetPosition ( ) : int
Результат int

Load() публичный Метод

Opens sound file
public Load ( string filename ) : bool
filename string Path of sound file to open
Результат bool

Pause() публичный Метод

Pauses sound
public Pause ( ) : bool
Результат bool

Play() публичный Метод

Plays sound from time 0 second
public Play ( ) : bool
Результат bool

PlayFrom() публичный Метод

Plays sound from specified second
public PlayFrom ( double time ) : bool
time double Sound position start to play
Результат bool

ReLoad() публичный Метод

Opens sound file which was closed with "UnLoad" method
public ReLoad ( ) : void
Результат void

Seek() публичный Метод

Seeks to specified position
public Seek ( double pos_second ) : bool
pos_second double position to seek in second
Результат bool

Stop() публичный Метод

Stops sound
public Stop ( ) : bool
Результат bool

UnLoad() публичный Метод

Closes sound file temporary
public UnLoad ( ) : void
Результат void