Weird 3D mixer bug
Weird 3D mixer bug
- Subject: Weird 3D mixer bug
- From: "Timothy J. Wood" <email@hidden>
- Date: Fri, 13 Sep 2002 10:32:34 -0700
I'm working on a high level Cocoa sound library for our game ports
that uses the 3D mixer on 10.2 (and will use the stereo mixer in 10.1).
I'm just hooking up the 3D positioning stuff now and I noticed
something weird.
I'm setting values in the following order: azimuth, elevation,
distance, gain (same order they are listed in the header).
If one parameter changes, I currently change them all. Now, if I
just change the distance parameter, the output sound doesn't change.
When I change the azimuth parameter, though, suddenly the distance
parameter takes effect. But this only happens if I change it to
something that is actually different than its current value (since I'm
resetting it to the same value each time the distance changes).
This seems pretty weird. I would have guessed that I needed to call
AudioUnitInitialize, but the AUMixer3DTest from the CoreAudio SDK never
calls it AFAICT. But, even calling AudioUnitInitialize() after making
parameter and property changes doesn't fix the problem.
<rant>It would be nice to have a simple 3D mixer test that actually
works out of the box instead of having to fight with it to get it to
play anything -- just include a small AAC file (or actually present a
file open dialog). So far I've not been able to get it to open a file
and the rather large and clunky utility framework doesn't seem to
report much in the way of a useful error about why it doesn't
work</rant>
Unlike the AUMixer3DTest, I'm not using a AUGraph -- I'm just hooking
up components myself (I've got an I/O proc hooked directly to input
zero of the mixer and that hooks up to the default output unit). I'm
using the same component description and I'm actually getting back
something that reacts correctly to the azimuth parameter -- just not
the distance (elevation is hard to tell since I'm using stereo output
right now). I've tried HRTF, SoundField and VectorBasedPanning for the
spatialization algorithm and all have same problem.
Any hints? I suppose I can hack around this by always twiddling the
azimuth by +/- some tiny value, but that would be really terrible :)
Clearly there is either a bug here or something fundamental that I'm
not getting :)
-tim
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.