[Openal] Artifacts - Alternating from left to right channels?

Daniel PEACOCK dpeacock at creativelabs.com
Wed Mar 4 08:54:30 PST 2009





Hi Ash,

> I changed all the sounds to use AL_SOURCE_RELATIVE and it has solved the
> problem.  I just pass in the world positions and do a transform.
>
> i.e. Vec3 relativePosition =
> (listener->getOrientation().Inverse())*(soundPosition-
> listener->getPosition());
>
> (should anyone be googling).
>
> I do think that the non-relative way should work, but hey, it works now -
> i'm happy :)
>

Glad to hear that Source Relative fixed the artifacts.

For the head-relative sounds ... if 'SourcePosition' and 'ListenerPosition'
are world co-ordinates, then all you need to do is set the AL Source
position to SourcePosition - ListenerPosition.  You can also set the AL
Source Velocity to SourceVelocity - ListenerVelocity (although
SourceVelocity is probably equal to ListenerVelocity).

Dan



More information about the Openal mailing list