[Openal-devel] Doppler Velocity
Jason Daly
jdaly at ist.ucf.edu
Mon Mar 7 08:23:33 PST 2005
Alexandre Mah wrote:
> Ah. Okay. But I would have to disagree. They both alter the speed
> of sound (as their sole purpose).
>
> In fact, the speed of sound is not dependent on AL_DOPPLER_VELOCITY,
> but rather on AL_DOPPLER_VELOCITY / AL_DOPPLER_FACTOR (so it seems
> AL_DOPPLER_VELOCITY is somewhat unintuitively named).
>
> Knowing the speed of sound is important if you want to calculate
> things like sonic boom.
Well, I've been arguing that AL_DOPPLER_VELOCITY is supposed to be set
to the speed of sound. When I've used OpenAL in the past, I've always
called alDopplerVelocity(343.3) in my apps, because my database units
are in meters, so the speed of sound is 343.3 meters/sec. With this, I
get a pretty good-sounding Doppler effect when I leave AL_DOPPLER_FACTOR
set to 1.0.
The way I read things back then (when the 1.0 spec was brand new) was
that for a realisitic effect, AL_DOPPLER_VELOCITY should be set to the
speed of sound (the "propagation speed", as the spec calls it), and
AL_DOPPLER_FACTOR should be left at 1.0. The purpose of
AL_DOPPLER_FACTOR was not to change the speed of sound, but to change
the Doppler effect itself. It was essentially an artistic control to be
used after you have your realistic calculations working properly. If
the Doppler effect doesn't sound right for your particular application,
you can always use AL_DOPPLER_FACTOR to exaggerate or reduce it and get
the effect you want, while leaving the real speed of sound alone. So, I
don't consider them redundant.
Unfortunately, the original spec was a little ambiguous on exactly what
DOPPLER_VELOCITY was supposed to be, so we have the dilemma now that
there may be 1.0-compliant applications that depend on the default
DOPPLER_VELOCITY being 1.0. So essentially, what has happened is that
DOPPLER_VELOCITY doesn't mean speed of sound anymore, and it in effect
has become a different Doppler factor. So, perhaps in a future version,
we do need to scrap DOPPLER_VELOCITY in favor of a more explicit speed
of sound parameter.
--
--"J"
"I'm a castaway stranded in a desolate land,
I can see the footprints in the virtual sand."
--Neil Peart
More information about the Openal-devel
mailing list