C# Class Accord.DirectSound.WaveFileAudioSource

Read audio samples from a Wave file.

This audio source reads audio samples from Wave files. Internally, it uses the WaveDecoder class to automatically decode Wave files into audio signals.

Inheritance: IAudioSource, IDisposable
显示文件 Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

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

Seek ( int frameIndex ) : void

Navigates to a given position within the source.

SignalToStop ( ) : void

Signals the source to stop.

Start ( ) : void

Starts reading from the source.

Stop ( ) : void

Stops the source.

WaitForStop ( ) : void

Blocks the calling thread until the source has stopped.

WaveFileAudioSource ( Stream stream ) : Accord.Audio

Constructs a new Wave file audio source.

WaveFileAudioSource ( string fileName ) : Accord.Audio

Constructs a new Wave file audio source.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

Private Methods

Method Description
Free ( ) : void

Free resource.

WorkerThread ( ) : void

Worker thread.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

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.
return void

Seek() public method

Navigates to a given position within the source.
public Seek ( int frameIndex ) : void
frameIndex int The frame position to navigate to.
return void

SignalToStop() public method

Signals the source to stop.
public SignalToStop ( ) : void
return void

Start() public method

Starts reading from the source.
public Start ( ) : void
return void

Stop() public method

Stops the source.
public Stop ( ) : void
return void

WaitForStop() public method

Blocks the calling thread until the source has stopped.
public WaitForStop ( ) : void
return void

WaveFileAudioSource() public method

Constructs a new Wave file audio source.
public WaveFileAudioSource ( Stream stream ) : Accord.Audio
stream Stream The stream containing a Wave file.
return Accord.Audio

WaveFileAudioSource() public method

Constructs a new Wave file audio source.
public WaveFileAudioSource ( string fileName ) : Accord.Audio
fileName string The path for the underlying source.
return Accord.Audio