how to use OgreOggSound1.16(solved)


24-03-2010 02:00:13

I use OgreOggSound1.16 from svn and use OpenAL 1.1 SDK.
My code runs OK in OgreOggSound1.14,but doesn't run in OgreOggSound1.16.
I think there must be some alteration in OgreOggSound1.16 about sound manager 's build?
this is my code:

mSoundMgr = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
OgreOggSound::OgreOggISound* pBackgroundMusic =
mSoundMgr->createSound("BackgroundMusic", "KingdomOfLight.ogg", false, true);

my error occurs in "mSoundMgr->init();".
I examine "mSoundMgr" and find that the value of "mDevice""mContext""mOrigVolume" are NULL.
So I think there must be some thing I have not to add about OpenAL.


24-03-2010 09:30:39

Sounds like a hardware setup issue, can you step into the code and check the creation of the device?

There were changes in the init() function to make it compatible with LINUX and the handle errors better, but if its not creating a device then OpenAL musn't be able to find sound harware correctly...


25-03-2010 01:55:30

I use "mSoundMgr = new OgreOggSound::OgreOggSoundManager();" instead of "mSoundMgr = OgreOggSound::OgreOggSoundManager::getSingletonPtr();".
The "mDevice" is not Null again.
But the error occurs in "init()" of "OgreOggSoundManager.cpp" again.
The error is "OGRE EXCEPTION(5:ItemIdentityException):MovableObjectFactory of type OgreOggISound
does not exist in Root::getMovableObjectFactory at .\src\OgreRoot.cpp(line 1461)".
By the way,I don't use "OGGSOUND_THREADED" and my system is Windows XP.


25-03-2010 08:58:44

You can't instantiate an OgreOggSoundManager by using new anymore, you have to load it as a plugin using Root::loadPlugin("OgreOggSound[_d]");.


25-03-2010 10:23:01

The problem is solved.
I add "OgreOggSound_d" to plugins_d.cfg and repeat to use "mSoundMgr = OgreOggSound::OgreOggSoundManager::getSingletonPtr();".
Then everything is ok.
Thanks for stickymango.


25-03-2010 10:26:01

No problem. :D