Setting s_noSound 1 doesn't actually disable OpenAL. Sounds are silenced but AL calls still happen.
I wanted to disable sound entirely because under Valgrind the game is really slow and spams console with
AL lib: (WW) ALSAProc: available samples exceeds the buffer size
Starting from command line with
./dhewm3 +set s_noSound 1
so the cvar should be in effect early enough (and gdb shows it is when breaking in idSoundSystemLocal::Init() ).
First OpenAL call: https://github.com/dhewm/dhewm3/blob/master/neo/sound/snd_system.cpp#L330
Useful gdb commands:
rbreak ^al[A-Z].*
rbreak ^alc[A-Z].*
Going to the game itself or demo playback crashes pretty instantly:
./dhewm3 +set s_noSound 1 +timedemoquit demo1.demo
crashes in https://github.com/dhewm/dhewm3/blob/master/neo/sound/snd_cache.cpp#L319
because this pointer is NULL. Works if started with sound enabled. Full Valgrind stacktrace:
at idSoundSample::LengthIn44kHzSamples() const (snd_cache.cpp:319)
by idSoundWorldLocal::FindAmplitude(idSoundEmitterLocal*, int, idVec3 const*, int, bool) [clone .part.13] (snd_world.cpp:2057)
by idSoundEmitterLocal::CurrentAmplitude() (snd_emitter.cpp:1063)
by idMaterial::EvaluateRegisters(float*, float const*, viewDef_s const*, idSoundEmitter*) const (Material.cpp:2460)
by R_AddLightSurfaces() (tr_light.cpp:913)
by R_RenderView(viewDef_s*) (tr_main.cpp:1134)
by idRenderWorldLocal::RenderScene(renderView_s const*) (RenderWorld.cpp:758)
by idSessionLocal::Draw() (Session.cpp:2401)
by idSessionLocal::UpdateScreen(bool) (Session.cpp:2497)
by idCommonLocal::Frame() (Common.cpp:2393)
by main (main.cpp:305)
Setting s_noSound 1 doesn't actually disable OpenAL. Sounds are silenced but AL calls still happen.
I wanted to disable sound entirely because under Valgrind the game is really slow and spams console with
Starting from command line with
./dhewm3 +set s_noSound 1so the cvar should be in effect early enough (and gdb shows it is when breaking in idSoundSystemLocal::Init() ).
First OpenAL call: https://github.com/dhewm/dhewm3/blob/master/neo/sound/snd_system.cpp#L330
Useful gdb commands:
Going to the game itself or demo playback crashes pretty instantly:
./dhewm3 +set s_noSound 1 +timedemoquit demo1.democrashes in https://github.com/dhewm/dhewm3/blob/master/neo/sound/snd_cache.cpp#L319
because
thispointer is NULL. Works if started with sound enabled. Full Valgrind stacktrace: