I compiled the lib and added the plugin, etc, so the lib works fine. Added this code in the createScene method of the standart application:
sndMgr = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
OgreOggSound::OgreOggISound* snd = sndMgr->createSound("snd1", "roar.wav", false, true, false, mSceneMgr);
The applications runs fine, I can see the ogre head and everything, but no sound is heard.
Did I miss something?
Thanks in advance
Guided by some examples in the forum. Guess I missed to set up some parameters.
Now have to learn how to use the lib more efficiently.
Glad you solved it, was about to ask if the sound was mono/stereo
Any queries, just shout!
Well, right now I'm a little confused. Because first time I tryied I couldn't hear the sound, then I added these two lines:
and it worked. But now trying again, I removed those lines, and worked too. So, which are the necesary parameters to set up, if there is any ?
And another thing, I noticed, even though it seems to be a 3D sound, that no matter how far I would go of the node, it will always have the same volume, no attenuation. How can I make it ? Heres my whole code;
mSoundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
// Create a static sound, no looping, prebuffered
if (OgreOggSound::OgreOggISound* newSound = mSoundManager->createSound("Sound1", "roar.wav", false, true, false) )
// Attach to a SceneNode
Using the node of the ogre head.
Thanks again ^^
Couple of questions:
* Is your sound definitely single channel?
* You don't appear to attach the listener to anything, it will therefore default to (0,0,0) and will not move, i.e. attenuation remains constant..
* If the above are fine then there's a couple of things to try, first, depending on your scale,
see the following for reference about how these values work: attenuation
I've found that these can be a pain to work out using a reallife attenuation model, the easier option would be to change the attenuation model from the default to:
You should be able to pass in intuitive distances to the above and have smooth attenuation between your min/max distance values.
Oh thanks, that's what I was missing, the Listener Class, didn't know about it.
Now it is heard as a 3D sound.
I'll read later about the attenuation.
Thanks once again.