Fix warnings 'macro argument should be enclosed in parentheses'

This commit is contained in:
Sylvain
2022-12-05 15:20:48 +01:00
committed by Sam Lantinga
parent 8cafde5ecc
commit af5bda5ef3
10 changed files with 58 additions and 58 deletions

View File

@@ -78,9 +78,9 @@ static const Uint8 mix8[] = {
};
/* The volume ranges from 0 - 128 */
#define ADJUST_VOLUME(s, v) (s = (s * v) / SDL_MIX_MAXVOLUME)
#define ADJUST_VOLUME_U8(s, v) (s = (((s - 128) * v) / SDL_MIX_MAXVOLUME) + 128)
#define ADJUST_VOLUME_U16(s, v) (s = (((s - 32768) * v) / SDL_MIX_MAXVOLUME) + 32768)
#define ADJUST_VOLUME(s, v) ((s) = ((s) * (v)) / SDL_MIX_MAXVOLUME)
#define ADJUST_VOLUME_U8(s, v) ((s) = ((((s) - 128) * (v)) / SDL_MIX_MAXVOLUME) + 128)
#define ADJUST_VOLUME_U16(s, v) ((s) = ((((s) - 32768) * (v)) / SDL_MIX_MAXVOLUME) + 32768)
void SDL_MixAudioFormat(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format,
Uint32 len, int volume)