C# 클래스 AudioPlayerApp.AudioPlayer

An audio player able to play audio from several audio and video formats (mp3, wma, avi, mp4... etc.) using XAudio2 and MediaFoundation.
파일 보기 프로젝트 열기: HakanL/animatroller 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CrossFadeStarting EventHandler
StateChanged EventHandler

Private Properties

프로퍼티 타입 설명
DisposePlayer void
PlayAsync void
sourceVoice_BufferEnd void

공개 메소드들

메소드 설명
AudioPlayer ( SharpDX.XAudio2.XAudio2 xaudio2, Stream audioStream ) : System

Initializes a new instance of the AudioPlayer class.

Close ( ) : void

Close this audio player.

This is similar to call Stop(), Dispose(), Wait().

Pause ( ) : void

Pauses the sound.

Play ( ) : void

Plays the sound.

Stop ( ) : void

Stops the sound.

Wait ( ) : void

Wait that the player is finished.

보호된 메소드들

메소드 설명
RaiseCrossFadeStarting ( ) : void
RaiseStateChanged ( StateEventArgs args ) : void

비공개 메소드들

메소드 설명
DisposePlayer ( ) : void
PlayAsync ( ) : void

Internal method to play the sound.

sourceVoice_BufferEnd ( IntPtr obj ) : void

메소드 상세

AudioPlayer() 공개 메소드

Initializes a new instance of the AudioPlayer class.
public AudioPlayer ( SharpDX.XAudio2.XAudio2 xaudio2, Stream audioStream ) : System
xaudio2 SharpDX.XAudio2.XAudio2 The xaudio2 engine.
audioStream Stream The input audio stream.
리턴 System

Close() 공개 메소드

Close this audio player.
This is similar to call Stop(), Dispose(), Wait().
public Close ( ) : void
리턴 void

Pause() 공개 메소드

Pauses the sound.
public Pause ( ) : void
리턴 void

Play() 공개 메소드

Plays the sound.
public Play ( ) : void
리턴 void

RaiseCrossFadeStarting() 보호된 메소드

protected RaiseCrossFadeStarting ( ) : void
리턴 void

RaiseStateChanged() 보호된 메소드

protected RaiseStateChanged ( StateEventArgs args ) : void
args StateEventArgs
리턴 void

Stop() 공개 메소드

Stops the sound.
public Stop ( ) : void
리턴 void

Wait() 공개 메소드

Wait that the player is finished.
public Wait ( ) : void
리턴 void

프로퍼티 상세

CrossFadeStarting 공개적으로 프로퍼티

public EventHandler CrossFadeStarting
리턴 EventHandler

StateChanged 공개적으로 프로퍼티

public EventHandler StateChanged
리턴 EventHandler