Channel counts as finished if the channel position reaches the end of the effect

This commit is contained in:
Gwilym Inzani 2023-07-25 23:24:40 +01:00
parent b80c85f1d9
commit 9445a57f48

View file

@ -538,11 +538,11 @@ impl MixerBuffer {
(false, true) => call_mono_fn!(agb_rs__mixer_add_mono_loop), (false, true) => call_mono_fn!(agb_rs__mixer_add_mono_loop),
(true, false) => { (true, false) => {
call_mono_fn!(agb_rs__mixer_add_mono_first); call_mono_fn!(agb_rs__mixer_add_mono_first);
channel.is_done = channel.pos > channel_len; channel.is_done = channel.pos >= channel_len;
} }
(false, false) => { (false, false) => {
call_mono_fn!(agb_rs__mixer_add_mono); call_mono_fn!(agb_rs__mixer_add_mono);
channel.is_done = channel.pos > channel_len; channel.is_done = channel.pos >= channel_len;
} }
} }
} }