Fix a bug in ma_gainer.

This commit is contained in:
David Reid
2022-11-19 14:34:47 +10:00
parent 1c4fc2743c
commit 9ba72fa2f6
+1 -1
View File
@@ -47963,7 +47963,7 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
/* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */ /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */
if (pGainer->t == (ma_uint32)-1) { if (pGainer->t == (ma_uint32)-1) {
pGainer->t = pGainer->config.smoothTimeInFrames; pGainer->t = (ma_uint32)ma_min(pGainer->config.smoothTimeInFrames, frameCount);
} }