C# Class Translate.Services.Audio.WaveMediaStreamSource

A Media Stream Source implemented to play WAVE files
Inheritance: System.Windows.Media.MediaStreamSource, IDisposable
Datei anzeigen Open project: nikhilk/silverlightfx

Public Methods

Method Description
Dispose ( ) : void

Implement the Dispose method to release the resources

WaveMediaStreamSource ( Stream stream ) : System

Initializes a new instance of the WaveMediaStreamSource class.

Protected Methods

Method Description
CloseMedia ( ) : void

Close the media. Release the resources.

Dispose ( bool disposing ) : void

Implementation of the IDisposable pattern

GetDiagnosticAsync ( MediaStreamSourceDiagnosticKind diagnosticKind ) : void

Not implemented

GetSampleAsync ( MediaStreamType mediaStreamType ) : void

Return the next sample requested

OpenMediaAsync ( ) : void

Open the media. Create the structures.

SeekAsync ( long seekToTime ) : void

Called when asked to seek to a new position

SwitchMediaStreamAsync ( System.Windows.Media.MediaStreamDescription mediaStreamDescription ) : void

Stream media stream. Not implemented

Private Methods

Method Description
AlignUp ( int a, int b ) : int

Helper function to align a block

Method Details

CloseMedia() protected method

Close the media. Release the resources.
protected CloseMedia ( ) : void
return void

Dispose() public method

Implement the Dispose method to release the resources
public Dispose ( ) : void
return void

Dispose() protected method

Implementation of the IDisposable pattern
protected Dispose ( bool disposing ) : void
disposing bool Are we being destroyed
return void

GetDiagnosticAsync() protected method

Not implemented
protected GetDiagnosticAsync ( MediaStreamSourceDiagnosticKind diagnosticKind ) : void
diagnosticKind MediaStreamSourceDiagnosticKind The diagnostic kind
return void

GetSampleAsync() protected method

Return the next sample requested
protected GetSampleAsync ( MediaStreamType mediaStreamType ) : void
mediaStreamType MediaStreamType The stream type that we are getting a sample for
return void

OpenMediaAsync() protected method

Open the media. Create the structures.
protected OpenMediaAsync ( ) : void
return void

SeekAsync() protected method

Called when asked to seek to a new position
protected SeekAsync ( long seekToTime ) : void
seekToTime long the time to seek to
return void

SwitchMediaStreamAsync() protected method

Stream media stream. Not implemented
protected SwitchMediaStreamAsync ( System.Windows.Media.MediaStreamDescription mediaStreamDescription ) : void
mediaStreamDescription System.Windows.Media.MediaStreamDescription The mediaStreamDescription that we want to switch to
return void

WaveMediaStreamSource() public method

Initializes a new instance of the WaveMediaStreamSource class.
public WaveMediaStreamSource ( Stream stream ) : System
stream Stream The stream the will contain the data to playback
return System