[Openal] Doppler effect&other trouble

mirek kratochvil exa.exa at gmail.com
Thu Sep 21 01:57:22 PDT 2006


Hello everyone
I've been playing around with OpenAL for last few weeks,
and (of course..) encountered some problems, so I'm here to ask.

First - the doppler effect implementation is somehow weird or
broken - After first few tries (when the sound was overpitched,
or was not pitched at all), I decided to hack through the AL
code. Resulting questions are:

1] Should I use alSpeedOfSound or alDopplerVelocity to set
the sound speed?

(or, as someone on this list advised, don't use them at all?)

When I don't use any of them, doppler effect gives really
extreme pitch (I checked my source's speeds several times, they are
"normal" for sound speed of 343.3 m/s. It looks(sounds) like the
sound speed was set to very small number (1 m/s) and cannot be reset.
Is there some solution to this problem?

2] -- doppler continued: When I set the SpeedOfSound or the
DopplerVelocity, and everything finally seems working right,
(no extreme pitches) doppler effect seems to be "reversed" - when the
listener is approaching source, the pitch is lower, and vice versa.
Possibly an AL bug?

3] I noticed the limit of alPitch(), which was set to 0.5-2.
I think this is just *not* enough, mostly because of that limit
is artifical (as source says - I guess it should not be a problem
to set the range to, say, 0.1-10. If I'm wrong, please tell me why.

4] Result of problem 3 is, that when 2 sources are approaching
themselves too fast, and doppler-computed pitch reaches that alPitch
limit, the sound is (instead of "logical" clamping the pitch value
to 2.0) pitched to 0.5 rate. That sounds terribly. I know there's
a limit with crossing the sound speed, but I didn't reach such speed.
Is this a bug or am I doing something wrong? plz help...

5] Also, I have some minor problems with buffer states, it would be
nice to know, if the buffer is playing or not. BUT, alGetBufferState
is "blocked" with a comment there's no reason to use this, because
it could give invalid results. It gives not, I tried it.

6] um..that's all:]

Please could someone tell me how (or where) to fix these problems?
I understand that openAL is under development and is changing
very frequently, but developer with a need of open sound API just
*needs* the complete version. I tried several versions, now I'm on
one marker 0.0.8 . If any of CVS or 200* versions does better,
please tell me.

Thanks in advance

[exa]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20060921/859312b0/attachment.html


More information about the Openal mailing list