From 072638fddf13d3070fcf0ae93aa85e451404a455 Mon Sep 17 00:00:00 2001 From: "ardi@ist-einmalig.de" Date: Mon, 16 Nov 2009 22:43:46 +0000 Subject: [PATCH] use the LoopFlag from Bannersound to automatic loop the sound if is needed --- source/libwiigui/gui_sound_decoder_bns.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libwiigui/gui_sound_decoder_bns.cpp b/source/libwiigui/gui_sound_decoder_bns.cpp index 630f5fc9..37c75a08 100644 --- a/source/libwiigui/gui_sound_decoder_bns.cpp +++ b/source/libwiigui/gui_sound_decoder_bns.cpp @@ -37,7 +37,7 @@ public: loop_hist1 = hist1; loop_hist2 = hist2; } - if(loopStart > startPos && currentPos >= endPos) + if(loop && currentPos >= endPos) { currentPos = loopStart; hist1 = loop_hist1; @@ -84,6 +84,7 @@ public: s16 pcm[14]; s16 hist1; s16 hist2; + bool loop; const u8* loopStart; u16 loopOffset; s16 loop_hist1; @@ -126,7 +127,7 @@ protected: in_ptr++; // skip u8 codeType = *in_ptr++; - in_ptr++; // u8 loopFlag = *in_ptr++; + channel[0].loop = channel[1].loop = be16inc(in_ptr); // u8 loopFlag; channelCount = *in_ptr++;