From 30879292b8ef0ead592a126129f24ad0f9e9a752 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Thu, 5 Dec 2019 21:20:11 +0000 Subject: [PATCH] Set volume level immediately for music playback. Avoids hearing a brief blip of sound if you have volume set to 0. --- source/exhumed/src/cd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/exhumed/src/cd.cpp b/source/exhumed/src/cd.cpp index 9e97e51cf..2cb2a95b5 100644 --- a/source/exhumed/src/cd.cpp +++ b/source/exhumed/src/cd.cpp @@ -92,7 +92,7 @@ bool playCDtrack(int nTrack, bool bLoop) kclose(hFile); - trackhandle = FX_Play(pTrack, nRead, bLoop ? 0 : -1, 0, 0, 255, 255, 255, FX_MUSIC_PRIORITY, fix16_one, MUSIC_ID); + trackhandle = FX_Play(pTrack, nRead, bLoop ? 0 : -1, 0, 0, gMusicVolume, gMusicVolume, gMusicVolume, FX_MUSIC_PRIORITY, fix16_one, MUSIC_ID); if (trackhandle <= FX_Ok) { OSD_Printf("Error playing music track %s", filename); @@ -104,8 +104,6 @@ bool playCDtrack(int nTrack, bool bLoop) return false; } - setCDaudiovolume(gMusicVolume); - return true; }