dxx-rebirth/similar/main
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
..
ai.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
aipath.cpp Pass vertex factory to compute_center_point_on_side 2018-03-12 03:43:47 +00:00
automap.cpp Raise max marker limit to 4 for cooperative games 2018-03-10 22:45:04 +00:00
bm.cpp Replace useless printf with puts 2017-12-05 05:29:55 +00:00
cntrlcen.cpp Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
collide.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
config.cpp
console.cpp Add optional support for printing console timestamps to stdout 2017-12-25 05:44:27 +00:00
controls.cpp
credits.cpp Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
digiobj.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
dumpmine.cpp Cache bitset::operator[] result 2017-09-30 18:00:15 +00:00
effects.cpp
endlevel.cpp Pass vertex factory to compute_center_point_on_side 2018-03-12 03:43:47 +00:00
fireball.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
fuelcen.cpp Pass vertex factory to compute_segment_center 2018-03-12 03:43:47 +00:00
fvi.cpp Move fvi.cpp fvi_hit_object out of global scope 2018-03-05 01:40:44 +00:00
game.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
gamecntl.cpp Remove useless parentheses in gamecntl pointer-to-member declarations 2018-05-05 22:33:55 +00:00
gamefont.cpp Use enumerate for gamefont arrays 2017-10-14 17:10:31 +00:00
gamemine.cpp Pass d_level_object_state to reset_objects 2018-03-12 03:43:46 +00:00
gamerend.cpp Fix FPS locking and FPS display implementations. 2018-04-23 15:33:43 -07:00
gamesave.cpp Clear weapon hitobj list on level load 2018-03-31 21:53:01 +00:00
gameseg.cpp Fix ambient sound effects 2018-04-09 00:58:28 +00:00
gameseq.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
gauges.cpp Simplify HUD_SCALE_X_AR, HUD_SCALE_Y_AR 2018-05-12 18:24:19 +00:00
generate-kconfig-udlr.py Adapt to Python 3 strict bytes vs str rules 2018-04-30 05:31:16 +00:00
hostage.cpp
hud.cpp Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
iff.cpp Simplify test for corrupt IFF file 2018-04-03 03:20:08 +00:00
inferno.cpp change SYNC_GL_AUTO mode to disable GL sync if VSync is turned off 2018-04-23 04:57:48 +00:00
kconfig.cpp Improve default keybindings 2018-05-12 21:13:05 +00:00
kconfig.ui-table.cpp Rewrite UI table to use symbolic constants for positioning 2018-02-01 05:38:47 +00:00
kmatrix.cpp Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
laser.cpp Pass valptridx factories to obj_relink 2018-03-12 03:43:46 +00:00
lighting.cpp Simplify lighting test 2017-11-05 20:49:09 +00:00
menu.cpp Set d_event type at construction 2018-05-12 18:24:19 +00:00
mglobal.cpp Use enum for Difficulty_level 2018-05-12 18:24:19 +00:00
mission.cpp
morph.cpp Hold morph_rate constexpr 2017-11-05 20:49:09 +00:00
multi.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
multibot.cpp Update num_kills_level/num_kills_total for remote kills 2018-04-30 01:11:29 +00:00
net_udp.cpp Cache user's last chosen host/port for direct_join 2018-05-12 21:13:05 +00:00
newdemo.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
newmenu.cpp Set d_event type at construction 2018-05-12 18:24:19 +00:00
object.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
paging.cpp Tighten eclip::dest_bm_num handling 2018-03-31 21:53:01 +00:00
physics.cpp Pass vertex factory to compute_segment_center 2018-03-12 03:43:47 +00:00
piggy.cpp Remove unnecessary inclusions of compiler-static_assert.h 2018-05-05 22:33:55 +00:00
player.cpp
playsave.cpp Use enum for Difficulty_level 2018-05-12 18:24:19 +00:00
polyobj.cpp Split g3_start_instance_matrix usage 2017-08-26 19:47:51 +00:00
powerup.cpp Prevent stacking weapon rotation sounds 2018-05-13 03:14:34 +00:00
render.cpp Simplify visited_segment_mask_t 2018-04-09 00:58:28 +00:00
robot.cpp Use partial_range for robot_get_anim_state 2018-01-29 01:56:40 +00:00
scores.cpp Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
segment.cpp
slew.cpp
songs.cpp Fix songs_play_file use for sdlmixer=0 2017-11-25 01:56:51 +00:00
state.cpp Use enum for Difficulty_level 2018-05-12 18:24:19 +00:00
switch.cpp Move flickering light state into structure 2018-03-31 21:53:01 +00:00
terrain.cpp Move various SDL-only texture mapping functions to !DXX_USE_OGL 2017-11-01 02:01:21 +00:00
texmerge.cpp
text.cpp
titles.cpp Replace useless printf with puts 2017-12-05 05:29:55 +00:00
vclip.cpp Fix proximity bomb failure-to-spin 2017-12-02 04:31:26 +00:00
vers_id.cpp
wall.cpp Make eclip_num unsigned 2018-03-31 21:53:01 +00:00
weapon.cpp Fix clang build of similar/main/weapon.cpp 2018-04-02 03:39:51 +00:00