From 16f02f734cce40870a8cdcae1577e9bfcc0a194c82be644817895cc796ed0626 Mon Sep 17 00:00:00 2001 From: copecone Date: Sat, 11 Jul 2026 00:27:18 +0900 Subject: [PATCH] Adjust Hitsound Volume --- Util/Audio/OfflineAudioMixer.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Util/Audio/OfflineAudioMixer.cs b/Util/Audio/OfflineAudioMixer.cs index 3a75643..cb2496a 100644 --- a/Util/Audio/OfflineAudioMixer.cs +++ b/Util/Audio/OfflineAudioMixer.cs @@ -87,7 +87,7 @@ namespace ADOFAIRenderer.Util.Audio // Target Audio Settings private readonly int _targetChannels; private readonly int _targetSampleRate; - private const float MasterVolume = 1f; + private const float ClipVolume = 1f; // Audio Filter Settings private readonly LinkedList _filters = new(); @@ -272,7 +272,7 @@ namespace ADOFAIRenderer.Util.Audio if (idxHigh >= totalSamples) idxHigh = totalSamples - 1; if (idxLow >= totalSamples) idxLow = totalSamples - 1; - for (int c = 0; c < _targetChannels; c++) + for (var c = 0; c < _targetChannels; c++) { float valLow = _bgmSamples[idxLow * _targetChannels + c]; float valHigh = _bgmSamples[idxHigh * _targetChannels + c]; @@ -334,11 +334,12 @@ namespace ADOFAIRenderer.Util.Audio if (idxHigh >= totalSamples) idxHigh = totalSamples - 1; if (idxLow >= totalSamples) idxLow = totalSamples - 1; - for (int c = 0; c < _targetChannels; c++) + for (var c = 0; c < _targetChannels; c++) { float valLow = clipData.Samples[idxLow * _targetChannels + c]; float valHigh = clipData.Samples[idxHigh * _targetChannels + c]; - mixedBuffer[s * _targetChannels + c] += (valLow + t * (valHigh - valLow)) * ev.Volume * MasterVolume; + mixedBuffer[s * _targetChannels + c] += (valLow + t * (valHigh - valLow)) * ev.Volume + * ClipVolume * 2 / 3; } }