mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Loop if requested
This commit is contained in:
parent
86ba309377
commit
40f7975f46
|
@ -43,7 +43,11 @@ 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() {
|
||||||
has_finished = true;
|
if some_channel.should_loop {
|
||||||
|
some_channel.pos = 0;
|
||||||
|
} else {
|
||||||
|
has_finished = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue