Apply volume setting to BizBox not hawk sfx

This commit is contained in:
CasualPokePlayer 2024-12-27 07:05:31 -08:00
parent af0b10fb58
commit 24d549ddb8
2 changed files with 3 additions and 2 deletions

View File

@ -1221,7 +1221,8 @@ namespace BizHawk.Client.EmuHawk
private void AboutMenuItem_Click(object sender, EventArgs e)
{
using BizBox form = new(() => Sound.PlayWavFile(Properties.Resources.GetNotHawkCallSFX(), atten: 1.0f));
var atten = Config.SoundEnabledNormal ? Config.SoundVolume / 100.0f : 0.0f;
using BizBox form = new(() => Sound.PlayWavFile(Properties.Resources.GetNotHawkCallSFX(), atten));
this.ShowDialogWithTempMute(form);
}

View File

@ -242,7 +242,7 @@ namespace BizHawk.Client.EmuHawk
public void PlayWavFile(Stream wavFile, float atten)
{
if (atten <= 0) return;
if (!Config.SoundEnabled || atten <= 0) return;
try
{
_outputDevice.PlayWavFile(wavFile, Math.Min(atten, 1));