Plauze
03-02-2009 15:26:23
Hello,
After following the setup instructions and spending a lot of time on it, i finally can manage sounds in my little apllication (play, pause, stop, ...).
But nevertheless i am not able to set positional sounds, i've been searching the web and the forum for days now, but i can't get into it. Here's what i'm doing...
In my framelistener class i move the camera and update the soundmanager on every started frame
i've been playing around with all options from setting the rolloffactor or maxdistance to removing soundManager->setDistanceModel(AL_LINEAR_DISTANCE) or setting setRelativeToListener on true
...but no effect at all, the sound (which btw is a mono sound) is not changing.
what am i doing wrong?
After following the setup instructions and spending a lot of time on it, i finally can manage sounds in my little apllication (play, pause, stop, ...).
But nevertheless i am not able to set positional sounds, i've been searching the web and the forum for days now, but i can't get into it. Here's what i'm doing...
soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr() ;
soundManager->init() ;
soundManager->setDistanceModel(AL_LINEAR_DISTANCE) ;
OgreOggSound::OgreOggISound* sound = soundManager->createSound("Sound","sound.ogg",false,false,false) ;
sound->setRelativeToListener(false) ;
roboNode->attachObject(sound) ;
camNode->attachObject(OgreOggSound::OgreOggSoundManager::getSingletonPtr()->getListener()) ;
In my framelistener class i move the camera and update the soundmanager on every started frame
Ogre::Vector3 walkSpeed(0,0,25);
camNode->translate(walkSpeed*evt.timeSinceLastFrame);
OgreOggSound::OgreOggSoundManager::getSingletonPtr()->update(evt.timeSinceLastFrame) ;
i've been playing around with all options from setting the rolloffactor or maxdistance to removing soundManager->setDistanceModel(AL_LINEAR_DISTANCE) or setting setRelativeToListener on true
...but no effect at all, the sound (which btw is a mono sound) is not changing.
what am i doing wrong?