mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Fix an edge case in the data converter.
This commit is contained in:
+1
-1
@@ -65328,7 +65328,7 @@ static ma_result ma_data_converter_process_pcm_frames__resample_first(ma_data_co
|
||||
*/
|
||||
#if 1
|
||||
{
|
||||
ma_uint64 requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut;
|
||||
ma_uint64 requiredInputFrameCount = ((frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut) + 1; /* +1 to account for truncation from the division. */
|
||||
if (frameCountInThisIteration > requiredInputFrameCount) {
|
||||
frameCountInThisIteration = requiredInputFrameCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user