3d sound with OpenAL problem
I'm not getting the results I expect from a simple test I'm performing. I'm able to play a sound just fine, but regardless of what position and velocity I set, it sounds the same. I tried setting a negative x position and a positve x velocity. I expected it to start quiet, get louder, then get quieter panning from the left to right speaker. But instead it stays at the same volume the entire time.
I've checked to see that the position and velocity have been set on the source, and get back the same values. I expected the position would change over time, but it stays the same as well.
Is there some sort of OpenAL time-advancing function I need to call every so often, or some sort of feature I need to enable to take the position/velocity into account?
Thanks,
- Eck
[edited by - Eck on March 15, 2004 4:09:39 AM]
EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG
I found out what my problem was. I was using Window''s Ding.wav which is a stereo sound. Rereading the buffer description, it talks about AL_CHANNELS being one of the attributes. When the number of channels is greater than 1, the buffer won''t be positioned when played.
So, I changed the format before calling alBufferData to either AL_FORMAT_MONO8, AL_FORMAT_MONO16 depending on what format it was in to begin with. Then I multiplied the frequency by 2 to get it to sound right.
I hope this helps someone else.
Later,
- Eck
So, I changed the format before calling alBufferData to either AL_FORMAT_MONO8, AL_FORMAT_MONO16 depending on what format it was in to begin with. Then I multiplied the frequency by 2 to get it to sound right.
I hope this helps someone else.
Later,
- Eck
EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement