From 9959440a3a70c1bf7fad5499e145a800c648fa6a Mon Sep 17 00:00:00 2001
From: Connor McLaughlin <stenzek@gmail.com>
Date: Fri, 8 May 2020 21:34:49 +1000
Subject: [PATCH] SPU: Align starting addresses to two words

Fixes interrupts firing early and occasional broken speech in Valkyrie
Profile.
---
 src/core/spu.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/spu.cpp b/src/core/spu.cpp
index f02090ad0..40613e2a4 100644
--- a/src/core/spu.cpp
+++ b/src/core/spu.cpp
@@ -1049,7 +1049,7 @@ bool SPU::StopDumpingAudio()
 
 void SPU::Voice::KeyOn()
 {
-  current_address = regs.adpcm_start_address;
+  current_address = regs.adpcm_start_address & ~u16(1);
   regs.adsr_volume = 0;
   has_samples = false;
   ignore_loop_address = false;
@@ -1491,7 +1491,7 @@ std::tuple<s32, s32> SPU::SampleVoice(u32 voice_index)
       else
       {
         Log_TracePrintf("Voice %u loop end+repeat @ 0x%08X", voice_index, ZeroExtend32(voice.current_address));
-        voice.current_address = voice.regs.adpcm_repeat_address;
+        voice.current_address = voice.regs.adpcm_repeat_address & ~u16(1);
       }
     }
   }