Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 11:12:01 PM (15 years ago)
Author:
rgrieder
Message:

Added some basic sound classes: WorldSound (to be used for 3D sound, is a WorldEntity) and AmbientSound (BaseObject, just add it somewhere and it will play with playOnLoad=true).
Also moved the sound listener device updating to the HumanController. We might want to modify this again so that the listener is at the camera position again, not at the space ship.

Location:
code/branches/core5/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc

    r5892 r5896  
    3939#include "core/GUIManager.h"
    4040#include "Scene.h"
    41 #include "sound/SoundBase.h"
     41#include "sound/AmbientSound.h"
    4242
    4343namespace orxonox
     
    6262        {
    6363            // Load sound
    64             this->ambient_ = new SoundBase(0);
    65             this->ambient_->loadFile("ambient/mainmenu.wav");
     64            this->ambient_ = new AmbientSound(0);
     65            this->ambient_->setSoundFile("ambient/mainmenu.wav");
    6666        }
    6767    }
     
    9696        if (GameMode::playsSound())
    9797        {
    98             this->ambient_->play(true);
     98            this->ambient_->setLoop(true);
     99            this->ambient_->play();
    99100        }
    100101    }
  • code/branches/core5/src/orxonox/gamestates/GSMainMenu.h

    r5892 r5896  
    5959
    6060        // ambient sound for the main menu
    61         SoundBase*        ambient_;
     61        AmbientSound*     ambient_;
    6262    };
    6363}
Note: See TracChangeset for help on using the changeset viewer.