Bug 4079 - OpenAL - target_speakers and NOPVS
Status: REOPENED
Alias: None
Product: Reaction
Classification: Unclassified
Component: map entities
Version: unspecified
Hardware: All All
: P3 normal
Assignee: Monk
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2009-06-12 00:05 EDT by Monk
Modified: 2011-05-15 21:32:50 EDT
3 users (show)

See Also:



Description Monk 2009-06-12 00:05:38 EDT
TTI - 8/18/2006

Just noticed that target_speakers don't work properly anymore. Every time speakers enter player's PVS, the (looping) sounds start from the beginning, thus producing some weird effects like unintentional echo, when multiple speakers are used for one sound.

Also, speakers' NOPVS spawnflag seems to be completely ignored.

Listen to examples of speakers:

subway (red car: looping music)
truckstop (garage: NOPVS, looping music).
Comment 1 Monk 2009-06-12 00:07:16 EDT
Black Monk - 8/29/2006

I remember Makro did something with the speakers a few releases back. I wonder if that "fix" is no longer valid with the current ioq3 sources, maybe they "fixed" it in a different way? 

--------------------------------------------------------------------------------

Makro - 8/29/2006

Yeah, I think my fix was relying on a bug/undocumented feature. It's been too long to remember the exact details, though.

--------------------------------------------------------------------------------

From recently looking at stuff:

FEATURE REQUEST: toggle spawnflag for the target_speakers so a mapper can decided whether to use the old q3a way a sound is propagated through a level or the new way Makro coded in (based on the PVS?).

This was crossed off by Makro and I swear I saw him say he added the spawnflag. I can't find that quote now, though. Anyway, if we find out what spawnflag Makro added, we can more easily find what his codepath was for his fix. If the basic Q3A way is now fixed (someone should test this in our Reaction build), we can just re-route that spawnflag that Makro added to the old code. That way we don't have to try to fix Makro's code at all. Seems to make sense in my mind, at least.

--------------------------------------------------------------------------------

TTI - Spawnflag 16
"by default, looping sounds are only played while in the player's PVS. Checking this spawnflag will make the sound play no matter if it's in the PVS or not."

TTI - With my new computer, I'm unable to replicate this behaviour. The bug didn't just magically vanish into thin air. Maybe it was a soundcard issue? It makes the most sense but something doesn't quite add up here. Further testing required.
Comment 3 Scott Brooks 2009-07-05 21:36:51 EDT
Fixed in commit #r1427

When using openal, the sound no longer restarts when it re-enters your PVS
Comment 4 TTI 2009-07-06 07:44:45 EDT
I'm reopening this because the "speakers' NOPVS spawnflag seems to be completely ignored" part is still unfixed.
Comment 5 TTI 2009-10-24 05:45:50 EDT
Can somebody try the latest ioq3 SVN (1698) to see if the problem still exists?
Comment 6 Monk 2009-10-24 20:31:51 EDT
I am not sure if this is fixed.  Get the latest svn, 1703 of ioq3, and give it a shot.  I am testing on RQ3 3.2.  The speakers sound ok on both maps but I'm not 100% as I was clueless as to noticing the problems before.  Going by the descriptions, I don't see a problem?  I tested SUBWAY and TRUCKSTOP.  TTI?
Comment 7 Monk 2009-10-25 13:00:59 EDT
I tested CITY, going in and out of range of the radio, and it didn't seem to restart every single time so I guess that's fixed.

How to test the NOPVS thing?

And do we need Blaze to back out the changes he made so we don't have two fixes going when we merge with the latest ioq3?
Comment 8 TTI 2010-03-05 04:50:44 EST
(In reply to comment #7)
> I tested CITY, going in and out of range of the radio, and it didn't seem to
> restart every single time so I guess that's fixed.

If you tested with snd_useOpenAL 1 ; snd_restart, and no issues, then it's probably fixed.

 
> And do we need Blaze to back out the changes he made so we don't have two fixes
> going when we merge with the latest ioq3?

Yes.
Comment 9 Monk 2011-05-15 18:07:51 EDT
Something to try:

[16:01] [DevHC] ok, Scrotos, basically, try the following:
[16:01] [DevHC] replace all usages of trap_S_AddRealLoopingSound with trap_S_AddLoopingSound
[16:02] [DevHC] usages as in: not declarations/definition
[16:02] [DevHC] and see how that fix works out...
Comment 10 Monk 2011-05-15 21:32:50 EDT
[16:52] [DevHC] oh look, there's another difference: "real looping sounds" r not supposed to have doppler effects...
[16:53] [DevHC] ya know there may be a better fix, like forcing a trap_S_StopLoopingSound(ent) when ent leaves the PVS