Changeset 7286 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Apr 13, 2006, 10:33:49 PM (19 years ago)
- Location:
- trunk/src/lib/sound
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/ogg_player.cc
r7221 r7286 115 115 SoundEngine::getInstance()->pushALSource(source); 116 116 this->source = 0; 117 check();117 SoundEngine::checkError("OggPlayer::release Source", __LINE__); 118 118 alDeleteBuffers(2, buffers); 119 119 this->buffers[0] = 0; 120 120 this->buffers[1] = 0; 121 check();121 SoundEngine::checkError("OggPlayer::release", __LINE__); 122 122 123 123 ov_clear(&oggStream); … … 184 184 185 185 alSourceUnqueueBuffers(source, 1, &buffer); 186 check();186 SoundEngine::checkError("OggPlayer::update() error", __LINE__); 187 187 188 188 active = stream(buffer); 189 189 190 190 alSourceQueueBuffers(source, 1, &buffer); 191 check();191 SoundEngine::checkError("OggPlayer::update()", __LINE__); 192 192 } 193 193 … … 226 226 227 227 alBufferData(buffer, format, pcm, size, vorbisInfo->rate); 228 check();228 SoundEngine::checkError("OggPlayer::stream()", __LINE__); 229 229 230 230 return true; … … 246 246 247 247 alSourceUnqueueBuffers(source, 1, &buffer); 248 check();248 SoundEngine::checkError("OggPlayer::empty()", __LINE__); 249 249 } 250 250 } … … 273 273 } 274 274 275 /**276 * checks for errors277 */278 void OggPlayer::check()279 {280 int error = alGetError();281 if(error != AL_NO_ERROR)282 PRINTF(2)("OpenAL error was raised.");283 }284 275 285 276 /** -
trunk/src/lib/sound/ogg_player.h
r7221 r7286 41 41 bool stream(ALuint buffer); 42 42 void empty(); 43 void check();44 43 const char* errorString(int code); 45 44 -
trunk/src/lib/sound/sound_source.cc
r7285 r7286 68 68 if (unlikely(this->sourceID == 0)) 69 69 SoundEngine::getInstance()->popALSource(this->sourceID); 70 assert (this->sourceID != 0);70 //assert (this->sourceID != 0); 71 71 72 72 alSourceStop(this->sourceID);
Note: See TracChangeset
for help on using the changeset viewer.