Bug #159

Sounds frequently do not play / fix sound issues

Added by Bill over 6 years ago. Updated over 5 years ago.

Status:Fixed% Done:

100%

Priority:NormalSpent time:-
Assignee:IR4T4
Category:Client
Target version:2.71rc2
OS:Windows Arch:

Description

I’m using Windows 8 Pro, and have confirmed this bug in both the 2.70rc1 client and the latest build. An SMG fired by someone else will often only make a noise for some of the shots. It might make a noise for three shots, then be silent for three shots, and then repeat. (This can be extremely disorienting.)

I can "fix" the issue by editing snd_dma.c, lines 614 and 618. That seems to only allow 4 sounds to play at a time, or 8 in some cases, by setting a variable named 'allowed’ to either 4 or 8. I changed these values to 8 and 16, respectively. But I do not understand how this fits into the big picture, so it is possible that it should be revised in some other way.

I asked for confirmation in the IRC channel, but nobody else (whether using Windows or not) could confirm the bug. I do not think the OS would matter, but maybe it does not affect other operating systems if they use OpenAL instead of DMA.


Related issues

Related to ET: Legacy Development - Bug #834: Sound not looping correctly Fixed 23.03.2015

Associated revisions

Revision cdfcf142
Added by IR4T4 over 6 years ago

client: don’t play the silence - skipping dummy blank sound in
SOUNDSYSTEM_StartSoundEx() FIXME: activate for openAL refs #159

Revision e0f8361e
Added by IR4T4 over 6 years ago

client: increased the limit of same sound at same time refs #159

Revision 43b76e8c
Added by IR4T4 over 6 years ago

client: more info about sound / cosmetics refs #159

Revision cdb01493
Added by IR4T4 over 6 years ago

client: increased the limit of 'external’ same sound at same time to
16. This is about 20% of MAX_CHANNELS and not the final fix refs #159

Revision 7e039d31
Added by IR4T4 about 6 years ago

client: don’t play the silence - skipping dummy blank sound for openAL
too refs #159

Revision 14459027
Added by IR4T4 about 6 years ago

client: 'allowed’ sound limit removed in S_Base_StartSoundEx refs #159

Revision c78f6cc7
Added by IR4T4 over 5 years ago

client: fixing performance and sound issues/reverting vanilla code - we
only want the time - Com_Milliseconds() does more than that refs #159

History

#1 Updated by Dragonji over 6 years ago

Happened to me as well when I was testing ET:L.

#2 Updated by IR4T4 over 6 years ago

  • Status changed from New to Feedback
  • Assignee set to IR4T4
  • Target version set to 2.71rc1
  • % Done changed from 0 to 50

Bill, thank you for reporting. I’ve increased the limit to 8.

The big picture is drawn by an older quake3 sound code merge ... and ET is not q3 #-)
Actually I couldn’t find such a limit (allowed) in snd_dma.c of the GPL code. However the limit of 4 equal sounds at same time is by far to low for ET when the entnum is not listener_number → enemies/world.

#3 Updated by IR4T4 over 6 years ago

  • Priority changed from Normal to High

#4 Updated by IR4T4 over 6 years ago


Inspect sound on bigger servers and increase limit again in case of missing sounds. (But I can imagine it’s just good noise now.)

#5 Updated by Bill over 6 years ago

Ah yes, I see this function is basically identical to the snd_dma in the original Q3 source, not ET!

Also, I noticed 8 is not quite enough. I specifically noticed some FG42 sounds being dropped. And getting more into the "big picture" ... I guess the limit is just there because MAX_CHANNELS is 96. With allowed = 8, that means you might run out of channels with more than 12 people nearby. (And then fewer people if we increase it some more.)

But looking at the GPL code it looks like they used a different fix for ET. There are added code blocks starting on lines 753, 772, 818, and 837, plus some other stuff sprinkled in here and there. These basically have the engine make more of an effort to re-use sound channels allocated earlier, when there are a bunch of sounds coming from one entity (which apparently happens when shooting an smg).

#6 Updated by IR4T4 over 6 years ago

Interesting and no q about the FG42 ... the fire rate is just high. I think we should revert here. Limits on single entities would fit much better than limits on same sound into the ETL picture.

#7 Updated by IR4T4 over 6 years ago

  • Target version changed from 2.71rc1 to 2.71rc2

#8 Updated by IR4T4 about 6 years ago

  • Subject changed from Sounds frequently do not play to Sounds frequently do not play / fix sound issues

#9 Updated by IR4T4 about 6 years ago

  • Priority changed from High to Normal

#10 Updated by IR4T4 about 6 years ago

  • Status changed from Feedback to Fixed
  • % Done changed from 50 to 100

The hardcoded limit which causes our issues has been removed - I couldn’t find a good reason why this is set. As long as there are available channels for sounds we don’t 'cut’ them anymore.

#11 Updated by Radegast over 5 years ago

  • OS set to Windows

#12 Updated by Spyhawk about 4 years ago

  • Related to Bug #834: Sound not looping correctly added

Also available in: Atom PDF