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

SDL3: update volume to a float #652

Open
Starbuck5 opened this issue Dec 22, 2024 · 1 comment · May be fixed by #653
Open

SDL3: update volume to a float #652

Starbuck5 opened this issue Dec 22, 2024 · 1 comment · May be fixed by #653

Comments

@Starbuck5
Copy link

In SDL2, SDL_mixer uses https://wiki.libsdl.org/SDL2/SDL_MixAudioFormat, which takes a volume from 0-128.

In SDL3, SDL_mixer uses https://wiki.libsdl.org/SDL3/SDL_MixAudio, which now takes a float.

According to SDL's README-MIGRATION:

The following symbols have been removed:
SDL_MIX_MAXVOLUME - mixer volume is now a float between 0.0 and 1.0

Therefore, I think it would make sense for SDL_mixer to follow SDL's lead here, before the API is frozen for release.

@slouken
Copy link
Collaborator

slouken commented Dec 22, 2024

Agreed, thanks for the PR!

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

Successfully merging a pull request may close this issue.

2 participants