Commit 1a919c05 authored by David Reid's avatar David Reid

Cleanup to previous commit.

parent 0724a58e
...@@ -2017,10 +2017,7 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO ...@@ -2017,10 +2017,7 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
/* Slow path. Need to interpolate the gain for each channel individually. */ /* Slow path. Need to interpolate the gain for each channel individually. */
/* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */
if (pFramesOut == NULL || pFramesIn == NULL) { if (pFramesOut != NULL && pFramesIn != NULL) {
/* Fast path. Just update the internal timer. */
} else {
/* Slow path. Need to interpolate the gain for each channel individually. */
float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;
float d = 1.0f / pGainer->config.smoothTimeInFrames; float d = 1.0f / pGainer->config.smoothTimeInFrames;
...@@ -2033,11 +2030,11 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO ...@@ -2033,11 +2030,11 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
if (a > 1) { if (a > 1) {
a = 1; a = 1;
} }
} }
pGainer->t = ma_min(pGainer->t + frameCount, pGainer->config.smoothTimeInFrames);
} }
pGainer->t = ma_min(pGainer->t + frameCount, pGainer->config.smoothTimeInFrames);
#if 0 #if 0
for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) {
/* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment