mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01: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() {
|
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
|
// TODO: This should probably play what's left rather than skip the last bit
|
||||||
if channel.should_loop {
|
if channel.should_loop {
|
||||||
channel.pos -= channel.data.len();
|
channel.pos = 0.into();
|
||||||
} else {
|
} else {
|
||||||
channel.is_done = true;
|
channel.is_done = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue