RecorderEx Class |
Namespace: Alvas.Audio
The RecorderEx type exposes the following members.
Name | Description | |
---|---|---|
![]() | RecorderEx | Initializes a new instance of the RecorderEx class |
![]() | RecorderEx(Boolean) | Initializes a new instance of the RecorderEx class |
Name | Description | |
---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Dispose | Releases all resources used by the Component. (Inherited from Component.) |
![]() | Equals | (Inherited from Object.) |
![]() | FormatBytes |
Returns audio format byte array.
|
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetMixerNo |
Return mixer number
|
![]() | GetPosition |
Gets the current sound position.
|
![]() ![]() ![]() | GetRecorderName |
Returns recorder name by index.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | PauseRecord |
Pauses recording. Use StartRecord method to resume recording.
|
![]() | StartRecord |
Starts recording.
|
![]() | StopRecord |
Stops recording.
|
![]() | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.) |
Name | Description | |
---|---|---|
![]() | BufferSizeInMS |
Gets or sets the recorder buffer size in milliseconds. By default 500 ms.
|
![]() | Container | Gets the IContainer that contains the Component. (Inherited from Component.) |
![]() | Format |
Gets and sets pointer to audio format.
|
![]() ![]() | RecorderCount |
Gets the number of audio recorders installed in system.
|
![]() | RecorderID |
Gets or sets the current recorder. If -1 the system uses suitable recorder.
|
![]() | Site | (Inherited from Component.) |
![]() | State |
Gets the recorder state.
|
Name | Description | |
---|---|---|
![]() | Close |
Occurs when the recorder is closed after recording.
|
![]() | Data |
Occurs when the Recorder returns next portion of the recorded data.
|
![]() | Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.) |
![]() | Open |
Occurs when the recorder is opened for recording.
|
public static void TestRecorderEx() { RecorderEx rex = new RecorderEx(); rex.Open += new EventHandler(rex_Open); rex.Data += new RecorderEx.DataEventHandler(rex_Data); rex.Close += new EventHandler(rex_Close); rex.Format = AudioCompressionManager.GetPcmFormat(1, 16, 44100); rex.StartRecord(); } static WaveWriter ww; static int i = 0; static void rex_Close(object sender, EventArgs e) { ww.Close(); ww = null; } static void rex_Data(object sender, DataEventArgs e) { ww.WriteData(e.Data); i += 1; if (i == 10) { ((RecorderEx)sender).StopRecord(); } } static void rex_Open(object sender, EventArgs e) { if (ww == null) { ww = new WaveWriter(File.Create("rec.wav"), AudioCompressionManager.FormatBytes(((RecorderEx)sender).Format)); } }