Changeset 7290 in orxonox.OLD for trunk/src/lib/sound
- Timestamp:
- Apr 14, 2006, 9:58:17 AM (19 years ago)
- Location:
- trunk/src/lib/sound
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/ogg_player.cc
r7287 r7290 49 49 OggPlayer::~OggPlayer() 50 50 { 51 //this->release();51 this->release(); 52 52 } 53 53 -
trunk/src/lib/sound/sound_buffer.cc
r7221 r7290 47 47 // SoundEngine::getInstance()->removeBuffer(this); 48 48 alDeleteBuffers(1, &this->bufferID); 49 SoundEngine::checkError("SoundBuffer: Delete Buffer", __LINE__); 49 50 } 50 51 -
trunk/src/lib/sound/sound_engine.cc
r7285 r7290 70 70 { 71 71 while (this->sourceList->size() > 0) 72 delete dynamic_cast<SoundSource*>(this->sourceList->front());72 delete static_cast<SoundSource*>(this->sourceList->front()); 73 73 } 74 74 … … 76 76 { 77 77 alDeleteSources(1, &this->ALSources.top()); 78 SoundEngine::checkError("Deleting Source", __LINE__); 78 79 this->ALSources.pop(); 79 80 } … … 83 84 { 84 85 while(this->bufferList->size() > 0) 85 ResourceManager::getInstance()->unload( dynamic_cast<SoundBuffer*>(this->bufferList->front()));86 ResourceManager::getInstance()->unload(static_cast<SoundBuffer*>(this->bufferList->front())); 86 87 } 87 88 … … 146 147 this->ALSources.pop(); 147 148 } 148 149 149 } 150 150 … … 155 155 void SoundEngine::update() 156 156 { 157 158 157 // updating the Listeners Position 159 158 if (likely(this->listener != NULL)) … … 199 198 source->getNode()->getVelocity().z); 200 199 } 201 202 200 } 203 201 else … … 208 206 } 209 207 } 208 SoundEngine::checkError("SoundEngine::update()", __LINE__); 210 209 } 211 210 … … 309 308 // #endif 310 309 311 printf ("===== SOURCECOUNT: %d\n", this->maxSourceCount);312 310 this->setDopplerValues(SOUND_DOPPLER_FACTOR, SOUND_DOPPLER_VELOCITY); 313 311 this->allocateSources(this->maxSourceCount); 312 this->checkError("Allocating Sources", __LINE__); 314 313 } 315 314 … … 422 421 }; 423 422 } 424 -
trunk/src/lib/sound/sound_source.cc
r7288 r7290 57 57 SoundEngine::getInstance()->popALSource(this->sourceID); 58 58 alSourcePlay(this->sourceID); 59 if (DEBUG >= 3) 60 SoundEngine::checkError("Play Source", __LINE__); 59 61 this->bPlay = true; 60 62 } … … 77 79 alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID()); 78 80 this->bPlay = true; 81 82 if (DEBUG >= 3) 83 SoundEngine::checkError("Play Source", __LINE__); 79 84 } 80 85 … … 95 100 { 96 101 alSourcePause(this->sourceID); 102 if (DEBUG >= 3) 103 SoundEngine::checkError("Pause Source", __LINE__); 97 104 } 98 105 … … 103 110 { 104 111 alSourceRewind(this->sourceID); 112 113 if (DEBUG >= 3) 114 SoundEngine::checkError("Rewind Source", __LINE__); 105 115 } 106 116 … … 114 124 { 115 125 alSourcef(this->sourceID, AL_ROLLOFF_FACTOR, rolloffFactor); 126 127 if (DEBUG >= 3) 128 SoundEngine::checkError("Set Source Rolloff-factor", __LINE__); 116 129 } 117 130
Note: See TracChangeset
for help on using the changeset viewer.