Changeset 8771 in orxonox.OLD for branches/atmospheric_engine/src/lib/sound/sound_source.cc
- Timestamp:
- Jun 24, 2006, 3:35:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/sound/sound_source.cc
r8495 r8771 164 164 165 165 /** 166 * @brief Plays back buffer on this Source with gain 167 * @param buffer the buffer to play back on this Source 166 * @brief Plays back buffer on this Source with gain 167 * @param buffer the buffer to play back on this Source 168 * @param gain the gain of the sound buffer 168 169 */ 169 170 void SoundSource::play(const SoundBuffer* buffer, float gain) … … 189 190 SoundEngine::checkError("Play Source", __LINE__); 190 191 } 191 192 192 193 /** 193 194 * @brief Plays back buffer on this Source with gain and looping possibility 194 195 * @param buffer the buffer to play back on this Source 195 */ 196 * @param gain the gain of the sound buffer 197 * @param loop if true, sound gets looped 198 */ 196 199 void SoundSource::play(const SoundBuffer* buffer, float gain, bool loop) 197 200 { … … 204 207 alSourceStop(this->sourceID); 205 208 alSourcei (this->sourceID, AL_BUFFER, buffer->getID()); 206 209 207 210 if (loop) 208 211 alSourcei (this->sourceID, AL_LOOPING, AL_TRUE); 209 212 else 210 211 213 alSourcei (this->sourceID, AL_LOOPING, AL_FALSE); 214 212 215 alSourcef (this->sourceID, AL_GAIN, gain); 213 216 … … 220 223 if (DEBUG_LEVEL >= 3) 221 224 SoundEngine::checkError("Play Source", __LINE__); 222 } 223 224 225 /** 226 * @brief Stops playback of a SoundSource 227 */ 225 } 226 227 /** 228 * @brief Changes the volume of an (active) buffer 229 * @param buffer the buffer to play back on this Source 230 * @param gain the new gain value 231 */ 232 void SoundSource::gain(const SoundBuffer* buffer, float gain) 233 { 234 // alSourcei (this->sourceID, AL_BUFFER, buffer->getID()); 235 alSourcef (this->sourceID, AL_GAIN, gain); 236 } 237 238 /** 239 * @brief Stops playback of a SoundSource 240 */ 228 241 void SoundSource::stop() 229 242 {
Note: See TracChangeset
for help on using the changeset viewer.