OpenAL question

Member
Posts: 81
Joined: 2007.05
Post: #1
Stuck on distance attenuation. Problem is things in the distance don't sound distant! Main issue is lots of things driving around in the environment and the player really only needs to hear what is close. Yet, everything sounds close.

So, I just want to do a sanity check. Read the docs.

The sounds play well. I read in an ogg file with quality level 6. ( I had ported alut but I got rid of it because its depricated .. no more wav files ) In Sound Studio, I made sure all of the sounds are within a 6db range for left and right.

Initially, I set the distance model to "AL_INVERSE_DISTANCE" . Listener and source gains to 1.

According to the documents, inverse distance attenuation is:

Dref/ ( Dref + Rfac * ( Distance - Dref )

For kicks, I set Dref to 1 and Rfac to 1. So, the equation should simplify to 1/Distance. Yet, things just seem as loud as ever. I'd assume if its at a distance of say 180 then the gain should be multiplied by 1/180 = 0.005555 . (?)

I checked that the source and listener positions are updated properly.

I set AL_MAX_DISTANCE to 200 which seems to work fine.

Huff....
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
You're using mono sounds right? Stereo sounds aren't localized at all...
Quote this message in a reply
Member
Posts: 81
Joined: 2007.05
Post: #3
Hmm, looks like the sounds are not mono. I'll mix the sounds down to mono in Sound Studio. I'll try some collision sounds first and see what happens. Smile
Quote this message in a reply
Member
Posts: 81
Joined: 2007.05
Post: #4
That seems to have solved the issue. Need to fine tune the settings! Thanks again!
Quote this message in a reply
Post Reply