C# Класс Accord.DirectSound.AudioOutputDevice

Audio output device for local audio playback (i.e. a sound card port).

This audio output sends audio data to a local output device such as a sound card. The audio is reproduced using DirectSound through SlimDX.

For instructions on how to list output devices, please see the AudioDeviceCollection documentation page.

Наследование: IAudioOutput, IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AudioOutputDevice ( System.Guid device, IntPtr owner, int samplingRate, int channels ) : Accord.Audio

Constructs a new Audio Output Device.

AudioOutputDevice ( IntPtr owner, int samplingRate, int channels ) : Accord.Audio

Constructs a new Audio Output Device.

Dispose ( ) : void

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

Play ( ) : void

Starts playing the current buffer.

Play ( float samples ) : void

Starts playing the current buffer.

SignalToStop ( ) : void

Signals audio output to stop its work.

Signals audio output to stop its background thread, stop to ask for new frames and free resources.

Stop ( ) : void

Stops playing the current buffer.

WaitForStop ( ) : void

Wait for audio output has stopped.

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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

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

Метод Описание
OnFramePlayingStarted ( PlayFrameEventArgs e ) : void
OnStopped ( EventArgs e ) : void
WorkerThread ( ) : void

Worker thread.

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

AudioOutputDevice() публичный метод

Constructs a new Audio Output Device.
public AudioOutputDevice ( System.Guid device, IntPtr owner, int samplingRate, int channels ) : Accord.Audio
device System.Guid Global identifier of the audio output device.
owner System.IntPtr The owner window handle.
samplingRate int The sampling rate of the device.
channels int The number of channels of the device.
Результат Accord.Audio

AudioOutputDevice() публичный метод

Constructs a new Audio Output Device.
public AudioOutputDevice ( IntPtr owner, int samplingRate, int channels ) : Accord.Audio
owner System.IntPtr The owner window handle.
samplingRate int The sampling rate of the device.
channels int The number of channels of the device.
Результат Accord.Audio

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

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

Starts playing the current buffer.
public Play ( ) : void
Результат void

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

Starts playing the current buffer.
public Play ( float samples ) : void
samples float
Результат void

SignalToStop() публичный метод

Signals audio output to stop its work.
Signals audio output to stop its background thread, stop to ask for new frames and free resources.
public SignalToStop ( ) : void
Результат void

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

Stops playing the current buffer.
public Stop ( ) : void
Результат void

WaitForStop() публичный метод

Wait for audio output has stopped.
Waits for output stopping after it was signaled to stop using SignalToStop method.
public WaitForStop ( ) : void
Результат void