Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7287 in orxonox.OLD for trunk/src/lib/sound


Ignore:
Timestamp:
Apr 13, 2006, 10:41:48 PM (19 years ago)
Author:
bensch
Message:

merged back with:
svn merge . . -rHEAD:PREV

Location:
trunk/src/lib/sound
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/ogg_player.cc

    r7286 r7287  
    115115  SoundEngine::getInstance()->pushALSource(source);
    116116  this->source = 0;
    117   SoundEngine::checkError("OggPlayer::release Source", __LINE__);
     117  check();
    118118  alDeleteBuffers(2, buffers);
    119119  this->buffers[0] = 0;
    120120  this->buffers[1] = 0;
    121   SoundEngine::checkError("OggPlayer::release", __LINE__);
     121  check();
    122122
    123123  ov_clear(&oggStream);
     
    184184
    185185    alSourceUnqueueBuffers(source, 1, &buffer);
    186     SoundEngine::checkError("OggPlayer::update() error", __LINE__);
     186    check();
    187187
    188188    active = stream(buffer);
    189189
    190190    alSourceQueueBuffers(source, 1, &buffer);
    191     SoundEngine::checkError("OggPlayer::update()", __LINE__);
     191    check();
    192192  }
    193193
     
    226226
    227227  alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
    228   SoundEngine::checkError("OggPlayer::stream()", __LINE__);
     228  check();
    229229
    230230  return true;
     
    246246
    247247    alSourceUnqueueBuffers(source, 1, &buffer);
    248     SoundEngine::checkError("OggPlayer::empty()", __LINE__);
     248    check();
    249249  }
    250250}
     
    273273}
    274274
     275/**
     276 * checks for errors
     277 */
     278void OggPlayer::check()
     279{
     280  int error = alGetError();
     281  if(error != AL_NO_ERROR)
     282    PRINTF(2)("OpenAL error was raised.");
     283}
    275284
    276285/**
  • trunk/src/lib/sound/ogg_player.h

    r7286 r7287  
    4141  bool stream(ALuint buffer);
    4242  void empty();
     43  void check();
    4344  const char* errorString(int code);
    4445
  • trunk/src/lib/sound/sound_source.cc

    r7286 r7287  
    6868  if (unlikely(this->sourceID == 0))
    6969    SoundEngine::getInstance()->popALSource(this->sourceID);
    70   //assert (this->sourceID != 0);
     70  assert (this->sourceID != 0);
    7171
    7272  alSourceStop(this->sourceID);
Note: See TracChangeset for help on using the changeset viewer.