From 1eecd50f3d474aa1ff5b059021994dc95e26787c Mon Sep 17 00:00:00 2001
From: Connor McLaughlin <stenzek@gmail.com>
Date: Mon, 18 May 2020 00:59:12 +1000
Subject: [PATCH] SPU: Run SPU when changing regs on voice pending key-on

Fixes menu/cursor sounds with different frequencies in Final Fantasy 7.
---
 src/core/spu.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/spu.cpp b/src/core/spu.cpp
index 7f4a76bee..e6c8a4eb8 100644
--- a/src/core/spu.cpp
+++ b/src/core/spu.cpp
@@ -557,7 +557,7 @@ void SPU::WriteVoiceRegister(u32 offset, u16 value)
   Assert(voice_index < 24);
 
   Voice& voice = m_voices[voice_index];
-  if (voice.IsOn())
+  if (voice.IsOn() || m_key_on_register & (1u << voice_index))
     m_tick_event->InvokeEarly();
 
   switch (reg_index)