[Solved]OgreOggListener::mName|OgreOggSoundPlugin::shutdown

cycheng

09-09-2010 07:02:04

Hi,

I use OgreOggSound 1.18,

(1)
In OgreOggSoundManager::init(), when system creates mListener in OgreOggSoundFactory::createInstanceImpl()
It seems the OgreOggSoundFactory do not assign name to OgreOggListener, does the system intend to do that ?

(2)
the movable type of OgreOggListener is "OgreOggListener", and it is different to
OgreOggSoundFactory(typename = "OgreOggISound") which create the OgreOggListener
this will encounter some problems if I do this :

#define SOUND_MGR OgreOggSound::OgreOggSoundManager::getSingleton()

OgreOggListener* ogglistener = SOUND_MGR.getListener();
Ogre::SceneManager* smgr_of_soundmgr = SOUND_MGR.getSceneManager();

smgr_of_soundmgr->extractMovableObject( ogglistener );

because it use "OgreOggListener" movable type and ogglistener ->mName search scene manages movableObject map
but actually, ogglistener is located in "OgreOggISound" objects map with name "OgreOggSoundListener"

(by the way, ogglistener ->mName is NULL)
How about create another Factory for OgreOggListener ?

(3)
in OgreOggSoundPlugin.cpp
It would better to initialise 'mOgreOggSoundManager = NULL' in OgreOggSoundPlugin constructor, and adding check in
OgreOggSoundPlugin::shutdown() to check if mOgreOggSoundManager exist

the case will occur if I install() the plugin without initialise() and shutdown() it immediately,
if I do not check, error will occur.


Thanks for your patient!

CY

stickymango

09-09-2010 10:04:21

All valid points, thanks. I'll look into them!

stickymango

09-09-2010 10:40:13

Fixed all the above issues.

* OgreOggListener is of type 'OgreOggISound'
* mName should be 'OgreOggListener'

Does that solve your issues?

cycheng

09-09-2010 13:40:19

Yes!
All solved :D

Thanks for your great work!

Best regards,
CY