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,9 +43,13 @@ impl Mixer {
|
|||
some_channel.pos += SOUND_BUFFER_SIZE;
|
||||
|
||||
if some_channel.pos >= some_channel.data.len() {
|
||||
if some_channel.should_loop {
|
||||
some_channel.pos = 0;
|
||||
} else {
|
||||
has_finished = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if has_finished {
|
||||
channel.take();
|
||||
|
|
Loading…
Reference in a new issue