C# Class NAudio.Wave.WaveOutEvent

Alternative WaveOut class, making use of the Event callback
Inheritance: IWavePlayer
ファイルを表示 Open project: jishi/Jishi.StreamToSonos Class Usage Examples

Private Properties

Property Type Description
CloseWaveOut void
DisposeBuffers void
DoPlayback void
PlaybackThread void
RaisePlaybackStoppedEvent void
Resume void

Public Methods

Method Description
Dispose ( ) : void

Closes this 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

Stop ( ) : void

Stop and reset the WaveOut device

WaveOutEvent ( ) : 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
CloseWaveOut ( ) : void
DisposeBuffers ( ) : void
DoPlayback ( ) : void
PlaybackThread ( ) : void
RaisePlaybackStoppedEvent ( Exception e ) : void
Resume ( ) : void

Resume playing after a pause from the same position

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

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

Stop() public method

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

WaveOutEvent() public method

Opens a WaveOut device
public WaveOutEvent ( ) : System
return System