Audacity 3.2.4 Error Code: -9999

I have been using Audacity for quite a few years, on Win 7, a little over a year ago I switched to Win 11. Now I get a Error code: -9999. (I have change every input in the preferences settings and matched Audacity sample rate to the Win11 line in sample rate (44100) ) I am trying to record from a “line-in” signal from a cassette deck. The line in does show I have good signal when running the tape deck. My system does record in the “Windows sound recorder” app perfectly, but you cannot convert to .mp3, and it is not as easy to use as Audacity. I can even play the input directly through Win11 directly to the speakers and it works fine. I even turned off my onboard system HD Realtek audio and installed a "Creative Sound Blaster Audigy 5.1 PCIe sound card; which is a recommended card for Win11, it made no difference. Audio from internet sites, DVD’s, .mp3 & 4’s play fine through speakers. This really baffles me. I have uninstalled and reinstalled - no improvement, tried a couple of the newer Audacity version, no help. There must be some software interconnect not working. - Mystified !

“timestamp”: 1677635220,
“event_id”: “51e178fa01ebfa4f844dfb46393a4789”,
“platform”: “native”,
“release”: “audacity@3.2.4”,
“contexts”: {
“os”: {
“type”: “os”,
“name”: “Windows”,
“version”: “10.0.22000”
“exception”: {
“values”: [
“type”: “Error”,
“value”: “Error opening recording device.\nError code: -9999 Unanticipated host error.”,
“mechanism”: {
“type”: “runtime_error”,
“handled”: false

So this is likely a Windows permission thing, where you have to grant Audacity permission to use the microphone. Check Windows > Settings > Privacy > Microphone > Allow desktop apps to access your microphone.

There are a few other things it could be. See: Error -9999 Unanticipated Host Error