- Timestamp:
- Jun 28, 2009, 1:42:54 PM (15 years ago)
- Location:
- code/branches/core4/src/orxonox/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/sound/SoundManager.cc
r3196 r3236 39 39 { 40 40 SoundManager* SoundManager::singletonRef_s = NULL; 41 ALCdevice* SoundManager::device_s = NULL;42 41 43 42 /** … … 49 48 singletonRef_s = this; 50 49 50 this->device_ = NULL; 51 51 this->soundavailable_ = true; 52 52 if(!alutInitWithoutContext(NULL,NULL)) … … 57 57 else 58 58 { 59 if(SoundManager::device_s == NULL) 60 { 61 COUT(3) << "Sound: OpenAL: Open sound device..." << std::endl; 62 SoundManager::device_s = alcOpenDevice(NULL); 63 } 59 assert(this->device_ == NULL); 60 COUT(3) << "Sound: OpenAL: Open sound device..." << std::endl; 61 this->device_ = alcOpenDevice(NULL); 64 62 65 if( SoundManager::device_s== NULL)63 if(this->device_ == NULL) 66 64 { 67 65 COUT(2) << "Sound: OpenAL: Could not open sound device" << std::endl; … … 71 69 { 72 70 COUT(3) << "Sound: OpenAL: Sound device opened" << std::endl; 73 this->context_ = alcCreateContext( SoundManager::device_s, NULL);71 this->context_ = alcCreateContext(this->device_, NULL); 74 72 if(this->context_ == NULL) 75 73 { … … 99 97 100 98 alcDestroyContext(this->context_); 101 alcCloseDevice( SoundManager::device_s);99 alcCloseDevice(this->device_); 102 100 alutExit(); 103 101 } -
code/branches/core4/src/orxonox/sound/SoundManager.h
r3196 r3236 55 55 56 56 private: 57 static ALCdevice* device_s;57 ALCdevice* device_; 58 58 ALCcontext* context_; 59 59 std::list<SoundBase*> soundlist_;
Note: See TracChangeset
for help on using the changeset viewer.