C# Class AudioAdapters.MicrophoneInputAdapter

Inheritance: GSF.TimeSeries.Adapters.InputAdapterBase
显示文件 Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
GetShortStatus ( int maxLength ) : string

Gets a short one-line status of this AdapterBase.

Protected Methods

Method Description
AttemptConnection ( ) : void

Attempts to connect to data input source.

Derived classes should attempt connection to data input source here. Any exceptions thrown by this implementation will result in restart of the connection cycle.

AttemptDisconnection ( ) : void

Attempts to disconnect from data input source.

Derived classes should attempt disconnect from data input source here. Any exceptions thrown by this implementation will be reported to host via AdapterBase.ProcessException event.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the MicrophoneInputAdapter object and optionally releases the managed resources.

Private Methods

Method Description
ConvertToPCM16 ( double sample ) : short
GetSampleTypeCode ( ) : TypeCode
WaveIn_DataAvailable ( object sender, NAudio.Wave.WaveInEventArgs waveInEventArgs ) : void
WaveIn_RecordingStopped ( object sender, NAudio.Wave.StoppedEventArgs stoppedEventArgs ) : void

Method Details

AttemptConnection() protected method

Attempts to connect to data input source.
Derived classes should attempt connection to data input source here. Any exceptions thrown by this implementation will result in restart of the connection cycle.
protected AttemptConnection ( ) : void
return void

AttemptDisconnection() protected method

Attempts to disconnect from data input source.
Derived classes should attempt disconnect from data input source here. Any exceptions thrown by this implementation will be reported to host via AdapterBase.ProcessException event.
protected AttemptDisconnection ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the MicrophoneInputAdapter object and optionally releases the 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

GetShortStatus() public method

Gets a short one-line status of this AdapterBase.
public GetShortStatus ( int maxLength ) : string
maxLength int Maximum number of available characters for display.
return string