Commit graph

12 commits

Author SHA1 Message Date
Christoph Oelckers
7919c86f3e - elimintated all cases from the ZScript code where channel indices and flags were combined into one parameter and removed all remnants of CHAN_PICKUP. 2020-01-06 19:49:18 +01:00
Christoph Oelckers
1cacd3e3de - sound engine update.
Notable changes:
* IsSourcePlayingSomething had undefined behavior when checking unattached and unpositioned sounds.
* loading Blood RAW sounds with different sample rates but the same backing lump may not use the same hardware sound buffer.
* when playing an unpositioned sound the attenuation is irrelevant and must be ignored. This resulted in a 3D sound being started which was mostly inaudible due to lack of valid origin.
2020-01-06 15:08:32 +01:00
Christoph Oelckers
bc1d728140 - made FSoundChan::EntChannel a full int and reordered the structure for better packing. 2020-01-06 15:08:28 +01:00
Christoph Oelckers
c3759f389c - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.

# Conflicts:
#	src/bbannouncer.cpp
#	src/fragglescript/t_func.cpp
#	src/g_shared/a_lightning.cpp
#	src/p_effect.cpp
#	src/p_mobj.cpp
#	src/p_switch.cpp
#	src/playsim/p_spec.cpp
#	src/sound/s_doomsound.cpp
#	src/sound/s_doomsound.h
#	wadsrc/static/zscript/base.zs

# Conflicts:
#	src/intermission/intermission.cpp
#	src/sound/s_doomsound.cpp
2020-01-06 15:00:05 +01:00
Christoph Oelckers
ba006cbc5c - sound engine update. 2020-01-06 14:50:50 +01:00
alexey.lysiuk
7277717b32 - fixed linked sound resolving
Hash indices and sound ids were used interchangeably but they are different entities

https://forum.zdoom.org/viewtopic.php?t=66618
2020-01-06 14:50:48 +01:00
Christoph Oelckers
b0d38adb25 - made the sound resolving a virtual method
This way the player sounds can be done in the proper place without infesting the core.

# Conflicts:
#	src/sound/s_doomsound.cpp
2020-01-06 14:50:46 +01:00
alexey.lysiuk
da7515c0ce - moved sound engine cleanup calls to own function
https://forum.zdoom.org/viewtopic.php?t=66605#p1127457
2020-01-06 14:38:33 +01:00
Christoph Oelckers
fb42e6d92e - separated reverb data and reverb editor.
Again, isolating the part that is game independent from parts that are specific to GZDoom.
2020-01-06 13:45:37 +01:00
Christoph Oelckers
8adf2c34cd - continued refactoring on sound code.
The game independent part of the code has been mostly isolated.

# Conflicts:
#	src/sound/s_doomsound.cpp
#	src/sound/s_sound.cpp
#	src/sound/s_sound.h

# Conflicts:
#	src/sound/s_sound.cpp
2020-01-06 13:45:19 +01:00
Christoph Oelckers
89bffd17bc - reduced the dependency of the sound system on game state.
Many of the simple wrappers have been moved to a separate file and the sound source handling has been abstracted.
This is only the first phase, the work is not complete yet.
Also changed the license of the sound code to BSD after verifying that this code bears no similarity to id's original sound code anymore, save for a few function names (which are due to be refactored out anyway.)

# Conflicts:
#	src/sound/s_sound.cpp
#	src/sound/s_sound.h
2020-01-06 13:35:40 +01:00
Christoph Oelckers
3501ffd743 - started separating the sound engine code from game dependent parts.
First step: Split the header. Todo: Abstract listener and sound source specifics out of the sound engine.
2020-01-06 13:35:38 +01:00