private void StopAlAu() { // Get rid of Alvas Audio registration window bgAlvasRegWindowCloser.DoWork += new DoWorkEventHandler(bgAlvasRegWindowCloser_DoWork); bgAlvasRegWindowCloser.RunWorkerAsync(); RecorderEx rex = new RecorderEx(); rex.Format = AudioCompressionManager.GetPcmFormat(1, 16, 44100); rex.StartRecord(); rex.StopRecord(); // Get rid of Alvas Audio registration window }
public void StartAudioRecording(string FileName) { try { AudioFileName = FileName + ".wav"; 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(); this.is_recording = true; AudioRecorder = rex; } catch (Exception ex) { MessageBox.Show("Unable to start recording\n" + ex.Message); AudioFileName = ""; AudioRecorder = null; this.is_recording = false; } }