From e6f704f8cb677f19429f817313497dca88ee1399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Kurczy=C5=84ski?= Date: Wed, 7 Aug 2024 20:34:05 +0200 Subject: [PATCH] Ensure initial volume for CD music is properly set. --- src/DETHRACE/common/sound.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DETHRACE/common/sound.c b/src/DETHRACE/common/sound.c index 8678aac2..c71bbb06 100644 --- a/src/DETHRACE/common/sound.c +++ b/src/DETHRACE/common/sound.c @@ -699,6 +699,11 @@ int DRS3StartCDA(tS3_sound_id pCDA_id) { } gLast_tune = pCDA_id; gCDA_is_playing = DRS3StartSoundNoPiping(gMusic_outlet, pCDA_id); +#if defined(DETHRACE_FIX_BUGS) + // Not a bug, but this is the less abusing place + // where the initial music volume might be set with success. + DRS3SetOutletVolume(gMusic_outlet, 42 * gProgram_state.music_volume); +#endif gCDA_tag = gCDA_is_playing; if (!gCDA_is_playing) { gCD_is_disabled = 1;