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

Cycling '74 Max MSP crashes when selecting a 22050 Hz sample rate #88

Closed
dechamps opened this issue Sep 2, 2020 · 3 comments
Closed
Labels
asiohost Relates to a specific ASIO Host Application.

Comments

@dechamps
Copy link
Owner

dechamps commented Sep 2, 2020

With FlexASIO 1.5, using the default configuration, Max 8.1.5 violently crashes when attempting to select a 22050 Hz sample rate on FlexASIO.

The FlexASIO log ends with the following:

--- ENTERING CONTEXT: getBufferSize()
Calculating default buffer size based on 22050 Hz sample rate
Returning: min buffer size 22, max buffer size 22050, preferred buffer size 441, granularity 1
--- EXITING CONTEXT: getBufferSize() [OK]

A debugger reveals that Max is crashing in some kind of stack in ad_asio!ext_main, and seems to be passing an invalid pointer to sscanf(). FlexASIO does not appear anywhere in the crashing stack.

Setting bufferSizeSample = 128 gets rid of the issue. It looks like Max is choking on the buffer sizes that FlexASIO advertises by default.

@dechamps dechamps added the asiohost Relates to a specific ASIO Host Application. label Sep 2, 2020
@dechamps
Copy link
Owner Author

dechamps commented Sep 2, 2020

This crash can also be triggered by Max falling back to the first available sample rate (which is typically 22050 Hz) for whatever reason, which can happen when the Max user settings don't match the underlying capabilities. In that case the only way to recover is to reset the settings (in AppData\Roaming\Cycling '74).

@dechamps
Copy link
Owner Author

dechamps commented Sep 3, 2020

Upon further investigation, appears that Max crashes if the driver reports a minimum buffer size of 31 samples or less. 32 samples or more is fine.

@dechamps
Copy link
Owner Author

dechamps commented Sep 4, 2020

This is fixed in FlexASIO 1.6 by enforcing a 32-sample lower limit on the default minimum buffer size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asiohost Relates to a specific ASIO Host Application.
Projects
None yet
Development

No branches or pull requests

1 participant