Changeset 7291 in orxonox.OLD for trunk/src/lib/sound/sound_source.cc
- Timestamp:
- Apr 14, 2006, 10:28:24 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/sound_source.cc
r7290 r7291 46 46 SoundSource::~SoundSource() 47 47 { 48 SoundEngine::getInstance()->pushALSource(this->sourceID);48 this->stop(); 49 49 } 50 50 … … 69 69 { 70 70 if (unlikely(this->sourceID == 0)) 71 { 71 72 SoundEngine::getInstance()->popALSource(this->sourceID); 73 if (sourceID == 0) 74 { 75 PRINTF(2)("No more Free source\n"); 76 return; 77 } 78 } 72 79 // assert (this->sourceID != 0); 73 80 … … 90 97 { 91 98 this->bPlay = false; 92 alSourceStop(this->sourceID); 93 SoundEngine::getInstance()->pushALSource(this->sourceID); 99 if (this->sourceID != 0) 100 { 101 alSourceStop(this->sourceID); 102 if (DEBUG >= 3) 103 SoundEngine::checkError("StopSource", __LINE__); 104 SoundEngine::getInstance()->pushALSource(this->sourceID); 105 this->sourceID = 0; 106 } 94 107 } 95 108
Note: See TracChangeset
for help on using the changeset viewer.