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

Sample rate negotiation with a DAW #18

Closed
josephernest opened this issue Oct 28, 2018 · 2 comments
Closed

Sample rate negotiation with a DAW #18

josephernest opened this issue Oct 28, 2018 · 2 comments

Comments

@josephernest
Copy link

If the sample rate is set to 44.1 Khz in the Windows playback device and Windows recording device:

image

and if the previously-selected device was set to 48 Khz in Ableton:

image

then it will cause a failure when opening the device:

image

So it could be useful to see if a sample rate negotiation between Flex and DAW would be possible.

Note: it's a minor / non-urgent / non-critical issue for now, because a solution is to set a sample-rate in the DAW that matches the Windows playback device sample rate, before selecting FlexASIO. For best user experience, it can be interesting to solve this issue (maybe later), so that the end user never sees the "Failed to open device" error.

@dechamps
Copy link
Owner

There are two possible scenarios here: either Ableton asks FlexASIO for which sample rates it supports, or it doesn't. Does Ableton show many possible sample rates in that drop down box, or only the one FlexASIO is currently using? If it's the former, then it means Ableton is not taking the ASIO driver into account when displaying the list of possible sample rates.

In any case… the main reason why this is so user-unfriendly is because FlexASIO is using WASAPI Shared mode by default, which is very inflexible when it comes to sample rates: it has to match the one set in the Windows settings, period. And because FlexASIO wants to open an input and an output, both devices have to match, too.

Once I'm done with #6 (I've already made good progress on that), you will have the possibility of choosing which "backend" ("host API" in PortAudio parlance) you want to use. This will solve your problem, because you will have the option of selecting a backend that is more flexible than WASAPI Shared, that is:

  • Other "Shared" backends (DirectSound, MME): will accept any sample rate, and then transparently convert to the device sample rate as set in the Windows options (just like most Windows applications);
  • Or "exclusive" backends (WASAPI Exclusive, WDM-KS): will accept any sample rate that the hardware device supports; will take complete control of the hardware device and send data directly to it at the selected sample rate (no conversion).

All 5 backends (DirectSound, MME, WASAPI Exclusive, WASAPI Shared, and WDM-KS) will be available once I'm done with #6.

@dechamps
Copy link
Owner

dechamps commented Nov 1, 2018

With the newly released FlexASIO 0.4, you can avoid this problem by using pretty much any backend besides WASAPI Shared. It's still not clear to me why WASAPI Shared is being so difficult about sample rates; filed #23 to investigate further.

@dechamps dechamps closed this as completed Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants