Changeset 4219 in orxonox.OLD for orxonox/branches/openAL
- Timestamp:
- May 18, 2005, 2:15:48 PM (20 years ago)
- Location:
- orxonox/branches/openAL/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/openAL/src/lib/sound/sound_engine.cc
r4209 r4219 264 264 void SoundEngine::removeBuffer(SoundBuffer* buffer) 265 265 { 266 // look if there are any sources that have the buffer still loaded 267 tIterator<SoundSource>* sourceIterator = this->sourceList->getIterator(); 268 SoundSource* enumSource = sourceIterator->nextElement(); 269 while (enumSource) 270 { 271 if (buffer == enumSource->getBuffer()) 272 delete enumSource; 273 enumSource = sourceIterator->nextElement(); 274 } 275 delete sourceIterator; 276 277 // remove the Buffer 266 278 this->bufferList->remove(buffer); 267 279 } … … 357 369 358 370 /** 371 \brief SourceEngine::flushAllBuffers 372 */ 373 void SoundEngine::flushAllBuffers(void) 374 { 375 tIterator<SoundBuffer>* bufferIterator = this->bufferList->getIterator(); 376 SoundBuffer* enumBuffer = bufferIterator->nextElement(); 377 while (enumBuffer) 378 { 379 ResourceManager::getInstance()->unload(enumBuffer, RP_LEVEL); 380 enumBuffer = bufferIterator->nextElement(); 381 } 382 delete bufferIterator; 383 } 384 385 /** 359 386 \brief initializes Audio in general 360 387 */ -
orxonox/branches/openAL/src/lib/sound/sound_engine.h
r4210 r4219 89 89 // administrative 90 90 void flushUnusedBuffers(void); 91 void flushAllBuffers(void); 91 92 bool initAudio(void); 92 93 -
orxonox/branches/openAL/src/story_entities/world.cc
r4209 r4219 208 208 delete this->particleEngine; 209 209 TextEngine::getInstance()->flush(); 210 SoundEngine::getInstance()->flushAllBuffers(); 210 211 211 212 delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
Note: See TracChangeset
for help on using the changeset viewer.