dxx-rebirth/similar
Kp 4a98e796ab Prevent stacking weapon rotation sounds
digi_play_sample_once is supposed to cancel prior instances of the
sound, but that functionality was lost in
21082c6db2.  As a result, the sound can be
stacked up to the limit of the engine.  Even when the functionality
existed, its implementation was wrong.

- Change these sounds to be attached to the player generating them.
- Pass the cancellation flag to other players when sending a sound.
- Send the full value of `volume`, rather than truncating it.
- Implement cancellation by killing and restarting the earlier version of a cancelled sound.
- Delete an ugly hack that prevented the patched logic from ever running.
- Fix an ancient quirk in digi_mixer that caused it to report all sounds as not playing, which then caused digi_sync_sounds to instantly cancel the new sound.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/88>
Reported-by: ryusei117 <https://github.com/dxx-rebirth/dxx-rebirth/issues/88#issuecomment-269597361>
Fixes: 21082c6db2 ("Added own channel management to SDL_mixer sound interface since the builtin channel management of this lib cannot handle our needs; Little code cleanup")
2018-05-13 03:14:34 +00:00
..
2d Remove build_colormap_good parameter used 2018-03-08 04:21:18 +00:00
3d Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
arch Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
editor Remove useless const qualifier on meddraw static_cast 2018-05-05 22:33:56 +00:00
main Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
misc Replace useless printf with puts 2017-12-05 05:29:55 +00:00