Changeset 6388 for code/branches/presentation2/src/orxonox/sound
- Timestamp:
- Dec 21, 2009, 1:28:10 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/sound
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/AmbientSound.cc
r6387 r6388 118 118 this->setSource(path); 119 119 else 120 COUT(3) << "Sound: " << source << ": Not a valid name! Ambient sound will not change." << std::endl; 120 COUT(3) << "Sound: " << source << ": Not a valid name! Ambient sound will not change." << std::endl; 121 121 } 122 122 } … … 134 134 if (this->isActive()) 135 135 this->play(); 136 else 136 else 137 137 this->stop(); 138 138 } -
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6387 r6388 177 177 pitch = pitch > 2 ? 2 : pitch; 178 178 pitch = pitch < 0.5 ? 0.5 : pitch; 179 } 179 } 180 180 this->pitch_ = pitch; 181 181 if (alIsSource(this->audioSource_)) … … 224 224 if (alIsSource(this->audioSource_)) // already playing or paused 225 225 { 226 // Set new buffer 226 // Set new buffer 227 227 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 228 228 if (ALuint error = alGetError()) -
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6387 r6388 254 254 } 255 255 256 float SoundManager::getVolume(SoundType::Value type) 256 float SoundManager::getVolume(SoundType::Value type) 257 257 { 258 258 if (type < 0 || type > SoundType::Effects) … … 261 261 } 262 262 263 float SoundManager::getRealVolume(SoundType::Value type) 263 float SoundManager::getRealVolume(SoundType::Value type) 264 264 { 265 265 if (type != SoundType::Music && type != SoundType::Effects) … … 339 339 } 340 340 341 if (!this->ambientSounds_.empty()) 341 if (!this->ambientSounds_.empty()) 342 342 { 343 343 this->fadeOut(ambientSounds_.front().first); … … 354 354 return; 355 355 356 if (this->ambientSounds_.front().first == oldAmbient) 356 if (this->ambientSounds_.front().first == oldAmbient) 357 357 { 358 358 this->fadeOut(oldAmbient); -
code/branches/presentation2/src/orxonox/sound/WorldSound.cc
r6387 r6388 110 110 } 111 111 112 void WorldSound::changedActivity() 112 void WorldSound::changedActivity() 113 113 { 114 114 SUPER(WorldSound, changedActivity); 115 115 if (this->isActive()) 116 116 this->play(); 117 else 117 else 118 118 this->stop(); 119 119 }
Note: See TracChangeset
for help on using the changeset viewer.