dxx-rebirth/common
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 Simplify calc_rod_corners loops 2017-08-26 19:47:51 +00:00
arch Set d_event type at construction 2018-05-12 18:24:19 +00:00
editor Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
include Set d_event type at construction 2018-05-12 18:24:19 +00:00
main Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
maths Pass vms_matrix &to vms_matrix_from_quaternion 2018-03-31 21:53:01 +00:00
mem
misc Simplify reporting fatal errors 2017-08-11 23:43:52 +00:00
texmap Move various SDL-only texture mapping functions to !DXX_USE_OGL 2017-11-01 02:01:21 +00:00
ui Set d_event type at construction 2018-05-12 18:24:19 +00:00