mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Loop if requested
This commit is contained in:
parent
86ba309377
commit
40f7975f46
|
@ -43,9 +43,13 @@ impl Mixer {
|
||||||
some_channel.pos += SOUND_BUFFER_SIZE;
|
some_channel.pos += SOUND_BUFFER_SIZE;
|
||||||
|
|
||||||
if some_channel.pos >= some_channel.data.len() {
|
if some_channel.pos >= some_channel.data.len() {
|
||||||
|
if some_channel.should_loop {
|
||||||
|
some_channel.pos = 0;
|
||||||
|
} else {
|
||||||
has_finished = true;
|
has_finished = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if has_finished {
|
if has_finished {
|
||||||
channel.take();
|
channel.take();
|
||||||
|
|
Loading…
Reference in a new issue