[SOLVED]question about latest oggsound version

deshan

28-11-2010 19:03:22

Hi sticky,

I took the latest version(1.19) from svn trunk. but i am getting a strange run time error.
can't figure out what it is.
This error comes even before the ogre configaration dialog.
Just curious to ask whther the new oggsound version required update in openal sdk?

stickymango

28-11-2010 20:36:29

Hi deshan,

No, there is no update to OpenAL required, what kind of error are you getting and whereabouts in the initialisation is it occurring?

deshan

29-11-2010 15:51:10

Hi sticky,

Thanks for the reply.

The same application when built with latest oggsound checkout 1.19 (with both ogre 1.6 and 1.7) it cause a run time error. But with my current oggsound version (checked out march 15 2010) it works fine (ogre 1.6 and 1.7).

These days I am porting project to ogre 1.7, at the moment I am ok because my application works fine with my current ogreoggsound version (checked out march 15 2010) :D

BTW i will make a sample application and run it in debug mode and will provide you the information (at the moment my project only built s in release mode)

~chamika

stickymango

29-11-2010 16:19:55

Okay, if you can get a debug stack trace that would help me pinpoint any issues, I've recently converted a number of applications to the latest version of OGRE and OgreOggSound and I did have some runtime issues but I thought I'd solved them, at least all my applications work okay.. :?

deshan

04-12-2010 15:50:57

Hi sticky,

The application breaks when i call init function.

All my oggsound code is

#include "OgreOggSound.h"
OgreOggSound::OgreOggSoundManager *soundManager;
soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
soundManager->init();



Breaks-
debug mode with ogreoggsound 1.19, ogre 1.7.2, OpenAL 1.1 SDK

Fine-
debug mode with ogreoggsound 1.14, ogre 1.7.2, OpenAL 1.1 SDK

Love to provide any other necessary information

~deshan

stickymango

04-12-2010 19:45:36

Where does the stack trace lead?

Can you step through?

deshan

05-12-2010 13:36:18

ok sticky I found the problem

seems i have to instantiate the OgreOggSoundManager by my self. This was not necessary in 1.14
see the code below

1.14
OgreOggSoundManager* OgreOggSoundManager::getSingletonPtr(void)
{
if (!ms_Singleton) ms_Singleton = OGRE_NEW_T(OgreOggSoundManager, Ogre::MEMCATEGORY_GENERAL)();
return ms_Singleton;
}


1.19
OgreOggSoundManager* OgreOggSoundManager::getSingletonPtr(void)
{
return ms_Singleton;
}


So the code would be
#include "OgreOggSound.h"
OgreOggSound::OgreOggSoundManager *soundManager;
new OgreOggSound::OgreOggSoundManager();
soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
soundManager->init();


Problem solved

BTW I am getting new problem

OGRE EXCEPTION(5:ItemIdentityException): MovableObjectFactory of type OgreOggISound does not exist in Root::getMovableObjectFactory at ..\..\..\..\OgreMain\src\OgreRoot.cpp (line 1461)

in return statement of following
bool OgreOggSoundManager::createListener()
{
if ( mListener ) return true;

// Create a listener
return ( (mListener = dynamic_cast<OgreOggListener*>(mSceneMgr->createMovableObject("OgreOggSoundListener", OgreOggSoundFactory::FACTORY_TYPE_NAME, 0)))!=0);
}


could you please tell me what could course this?

Thanx

~deshan

stickymango

05-12-2010 14:02:50

Ah right, I see your problem :D

Its been simplified by using Ogre's plugin interface, now all you need to do is either:
add the following to a plugins.cfg file, if you use one,
Plugin=OgreOggSound
or in code:Ogre::Root::getSingletonPtr()->loadPlugin("OgreOggSound");
OgreOggSoundManager* soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();

You should not instantiate the manager yourself, Ogre should take care of creating and destroying the manager for you..

deshan

05-12-2010 16:36:37

Now that works fine, Thanks sticky.

stickymango

05-12-2010 22:51:01

No problem, glad your up and running again :)