mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 23:26:33 +11:00
Loop if requested
This commit is contained in:
parent
86ba309377
commit
40f7975f46
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ impl Mixer {
|
|||
some_channel.pos += SOUND_BUFFER_SIZE;
|
||||
|
||||
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…
Add table
Reference in a new issue