Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2011, 1:03:47 PM (14 years ago)
Author:
landauf
Message:

detached AmbientSound from BaseObject - AmbientSound can not be placed directly in a level file anymore
instead added WorldAmbientSound, a BaseObject which can be placed in a level file to create and control ambient sound

with this change, the level can be destroyed completely because WorldAmbientSound can be deleted immediately at the end of the level, while the AmbientSound remains active until it faded out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/sound/AmbientSound.h

    r6417 r7854  
    3333#include "OrxonoxPrereqs.h"
    3434
    35 #include "core/BaseObject.h"
    36 #include "network/synchronisable/Synchronisable.h"
    3735#include "BaseSound.h"
    3836#include "MoodManager.h"
     
    4139{
    4240    /**
    43      * The AmbientSound class is the base class for all sound file loader classes.
    44      * It server as main interface to the OpenAL library.
    45      *
     41     * The AmbientSound class is used to play background music. It can not be placed
     42     * directly in a level file, use WorldAmbientSound instead.
    4643     */
    47     class _OrxonoxExport AmbientSound : public BaseSound, public BaseObject, public Synchronisable, public MoodListener
     44    class _OrxonoxExport AmbientSound : public BaseSound, public MoodListener
    4845    {
    4946        friend class SoundManager;
     47        friend class WorldAmbientSound;
    5048
    5149    public:
    52         AmbientSound(BaseObject* creator);
    53 
    54         void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    55         void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
    56         void changedActivity();
     50        AmbientSound();
    5751
    5852        void play();
     
    7367    private:
    7468        void preDestroy();
    75         void registerVariables();
    7669        float getRealVolume();
    7770        void moodChanged(const std::string& mood);
Note: See TracChangeset for help on using the changeset viewer.