WSAPI error - -9996 and distortion

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
TonyShelbourne
Posts: 5
Joined: Thu Jan 07, 2021 11:56 am
Operating System: Windows 10

WSAPI error - -9996 and distortion

Post by TonyShelbourne » Thu Jan 07, 2021 12:16 pm

Windows: Home 10.0.19041
Audacity: 2.4.2

When I select WSAPI as Audio Host, and Speakers (Realtek(R) Audio) (loopback) as the Recording Device, the following message appears when I try to record a new track, eg with Shift+R:

Error opening recording device.
Error code: -9996 Invalid device.


When I select WSAPI as Audio Host, and Stereo Mix (Realtek(R) Audio) as the Recording Device, Audacity seems to record the output OK, but on playback, the sound is massively distorted. The same result happens when I select Windows Direct Sound as the Audio Host. Recording levels are all set correctly - well within clipping tolerances.

Recording is working fine through the microphone.

Any help gratefully received.

jademan
Forum Crew
Posts: 1179
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Please select

Re: WSAPI error - -9996 and distortion

Post by jademan » Fri Jan 08, 2021 4:22 pm

TonyShelbourne wrote:
Thu Jan 07, 2021 12:16 pm
Windows: Home 10.0.19041
Audacity: 2.4.2

When I select WSAPI as Audio Host, and Speakers (Realtek(R) Audio) (loopback) as the Recording Device, the following message appears when I try to record a new track, eg with Shift+R:

Error opening recording device.
Error code: -9996 Invalid device.
The same thing happens to me. :(

TonyShelbourne wrote:
Thu Jan 07, 2021 12:16 pm
When I select WSAPI as Audio Host, and Stereo Mix (Realtek(R) Audio) as the Recording Device, Audacity seems to record the output OK, but on playback, the sound is massively distorted. The same result happens when I select Windows Direct Sound as the Audio Host. Recording levels are all set correctly - well within clipping tolerances.

Recording is working fine through the microphone.

Any help gratefully received.
I cannot duplicate this distortion. I suppose you could try [speaker icon]>Sounds>Recording>Stereo Mix>Properties>Enhancements>Disable All Sound Effects.

I hope this helps. :D

TonyShelbourne
Posts: 5
Joined: Thu Jan 07, 2021 11:56 am
Operating System: Windows 10

Re: WSAPI error - -9996 and distortion

Post by TonyShelbourne » Fri Jan 08, 2021 4:53 pm

Many thanks, Jademan. It worked! I never even knew the option existed - I mean, it's not in the Sound Settings menu.

Brillo!

(Still get the same -9996 error, though. Ho hum.)

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WSAPI error - -9996 and distortion

Post by steve » Sat Jan 09, 2021 1:36 pm

In the Windows Sound control panel, ensure that the Realtek device is set to "2 channels, 44100 Hz" in both the Recording tab and the Playback tab.

To open the Windows Sound control panel:
  1. open the run dialog with Windows logo + R
  2. enter: control mmsys.cpl
  3. press the OK button
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

TonyShelbourne
Posts: 5
Joined: Thu Jan 07, 2021 11:56 am
Operating System: Windows 10

Re: WSAPI error - -9996 and distortion

Post by TonyShelbourne » Sat Jan 09, 2021 7:45 pm

It doesn't appear on the Playback setting: only Digital Output (AMD High Definiton Audio Device) whcih stated it's "Not plugged in" and Speakers. It's there on the Recording setting, along with Microphone.

TonyShelbourne
Posts: 5
Joined: Thu Jan 07, 2021 11:56 am
Operating System: Windows 10

Re: WSAPI error - -9996 and distortion

Post by TonyShelbourne » Sat Jan 09, 2021 7:49 pm

It's on the Recordings tab, along with Microphone. But on the Playback tab, there's "Speakers" and "Digital Output - AMD High Definition Audio Device - Not plugged in."

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WSAPI error - -9996 and distortion

Post by steve » Sat Jan 09, 2021 8:37 pm

My guess is that "Speakers" is the one that you want. (I'm assuming that you don't have any USB speakers connected).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

TonyShelbourne
Posts: 5
Joined: Thu Jan 07, 2021 11:56 am
Operating System: Windows 10

Re: WSAPI error - -9996 and distortion

Post by TonyShelbourne » Sun Jan 10, 2021 4:58 pm

Well, that seems to have worked, - Lord knows why!

Though the "loopback" option needs a lot of level adjustment.

Sincere thanks, Steve. I now have a functioning laptop for recording.

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WSAPI error - -9996 and distortion

Post by steve » Sun Jan 10, 2021 5:20 pm

I think there's something weird about your device drivers - the settings that you had shouldn't be possible. However, as it's working now, best not to change it (If it's not broken, don't fix it) ;)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply