Audacity 3.1.3 - Realtek Driver loss

I have been happily using Audacity for several years now, primarily for making digital recordings of an inherited ancient vinyl LP library but for various boring reasons my recent use was non-existent. Things have recently changed, and I have restarted my recording project, which led to me upgrading to 3.1.3 on my W10 pro pc. It may be pure coincidence, but the result was all sorts of issues with my W10 and I could not get Audacity to recognise my Realtek sound board. I am far from being a technical expert of any sorts, but it seems that somehow my Windows drivers became corrupt during the upgrade process. All is now back to what passes for normal, following reinstallation of the Realtek drivers and various W10 repairs and reversion to Audacity 3.1.2. I shall not hurry to upgrade Audacity in the near future.
This is by no means a complaint or moan; I am a great fan of Audacity and really appreciate all the work that goes into it. Hopefully, the developers and even other users will find my experience helpful.

I wonder if W10 had a recent update, as in yesterday.

I normally use MacOS but, due to a project I got, I’m forced to use windows.
All been OK for 2 weeks, now all of a sudden:
Audacity (2.4.2) has been very well behaved, so it must be something else.

Makes no difference if I use Windows Direct Sound, MME or WASAPI, gives same error.

Oh well, back to trying to find the problem when trying to record.

Solution found.

Everytime microsoft does an update, it seems that the security settings are reset.
This then means that the microphone (yes, stereo mix also affected), is locked out
of being used by apps like Audacity.

Go to start → settings (the icon that looks like a gear), then select privacy settings and enable the mic.
(Ignore the last accessed date, it’s hopelessly wrong, I last used Audacity 5 minutes ago, yet it shows
some random date in 2020).

You may also have to disable all sound enhancements (generally a good idea) and also make sure
that the sample rate when recording in Audacity, matches that of your sound card’s stereo mix.

In my case it’s 48 KHz, 16 bit, stereo.
Also known as DVD quality.

All good now, hope it helps others.
(I sometimes wonder if microsoft goes out of their way to intentionally be as obtuse as they can be).

Forgot to mention, you may want to uncheck “Listen to this device” if you get an echo.

Thanks Paul.