private void panelPaintEvent(object sender, PaintEventArgs e)\r
{\r
//Debug.WriteLine(String.Format("volumeHeight {0}", volumeHeight));\r
- if (volumeHeight >= 200)\r
- return;\r
+ //if (volumeHeight >= 200)\r
+ // return;\r
if (!recording)\r
{\r
volumePanel.Controls.Clear();\r
\r
public void StartRecording(String filePath) {\r
this.filePath = filePath;\r
- sourceStream = newWaveIn();\r
+ //sourceStream = newWaveIn();\r
+ sourceStream = new WasapiCapture(device);\r
sourceStream.DataAvailable += newEventHandler();\r
waveWriter = newWavFileWriter();\r
sourceStream.StartRecording();\r
return new WaveIn {\r
DeviceNumber = inputDeviceIndex,\r
WaveFormat =\r
- //WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL)\r
- new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) \r
+ WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL)\r
+ //new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL)\r
};\r
}\r
\r
if (!pausing) {\r
waveWriter.Write(e.Buffer, 0, e.BytesRecorded);\r
waveWriter.Flush();\r
- float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100;\r
- mainForm.setPanelSizeHeight(panelHeight);\r
+ //float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100;\r
+ //mainForm.setPanelSizeHeight(panelHeight);\r
}\r
}\r
\r