Changeset 4195 in orxonox.OLD for orxonox/branches/openAL/src/lib/sound
- Timestamp:
- May 16, 2005, 1:39:12 PM (20 years ago)
- Location:
- orxonox/branches/openAL/src/lib/sound
- Files:
-
- 1 added
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/openAL/src/lib/sound/sound_engine.cc
r4187 r4195 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "sound_engine.h" 19 19 20 20 using namespace std; … … 24 24 \brief standard constructor 25 25 */ 26 ProtoSingleton::ProtoSingleton()26 SoundEngine::SoundEngine () 27 27 { 28 this->setClassName (" ProtoSingleton");28 this->setClassName ("SoundEngine"); 29 29 30 30 } … … 33 33 \brief the singleton reference to this class 34 34 */ 35 ProtoSingleton* ProtoSingleton::singletonRef = NULL;35 SoundEngine* SoundEngine::singletonRef = NULL; 36 36 37 37 /** 38 38 \returns a Pointer to this Class 39 39 */ 40 ProtoSingleton* ProtoSingleton::getInstance(void)40 SoundEngine* SoundEngine::getInstance(void) 41 41 { 42 if (! ProtoSingleton::singletonRef)43 ProtoSingleton::singletonRef = new ProtoSingleton();44 return ProtoSingleton::singletonRef;42 if (!SoundEngine::singletonRef) 43 SoundEngine::singletonRef = new SoundEngine(); 44 return SoundEngine::singletonRef; 45 45 } 46 46 … … 49 49 50 50 */ 51 ProtoSingleton::~ProtoSingleton()51 SoundEngine::~SoundEngine () 52 52 { 53 ProtoSingleton::singletonRef = NULL;53 SoundEngine::singletonRef = NULL; 54 54 55 55 } -
orxonox/branches/openAL/src/lib/sound/sound_engine.h
r4194 r4195 1 1 /*! 2 \file proto_singleton.h3 \brief Definition of the ...singleton Class2 \file sound_engine.h 3 \brief Definition of the SoundEngine singleton Class 4 4 5 5 */ 6 6 7 #ifndef _ PROTO_SINGLETON_H8 #define _ PROTO_SINGLETON_H7 #ifndef _SOUND_ENGINE_H 8 #define _SOUND_ENGINE_H 9 9 10 10 #include "base_object.h" … … 12 12 // FORWARD DEFINITION 13 13 14 //! A default singleton class.15 class ProtoSingleton: public BaseObject {14 //! A Class that handles audio via the openAudioLibrary 15 class SoundEngine : public BaseObject { 16 16 17 17 public: 18 static ProtoSingleton* getInstance(void);19 virtual ~ ProtoSingleton(void);18 static SoundEngine* getInstance(void); 19 virtual ~SoundEngine(void); 20 20 21 21 private: 22 ProtoSingleton(void);23 static ProtoSingleton* singletonRef;22 SoundEngine(void); 23 static SoundEngine* singletonRef; 24 24 }; 25 25 26 #endif /* _ PROTO_SINGLETON_H */26 #endif /* _SOUND_ENGINE_H */
Note: See TracChangeset
for help on using the changeset viewer.