Channel counts as finished if the channel position reaches the end of the effect (#463)

Fixes an issue where you could only play 8 sounds until it would stop
entirely.

- [x] no changelog update needed
This commit is contained in:
Gwilym Inzani 2023-07-25 23:33:39 +01:00 committed by GitHub
commit 6c7f415fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -538,11 +538,11 @@ impl MixerBuffer {
(false, true) => call_mono_fn!(agb_rs__mixer_add_mono_loop),
(true, false) => {
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) => {
call_mono_fn!(agb_rs__mixer_add_mono);
channel.is_done = channel.pos > channel_len;
channel.is_done = channel.pos >= channel_len;
}
}
}