mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix a mixing bug when applying an effect.
This commit is contained in:
@@ -1884,11 +1884,11 @@ static ma_result ma_volume_and_clip_and_effect_pcm_frames(void* pDst, ma_format
|
|||||||
otherwise we need to convert.
|
otherwise we need to convert.
|
||||||
*/
|
*/
|
||||||
if (effectFormatOut == formatOut && effectChannelsOut == channelsOut) {
|
if (effectFormatOut == formatOut && effectChannelsOut == channelsOut) {
|
||||||
/* Fast path. No data conversion required for output data. Just accumulate. */
|
/* Fast path. No data conversion required for output data. Just accumulate or overwrite. */
|
||||||
if (isAccumulation) {
|
if (isAccumulation) {
|
||||||
ma_unclipped_accumulate_pcm_frames(pRunningDst, effectBufferOut, effectFrameCountOut, effectFormatOut, effectChannelsOut);
|
ma_unclipped_accumulate_pcm_frames(pRunningDst, effectBufferOut, effectFrameCountOut, effectFormatOut, effectChannelsOut);
|
||||||
} else {
|
} else {
|
||||||
ma_clipped_accumulate_pcm_frames(pRunningDst, effectBufferOut, effectFrameCountOut, effectFormatOut, effectChannelsOut);
|
ma_clip_pcm_frames(pRunningDst, effectBufferOut, effectFrameCountOut, effectFormatOut, effectChannelsOut);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Slow path. Data conversion required before accumulating. */
|
/* Slow path. Data conversion required before accumulating. */
|
||||||
|
|||||||
Reference in New Issue
Block a user