C# Class DevAudio.Microcone.Device

Exibir arquivo Open project: microcone/microconesdk Class Usage Examples

Public Methods

Method Description
Close ( ) : bool

Closes this device by destroying the asioOut member of this device

Device ( ) : System
Pause ( ) : void

Stops recording but doesn't destroy output files so they can be continued later.

Rescan ( ) : bool

Rescans all compatible audio devices and creates an asioOut object when it finds one.

If more than one device is found, the first one is used.

Resume ( ) : void

Resumes recording after a pause event.

StartRecording ( ) : bool

Starts a new recording using the Microcone. Outputs 2 mix files an 6 (or 5) sector files, in wav format.

Stop ( ) : System.TimeSpan

Stops the Microcone recording and saving to file, and closes the files.

Private Methods

Method Description
SetupAudio ( ) : bool
asioOut_AudioAvailable ( object sender, NAudio.Wave.AsioAudioAvailableEventArgs e ) : void

Handles the AudioAvailable event of the asioOut control. Saves audio data (stored in buffers) into WaveFileWriter objects.

createOutputFileObjects ( ) : void

Makes a series of WaveFileWriter objects

createSaveFileNames ( bool makeOutputPath ) : void

Creates an array of file names used for saving audio data to.

destroyOutputFileObjects ( ) : void

Destroys output file objects after closing them off.

outputFileTime ( ) : System.TimeSpan

Returns the total play time of the recorded file.

This should only be called when recording is stopped and during tidy-up.

savePath ( ) : string

Generates a file save path using the user's Documents directory, an app sub-directory, and the current time/date.

Method Details

Close() public method

Closes this device by destroying the asioOut member of this device
public Close ( ) : bool
return bool

Device() public method

public Device ( ) : System
return System

Pause() public method

Stops recording but doesn't destroy output files so they can be continued later.
public Pause ( ) : void
return void

Rescan() public method

Rescans all compatible audio devices and creates an asioOut object when it finds one.
If more than one device is found, the first one is used.
public Rescan ( ) : bool
return bool

Resume() public method

Resumes recording after a pause event.
public Resume ( ) : void
return void

StartRecording() public method

Starts a new recording using the Microcone. Outputs 2 mix files an 6 (or 5) sector files, in wav format.
public StartRecording ( ) : bool
return bool

Stop() public method

Stops the Microcone recording and saving to file, and closes the files.
public Stop ( ) : System.TimeSpan
return System.TimeSpan