From: Bellai Ádám Date: Fri, 10 Nov 2017 15:21:57 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=fd720ec1e2babf941db12257303a686ac5836608;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30711 --- diff --git a/client/AudioRecorder/MainForm.cs b/client/AudioRecorder/MainForm.cs index 00165f2c..77535103 100644 --- a/client/AudioRecorder/MainForm.cs +++ b/client/AudioRecorder/MainForm.cs @@ -123,8 +123,8 @@ namespace AudioRecorder private void panelPaintEvent(object sender, PaintEventArgs e) { //Debug.WriteLine(String.Format("volumeHeight {0}", volumeHeight)); - if (volumeHeight >= 200) - return; + //if (volumeHeight >= 200) + // return; if (!recording) { volumePanel.Controls.Clear(); diff --git a/client/AudioRecorder/WavRecorder.cs b/client/AudioRecorder/WavRecorder.cs index 6995c399..01b5c47c 100644 --- a/client/AudioRecorder/WavRecorder.cs +++ b/client/AudioRecorder/WavRecorder.cs @@ -26,7 +26,8 @@ namespace AudioRecorder { public void StartRecording(String filePath) { this.filePath = filePath; - sourceStream = newWaveIn(); + //sourceStream = newWaveIn(); + sourceStream = new WasapiCapture(device); sourceStream.DataAvailable += newEventHandler(); waveWriter = newWavFileWriter(); sourceStream.StartRecording(); @@ -45,8 +46,8 @@ namespace AudioRecorder { return new WaveIn { DeviceNumber = inputDeviceIndex, WaveFormat = - //WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL) - new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) + WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL) + //new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) }; } @@ -55,8 +56,8 @@ namespace AudioRecorder { if (!pausing) { waveWriter.Write(e.Buffer, 0, e.BytesRecorded); waveWriter.Flush(); - float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100; - mainForm.setPanelSizeHeight(panelHeight); + //float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100; + //mainForm.setPanelSizeHeight(panelHeight); } }