Changeset 6197 for code/branches/presentation2/src/orxonox/sound
- Timestamp:
- Dec 2, 2009, 2:58:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6190 r6197 163 163 void SoundManager::checkSoundVolumeValidity() 164 164 { 165 if(this->soundVolume_ < 0.0 || this->soundVolume_ > 1.0) 166 { 167 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 165 if(!checkVolumeValidity(SoundType::none)) 166 { 168 167 ResetConfigValue(soundVolume_); 169 168 } 170 171 this->updateVolume(SoundType::none);172 COUT(3) << "SoundManager: volume set to " << this->soundVolume_ << std::endl;173 174 169 } 175 170 176 171 void SoundManager::checkAmbientVolumeValidity() 177 172 { 178 if(this->ambientVolume_ < 0.0 || this->ambientVolume_ > 1.0) 179 { 180 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 173 if(!checkVolumeValidity(SoundType::ambient)) 174 { 181 175 ResetConfigValue(ambientVolume_); 182 176 } 183 184 this->updateVolume(SoundType::ambient);185 COUT(3) << "SoundManager: volume set to " << this->ambientVolume_ << std::endl;186 177 } 187 178 188 179 void SoundManager::checkEffectsVolumeValidity() 189 180 { 190 if(this->effectsVolume_ < 0.0 || this->effectsVolume_ > 1.0) 191 { 192 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 181 if(!checkVolumeValidity(SoundType::effects)) 182 { 193 183 ResetConfigValue(effectsVolume_); 194 184 } 195 196 this->updateVolume(SoundType::effects); 197 COUT(3) << "SoundManager: volume set to " << this->effectsVolume_ << std::endl; 198 } 199 200 // void SoundManager::checkSoundVolumeValidity() 201 // { 202 // if(!checkVolumeValidity(SoundType::none)) 203 // ResetConfigValue(soundVolume_) 204 // } 205 // 206 // void SoundManager::checkAmbientVolumeValidity() 207 // { 208 // if(!checkVolumeValidity(SoundType::ambient)) 209 // ResetConfigValue(ambientVolume_); 210 // } 211 // 212 // void SoundManager::checkEffectsVolumeValidity() 213 // { 214 // if(!checkVolumeValidity(SoundType::effects)) 215 // ResetConfigValue(effectsVolume_); 216 // } 185 } 217 186 218 187 void SoundManager::setListenerPosition(const Vector3& position)
Note: See TracChangeset
for help on using the changeset viewer.