Various sounds are played multiple times at once
When a player is killed, the player death sound is played multiple times simultaneously. Another sound that is played many times at the same moment is when a door is opened, when the sound for the door opening is played in such a manner as is the sound for the door closing.
Probably a client/server duplication thing. If you try it on a high-lag server, the two sounds are some time apart.
(In reply to comment #1)
> Probably a client/server duplication thing. If you try it on a high-lag server,
> the two sounds are some time apart.
I can confirm this. The length between the start of the two sounds is a lot more noticable with higher ping. I've also heard a sound being played three times on a few occasions.
It's not only the sound that is played twice, also the animation of doors and lifts is being displayed twice. For instance a door opens and at one point during the process when it is almost open it snaps back and opens again, synchronous to the second sound).
(In reply to comment #3)
> It's not only the sound that is played twice, also the animation of doors and
> lifts is being displayed twice. For instance a door opens and at one point
> during the process when it is almost open it snaps back and opens again,
> synchronous to the second sound).
Yes, I happened to notice that in the past as well. Doors tend to be jittery often.
This is quite a problem. A lot of the door trigger code is in "common", so it runs twice, once on client and once on server. Will take time to resolve.
r1137 fixed a bunch of the sector double sounds (doors, lifts, etc). Tested, seems ok.
r1185 removed sndseq, and with it various sector sound events. r1186 added door sounds back, r1188 added lift sounds back. This needs testing to ensure they're proper.
(In reply to comment #7)
> r1185 removed sndseq, and with it various sector sound events. r1186 added
> door sounds back, r1188 added lift sounds back. This needs testing to ensure
> they're proper.
Doors seem to now be fine, however when lifts are lowered the sound is slightly cut off and when the lifts go back up the sound for rising lifts is rather choppy and played many times at once.
Everything seems to now be fine. All lift sounds are played normally, as the door sounds are.
All issues mentioned in report fixed, bug closed.
Hm, it seems that occasionally rocket and BFG explosions can be played multiple times at once.
New "various sounds" being played multiple times
Reassigned to joe the sound guy.
Grr I wish this actually set it to assigned when it gets reassigned!
Should be fixed. I had a problem with the rocket explosion playing twice but adding a check for if(volume <= 0) stopped that for some reason. The only multiple sounds playing thing i've experienced is that sometimes moving floors play the plat stop sound multiple times. I put this down to server and client inconsistencies though :/
I've heard rocket sounds being played multiple times occasionally, but the rocket seems to explode just before it impacts. The explosion can be definitely seen moving when it shouldn't.
*** Bug 233 has been marked as a duplicate of this bug. ***
Still an issue as of r312
Still in as 397 (multiple oomf sound)
reassigning to myself
*** Bug 289 has been marked as a duplicate of this bug. ***
As of r1431, there is a bug related to various sounds being played continuously during coop net games.
If you play through a few maps in coop, especially in a wad with a decent amount of monsters such as scythe, you'll sometimes hear a monster's activate sound played over and over from somewhere in the map. The monster's activate sound will play continuously until the monster is actually woken up server side.
Have found no definite way to reproduce other than playing some coop for a while and hoping you come across it.
I can very clearly hear multiple explosion sounds (from rockets and imp fireballs). The problem seems to be that the client calls P_ExplodeMissile, and then the server calls CL_ExplodeMissile which in turn calls P_ExplodeMissle again.
I tried to make it so that there were seperate explosion functions, one for online and one for offline. It worked, but if I suicided with my own rocket no sound was played. The other solution I used was to modify the file /trunk/server/src/p_mobj.cpp by commenting out the for loop in P_ExplodeMissile. I didn't see any side effect to this.
I can also clearly hear multiple death screams for other players in deathmatch. The problem is similar to the one above. I used a printf in the scream function, and found that when I fragged another player, i would see the scream call, an obituary, followed by another scream call.
// MSG_WriteMarker(&cl->reliablebuf, svc_explodemissile);
// MSG_WriteShort(&cl->reliablebuf, mo->netid);
to p_mobj.cpp in the server (P_ExplodeMissile) appears to resolve the issue for rockets/monster missiles - perhaps the client is calling this on its own when it detects a missile collision?
Some testing on high-latency connections also shows that clients don't play their own death sound twice, but they do for opponents.
Created attachment 214 [details]
Seems to fix duplicate rocket explode & player death sounds
I don't necessarily advocate this as a solution, but this small patch seems to fix the duplicate rocket explosion and player death sounds.
Created attachment 215 [details]
Patch to fix duplicate rocket explosion & player death sounds
The other patch did not resolve player death sounds, this one does. Again, not necessarily sure of the approach.
r1767 applies this patch. I also question whether making the change for explodemissile on the server side of things is the best choice or not. We will have to revisit this.
All problems mentioned in here are now resolved.
Preventing the server from sending the svc_explodemissile message has lots of bad side effects, all stemming from the fact that missiles now don't always explode (perhaps due to packet loss?). IMO this fix should be rolled back and a better solution explored, such as adding a bool parameter to the client's P_ExplodeMissile whether or not the function was invoked as a result of a collision or a network message, and to not play the explosion sound if invoked by a network message.
The explodemissile change is not kosher. r1810 reverts this.
Created attachment 262 [details]
Fixes duplicate missile sound issues
There are a couple of causes of the duplicate sounds from missiles. The first is that the client calls P_ExplodeMissile() several times either directly or through P_CheckMissile(), which would call P_ExplodeMissile() if the player was standing too close to a wall/thing. Another bug hampering earlier efforts was the fact that when a missile is fired too close to a wall/thing, the server generates the missile and puts it in the back of the queue to notify players. It then immediately sends players notification to explode the missile. Unfortunately because of queuing, players didn't know about the missile yet when they received the message to explode the missile, resulting in no explosion sound if someone were to fix the first bug alone.
When P_CheckMissile notices that a missile will be fired directly into a wall/thing, it directly notifies players about the missile spawning instead of queuing it.
Check that only the server is calling P_ExplodeMissile() in p_mobj.cpp.
r2206 applies my above patch.
Printfs in S_Sound() [client/src/s_sound.cpp] indicate that only one sound is being played for missile explosions as well as for player death sounds. Are there any other duplicate sounds still?
Dr Sean's patch works, however doors still play multiple sounds:
[10:48] <HeX9109`> fast doors
[10:50] <HeX9109`> In choco and vanilla when a fast door closes, it plays the sound twice due to a bug. In odamex offline it only plays once, online its multiple times
[10:51] <dr_sean> so online sometimes plays more than twice and offline always plays once?
[10:51] <HeX9109`> yes, appears that way
[10:51] <dr_sean> does the number of times it plays online vary?
[10:52] <HeX9109`> I’ll add these lines to the bug tracker
[10:52] <dr_sean> sometimes 2x, sometimes 3x?
[10:52] <HeX9109`> typically, it sounds like reproduced packets because its really random
[10:52] <HeX9109`> like clo-clo-cl-clo-close
[10:53] <dr_sean> I think that's a bug in the Thinker code being called an odd number of times. It's why the death animation (bug 623) is sped up so much too.
These have now all been fixed. If anything comes up again, please post individual bugs with details on how to reproduce. We would like to reduce the number of these single bugs that cover a wide variety of topics.