From: Bellai Ádám Date: Fri, 10 Nov 2017 13:45:33 +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=fabe8c02940d83ad2ee97e090c4d5ded1ec559b8;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30710 --- diff --git a/client/AudioRecorder/WavRecorder.cs b/client/AudioRecorder/WavRecorder.cs index e018a30d..6995c399 100644 --- a/client/AudioRecorder/WavRecorder.cs +++ b/client/AudioRecorder/WavRecorder.cs @@ -45,8 +45,8 @@ namespace AudioRecorder { return new WaveIn { DeviceNumber = inputDeviceIndex, WaveFormat = - WaveFormat.CreateIeeeFloatWaveFormat(8000, MONO_CHANEL) - //new WaveFormat(8000, MONO_CHANEL) + //WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL) + new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) }; } @@ -54,9 +54,9 @@ namespace AudioRecorder { if (waveWriter == null) return; if (!pausing) { waveWriter.Write(e.Buffer, 0, e.BytesRecorded); + waveWriter.Flush(); float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100; mainForm.setPanelSizeHeight(panelHeight); - waveWriter.Flush(); } }