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

Docs updates (mainly to mixer) #3272

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Starbuck5
Copy link
Member

@Starbuck5 Starbuck5 commented Dec 19, 2024

The mixer module is optional and depends on SDL_mixer. Your program should test that :mod:pygame.mixer is available and initialized before using it.

It's part of our API. Any remotely compliant build of pygame-ce has this, it's not something to be afraid of. I don't expect people's programs to test for pygame.mixer.

Pygame will default to reasonable values, but pygame cannot perform Sound resampling, so the mixer should be initialized to match the values of your audio resources.

Technically, true, pygame-ce does not perform resampling. But SDL does, and they will resample into the format of your audio resources, this is highly misleading.

@Starbuck5 Starbuck5 added docs mixer pygame.mixer labels Dec 19, 2024
@Starbuck5 Starbuck5 requested a review from a team as a code owner December 19, 2024 08:01
Copy link
Contributor

@yunline yunline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if imageext, font and freetype should also be getting the same treatment? They are also in the same boat of being "technically optional but used fairly widely so not actually"

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

Successfully merging this pull request may close these issues.

3 participants