C# 클래스 Accord.Audio.AudioSourceMixer

Software mixer for audio sources.
상속: IAudioSource, IDisposable
파일 보기 프로젝트 열기: accord-net/framework

공개 메소드들

메소드 설명
AudioSourceMixer ( ) : System

Initializes a new instance of the AudioSourceMixer class.

AudioSourceMixer ( IEnumerable sources ) : System

Initializes a new instance of the AudioSourceMixer class.

Dispose ( ) : void

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

Seek ( int frameIndex ) : void

Not supported.

SignalToStop ( ) : void

Signals audio source to stop its work.

Signals audio source to stop its background thread, stop to provide new frames and free resources.

Start ( ) : void

Start audio source.

Starts audio source and return execution to caller. Audio source object creates background thread and notifies about new frames with the help of NewFrame event.

Stop ( ) : void

Stop audio source.

Stops audio source aborting its thread.

Since the method aborts background thread, its usage is highly not preferred and should be done only if there are no other options. The correct way of stopping camera is signaling it stop and then waiting for background thread's completion.

WaitForStop ( ) : void

Wait for audio source has stopped.

Waits for source stopping after it was signaled to stop using SignalToStop method.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

OnNewFrame ( Array frame ) : void

Notifies client about new block of frames.

OnNewFrame ( Signal frame ) : void

Notifies client about new block of frames.

비공개 메소드들

메소드 설명
WorkerThread ( ) : void

Worker thread.

mix ( short a, short b ) : short
source_NewFrame ( object sender, NewFrameEventArgs e ) : void

메소드 상세

AudioSourceMixer() 공개 메소드

Initializes a new instance of the AudioSourceMixer class.
public AudioSourceMixer ( ) : System
리턴 System

AudioSourceMixer() 공개 메소드

Initializes a new instance of the AudioSourceMixer class.
public AudioSourceMixer ( IEnumerable sources ) : System
sources IEnumerable The audio sources to be mixed.
리턴 System

Dispose() 공개 메소드

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

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; /// false to release only unmanaged resources.
리턴 void

OnNewFrame() 보호된 메소드

Notifies client about new block of frames.
protected OnNewFrame ( Array frame ) : void
frame System.Array New frame's audio.
리턴 void

OnNewFrame() 보호된 메소드

Notifies client about new block of frames.
protected OnNewFrame ( Signal frame ) : void
frame Signal New frame's audio.
리턴 void

Seek() 공개 메소드

Not supported.
public Seek ( int frameIndex ) : void
frameIndex int
리턴 void

SignalToStop() 공개 메소드

Signals audio source to stop its work.
Signals audio source to stop its background thread, stop to provide new frames and free resources.
public SignalToStop ( ) : void
리턴 void

Start() 공개 메소드

Start audio source.
Starts audio source and return execution to caller. Audio source object creates background thread and notifies about new frames with the help of NewFrame event.
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stop audio source.

Stops audio source aborting its thread.

Since the method aborts background thread, its usage is highly not preferred and should be done only if there are no other options. The correct way of stopping camera is signaling it stop and then waiting for background thread's completion.

public Stop ( ) : void
리턴 void

WaitForStop() 공개 메소드

Wait for audio source has stopped.
Waits for source stopping after it was signaled to stop using SignalToStop method.
public WaitForStop ( ) : void
리턴 void