Skip to content

Commit 16ef185

Browse files
committed
Merge pull request naudio#20 from KvanTTT/master
Fixed WAV Recording sample (Microphone turning on).
2 parents 1943205 + d0c95d1 commit 16ef185

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

NAudioDemo/RecordingDemo/RecordingPanel.cs

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ private void OnButtonStartRecordingClick(object sender, EventArgs e)
6363
{
6464
CreateWaveInDevice();
6565
}
66+
// Forcibly turn on the microphone (some programs (Skype) turn it off).
67+
var device = (MMDevice)comboWasapiDevices.SelectedItem;
68+
device.AudioEndpointVolume.Mute = false;
6669

6770
outputFilename = String.Format("NAudioDemo {0:yyy-MM-dd HH-mm-ss}.wav", DateTime.Now);
6871
writer = new WaveFileWriter(Path.Combine(outputFolder, outputFilename), waveIn.WaveFormat);

0 commit comments

Comments
 (0)