diff --git a/libultraship b/libultraship
index 20cae248..c3fe8b75 160000
--- a/libultraship
+++ b/libultraship
@@ -1 +1 @@
-Subproject commit 20cae24870de0958d3603c07b554241fc166d521
+Subproject commit c3fe8b759a5f0dcf673de89a1d4181846e24bef1
diff --git a/soh-uwp/Package.appxmanifest b/soh-uwp/Package.appxmanifest
index 0bb49bd9..b94b1378 100644
--- a/soh-uwp/Package.appxmanifest
+++ b/soh-uwp/Package.appxmanifest
@@ -15,7 +15,7 @@
+ Version="1.0.10.0" />
diff --git a/soh/src/code/audio_synthesis.c b/soh/src/code/audio_synthesis.c
index 2d3ce8b5..223f116b 100644
--- a/soh/src/code/audio_synthesis.c
+++ b/soh/src/code/audio_synthesis.c
@@ -1,3 +1,6 @@
+#pragma GCC push_options
+#pragma GCC optimize("Od")
+
#include
#include "global.h"
#include "soh/mixer.h"
@@ -893,11 +896,12 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
// Note the following code was written to address rare crashes on certain platforms. It could definitely use another set of eyes
// Violation protection: in rare instances the aligned value exceeds the sample + padding.
- int requested = ((sampleDataOffset - sampleDataStart) + (nFramesToDecode * frameSize + 16)) & ~0XF;
- int fontsize = audioFontSample->size + 16;
+ int requested = (sampleDataOffset + sampleDataStart) + (aligned & ~0XF); // loadbuffer rounds down 16
+ int fontsize = ALIGN16(audioFontSample->size + 16);
if (requested >= fontsize) {
- aligned = ALIGN16(audioFontSample->size - sampleDataOffset);
+ // Clean up alignment
+ aligned = ALIGN16((audioFontSample->size - (sampleDataOffset + sampleDataStart)));
}
// End violation protection
@@ -1081,6 +1085,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
return cmd;
}
+
Acmd* AudioSynth_FinalResample(Acmd* cmd, NoteSynthesisState* synthState, s32 count, u16 pitch, u16 inpDmem,
s32 resampleFlags) {
if (pitch == 0) {
@@ -1252,3 +1257,4 @@ Acmd* AudioSynth_NoteApplyHeadsetPanEffects(Acmd* cmd, NoteSubEu* noteSubEu, Not
aAddMixer(cmd++, ALIGN64(bufLen), DMEM_NOTE_PAN_TEMP, dest);
return cmd;
}
+#pragma GCC pop_options