mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
audio: calculate resampling time directly, don't increment (thanks, Eric!).
Fixes buffer overruns as floating point errors accumulate. Partially fixes Bugzilla #3848.
This commit is contained in:
parent
763c387149
commit
b2f5123b65
@ -527,7 +527,7 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate,
|
||||
*(dst++) = outsample;
|
||||
}
|
||||
|
||||
outtime += outtimeincr;
|
||||
outtime = i * outtimeincr;
|
||||
}
|
||||
|
||||
return outframes * chans * sizeof (float);
|
||||
|
Loading…
Reference in New Issue
Block a user