Adjust Hitsound Volume

This commit is contained in:
copecone committed 2026-07-11 00:27:18 +09:00
1 parent 36d8edfb07
commit 16f02f734c
1 file changed
+5 -4
+5 -4
View File
@@ -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<IAudioFilter> _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;
}
}