Destructor forgot to remove frame listener?

daedar

04-03-2007 22:08:27

Hi,

first thx for this really usefull OpenAL manager for Ogre, OgreAL's nearly perfect :D

But I've just a simple remark about the destructor, I think something like this line should be added :

Ogre::Root::getSingleton().removeFrameListener(this);


If you wanna delete the sound manager and recreate a new one with a different scene manager (switching between menus and game in our case), it will crash because the old frame listener is again active.

Thx

daedar

CaseyB

05-03-2007 00:42:08

Very good call! Thank you!

Dirso

08-04-2007 17:03:16

@daedar: It worked for me as well!! Thanks a lot!!

@CaseyB: Congratulations for your amazing work with OgreAL! It saved my life!!

Dirso

CaseyB

08-04-2007 22:41:36

Congratulations for your amazing work with OgreAL! It saved my life!!Thanks! I'm glad that you like it!

kungfoomasta

09-04-2007 05:19:15

I have a scenario in my game where I want the user to be able to change resolutions. Basically I destroy OGRE and set it up again. Currently I'm not deleting OgreAL's soundmanager during this process. It doesn't seem like anything is wrong, but could this cause problems down the road? I guess the only other alternative would be to retreive the sound position and restore it after setting up OGRE. There would be a pause, but only a small one.

So to restate.. should I destroy and recreate OgreAL soundmanager along with OGRE?

Thanks,

KungFooMasta

CaseyB

09-04-2007 06:04:27

When we start using Ogre's ResourceManager the Sounds will go away completely, but for now, just the Scenenodes that they are attached to will go away, which will cause problems because the MovableObject stores a pointer to its parent which would be invalidated.

kungfoomasta

09-04-2007 18:13:50

Sorry I haven't looked, but for sounds that are non 3d, or not relative to the listener, are those attached to scene nodes?

Its just the background sound that I have playing, but I guess I could have 3d sounds to be fancy. 8)

Good to hear they will act like Ogre resources. I will just have to save state and restore it after changing resolution. :)

KungFooMasta