• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Beta Test: Multitone Loopback Analyzer software

Sokel

Master Contributor
Joined
Sep 8, 2021
Messages
6,182
Likes
6,301
Multitone just passes a flag to the audio library. If it's for some reason reversed, just toggle the selection in Multitone and see if it switches to the other mode.
Tried it with shared mode check and...

shared.PNG




Edit.just tried foobar exclusive/shared,both works.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,838
Likes
37,777
Multitone just passes a flag to the audio library. If it's for some reason reversed, just toggle the selection in Multitone and see if it switches to the other mode.
When I switch Shared mode on, I get the error message, Cannot find audio format supported by driver.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,838
Likes
37,777
I don't think this is a Multitone problem as the other playback softwares give the same output.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,727
Likes
10,404
Location
North-East
When I switch Shared mode on, I get the error message, Cannot find audio format supported by driver.

Just testing it now, it appears WASAPI only gives 16 bit access in exclusive mode. This is why Multitone says it can't find a supported format -- it's looking for more bits that are reported as supported by the audio driver. I can let it output 16 bits, I guess, instead of displaying an error message, but this will not be a good measurement experience unless you expect to measure 16 bits.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,838
Likes
37,777
I have to use exclusive push mode to get all sample rates and bit-depth combinations to work.
With Foobar I don't get those choices with the Topping. Some other devices I do, but not the Topping.
 

Sokel

Master Contributor
Joined
Sep 8, 2021
Messages
6,182
Likes
6,301
I have to use exclusive push mode to get all sample rates and bit-depth combinations to work.
The only thing that doesn't work in WASAPI exclusive in foobar (event/push) is native DSD512,has something to do with the SACD plugin obviously.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,727
Likes
10,404
Location
North-East
I don't think this is a Multitone problem as the other playback softwares give the same output.

I can get at most 16 bits in exclusive mode. Not sure how useful that is, but I'll make the change to not error out in this case. It'll to ask you if you want to continue measurement with 16 bits, and then it's up to you ;)
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,838
Likes
37,777
Well Kernel streaming in Reaper works with good results. Any chance of that as a choice in Multitone? I have no idea if that is some big hairy problem to include.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,838
Likes
37,777
I can get at most 16 bits in exclusive mode. Not sure how useful that is, but I'll make the change to not error out in this case. It'll to ask you if you want to continue measurement with 16 bits, and then it's up to you ;)
I suppose though probably using it like it is in 24 bit, just don't go above -.2 dbFS is more useful than 16 bit would be. One could use the CAaudiolimiter removal trick if that last .2 db is important. I'd maybe be just as happy with a note not to use WASAPI above .2 dbFS actually.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,727
Likes
10,404
Location
North-East
Well Kernel streaming in Reaper works with good results. Any chance of that as a choice in Multitone? I have no idea if that is some big hairy problem to include.

I think it is. If you want to use kernel streaming, use one of the ASIO drivers that support it, for example ASIO4ALL or FlexASIO. You can then use that ASIO device from Multitone.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,622
Location
London, United Kingdom
When some of the audio devices don't offer ASIO (these are generally playback only DACs or AV devices) you aren't sure what you are getting without jumping thru hoops.

When using WASAPI Exclusive mode, you are sure of what you are getting, same as ASIO. You were just victim of an unfortunate bug in Multitone itself.

If it's for some reason reversed

@bennetng just provided proof that the condition is indeed reversed in your code. That certainly explains a lot!

Just testing it now, it appears WASAPI only gives 16 bit access in exclusive mode. This is why Multitone says it can't find a supported format -- it's looking for more bits that are reported as supported by the audio driver.

If an audio format can be set in the Windows audio device settings, it should also work in WASAPI Exclusive mode.

WASAPI Exclusive can definitely do 24-bit. There is plenty of evidence with lots of applications that work just fine in 24-bit with WASAPI Exclusive (e.g. foobar).

However, last time I programmed against WASAPI directly (it was a long time ago), I noticed most devices actually require 24-bit padded to 32 bit (or the opposite, I don't remember) in the WAVEFORMATEXTENSIBLE spec, otherwise they refuse the format. I don't know if that's still true today.

More generally, WASAPI Exclusive is, in my experience, trickier to make work reliably compared to WASAPI Shared, because some devices can be quite finicky about things like formats and buffer sizes. These problems don't arise with WASAPI Shared because Windows accepts anything and then automatically applies any format conversions and buffer adaptation necessary.

@pkane Have you considered using NAudio instead of using WASAPI directly? My understanding is that it would abstract away all these problems so that you don't have to get your hands dirty. (I never tried it though.)

@pkane: whatever you do, please make sure WASAPI Shared is not the default. WASAPI Shared is a really bad idea for measurements because of automatic conversions and APOs (including CAudioLimiter) will screw things up big time for unsuspecting users. If you can't make WASAPI Exclusive work, might as well tell people to use ASIO. After all, they can always use ASIO4ALL or FlexASIO (which, by the way, does support WASAPI Exclusive in 24-bit!).

Well Kernel streaming in Reaper works with good results. Any chance of that as a choice in Multitone? I have no idea if that is some big hairy problem to include.

Kernel Streaming is really hard to use directly. You'd want to use a library, but few of them support Kernel Streaming for the same reason. A notable exception is PortAudio.

Technically you can use Multitone with Kernel Streaming today: just use it with FlexASIO and the Kernel Streaming backend :p

I suppose though probably using it like it is in 24 bit, just don't go above -.2 dbFS is more useful than 16 bit would be. One could use the CAaudiolimiter removal trick if that last .2 db is important. I'd maybe be just as happy with a note not to use WASAPI above .2 dbFS actually.

I would strongly advise against using WASAPI Shared with measurements. Unless you are careful you can easily end up with random conversions and APOs that will screw up your results. Use WASAPI Exclusive or ASIO.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,727
Likes
10,404
Location
North-East
I suppose though probably using it like it is in 24 bit, just don't go above -.2 dbFS is more useful than 16 bit would be. One could use the CAaudiolimiter removal trick if that last .2 db is important. I'd maybe be just as happy with a note not to use WASAPI above .2 dbFS actually.
I think this is a bit of a complication. On my development machine, I don't have any issues with WASAPI at 0dBFS -- the results are exactly the same for ASIO or for WASAPI. I think WASAPI is just generally to be avoided, if possible.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,622
Location
London, United Kingdom
So that was why the volume works in mixer!

If the audio device supports hardware volume control (most of them do), then the Windows master volume control will still work even in WASAPI Exclusive mode, because changing the volume does not involve touching the bitstream. This is not a way to tell WASAPI Shared and WASAPI Exclusive apart unless your device relies on software volume control, which is atypical.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
@bennetng just provided proof that the condition is indeed reversed in your code. That certainly explains a lot!
I was a bit hesitated to post that screenshot but I suppose every .NET user should know the apps are by definition open-source. BTW, the software in my signature is also written in .NET and could be useful to identify if a file or a renderer is doing some strange stuff or not.
 
Top Bottom