Changeset 6411 for code/branches/presentation2/src/orxonox/sound
- Timestamp:
- Dec 24, 2009, 4:01:23 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6397 r6411 60 60 { 61 61 this->stop(); 62 // Release buffer 63 if (this->soundBuffer_ != NULL) 64 { 65 assert(GameMode::playsSound()); 66 SoundManager::getInstance().releaseSoundBuffer(this->soundBuffer_, this->bPooling_); 67 } 62 68 } 63 69 -
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6409 r6411 162 162 SoundManager::~SoundManager() 163 163 { 164 // Erase fade lists because of the smart pointers 165 this->fadeInList_.clear(); 166 this->fadeOutList_.clear(); 167 168 // If there are still used buffers around, well, that's just very bad... 169 if (this->soundBuffers_.size() != this->effectsPool_.size()) 170 COUT(1) << "Sound Error: Some sound buffers are still in use but OpenAL is about to shut down. Fix this!" << std::endl; 171 // Empty buffer pool and buffer list 172 this->effectsPool_.clear(); 173 this->soundBuffers_.clear(); 174 175 // There should not be any sources in use anymore 176 if (!this->usedSoundSources_.empty()) 177 COUT(1) << "Sound Error: Some sound sources are still in use but OpenAL is about to shut down. Fix this!" << std::endl; 178 while (!this->availableSoundSources_.empty()) 179 { 180 alDeleteSources(1, &this->availableSoundSources_.back()); 181 this->availableSoundSources_.pop_back(); 182 } 183 164 184 GameMode::setPlaysSound(false); 165 185
Note: See TracChangeset
for help on using the changeset viewer.