[Openal] Artifacts - Alternating from left to right channels?
Daniel PEACOCK
dpeacock at creativelabs.com
Mon Feb 23 02:59:30 PST 2009
Hi Ashley,
> I set the velocity of the listener and sources to their proper velocity
> (keeping the positions at 0,0,0) and there were no artifacts.
OK - so we know it is a problem with Source / Listener position updates
then.
> I am using metres as my unit for everything - I assume I don't need to
set
> AL_METERS_PER_UNIT in that case?
That's fine yes.
> I don't set any special AL settings - everything is default except
> AL_REFERENCE_DISTANCE which i set to 5.0 (although i'm not sure why to be
> honest! :)). I also change the pitch and gain as i go through the revs.
The Reference Distance is one of the main parameters you have for
controlling the way that sounds attenutate with distance. With the default
Inverse Distance Clamped distance model, a Source with Ref Dist set to 5
(meters) will be at maximum volume while it is within 5 meters of the
listener, and start to fade out as it moves further away. At 10 meters it
will be at half volume, and at 20 meters at a quarter volume, etc ...
Just checking something ... an AL Source remembers all its parameter values
even if you switch the Buffers it is playing. If you want to re-use a
Source to play a new sound in the game, you must re-set all the parameters
to the new values, are you doing that?
Are you using Head Relative sounds (setting the AL_SOURCE_RELATIVE
property) on your Sources? This tells AL that your position and velocity
settings on the Source are relative to the Listener position and velocity
rather than to the origin. (This setting could be useful for all player's
car sounds)
Dan
More information about the Openal
mailing list