SDL_mixer icon indicating copy to clipboard operation
SDL_mixer copied to clipboard

SDL3: update volume to a float

Open Starbuck5 opened this issue 1 year ago • 1 comments

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.

Starbuck5 avatar Dec 22 '24 11:12 Starbuck5

Agreed, thanks for the PR!

slouken avatar Dec 22 '24 20:12 slouken

This is resolved in the new SDL3_mixer API, thanks!

icculus avatar Jul 24 '25 04:07 icculus