diff --git a/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj index 16a01ee6..1b1a9fdf 100644 --- a/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -1214,7 +1214,7 @@ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.6; + CURRENT_PROJECT_VERSION = 2.1.8; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NORMALSRB2, @@ -1226,7 +1226,7 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.6; + CURRENT_PROJECT_VERSION = 2.1.8; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PREPROCESSOR_DEFINITIONS = ( diff --git a/src/sdl2/mixer_sound.c b/src/sdl2/mixer_sound.c index 658a8b5d..e8c62d70 100644 --- a/src/sdl2/mixer_sound.c +++ b/src/sdl2/mixer_sound.c @@ -152,7 +152,7 @@ static Mix_Chunk *ds2chunk(void *stream) if (!(frac & 0xFFFF)) // other solid multiples (change if FRACBITS != 16) newsamples = samples * (frac >> FRACBITS); else // strange and unusual fractional frequency steps, plus anything higher than 44100hz. - newsamples = FixedMul(frac, samples) + 1; // add 1 sample for security! the code below rounds up. + newsamples = FixedMul(FixedDiv(samples, freq), 44100) + 1; // add 1 to counter truncation. if (newsamples >= UINT32_MAX>>2) return NULL; // would and/or did wrap, can't store. break;