mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Prevent truncation when resampling sounds with non-multiples of 11250.
This commit is contained in:
parent
e62c0794dc
commit
c977d17416
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…
Add table
Reference in a new issue