Phase 2: Code Analysis complete with Harmony patches

- Added docs/CODE_ANALYSIS_PHASE2.md with deep analysis
- Implemented VoiceManagerPatch: voice limit (128), ducking, fade times
- Implemented AudioDuckingPatch: snapshot apply, fade in/out timing
- Implemented EnemyAudioPatch: enemy attack hooks, CFVoice routing
- Updated Plugin.cs to call all patch Apply methods
- Hook targets: UtageFmodVoiceManager, SnapshotManager, CFVoiceEventUtility
This commit is contained in:
2026-03-22 13:41:18 -04:00
parent 7169d4533b
commit aa3de01335
5 changed files with 712 additions and 31 deletions

View File

@@ -24,24 +24,27 @@ namespace HomuraHimeAudioMod
harmony = new Harmony(PluginInfo.PLUGIN_GUID);
Log.LogInfo($"HomuraHime Audio Mod v{PluginInfo.PLUGIN_VERSION} initializing...");
ApplyPatches();
Log.LogInfo("HomuraHime Audio Mod initialized successfully");
}
private void ApplyPatches()
{
Log.LogInfo($"Applying audio patches...");
Log.LogInfo("Applying audio patches...");
// Phase 2 will populate these patch classes after code analysis
// VoiceManagerPatch.Apply(ref harmony);
// AudioDuckingPatch.Apply(ref harmony);
// EnemyAudioPatch.Apply(ref harmony);
VoiceManagerPatch.Apply(ref harmony);
AudioDuckingPatch.Apply(ref harmony);
EnemyAudioPatch.Apply(ref harmony);
Log.LogInfo($"Patches applied successfully");
Log.LogInfo("All patches applied successfully");
}
private void OnDestroy()
{
harmony?.UnpatchAll();
harmony?.UnpatchAll(PluginInfo.PLUGIN_GUID);
}
}
}