C# Класс NAudio.Wave.WasapiOut

Support for playback using Wasapi
Наследование: IWavePlayer
Показать файл Открыть проект Примеры использования класса

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

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

Dispose

GetPosition ( ) : long

Gets the current position in bytes from the wave output device. (n.b. this is not the same thing as the position within your reader stream)

Init ( IWaveProvider waveProvider ) : void

Initialize for playing the specified wave stream

Pause ( ) : void

Stop playback without flushing buffers

Play ( ) : void

Begin Playback

Stop ( ) : void

Stop playback and flush buffers

WasapiOut ( AudioClientShareMode shareMode, bool useEventSync, int latency ) : System

WASAPI Out using default audio endpoint

WasapiOut ( AudioClientShareMode shareMode, int latency ) : System

WASAPI Out using default audio endpoint

WasapiOut ( MMDevice device, AudioClientShareMode shareMode, bool useEventSync, int latency ) : System

Creates a new WASAPI Output

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

Метод Описание
FillBuffer ( IWaveProvider playbackProvider, int frameCount ) : void
GetDefaultAudioEndpoint ( ) : MMDevice
PlayThread ( ) : void
RaisePlaybackStopped ( Exception e ) : void

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

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

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

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

Gets the current position in bytes from the wave output device. (n.b. this is not the same thing as the position within your reader stream)
public GetPosition ( ) : long
Результат long

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

Initialize for playing the specified wave stream
public Init ( IWaveProvider waveProvider ) : void
waveProvider IWaveProvider IWaveProvider to play
Результат void

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

Stop playback without flushing buffers
public Pause ( ) : void
Результат void

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

Begin Playback
public Play ( ) : void
Результат void

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

Stop playback and flush buffers
public Stop ( ) : void
Результат void

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

WASAPI Out using default audio endpoint
public WasapiOut ( AudioClientShareMode shareMode, bool useEventSync, int latency ) : System
shareMode AudioClientShareMode ShareMode - shared or exclusive
useEventSync bool true if sync is done with event. false use sleep.
latency int Desired latency in milliseconds
Результат System

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

WASAPI Out using default audio endpoint
public WasapiOut ( AudioClientShareMode shareMode, int latency ) : System
shareMode AudioClientShareMode ShareMode - shared or exclusive
latency int Desired latency in milliseconds
Результат System

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

Creates a new WASAPI Output
public WasapiOut ( MMDevice device, AudioClientShareMode shareMode, bool useEventSync, int latency ) : System
device NAudio.CoreAudioApi.MMDevice Device to use
shareMode AudioClientShareMode
useEventSync bool true if sync is done with event. false use sleep.
latency int
Результат System