Renamed SDL_MixAudioFormat to SDL_MixAudio, and use float volume

This commit is contained in:
Brick
2024-05-08 14:21:24 +01:00
parent 5c4b558c1c
commit b6b9d5508e
9 changed files with 37 additions and 28 deletions

View File

@@ -1046,7 +1046,7 @@ void SDL_AudioThreadFinalize(SDL_AudioDevice *device)
static void MixFloat32Audio(float *dst, const float *src, const int buffer_size)
{
if (SDL_MixAudioFormat((Uint8 *) dst, (const Uint8 *) src, SDL_AUDIO_F32, buffer_size, SDL_MIX_MAXVOLUME) < 0) {
if (SDL_MixAudio((Uint8 *) dst, (const Uint8 *) src, SDL_AUDIO_F32, buffer_size, 1.0f) < 0) {
SDL_assert(!"This shouldn't happen.");
}
}