API: Enhanced S_StopSound() adding further sound stopping behaviors
In order to implement the one-sound-per-sector playback behavior used by the id tech 1 games, libcommon presently performs a fair amount of DMU API negotiation, for the purpose of stopping sounds emitted from origins in the same sector. As the sound origins are in the engine's domain this seemed somewhat unnecessary.
The engine now provides an additional version of S_StopSound() with parameterized sound stop behaviors, allowing any sound origin to be used to perform additional sound stops for any or all other emitters in the same sector.
The engine now links up the ddmobj_base_t objects in a sector using the unused thinker_t::prev, next pointers. This object chain used in combination with DMU's RTTI mechanism, provides an efficient method of iterating all sound origins in a sector, given a pointer to any sound origin within it (of any type).
Todo: Make use of the enhanced functionality to parameterize sector sound stopping on game side using new cvars.
API: Enhanced S_StopSound() adding further sound stopping behaviors
In order to implement the one-sound-per-sector playback behavior used
by the id tech 1 games, libcommon presently performs a fair amount of
DMU API negotiation, for the purpose of stopping sounds emitted from
origins in the same sector. As the sound origins are in the engine's
domain this seemed somewhat unnecessary.
The engine now provides an additional version of S_StopSound() with
parameterized sound stop behaviors, allowing any sound origin to be
used to perform additional sound stops for any or all other emitters
in the same sector.
The engine now links up the ddmobj_base_t objects in a sector using
the unused thinker_t::prev, next pointers. This object chain used in
combination with DMU's RTTI mechanism, provides an efficient method
of iterating all sound origins in a sector, given a pointer to any
sound origin within it (of any type).
Todo: Make use of the enhanced functionality to parameterize sector
sound stopping on game side using new cvars.