C# Class NAudio.Wave.WasapiOut

Support for playback using Wasapi
Inheritance: IWavePlayer
Show file Open project: jishi/Jishi.StreamToSonos Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
FillBuffer ( IWaveProvider playbackProvider, int frameCount ) : void
GetDefaultAudioEndpoint ( ) : MMDevice
PlayThread ( ) : void
RaisePlaybackStopped ( Exception e ) : void

Method Details

Dispose() public method

Dispose
public Dispose ( ) : void
return void

GetPosition() public method

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
return long

Init() public method

Initialize for playing the specified wave stream
public Init ( IWaveProvider waveProvider ) : void
waveProvider IWaveProvider IWaveProvider to play
return void

Pause() public method

Stop playback without flushing buffers
public Pause ( ) : void
return void

Play() public method

Begin Playback
public Play ( ) : void
return void

Stop() public method

Stop playback and flush buffers
public Stop ( ) : void
return void

WasapiOut() public method

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
return System

WasapiOut() public method

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
return System

WasapiOut() public method

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
return System