From 3e1cb17e224e1cdd1c5e2d741fcab8ba4c7c8ca9 Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Mon, 13 Jun 2022 18:05:51 -0400 Subject: [PATCH] Fixed crackling issues --- soh/assets/xml/GC_NMQ_D/audio/Audio.xml | 16 ++++++++-------- soh/soh/OTRGlobals.cpp | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_D/audio/Audio.xml b/soh/assets/xml/GC_NMQ_D/audio/Audio.xml index a7b0d1af4..801228b34 100644 --- a/soh/assets/xml/GC_NMQ_D/audio/Audio.xml +++ b/soh/assets/xml/GC_NMQ_D/audio/Audio.xml @@ -1339,13 +1339,13 @@ - + - + - + @@ -1435,13 +1435,13 @@ - + - + - + @@ -1470,7 +1470,7 @@ - + @@ -1503,7 +1503,7 @@ - + diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d43818acf..a9332573a 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -683,6 +683,9 @@ extern "C" SoundFontSample* ResourceMgr_LoadAudioSample(const char* path) sampleC->loop->end = sample->loop.end; sampleC->loop->count = sample->loop.count; + for (int i = 0; i < 16; i++) + sampleC->loop->state[i] = 0; + for (int i = 0; i < sample->loop.states.size(); i++) sampleC->loop->state[i] = sample->loop.states[i];