Error opening sound device after laptop battery went dead


I have a really frustrating problem that I haven’t managed to solve.
I have a laptop with Windows 10,Audacity was the previous but updated now to the latest without luck 2.3.3 sound card: Focusrite Scarlett 3rd Gen 4i4 updated without luck to the latest driver.

I was unplugged the charger from the laptop to get a better a better sounding while recording records. Everything worked perfectly before, but my battery was drained and it went off. Plugged back the charger everything working fine, but I noticed after this case I can’t get to work to play or record with my sound card in audacity. For example in foobar works perfectly the playback. Also tried “direct audio playback” from the inputs and works perfectly.

If i press play the error message is “error opening sound device” try changing the audio host, playback device and the project sample rate.
If i press the record monitoring or record I get the error -9997 invalid sample rate.

After this I tried to update the Audacity, the Focusrite driver and restart the “windows audio endpoint”.

UPDATE while i writing this post I tried to change the audio host from WASAPI to NME or DirectSound and those works perfectly. What happened to the WASAPI ?