[Openal] Reuse of source objects in 1.0 vs. 1.1
Ed Phillips
ed at udel.edu
Tue Sep 27 10:57:42 PDT 2005
Hi,
On Tue, 27 Sep 2005, Garin Hiebert wrote:
>> For the mono sound files, how do we disable any "3D effect" processing for
>> the source? I've made the calls to set up zero position, zero velocity,
>> zero direction, source-relative position, and 0.0 rolloff... what else do I
>> need to set to ensure they get played in 2D manner...? These settings seem
>> to be enough to make them play as "2D" in our game with the 1.0 DLLs, but
>> not with 1.1 DLLs...
>
> I would have thought that the zero velocity combined with setting
> AL_SOURCE_RELATIVE to true would do it. Since things are working with
> 1.0, then there must be a screwup in the 1.1 code. I assume you've
> repeated this test with the code after yesterday's update? The previous
> code (with the matrix operation in the wrong place) could have led to a
> pitch being applied incorrectly.
Okay, sorry... I've made a bit of a screw-up here. My 1.0 DLLs include
the doppler fix I adapted from STABLE (that we were discussing) so they're
suspect in this case (they get bypassed altogether if the "Distance" is 0
- and Distance is not checked before doing doppler calculations in 1.0 CVS
or 1.1 CVS like it used to be in STABLE). I'll retest everything tonight
and let you know what I find...
The first thing that comes to mind from the looks of
aluComputeSourceParameters() is that essentially "everything" needs to be
set on the source to cause the 3D effects to produce "no change" (which is
okay). It might be nice to have some kind of AL_SOURCE_2D or
AL_SOURCE_MODE_2D flag or something that could short-circuit the math -
since these kinds of sources will end up with "no change" resulting from
all that computation of vectors and matrix multiplication, etc. (Or worse,
will get get some small amount of random effect due to potential float
inaccuracies).
Anyway, it's good that aluComputeSourceParameters() is where all the
action is (since that's the code I've looked at the most so far)... I
should have it sorted in short-order...
Thanks Garin! You've been a great help!
Ed
Ed Phillips <ed at udel.edu> University of Delaware (302) 831-6082
Systems Programmer III, Network and Systems Services
More information about the Openal
mailing list