Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

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
8bit_coder
Posts: 32
Joined: Sun Dec 03, 2017 4:31 am
Operating System: Windows 8 or 8.1

Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by 8bit_coder » Tue Aug 18, 2020 9:34 pm

Info:
Audacity 2.3.3
Windows 10 Pro 1909
I have a very strange issue that has plagued me for about 2 years now through multiple audacity versions:
Whatever recording device I select and use with WASAPI, I can record perfectly fine. But as soon as I try to record again, I get an error opening the recording device:
error.PNG
error.PNG (3.73 KiB) Viewed 1923 times
What's weird is that if I switch to something like MME, record, then go back to WASAPI, I can record once more. But if I record a second time with WASAPI, it gives the same error. I use WASAPI normally because it gives me the least glitches during audio recording. Even more strange is that if I record my microphone, it sometimes doesn't give the error and records fine a second time, but the issue is amplified when I use my audio interface. No matter what, I cannot do a second recording with WASAPI unless I switch to MME and back. Does anyone know why this is or how to solve this?

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

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by steve » Tue Aug 18, 2020 10:12 pm

8bit_coder wrote:
Tue Aug 18, 2020 9:34 pm
But as soon as I try to record again
On the same track or a new track, or does that make no difference?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

8bit_coder
Posts: 32
Joined: Sun Dec 03, 2017 4:31 am
Operating System: Windows 8 or 8.1

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by 8bit_coder » Tue Aug 18, 2020 11:03 pm

It makes no difference.

myusernameskazo
Posts: 1
Joined: Thu Aug 20, 2020 3:36 am
Operating System: Windows 10

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by myusernameskazo » Thu Aug 20, 2020 3:38 am

I'm having this same problem, except i only get it when recording a new track rather than the same one

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

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by steve » Thu Aug 20, 2020 11:07 am

Check in the Windows Sound control panel to see what the "sample rate" is for the audio device that you are using, in both the Record tab and the Playback tab. They should both match the Audacity "Project Rate" (lower left corner of the main Audacity window).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

8bit_coder
Posts: 32
Joined: Sun Dec 03, 2017 4:31 am
Operating System: Windows 8 or 8.1

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by 8bit_coder » Wed Sep 02, 2020 7:45 pm

The sample rate is exactly the same

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

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by steve » Wed Sep 02, 2020 8:37 pm

8bit_coder wrote:
Wed Sep 02, 2020 7:45 pm
The sample rate is exactly the same
What are they set at?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

8bit_coder
Posts: 32
Joined: Sun Dec 03, 2017 4:31 am
Operating System: Windows 8 or 8.1

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by 8bit_coder » Thu Sep 03, 2020 12:01 am

If I'm recording with my microphone, they're both set at 48khz, if I'm recording with my interface, they're both at 96khz. That's whats strange, they're both the right sample rate.

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

Re: Recording with windows WASAPI gives invalid sample rate error ONLY when recording a second time

Post by steve » Thu Sep 03, 2020 9:28 am

Try setting the "Project Rate" (lower left corner of the main Audacity window) to match the sample rate of the device that you are using.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply