Fix chorus not being rendered when an audio processing callback is used. #751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in
fluid_rvoice_mixer.c
:fluid_rvoice_mixer_process_fx()
:If an audio processing callback is used,
mix_fx_to_out
would beFALSE
. As a result,in_ch
andout_ch_l
points to the same buffer.in
fluid_chorus.c
:fluid_chorus_processreplace()
:Here the chorus processing code writes to the left output buffer (which will overwrite the input buffer in this case) before the sample from the input buffer is stored into the delay buffer, making the chorus output all zeros. If no audio processing callback is used,
mix_fx_to_out
would beTRUE
andin
andleft_out
will not point to the same buffer, therefore the order doesn't matter.Simply swapping the two steps should be a sufficient fix. This patch also apply the same change to
fluid_chorus_processmix
only for the sake of consistency (since they are almost exact copies of each other).