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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/sound/SoundManager.h

    r5867 r5896  
    3939    /**
    4040     * The SoundManager class manages the OpenAL device, context and listener
    41      * position. It has a list of all SoundBase objects and calls their update
    42      * function every tick. It is a singleton.
     41     * position. It is a singleton.
    4342     *
    4443     */
    45     class _OrxonoxExport SoundManager : public Singleton<SoundManager>, public Tickable
     44    class _OrxonoxExport SoundManager : public Singleton<SoundManager>
    4645    {
    4746        friend class Singleton<SoundManager>;
     
    4948        SoundManager();
    5049        ~SoundManager();
    51         void addSound(SoundBase* sound);
    52         void removeSound(SoundBase* sound);
    53         void tick(float dt);
    54         bool isSoundAvailable();
     50
     51        void setListenerPosition(const Vector3& position);
     52        void setListenerOrientation(const Quaternion& orientation);
    5553
    5654    private:
    5755        ALCdevice* device_;
    5856        ALCcontext* context_;
    59         std::list<SoundBase*> soundlist_;
    60         bool soundavailable_;
    6157
    6258        static SoundManager* singletonPtr_s;
    63     }; // class SoundManager
    64 } // namespace orxonox
     59    };
     60}
    6561
    6662#endif /* _SoundManager_H__ */
Note: See TracChangeset for help on using the changeset viewer.