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