Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6844 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jan 30, 2006, 1:42:02 AM (19 years ago)
Author:
bensch
Message:

trunk: openal better checks

File:
1 edited

Legend:

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

    r6842 r6844  
    332332bool SoundEngine::allocateSources(unsigned int count)
    333333{
     334  unsigned int failCount = 0;
    334335  for (unsigned int i = 0; i < count; i++)
    335336  {
     
    340341    if (!alIsSource(source))
    341342    {
    342       PRINTF(2)("not allocated Source\n");
     343      PRINTF(5)("not allocated Source\n");
     344      failCount++;
    343345      continue;
    344346    }
     
    349351    this->ALSources.push(source);
    350352  }
    351   return true;
     353  if (failCount == 0)
     354    return true;
     355  else
     356  {
     357    PRINTF(2)("Failed to allocate %d of %d SoundSources\n", failCount, count);
     358  }
    352359}
    353360
Note: See TracChangeset for help on using the changeset viewer.