Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7307 in orxonox.OLD


Ignore:
Timestamp:
Apr 16, 2006, 10:37:37 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more compliant, less errors, this seems to be better…

Location:
trunk/src
Files:
3 edited

Legend:

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

    r7306 r7307  
    146146
    147147  this->state &= ~(OggPlayer::Stopped | OggPlayer::Paused);
     148
     149  if (!this->playback())
     150    return false;
     151
    148152  if (this->musicThread == NULL)
    149153    return ((this->musicThread = SDL_CreateThread(OggPlayer::createAudioThread, (void*)this)) != NULL);
     
    231235  OggPlayer* ogg = (OggPlayer*)oggPlayer;
    232236  PRINTF(4)("STARTIG AUDIO THREAD\n");
    233 
    234   if (!ogg->playback())
    235     return -1;
    236237
    237238  while (ogg->state & OggPlayer::Playing)
     
    284285  {
    285286    assert (!(this->state & Playing));
     287    this->printState();
    286288    SDL_WaitThread(this->musicThread, NULL);
    287289    this->musicThread = NULL;
  • trunk/src/lib/sound/ogg_player.h

    r7306 r7307  
    7676  void empty();
    7777
    78 public:
    79 
    8078private:
    8179  FILE*               oggFile;              //!< general file-handler, to open the sound-file
  • trunk/src/story_entities/game_world.cc

    r7306 r7307  
    281281        this->dataTank->music->printState();
    282282      }
    283       if (this->cycle == 500)
     283      if (this->cycle % 4 == 0)
    284284        this->dataTank->music->pause();
    285       if (this->cycle == 1000)
     285      if (this->cycle % 5 == 0)
    286286        this->dataTank->music->play();
    287       if (this->cycle == 1500)
     287      if (this->cycle % 11 == 0)
    288288        this->dataTank->music->stop();
    289       if (this->cycle == 2000)
    290         this->dataTank->music->play();
    291 
    292 
    293289    }
    294290  }
Note: See TracChangeset for help on using the changeset viewer.