Closed putridpete closed 7 months ago
Does it work if you configure with "cmake -DCMAKE_BUILD_TYPE=Debug" ?
This here [Error : iMuse] null sound addr in StartSound()
is suspicious
I can repro; this part of CMakeLists.txt needs to be deleted:
## gcc-12+ and clang-15+ have a feature to automatically zero all variables/members/...
## this mimics what modern MSVC does. Enable it for release builds (i.e.
## when not debugging to not hide any real bugs).
if(CMAKE_BUILD_TYPE STREQUAL "Release")
check_cxx_compiler_flag("-ftrivial-auto-var-init=zero" COMPILER_ENABLE_AUTOZERO)
endif()
as gcc now just DCEs a bunch of code. I'll take a look.
Hey there, thanks for the response. Sorry I'm late, but I can confirm that after recompiling with that part removed from CMakeLists.txt
, music is restored in all cutscenes!
I had some time to properly debug this; this here fixes the code bug:
diff --git a/TheForceEngine/TFE_DarkForces/Landru/lmusic.cpp b/TheForceEngine/TFE_DarkForces/Landru/lmusic.cpp
index a3cc6fdf..6eb11bfd 100644
--- a/TheForceEngine/TFE_DarkForces/Landru/lmusic.cpp
+++ b/TheForceEngine/TFE_DarkForces/Landru/lmusic.cpp
@@ -72,9 +72,9 @@ namespace TFE_DarkForces
s32 index = 0;
char name[80];
+ s32 sequence = 0;
while (fileData)
{
- s32 sequence;
if (sscanf(fileData, "SEQUENCE: %d", &sequence) == 1)
{
index = 0;
since "sequence" is reinitialized every iteration of the loop, gcc saw that it was never anything else than zero, the stores to "s_sequences" were removed due to being dead code (code inside the 'if (sequence && ...)' could never be executed)
Hey there, I just compiled from source on Arch Linux and there is no music playing at all during cutscenes. I couldn't find any specific issue mentioning this, neither here on github or the projects forum.
Here's the output from the terminal, in which the intro plays without any music:
I've tested this under kernels
6.1.62-1-lts
and6.6.1.zen1-1
with the same result. Sound works fine during videos and both music and sound work fine during levels. I'm wondering if this is an issue with my configuration or if I'm missing anything in particular inside my data folder. I've simply copied it whole from a previous GOG installation and placed it next to the binary and pointed towards it using the source port's menu. Any help would be appreciated.