Skip to content
Snippets Groups Projects
Commit ea7abe7c authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Merge branch 'master' of https://github.com/ilag11111/SRB2

parents 2055e268 b21d5c55
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment