I am trying to use Audacity to record in Windows 10 from an output device using WASAPI Exclusive mode.
The Audacity Tutorial at Tutorial - Selecting Your Recording Device - Audacity Manual seems to indicate this is possible:
“Selecting Windows DirectSound or Windows WASAPI and enabling both “Exclusive Mode” boxes in Windows Sound allows Audacity to request audio direct from the device without resampling.”
I am using Foobar2000 as the player, and it selects the output device (an external DAC) in WASAPI exclusive mode.
When I try to record loopback from the DAC in Audacity, the “device not available” dialogue comes up in Audacity. If I try this in shared mode it’s all good.
So am I reading that statement in the tutorial incorrectly?
How to loopback record from a Windows audio player output device which is set to exclusive mode?
I’m confused by your post. You say you are recording loopback from an external device. Loopback is used to record audio that is playing on your computer not from an external source.
When I use loopback on my W10 and W11 PCs I have these settings - this is my W10 with Audacity 3.7.3
I also have a external DAC (an Edirol UA-1EX with a USB connection to the which I use d to use to record from my record deck and still use to record from a n FM radio receiver - but then the Recording device has to be the UA-1EX. And this records fine too.
Oddly when I plug the UA-IEX into my PC W10 automatically enables it for output but leaves it disabled for input - so I have to enable it in Windows Sound.
AFAIK it is in this latter mode with an external DAC that WASAPI works without resampling - I am unsure what happens when you use the loopback method for sounds playing on your PC.
Thanks for the response Peter
Maybe my wording wasn’t very good…I AM trying to record audio that is playing on my computer using loopback - the source is streaming radio.
The playback device is the external DAC. The Playback and Recording devices selected in Audacity Audio Settings (as per your screenshot) are set to
[Playback] “Speakers (2-Topping USB DAC)”
[Recording] “Speakers (2-Topping USB DAC) (loopback)”
The Windows 10 Sound Settings (as per your other screenshot) for the Topping DAC have both Exclusive mode boxes ticked.
This works fine for recording in Audacity if the player (Foobar app on the computer) has the “Topping DAC” selected as output device.
If the “Topping DAC Exclusive” output device is chosen in Foobar I get the Invalid Device message from Audacity when trying to record. Which is kind of what I would expect from what I’d read about how WASAPI Exclusive mode works, but that Audacity Tutorial seems to imply otherwise.
NB - the same issue occurs if I just use the Realtek speakers as output devices in Exclusive mode.
I see that your Edirol UA-1EX device is a DAC and an ADC so it can convert in either direction. My Topping E30 is a DAC only.
cheers
Andrew
Indeed, and usually I am only using the ADC side of it to connect analog devices to my PC/Audacity - but in the interests of experimentation I attempted to use loopback on the Edirol (to be honest I never noticed before that that was a possible available option) so I used these settings:
But when I try to record, either with the exclusive settings on or off, all that happens is that Audacity goes into record mode with the red recording cursor stuck at T=0 and with no recording taking place. I don’t get the “device not available” dialog that you get.
I happen to be the sole remaining editor of the manual *(and BTW the Manual will no longer exist when Muse eventually release version 4 of Audacity)*and did quite a lot of work on that page - but I’m afraid that the guy on the old Audacity Team (Gale Andrews) who wrote that note div about exclusive mode sadly died a few years ago so I can no longer ask him about this :
I was also only ever a QA tester and documenter so I don’t peer at the programming innards of Audacity and can’t really offer any further technical insights.
It is remotely possible that @steve (fellow Forum elf and fellow ex Audacity Team member) may be able to offer some insights - but possibly not as he is a Linux guy.
As waxcylinder / Peter wrote, I’m primarily a Linux guy, but from what I recall about WASAPI “Exclusive Mode” is that this mode passes control of a device to one application (exclusively). (Also the sample rate set in the app must match the sample rate set for the device).
“WASAPI loopback” allows the output of a device to be captured from the audio end-point.
I had some spare time this afternoon so I did some more digging and experimenting …
It looks to me as though this is a bug, a regression bug at that. It is a regression bug on 2.4.2 introduced in 3.0.0. With these settings on 2.4.2 it all works fine:
I do love being able to see the old Device Toolbar that we had in the earlier Audacity versions - you can still get it but you have to remember to turn it on from View > Toolbars.
When I try the same settings on Audacity 3.0.0 it freezes/crashes.
3.0 was the last version that the old Audacity Team produced before Muse took over the project, it was the version where we changed the project from from the pile-of-files (AUP and folder of little 6 second audio clips) to the consolidated AUP3 SQLite database - but that transition should not really have affected the WASAPI loopback with an external DAC.
The other digging I did was on Muse’s own Support site where this page has a video tutorial which clearly indicates that it should work:
So, I will be logging this regression issue on Muse’s Github issues log
I was half-way through logging the bug and was trying to create an image of failure in 3.7.3 and lo and behold it worked.
The only difference that I can think of is that I purged my Audacity settings folder (a “hidden” folder) to simulate clean OOTB factory settings 3.7.3 - before adding back the Device Toolbar and changing the settings to WASAPI/Edirol loopback.
I have to change the Playback device back to PC speakers to hear what I recorded but that was exactly what I expected, a song I was playing in iTunes.
So maybe it is just your DAC that doesn’t want to play nice. I note that @steve wrote earlier in this thread:
UPDATE: after having it working in 3.7.3 I then relaunched 3.0.0 and that worked fine too !
Hi - yes that’s how I understood WASAPI exclusive mode worked too. It was just that comment in the Audacity tutorial that seemed to imply it might work a bit differently.
It would be great if it was possible to loopback record from a device in exclusive mode, so that all the Windows processing was avoided. However that doesn’t seem to be possible currently.
thanks for your advice
Hi Peter - thanks for all your effort, and very interesting to hear some Audacity background from someone so deeply involved
I should point out that I am very new to Audacity and still feeling my way.
I did download 2.4.2 and try it out and it behaves the same way as 3.7.3 - ie with the DAC in exclusive mode in Foobar I get the -9996 invalid device error.
But I get the same error if I use the Realtek speakers in exclusive mode. So this looks like a limitation of the WASAPI exclusive mode - as per Steve’s snip from the MS doco.
So I’ll resign myself to using shared mode and trying to minimise spurious audio and processing through the Windows audio engine. There’s quite a few tips out there discussing how to do that, though it’s not ideal!