Commit b2eccfa6 authored by David Reid's avatar David Reid

Fix a bug with engine nodes.

This bug results in an audio glitch when mixing nodes in the node
graph. It specifically happens when resampling is not being performed,
in which case it was specifying an output frame count greater than the
number of frames that are actually being output.

Public issue https://github.com/mackron/miniaudio/issues/408
parent f2d4fc42
...@@ -70679,8 +70679,8 @@ static void ma_engine_node_process_pcm_frames__general(ma_engine_node* pEngineNo ...@@ -70679,8 +70679,8 @@ static void ma_engine_node_process_pcm_frames__general(ma_engine_node* pEngineNo
framesJustProcessedIn = (ma_uint32)resampleFrameCountIn; framesJustProcessedIn = (ma_uint32)resampleFrameCountIn;
framesJustProcessedOut = (ma_uint32)resampleFrameCountOut; framesJustProcessedOut = (ma_uint32)resampleFrameCountOut;
} else { } else {
framesJustProcessedIn = framesAvailableIn; framesJustProcessedIn = ma_min(framesAvailableIn, framesAvailableOut);
framesJustProcessedOut = framesAvailableOut; framesJustProcessedOut = framesJustProcessedIn; /* When no resampling is being performed, the number of output frames is the same as input frames. */
} }
/* Fading. */ /* Fading. */
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