C# Class NAudio.Wave.WaveOut

Represents a wave out device
Inheritance: IWavePlayer
Datei anzeigen Open project: jishi/Jishi.StreamToSonos Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Closes this WaveOut device

GetCapabilities ( int devNumber ) : NAudio.Wave.WaveOutCapabilities

Retrieves the capabilities of a waveOut device

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 - it calls directly into waveOutGetPosition)

Init ( IWaveProvider waveProvider ) : void

Initialises the WaveOut device

Pause ( ) : void

Pause the audio

Play ( ) : void

Start playing the audio from the WaveStream

Resume ( ) : void

Resume playing after a pause from the same position

Stop ( ) : void

Stop and reset the WaveOut device

WaveOut ( ) : System

Creates a default WaveOut device Will use window callbacks if called from a GUI thread, otherwise function callbacks

WaveOut ( IntPtr windowHandle ) : System

Creates a WaveOut device using the specified window handle for callbacks

WaveOut ( NAudio.Wave.WaveCallbackInfo callbackInfo ) : System

Opens a WaveOut device

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Closes the WaveOut device and disposes of buffers

Private Methods

Method Description
Callback ( IntPtr hWaveOut, NAudio.Wave.WaveInterop uMsg, IntPtr dwInstance, NAudio.Wave.WaveHeader wavhdr, IntPtr dwReserved ) : void
EnqueueBuffers ( ) : void
RaisePlaybackStoppedEvent ( Exception e ) : void

Method Details

Dispose() public method

Closes this WaveOut device
public Dispose ( ) : void
return void

Dispose() protected method

Closes the WaveOut device and disposes of buffers
protected Dispose ( bool disposing ) : void
disposing bool True if called from Dispose
return void

GetCapabilities() public static method

Retrieves the capabilities of a waveOut device
public static GetCapabilities ( int devNumber ) : NAudio.Wave.WaveOutCapabilities
devNumber int Device to test
return NAudio.Wave.WaveOutCapabilities

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 - it calls directly into waveOutGetPosition)
public GetPosition ( ) : long
return long

Init() public method

Initialises the WaveOut device
public Init ( IWaveProvider waveProvider ) : void
waveProvider IWaveProvider WaveProvider to play
return void

Pause() public method

Pause the audio
public Pause ( ) : void
return void

Play() public method

Start playing the audio from the WaveStream
public Play ( ) : void
return void

Resume() public method

Resume playing after a pause from the same position
public Resume ( ) : void
return void

Stop() public method

Stop and reset the WaveOut device
public Stop ( ) : void
return void

WaveOut() public method

Creates a default WaveOut device Will use window callbacks if called from a GUI thread, otherwise function callbacks
public WaveOut ( ) : System
return System

WaveOut() public method

Creates a WaveOut device using the specified window handle for callbacks
public WaveOut ( IntPtr windowHandle ) : System
windowHandle System.IntPtr A valid window handle
return System

WaveOut() public method

Opens a WaveOut device
public WaveOut ( NAudio.Wave.WaveCallbackInfo callbackInfo ) : System
callbackInfo NAudio.Wave.WaveCallbackInfo
return System