Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7849 in orxonox.OLD


Ignore:
Timestamp:
May 25, 2006, 12:48:25 PM (18 years ago)
Author:
bensch
Message:

trunk: Sound is not lost, if the MusicEngine does not get his time in time :)

File:
1 edited

Legend:

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

    r7737 r7849  
    260260        ogg->update();
    261261      }
    262       SDL_Delay(1);
     262      SDL_Delay(10);
    263263    }
    264264    PRINTF(4)("End the AudioThread\n");
     
    325325
    326326    alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
     327
    327328    if (DEBUG_LEVEL >= 3)
    328329      SoundEngine::checkError("OggPlayer::update()::alGetSourceI", __LINE__);
     
    342343        SoundEngine::checkError("OggPlayer::update()::queue", __LINE__);
    343344    }
     345
     346    int play;
     347    alGetSourcei(source, AL_SOURCE_STATE, &play);
     348
     349    if (play != AL_PLAYING)
     350    {
     351      alSourcePlay(source);
     352      PRINTF(2)("Filling Audio Gap\n");
     353    }
     354
    344355
    345356    return active;
Note: See TracChangeset for help on using the changeset viewer.