dhewm3/neo/sound
Daniel Gibson 13ac657ebf Make deleting listenerSlot in idSoundWorldLocal::Shutdown() work
the problem was that the sources were still associated to it, because
they get deleted after the listenerSlot: the sources get freed in
idSoundSystemLocal::Shutdown() which is called by
idCommonLocal::ShutdownGame() in line 3217,
while the listenerSlot is deleted via idSessionLocal::Shutdown()
-> delete sw/rw -> idSoundWorldLocal::~idSoundWorldLocal()
-> idSoundWorldLocal::Shutdown() - and idSessionLocal::Shutdown() is
called in idCommonLocal::ShutdownGame() line 3211, before the other.

I'm not gonna mess with the order of deleting things in ShutdownGame(),
but it's sufficient to unassociate the effect slot from the source
when destroying the emitters in idSoundWorldLocal::Shutdown(),
by adding a call for that to idSoundChannel::ALStop() - and destroying
the emitters before deleting listenerSlot.

Before this fix, with ALSOFT_LOGLEVEL=3 you got the following warning:
  (WW) Error generated on context 0x5578fce2a280, code 0xa004,
  "Deleting in-use effect slot 1"
Thanks for openal-soft's KittyCat for pointing this out!
2021-04-12 19:17:12 +02:00
..
efxlib.h Cleanup EFX code 2012-01-10 17:45:37 +01:00
snd_cache.cpp ignore errors unloading OpenAL data. mitigates #178 2020-01-30 01:08:10 +01:00
snd_decoder.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
snd_efxfile.cpp Calculate EFX density as in EFX-Util 2021-01-15 17:57:17 +01:00
snd_emitter.cpp Make deleting listenerSlot in idSoundWorldLocal::Shutdown() work 2021-04-12 19:17:12 +02:00
snd_local.h Calculate EFX occlusion as in Creative's EFX-Util 2021-01-15 17:57:39 +01:00
snd_shader.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
snd_system.cpp Update sounds at ~60Hz instead of ~10Hz, fixes #141 2020-07-12 04:43:53 +02:00
snd_wavefile.cpp s/LittleLong/LittleInt/ to match the return type 2012-06-28 13:02:47 +02:00
snd_world.cpp Make deleting listenerSlot in idSoundWorldLocal::Shutdown() work 2021-04-12 19:17:12 +02:00
sound.h Port EAX to EFX 2012-01-08 22:04:56 +01:00