Changeset 8006 for code/branches/usability/src/orxonox/sound/BaseSound.cc
- Timestamp:
- Mar 1, 2011, 5:16:52 AM (14 years ago)
- Location:
- code/branches/usability
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability
- Property svn:mergeinfo changed
/code/branches/sound4 removed /code/branches/sound5 removed
- Property svn:mergeinfo changed
-
code/branches/usability/src/orxonox/sound/BaseSound.cc
r8005 r8006 92 92 alSourcePlay(this->audioSource_); 93 93 if (int error = alGetError()) 94 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;94 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl; 95 95 } 96 96 } … … 145 145 alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0); 146 146 if (ALint error = alGetError()) 147 COUT(2) << "Sound : Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl;148 if(this->soundBuffer_ != NULL) {149 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());150 }147 COUT(2) << "Sound Warning: Setting source parameters to 0 failed: " 148 << SoundManager::getALErrorString(error) << std::endl; 149 assert(this->soundBuffer_ != NULL); 150 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 151 151 if (ALuint error = alGetError()) 152 COUT(1) << "Sound : Error: Could not set buffer \"" << this->source_ << "\": " <<getALErrorString(error) << std::endl;152 COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl; 153 153 } 154 154 … … 157 157 this->volume_ = clamp(vol, 0.0f, 1.0f); 158 158 if (this->volume_ != vol) 159 COUT(2) << "Sound : Warning: volume out of range, clamping value." << std::endl;159 COUT(2) << "Sound warning: volume out of range, clamping value." << std::endl; 160 160 this->updateVolume(); 161 161 } … … 168 168 alSourcef(this->audioSource_, AL_GAIN, volume); 169 169 if (int error = alGetError()) 170 COUT(2) << "Sound: Error setting volume to " << volume << ": " << getALErrorString(error) << std::endl; 170 COUT(2) << "Sound: Error setting volume to " << volume 171 << ": " << SoundManager::getALErrorString(error) << std::endl; 171 172 } 172 173 } … … 183 184 if (pitch > 2 || pitch < 0.5f) 184 185 { 185 COUT(2) << "Sound : Warning: pitch out of range, cropping value." << std::endl;186 COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl; 186 187 pitch = pitch > 2.0f ? 2.0f : pitch; 187 188 pitch = pitch < 0.5f ? 0.5f : pitch; … … 192 193 alSourcef(this->audioSource_, AL_PITCH, pitch); 193 194 if (int error = alGetError()) 194 COUT(2) << "Sound: Error setting pitch: " << getALErrorString(error) << std::endl;195 COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl; 195 196 } 196 197 } … … 237 238 if (ALuint error = alGetError()) 238 239 { 239 COUT(1) << "Sound : Error: Could not set buffer \"" << source << "\": " <<getALErrorString(error) << std::endl;240 COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl; 240 241 return; 241 242 } … … 245 246 alSourcePlay(this->audioSource_); 246 247 if (int error = alGetError()) 247 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;248 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl; 248 249 if (this->isPaused()) 249 250 alSourcePause(this->audioSource_);
Note: See TracChangeset
for help on using the changeset viewer.