Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7292 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Apr 14, 2006, 11:18:42 AM (19 years ago)
Author:
bensch
Message:

better debug, (non-threaded again)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r7291 r7292  
    136136int GameWorld::createAudioThread(void* gameWorld)
    137137{
    138   GameWorld* gw = (GameWorld*)gameWorld;
     138/*  GameWorld* gw = (GameWorld*)gameWorld;
    139139  printf("STARTIG AUDIO THREAD\n");
    140140  if(gw->dataTank && gw->dataTank->music != NULL)
     
    146146      gw->dataTank->music->update();
    147147    SDL_Delay(1);
    148   }
     148  }*/
    149149  printf("End the AudioThread\n");
    150150}
     
    230230    this->audioThread = SDL_CreateThread(GameWorld::createAudioThread, (void*)this);
    231231
     232  if (this->dataTank->music != NULL)
     233    this->dataTank->music->playback();
     234
    232235  this->run();
    233236}
     
    241244  PRINTF(3)("GameWorld::stop() - got stop signal\n");
    242245  this->bRunning = false;
     246
     247  if (this->audioThread != NULL)
     248  {
     249    this->bRunning = false;
     250    SDL_WaitThread(this->audioThread, NULL);
     251    this->audioThread = NULL;
     252  }
    243253
    244254  this->audioThread = NULL;
     
    403413  PNode::getNullParent()->updateNode (this->dtS);
    404414  SoundEngine::getInstance()->update();
     415
     416  if (this->dataTank->music != NULL)
     417    this->dataTank->music->update();
     418
    405419}
    406420
Note: See TracChangeset for help on using the changeset viewer.