C# Класс Accord.Audio.AudioSourceMixer

Software mixer for audio sources.
Наследование: IAudioSource, IDisposable
Показать файл Открыть проект

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

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