Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7309 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Apr 16, 2006, 11:46:15 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new Mutex (do not think that it hlps… but hey lets try it )

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

Legend:

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

    r7308 r7309  
    158158}
    159159
    160 
     160/**
     161 * @brief stop the OggPlayer from Playing.
     162 */
    161163void OggPlayer::stop()
    162164{
     
    168170}
    169171
     172/**
     173 * @brief Pause the Playing.
     174 */
    170175void OggPlayer::pause()
    171176{
     
    268273  this->state |= OggPlayer::Playing;
    269274
     275  SDL_mutexP(this->musicMutex);
    270276  if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1]))
    271     return false;
     277  {
     278    return false;
     279    SDL_mutexV(this->musicMutex);
     280  }
    272281
    273282  alSourceQueueBuffers(this->source, 2, this->buffers);
     
    275284    SoundEngine::checkError("OggPlayer::playback()::alSourceQueueBuffers", __LINE__);
    276285
    277 
    278286  alSourcePlay(this->source);
    279287  if (DEBUG >= 3)
    280288    SoundEngine::checkError("OggPlayer::playback()::alSourcePlay", __LINE__);
     289  SDL_mutexV(this->musicMutex);
    281290  return true;
    282291}
  • trunk/src/lib/sound/ogg_player.h

    r7308 r7309  
    4545  OggPlayer(const std::string& fileName = "");
    4646  virtual ~OggPlayer();
    47   /** @param state compare this State with the internal State */
     47  /** @param state compare this State with the internal State @returns true on match */
    4848  bool operator==(OggPlayer::State state) { return this->state & state; };
    4949
Note: See TracChangeset for help on using the changeset viewer.