mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Merge pull request #126 from gwilymk/fix-crash-when-looping-stereo
Fix crash when stereo sound loops
This commit is contained in:
commit
a514625122
|
@ -147,7 +147,7 @@ impl MixerBuffer {
|
|||
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
|
||||
if channel.should_loop {
|
||||
channel.pos -= channel.data.len();
|
||||
channel.pos = 0.into();
|
||||
} else {
|
||||
channel.is_done = true;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue