OpenAL Sound Origin Issue

Tim Angus tim at ngus.net
Sun Feb 12 05:46:11 EST 2006


On Fri, 10 Feb 2006 19:52:52 -0600 Jayschwa wrote:
> The exception seems to be sounds originating from my
> player. Things like weapon fire and jumping come out a lot more
> faintly, mainly through the left and right channels.

This is most likely due to the fact that the listener and sounds
velocities are set to 0 when respatialising. In other words, as far as
OpenAL is concerned, the listener is always still (although its
position changes). In effect, some sounds are not "attached" to the
player, so when the player moves the sound will appear to drift to one
side. The fix for this is to change the sound API to include velocity
or employ some hackery to infer the player/sound velocity through other
means.

> This effect is a
> little disconcerting, as I can hear the bullets hitting the wall
> across the map more clearly than the machinegun firing right in front
> of my face.

That seems very odd. I can't explain that. Perhaps try changing
s_alMinDistance?

> I'm going to hazard a guess that the precise source of these sounds
> is below the "ears" of the player, mainly because looking down and
> firing makes the sound come through nice and strong in the center,
> but looking up and firing makes the sound come out mainly from the
> rear speakers.

Your theory is probably correct. The respatialisation is taken against
the view position, whereas the machinegun sound is centered around the
entity position, which is slightly lower. SVN 539 has a potential fix
for this.



More information about the quake3 mailing list