mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Fix a bug in the gainer where a null pointer can be offset.
This commit is contained in:
+5
-5
@@ -50869,15 +50869,15 @@ static /*__attribute__((noinline))*/ ma_result ma_gainer_process_pcm_frames_inte
|
||||
a += d;
|
||||
}
|
||||
}
|
||||
|
||||
pFramesOut = ma_offset_ptr(pFramesOut, interpolatedFrameCount * sizeof(float));
|
||||
pFramesIn = ma_offset_ptr(pFramesIn, interpolatedFrameCount * sizeof(float));
|
||||
}
|
||||
|
||||
frameCount -= interpolatedFrameCount;
|
||||
|
||||
/* Make sure the timer is updated. */
|
||||
pGainer->t = (ma_uint32)ma_min(pGainer->t + interpolatedFrameCount, pGainer->config.smoothTimeInFrames);
|
||||
|
||||
/* Adjust our arguments so the next part can work normally. */
|
||||
frameCount -= interpolatedFrameCount;
|
||||
pFramesOut = ma_offset_ptr(pFramesOut, interpolatedFrameCount * sizeof(float));
|
||||
pFramesIn = ma_offset_ptr(pFramesIn, interpolatedFrameCount * sizeof(float));
|
||||
}
|
||||
|
||||
/* All we need to do here is apply the new gains using an optimized path. */
|
||||
|
||||
Reference in New Issue
Block a user