Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1968 - Windows: Recording or monitoring from a USB sound device using WASAPI host yields "Error opening recording device"
Windows: Recording or monitoring from a USB sound device using WASAPI host yi...
Status: CLOSED NOT-A-BUG
Product: Audacity
Classification: Unclassified
Component: Audio IO
2.3.0
PC Windows (all)
: P3 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-04 06:15 UTC by Peter Sampson
Modified: 2019-08-13 15:42 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1) attach an external device (USB soundcard with FM radio say) 2) set host to MME or WDS 3) set input to be USB device 4) set output to be PC's onboard speakers 5) turn on Software Playthrough 6) Press Record 7) observe record works properly with monitoring 8) Now change host to WASAPI 9) Press Record 10) Observe: Error opening recording device - error code -9997 invalid sample rate message 11) Now press Play 12) Plays OK
Release Note:
Recording or monitoring from a USB sound device using WASAPI host may yield an "Error opening recording device" error message
First Git SHA:
Group: ---
Workaround:
Change host to be MME or Windows Direct Sound
Closed: 2019-08-13 00:00:00
petersampsonaudacity: Regression-
petersampsonaudacity: Test‑OK‑Win?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2018-09-04 06:15:54 UTC
WASAPI host only, using a USB sound device (in my case Edirol UA-1EX with FM radio) as input with output to the PC's onboard speakers yields an Error opening recording device message.  Project rate set to 44100 and then 4800

Curiously Playback to that onboard speaker with WASAPI as host works fine (with the project rate set at default 44100 or 48000.

Monitoring and Recording work fine when I switch the host to MME or WDS

This is not a regression - happens all the way back to at least 2.1.3
Comment 1 Peter Sampson 2018-09-04 06:17:34 UTC
We lack a "Group" for Playback and Recording
Comment 2 Peter Sampson 2018-09-04 07:23:26 UTC
If we do not fix this for 2.3.0 I may need to add this to the Manual's FAQ regarding "Error opening ..."
Comment 3 Peter Sampson 2018-09-09 06:55:11 UTC
Monitoring and Recording work fine with WASAPI host if I set both the input and the output device to be the USB sound device.

It is only if I have the USB device as the input and onboard Realtek/speakers as output that the error occurs

=================================================

I did a little moire experimentation with WASAPI host.

If I set the input device to be Realtek/on-board mic and the output device to be the USB device than I also get the "error opening sound device ..."

If I set the Realtek card to be both input and output then WASAPI monitoring and recording works fine.

This leads me to think that this is a rate mis-match issue'



Remember that my PC with the Realtek card is fixed at 48,000 - and the Edirol UA-1EX is currently set to run at 44,100.

I appear to be able to reset the Edirol to 48000 (if that works with the basic Microsoft USB drivers - the advanced drivers for the Edirol disappeared with W10)
Comment 4 Peter Sampson 2018-09-09 07:07:20 UTC
Sorry - can't run that experiment.

Although the Edorol has dip switches for setting it to 48,000 Hz (and 32 & 96 kHz) the Microsoft drivers appear to limit it to running only at 44,100 Hz


But my suspicion of a rate mismatch issue remains.


I do recall that earlier in 2.3.0 dev we had a problem with my 48kHZ-fixed PC not working with Audacity set to its default (and my preferred) rate of 44,100.

And that was an issue that James fixed.
Comment 5 David Bailes 2019-03-14 14:47:32 UTC
(In reply to Peter Sampson from comment #3)
> Monitoring and Recording work fine with WASAPI host if I set both the input
> and the output device to be the USB sound device.
> 
> It is only if I have the USB device as the input and onboard
> Realtek/speakers as output that the error occurs
> 
> =================================================
> 
> I did a little moire experimentation with WASAPI host.
> 
> If I set the input device to be Realtek/on-board mic and the output device
> to be the USB device than I also get the "error opening sound device ..."
> 
> If I set the Realtek card to be both input and output then WASAPI monitoring
> and recording works fine.
> 
> This leads me to think that this is a rate mis-match issue'

I think this is correct.
Using WASAPI in shared mode, then to have recording and playback at the same time, the default sample rates in shared mode for the recording and playback devices have to be the same.

> 
> 
> 
> Remember that my PC with the Realtek card is fixed at 48,000 - and the
> Edirol UA-1EX is currently set to run at 44,100.
> 
> I appear to be able to reset the Edirol to 48000 (if that works with the
> basic Microsoft USB drivers - the advanced drivers for the Edirol
> disappeared with W10)
Comment 6 David Bailes 2019-03-16 06:38:32 UTC
(In reply to David Bailes from comment #5)
> (In reply to Peter Sampson from comment #3)
> > Monitoring and Recording work fine with WASAPI host if I set both the input
> > and the output device to be the USB sound device.
> > 
> > It is only if I have the USB device as the input and onboard
> > Realtek/speakers as output that the error occurs
> > 
> > =================================================
> > 
> > I did a little moire experimentation with WASAPI host.
> > 
> > If I set the input device to be Realtek/on-board mic and the output device
> > to be the USB device than I also get the "error opening sound device ..."
> > 
> > If I set the Realtek card to be both input and output then WASAPI monitoring
> > and recording works fine.
> > 
> > This leads me to think that this is a rate mis-match issue'
> 
> I think this is correct.
> Using WASAPI in shared mode, then to have recording and playback at the same
> time, the default sample rates in shared mode for the recording and playback
> devices have to be the same.

Just to add that there are good reasons for this restriction, and Reaper also has this restriction.

WASAPI in exclusive mode doesn't have this restriction, but is not without problems. The option is available in Reaper. I tried it and got distortion, which seems to be a problem reported by others.
Comment 7 Peter Sampson 2019-08-13 11:37:51 UTC
I'm thinking that this is not an Audacity bug but is rather a restriction of WASAPI

If we do close this as NOTABUG then I shall put a note in the Manual - I may well do that anyway
Comment 8 Peter Sampson 2019-08-13 11:44:53 UTC
(In reply to Peter Sampson from comment #7)
>If we do close this as NOTABUG then I shall put a note in the Manual - 
>I may well do that anyway

Done - see: https://alphamanual.audacityteam.org/man/Device_Toolbar#Audio_Host
Comment 9 Peter Sampson 2019-08-13 15:42:54 UTC
This basically works as intended - it is not an Audacity bug per se - and certainly nothing we can fix.  There are also good workarounds.  

I can recall of no users complaining about this (apart from me!)

Therefore I shall close this