libpalaso icon indicating copy to clipboard operation
libpalaso copied to clipboard

SIL.Media.Naudio.BeginMonitoring() throws error when Win 11 Mic permission is off

Open hatton opened this issue 2 years ago • 1 comments

Windows 11 (possibly existing earlier) has per-app mic permission. When off, Bloom is getting

Msg: UnspecifiedError calling waveInOpen
Class: NAudio.MmException
Source: NAudio
Assembly: NAudio, Version=1.10.0.0, Culture=neutral, PublicKeyToken=null
Stack:    at NAudio.Wave.WaveIn.OpenWaveInDevice()
   at NAudio.Wave.WaveIn.StartRecording()
   at SIL.Media.Naudio.AudioRecorder.BeginMonitoringIfNeeded()
   at SIL.Media.Naudio.AudioRecorder.BeginMonitoring()
Thread: 
Thread UI culture: en-US
Exception: NAudio.MmException

It seems like instead, we should act the same as if we didn't have any mic available.

Alternatively, if we could determine the cause, then maybe a specific exception that the app could catch would make sense.

Original Bloom Issue: BL-12406

hatton avatar Jun 30 '23 13:06 hatton

Also Windows 10.

gmartin7 avatar Jul 06 '23 21:07 gmartin7