Fixed GetResamplerAvailableOutputFrames

Non-euclidean division is a pain
main
Brick 2023-08-26 10:00:58 +01:00 committed by Ryan C. Gordon
parent b49d0a607e
commit 041dbd6b5f
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static Sint64 GetResampleRate(const int src_rate, const int dst_rate)
static size_t GetResamplerAvailableOutputFrames(const size_t input_frames, const Sint64 resample_rate, const Sint64 resample_offset)
{
const Sint64 output_frames = ((((Sint64)input_frames << 32) - resample_offset - 1) / resample_rate) + 1;
const Sint64 output_frames = (((Sint64)input_frames << 32) - resample_offset + resample_rate - 1) / resample_rate;
return (size_t) SDL_max(output_frames, 0);
}