Changeset 2950 for code/branches/sound/src/sound/SoundManager.cc
- Timestamp:
- May 4, 2009, 3:40:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound/src/sound/SoundManager.cc
r2932 r2950 38 38 { 39 39 /** 40 * Static function to get the singleton instance of SoundManager.41 *42 * @return The singleton instance43 */44 SoundManager* SoundManager::instance()45 {46 if(SoundManager::singleton_ == NULL)47 {48 SoundManager::singleton_ = new SoundManager();49 }50 51 return SoundManager::singleton_;52 }53 54 /**55 40 * Default constructor 56 41 */ … … 58 43 { 59 44 if(!alutInit(NULL,NULL)) { 60 COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) ;45 COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl; 61 46 } 47 48 COUT(4) << "OpenAL ALUT version:" << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl; 49 COUT(4) << "OpenAL ALUT supported MIME types:" << alutGetMIMETypes(ALUT_LOADER_BUFFER) << std::endl; 62 50 } 63 51 … … 98 86 // update listener position 99 87 Camera* camera = CameraManager::getInstance().getActiveCamera(); 88 if(camera == NULL) return; 100 89 Vector3 pos = camera->getPosition(); 101 90 alListener3f(AL_POSITION, pos.x, pos.y, pos.z);
Note: See TracChangeset
for help on using the changeset viewer.