Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make device name matching more flexible #129

Closed
thrakotool opened this issue Aug 9, 2021 · 6 comments
Closed

Make device name matching more flexible #129

thrakotool opened this issue Aug 9, 2021 · 6 comments

Comments

@thrakotool
Copy link

I understand this has more to do with the hardware and the win audio engine in general, but I was hoping for a witty solution on the FlexASIO side.
My device (Steinberg MR816) is defined in WASAPI as "Speakers (8- Yamaha Steinberg FW WDM Audio)" at 44.1kHz, but when I change the sample rate to 48kHz - the name changes to "Speakers (9- Yamaha Steinberg FW WDM Audio)". Obviously, FlexASIO fails to find it with the new name = no output at 48kHz.
Same thing with DirectSound.

In WDM-KS the name is consistent at all sample rates, but the sound is distorted at any buffer size (WASAPI works great at 1024, WDM-KS doesn't).

Is it possible to specify different device names for different sample rates in the .toml file? Or edit some other setting somewhere to keep the whole thing consistent.

@dechamps
Copy link
Owner

dechamps commented Aug 9, 2021

when I change the sample rate to 48kHz - the name changes

That's surprising. What do you mean by "change the sample rate"? I've never seen a device change its name just because its sample rate was changed in the Windows sound control panel settings.

@thrakotool
Copy link
Author

The sample rate options are in its own software - here's a screenshot of the panel from Steinberg's website:
Yamaha Steinberg FW control panel

I think MR816 re-initializes every time its sample rate gets changed, judging by its LED behavior. So the name change happens after re-initialization, and the names are consistent with the chosen sample rate.

However, when I was using the inbuilt 1394 port on my previous motherboard, FlexASIOGui showed "Speakers (4 - Yamaha Steinberg FW WDM Audio)" at 44.1kHz and "Speakers (5 - Yamaha Steinberg FW WDM Audio)" at 48kHz.
With my new motherboard I have to use a dedicated PCIe 1394 card, which surprisingly resulted in new names: "Speakers (8-..." and "Speakers (9-..." respectively. I'm not sure what to make of it.

@dechamps
Copy link
Owner

dechamps commented Aug 9, 2021

That's because every time you do this, Windows sees a new audio device and thus gives it a different name. It doesn't know that it's the same device. That's a hardware/driver limitation of your specific device.

Sadly FlexASIO doesn't provide a way to do "fuzzy matching" on device names. I'll see if I can implement something like this in the future.

@dechamps dechamps changed the title WASAPI changes the device name at different sample rate Make device name matching more flexible Aug 9, 2021
@thrakotool
Copy link
Author

Thank you, that would be life saving! FlexASIO is amazing for what it does, but sadly I have to switch between sample rates daily for my work, so this is a critical issue for my workflow.
Just a wild guess, but I noticed that PortAudioDevices shows the same Device Index despite the name changes - so if technically possible, it might be feasible to just use the index instead of the name.

@dechamps
Copy link
Owner

dechamps commented Aug 9, 2021

The issue with the index is that it can change every time a device is added or removed. The best option is probably to allow some kind of glob/regex/partial matching of the device name.

@dechamps dechamps added this to the FlexASIO 1.8 milestone Oct 3, 2021
@dechamps
Copy link
Owner

dechamps commented Oct 16, 2021

This is now implemented in FlexASIO 1.8 as the deviceRegex option. This will allow you to write the following:

[output]
deviceRegex = '^Speakers \(.*Yamaha Steinberg FW WDM Audio\)$'

Which will match any device named Speakers (xxxYamaha Steinberg FW WDM Audio), where xxx can be anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants