Changeset 6506 for code/branches/sound5/src/orxonox/sound/BaseSound.cc
- Timestamp:
- Mar 11, 2010, 3:16:12 PM (15 years ago)
- Location:
- code/branches/sound5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound5
- Property svn:mergeinfo changed
/code/branches/sound4 (added) merged: 6435,6476,6504
- Property svn:mergeinfo changed
-
code/branches/sound5/src/orxonox/sound/BaseSound.cc
r6502 r6506 91 91 alSourcePlay(this->audioSource_); 92 92 if (int error = alGetError()) 93 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;93 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl; 94 94 } 95 95 } … … 141 141 alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0); 142 142 if (ALint error = alGetError()) 143 COUT(2) << "Sound Warning: Setting source parameters to 0 failed: " 144 << SoundManager::getALErrorString(error) << std::endl; 143 COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl; 145 144 assert(this->soundBuffer_ != NULL); 146 145 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 147 146 if (ALuint error = alGetError()) 148 COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl;147 COUT(1) << "Sound: Error: Could not set buffer \"" << this->source_ << "\": " << getALErrorString(error) << std::endl; 149 148 } 150 149 … … 153 152 this->volume_ = clamp(vol, 0.0f, 1.0f); 154 153 if (this->volume_ != vol) 155 COUT(2) << "Sound warning: volume out of range, clamping value." << std::endl;154 COUT(2) << "Sound: Warning: volume out of range, clamping value." << std::endl; 156 155 this->updateVolume(); 157 156 } … … 164 163 alSourcef(this->audioSource_, AL_GAIN, volume); 165 164 if (int error = alGetError()) 166 COUT(2) << "Sound: Error setting volume to " << volume 167 << ": " << SoundManager::getALErrorString(error) << std::endl; 165 COUT(2) << "Sound: Error setting volume to " << volume << ": " << getALErrorString(error) << std::endl; 168 166 } 169 167 } … … 180 178 if (pitch > 2 || pitch < 0.5f) 181 179 { 182 COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;180 COUT(2) << "Sound: Warning: pitch out of range, cropping value." << std::endl; 183 181 pitch = pitch > 2.0f ? 2.0f : pitch; 184 182 pitch = pitch < 0.5f ? 0.5f : pitch; … … 189 187 alSourcef(this->audioSource_, AL_PITCH, pitch); 190 188 if (int error = alGetError()) 191 COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl;189 COUT(2) << "Sound: Error setting pitch: " << getALErrorString(error) << std::endl; 192 190 } 193 191 } … … 234 232 if (ALuint error = alGetError()) 235 233 { 236 COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl;234 COUT(1) << "Sound: Error: Could not set buffer \"" << source << "\": " << getALErrorString(error) << std::endl; 237 235 return; 238 236 } … … 242 240 alSourcePlay(this->audioSource_); 243 241 if (int error = alGetError()) 244 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;242 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl; 245 243 if (this->isPaused()) 246 244 alSourcePause(this->audioSource_);
Note: See TracChangeset
for help on using the changeset viewer.