From 07fbab1e8e40568e6d766b26a00e36e0ea5596ba Mon Sep 17 00:00:00 2001 From: DV666 Date: Wed, 13 May 2026 17:29:53 +0200 Subject: [PATCH 1/2] Fix looping sounds when changing fields. --- Assembly-CSharp/Global/Sound/SaXAudio/SdLibAPIWithSaXAudio.cs | 4 ++++ Assembly-CSharp/Global/ff9/Snd/FF9Snd.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Assembly-CSharp/Global/Sound/SaXAudio/SdLibAPIWithSaXAudio.cs b/Assembly-CSharp/Global/Sound/SaXAudio/SdLibAPIWithSaXAudio.cs index 09176b461..4be1a0653 100644 --- a/Assembly-CSharp/Global/Sound/SaXAudio/SdLibAPIWithSaXAudio.cs +++ b/Assembly-CSharp/Global/Sound/SaXAudio/SdLibAPIWithSaXAudio.cs @@ -238,6 +238,10 @@ public override Int32 SdSoundSystem_SoundCtrl_Start(Int32 soundID, Int32 offsetT return 0; } + // [DV] Fix looping sounds when re-using the same sound between fields, mostly for ambiant sounds (eg: Prima Vista machines) + if (bankData.TryGetValue(bankID, out BankData data) && data.LoopEnd > 0) + SaXAudio.SetLooping(soundID, true); + return SaXAudio.StartAtTime(soundID, offsetTimeMSec / 1000f) ? 1 : 0; } diff --git a/Assembly-CSharp/Global/ff9/Snd/FF9Snd.cs b/Assembly-CSharp/Global/ff9/Snd/FF9Snd.cs index 158249553..da5000f41 100644 --- a/Assembly-CSharp/Global/ff9/Snd/FF9Snd.cs +++ b/Assembly-CSharp/Global/ff9/Snd/FF9Snd.cs @@ -237,8 +237,8 @@ public static Int32 GetExtEnvObjNo(Int32 ObjNo) { return 642; } - if (ObjNo == 255) - { + if (ObjNo == 255) // [DV] Special case for Prima Vista (field 57 and 58). The only sound invoked here is 255 but the devs add a little fix to add 618 and 410. + { // More informations in SetSfxResDelegate. return 618; } if (ObjNo == 355) From 34b06dc900d1182255faa18fec02a99f8ea18cdc Mon Sep 17 00:00:00 2001 From: DV666 Date: Wed, 13 May 2026 17:56:22 +0200 Subject: [PATCH 2/2] Use SoLoud instead of SdLib when switching the Backend parameter in launcher --- Memoria.Launcher/Launcher/Settings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Memoria.Launcher/Launcher/Settings.cs b/Memoria.Launcher/Launcher/Settings.cs index 351919c89..27beed1be 100644 --- a/Memoria.Launcher/Launcher/Settings.cs +++ b/Memoria.Launcher/Launcher/Settings.cs @@ -48,7 +48,7 @@ public partial class MainWindow : Window, INotifyPropertyChanged ["SwordplayAssistance", "_swordplayassistance", "SwordplayAssistance", "Hacks", 1, 2, 1], ["FrogCatchingIncrement", "_frogcatchingincrement", "FrogCatchingIncrement", "Hacks", 1, 100, 1], - ["AudioBackend", "_audiobackend", "Backend", "Audio", 0, 1, 1], + ["AudioBackend", "_audiobackend", "Backend", "Audio", 2, 1, 1], ["WorldSmoothTexture", "_worldsmoothtexture", "WorldSmoothTexture", "Graphics", 0, 1, 1], ["BattleSmoothTexture", "_battlesmoothtexture", "BattleSmoothTexture", "Graphics", 0, 1, 1], ["ElementsSmoothTexture", "_elementssmoothtexture", "ElementsSmoothTexture", "Graphics", 0, 1, 1],