[Openal-devel] Cone Angle 180 or 360 (Win32)
rage2050
rage2050 at mail.goo.ne.jp
Fri Oct 14 01:03:25 PDT 2005
Using OpenAL32.dll Generic Software Device (DirectSound),
I'm confused about cone angle.
In function aluCalculateSourceParameters(), the Angle between
Source and Listener is calculated as follows;
Angle=(ALfloat)(180.0*acos(aluDotproduct(Direction,SourceToListener))/3.141592654f);
I think,
(1) When Source and Listener are at the same position,
DotProduct=0, acos(0)=pi/2, so Angle=90.
I think if SoucePosition==ListenerPosition, it is better
treated as Angle=0.
(2) Angle ranges 0 (front) to 180 (back). OpenAL spec defines
AL_CONE_(INNER|OUTER)_ANGLE==360.0f is omni-directional source.
Suppose we like to set GAIN=1.0f right in front of the Source,
and GAIN=0.1f right behind.
We should set AL_CONE_INNER_ANGLE=0.0f, AL_CONE_OUTER_GAIN=0.1f.
Then, how about AL_CONE_OUTER_ANGLE?
Current implementation requires AL_CONE_OUTER_ANGLE=180.0f;
but I think AL_CONE_OUTER_ANGLE=360.0f; is more natural,
because OpenAL spec defines "360" is omni-directional.
How do you think about these?
Thanks.
#if 0
Sorry for my bad Engrish.
#endif
/** @name rage2050
@email rage2050 at mail.goo.ne.jp
@url http://hp.vector.co.jp/authors/VA024832/
*/
More information about the Openal-devel
mailing list