mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-13 00:24:17 +00:00
Merge pull request #119 from ilag11111/linux64-soundcrash-fix
Prevent resampling-related crashes on Linux 64-bit
This commit is contained in:
commit
51cb45cd4b
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ static Mix_Chunk *ds2chunk(void *stream)
|
|||
break;
|
||||
default: // convert arbitrary hz to 44100.
|
||||
step = 0;
|
||||
frac = ((UINT32)freq << FRACBITS) / 44100;
|
||||
frac = ((UINT32)freq << FRACBITS) / 44100 + 1; //Add 1 to counter truncation.
|
||||
while (i < samples)
|
||||
{
|
||||
o = (INT16)(*s+0x80)<<8; // changed signedness and shift up to 16 bits
|
||||
|
|
Loading…
Reference in a new issue