Google

Building with Ogre1.8

A open source audio library to get spatialised sounds into OGRE applications

Moderators: OGRE Team, Ogreoggsound Moderators

Building with Ogre1.8

Postby dermont » Thu Nov 03, 2011 2:01 pm

There have been a number of changes to variable names in v1.8. You probably haven't got around to thinking of updating but since the update to build with 1.8 is trivial and doesn't affect v1.7 hopefully it can be applied to svn.

https://bitbucket.org/sinbad/ogre/chang ... ingleton.h

Code: Select all
Index: ogreoggsoundmanager.cpp
===================================================================
--- ogreoggsoundmanager.cpp   (revision 411)
+++ ogreoggsoundmanager.cpp   (working copy)
@@ -47,7 +47,12 @@
    bool OgreOggSound::OgreOggSoundManager::mShuttingDown = false;
 #endif
 
+
+#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR <= 7   
 template<> OgreOggSound::OgreOggSoundManager* Ogre::Singleton<OgreOggSound::OgreOggSoundManager>::ms_Singleton = 0;
+#else
+template<> OgreOggSound::OgreOggSoundManager* Ogre::Singleton<OgreOggSound::OgreOggSoundManager>::msSingleton = 0;
+#endif
 
 namespace OgreOggSound
 {
@@ -215,13 +220,26 @@
    /*/////////////////////////////////////////////////////////////////*/
    OgreOggSoundManager* OgreOggSoundManager::getSingletonPtr(void)
    {
+#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR <= 7   
       return ms_Singleton;
+#else
+      return msSingleton;
+#endif
    }
    /*/////////////////////////////////////////////////////////////////*/
    OgreOggSoundManager& OgreOggSoundManager::getSingleton(void)
    {
-      if ( !ms_Singleton ) OGRE_EXCEPT( Ogre::Exception::ERR_ITEM_NOT_FOUND, "'OgreOggSound[_d]' plugin NOT loaded! - use loadPlugin()", "OgreOggSoundManager::getSingleton()"); 
+#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR <= 7   
+      if ( !ms_Singleton )
+#else
+      if ( !msSingleton )
+#endif
+OGRE_EXCEPT( Ogre::Exception::ERR_ITEM_NOT_FOUND, "'OgreOggSound[_d]' plugin NOT loaded! - use loadPlugin()", "OgreOggSoundManager::getSingleton()"); 
+#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR <= 7   
       return ( *ms_Singleton );
+#else
+      return ( *msSingleton );
+#endif
    }
    /*/////////////////////////////////////////////////////////////////*/
    bool OgreOggSoundManager::init(   const std::string &deviceName,
dermont
Bugbear
 
Posts: 895
Kudos: 37
Joined: 27 Sep 2005

Re: Building with Ogre1.8

Postby stickymango » Tue Nov 22, 2011 11:08 pm

Thanks for this, I haven't got round to looking at 1.8 yet but will review these ammendments and incorporate any changes.

Thanks!
stickymango
Gnoll
 
Posts: 604
Kudos: 4
Joined: 25 Aug 2006
Location: England


Return to OgreOggSound

Who is online

Users browsing this forum: No registered users and 1 guest