mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
channel.data.len() = 2 * channel.pos
This commit is contained in:
parent
5266e7a40c
commit
46b40c8e5b
|
@ -147,7 +147,7 @@ impl MixerBuffer {
|
||||||
if (channel.pos + playback_speed * SOUND_BUFFER_SIZE).floor() >= channel.data.len() {
|
if (channel.pos + playback_speed * SOUND_BUFFER_SIZE).floor() >= channel.data.len() {
|
||||||
// TODO: This should probably play what's left rather than skip the last bit
|
// TODO: This should probably play what's left rather than skip the last bit
|
||||||
if channel.should_loop {
|
if channel.should_loop {
|
||||||
channel.pos -= channel.data.len();
|
channel.pos = 0.into();
|
||||||
} else {
|
} else {
|
||||||
channel.is_done = true;
|
channel.is_done = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue