Changeset 6204 for code/branches
- Timestamp:
- Dec 2, 2009, 5:06:57 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6203 r6204 124 124 { 125 125 if (alIsSource(this->audioSource_)) 126 { 126 127 alSourcef(this->audioSource_, AL_GAIN, this->volume_*this->getVolumeGain()); 128 if (int error = alGetError()) 129 COUT(2) << "Sound: Error setting volume: " << error << std::endl; 130 } 127 131 } 128 132 … … 144 148 this->pitch_ = pitch; 145 149 if (GameMode::playsSound()) 150 { 151 if (int error = alGetError()) 152 COUT(2) << "Sound: Error setting pitch: " << error << std::endl; 146 153 alSourcei(this->audioSource_, AL_PITCH, pitch); 154 } 147 155 } 148 156 … … 189 197 this->updateVolume(); 190 198 this->setPitch(this->getPitch()); 191 alSourcei (this->audioSource_, AL_LOOPING, (this->bLoop_ ? AL_TRUE : AL_FALSE));199 this->setLooping(getLooping()); 192 200 if (this->isPlaying() || this->isPaused()) 193 alSourcePlay(this->audioSource_);201 BaseSound::play(); 194 202 if (this->isPaused()) 195 alSourcePause(this->audioSource_); 196 197 if (int error = alGetError()) 198 COUT(2) << "Sound: OpenAL: Error playing sound: " << error << std::endl; 203 BaseSound::pause(); 199 204 } 200 205 } -
code/branches/presentation2/src/orxonox/sound/WorldSound.cc
r6186 r6204 96 96 this->stop(); 97 97 } 98 98 99 99 float WorldSound::getVolumeGain() 100 100 {
Note: See TracChangeset
for help on using the changeset viewer.