-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
SDL 2.0.16 programs go to unrequested frequency with Mix_OpenAudio #4604
Comments
This seems to be expected behavior. This behavior doesn't seem to be documented in the
If you need the frequency not to change, you can simply call |
Thanks for the reply! I'm aware of how to get around this, pygame actually uses Mix_OpenAudioDevice() as well, and exposes I guess I made this report out of an abundance of caution, in response to the pre release window being the time to report regressions / problems. It's strange to me that this behavior changed without any note in the release notes, and between SDL versions rather than SDL_Mixer versions. Pygame has assumed that this will return with a frequency of 44100 for a while now, and I've never had the unittest fail, on multiple machines, and I've never heard any other contributor report it failing. Even though it is technically within the documentation, this is still a change in behavior that people might be relying on, so I wanted to report it just to make sure everything is square before the full release. |
This seems like a likely culprit - b98b5ad @icculus any thoughts on the risk of shipping this?
WASAPI does actually have a proper resampler available via |
That's because most targets can accept 44.1KHz so you haven't seen this fail recently. But there was a time in SDL2, before WASAPI used that flag we just removed, where it would have produced this result. The unit test might often give the same result, but the unit test is asserting an incorrect truth. |
(Also, having gotten burnt by adding that WASAPI flag in the first place, I'm extremely hesitant to add new ones while 2.0.16 is locked down unless we're extremely confident it's both necessary and safe.) |
Ok, this looks pretty cut and dry then. On pygame's end this might be an SDL1 holdover, but it'll be easy enough to fix there. If there aren't any loose ends I guess this issue should be closed. |
Hi,
I'm one of the pygame contributors, and when I built pygame with SDL 2.0.16 I noticed a few unit test failures in our
mixer
module.I made a minimum reproducible example in C:
Compiled with 2.0.14, it outputs:
But with 2.0.16, it outputs:
I'm running this on Windows 10.
The text was updated successfully, but these errors were encountered: