kinggori
12-03-2007 05:27:09
I attached a wav file to an object and a listener to my camera-character
If the file is roar.wav that CaseyB attached as I move further away from the object the sound fades away. But when I try using my wav files the sound does not fade!!
Any idea why this is happening? maybe its because one file is mono and the other is stereo?
CaseyB
12-03-2007 13:57:02
maybe its because one file is mono and the other is stereo?
Yup, that's it exactly. Any 3D sounds need to be mixed down to Mono in order for OpenAL to render them correctly.
kinggori
12-03-2007 18:17:46
maybe its because one file is mono and the other is stereo?
Yup, that's it exactly. Any 3D sounds need to be mixed down to Mono in order for OpenAL to render them correctly.
is there a program that converts stereo/3d wav to mono wav?
I'm sorry but I have another question... when I attach sound to an object it i very loud when i am next to the object as expected and as I move away the sound fades away but I can still hear it!! even if I'm on the other side of the map! I set the gain to 0.1 but that still causes the same problem. Is there a way of limiting the "range" of sound?
CaseyB
12-03-2007 18:35:08
is there a program that converts stereo/3d wav to mono wav?
There is a project on Sourceforge called Audacity that's pretty good. You should check that out, it has a lot of other functionality too.
I'm sorry but I have another question... when I attach sound to an object it i very loud when i am next to the object as expected and as I move away the sound fades away but I can still hear it!! even if I'm on the other side of the map! I set the gain to 0.1 but that still causes the same problem. Is there a way of limiting the "range" of sound?
There are a few values that you can play with, here's the api documentation for them. The Website is down so I'll just post it here for now.
/**
* Sets the Max Distance.
* @param maxDistance The max distance used in the Inverse Clamped Distance Model
* @note This is the distance where there will be no further attenuation of the source
*/
void setMaxDistance(Ogre::Real maxDistance);
/**
* Sets the rolloff factor.
* @param rolloffFactor The rolloff rate for the source
* @note Used for distance attenuation
*/
void setRolloffFactor(Ogre::Real rolloffFactor);
/**
* Sets the reference distance.
* @param refDistance The reference distance used in attenuation calculations.
* @note This is the distance under which the volume for the
* source would normally drop by half
*/
void setReferenceDistance(Ogre::Real refDistance);
/**
* Sets the variables used in the distance attenuation calculation.
* @param maxDistance The max distance used in the Inverse Clamped Distance Model
* @param rolloffFactor The rolloff rate for the source
* @param refDistance The reference distance used in attenuation calculations
*/
void setDistanceValues(Ogre::Real maxDistance, Ogre::Real rolloffFactor, Ogre::Real refDistance);