Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2009, 11:10:39 AM (14 years ago)
Author:
rgrieder
Message:

Little cleanup in sound stuff and MoodManager.
Caution: Renamed SoundTypes to {All, Music, Effects}!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/sound/BaseSound.h

    r6322 r6370  
    6767
    6868        virtual void setSource(const std::string& source);
    69         virtual const std::string& getSource() const { return this->source_; }
    70         inline void sourceChanged(){ this->setSource(this->source_); }
     69        virtual const std::string& getSource() const
     70            { return this->source_; }
    7171
    7272        void setVolume(float vol);
    73         float getVolume() const { return this->volume_; }
    74         inline void volumeChanged(){ this->setVolume(this->volume_); }
    75        
    76         virtual float getVolumeGain();
    77         void updateVolume(void);
     73        float getVolume() const
     74            { return this->volume_; }
     75        void updateVolume();
    7876
    79         bool getLooping() const   { return this->bLooping_; }
     77        bool getLooping() const
     78            { return this->bLooping_; }
    8079        void setLooping(bool val);
    81         inline void loopingChanged(){ this->setLooping(this->bLooping_); }
    8280
    83         float getPitch() const   { return this->pitch_; }
     81        float getPitch() const
     82            { return this->pitch_; }
    8483        void setPitch(float pitch);
    85         inline void pitchChanged(){ this->setPitch(this->pitch_); }
    86        
    87         void stateChanged();
    88 
    89         //ALuint getALAudioSource(void);
    9084
    9185    protected:
     
    9690            Paused
    9791        };
     92
     93        // network callbacks
     94        inline void pitchChanged()
     95            { this->setPitch(this->pitch_); }
     96        inline void loopingChanged()
     97            { this->setLooping(this->bLooping_); }
     98        inline void volumeChanged()
     99            { this->setVolume(this->volume_); }
     100        inline void sourceChanged()
     101            { this->setSource(this->source_); }
     102        void stateChanged();
     103
    98104        virtual void initialiseSource();
    99105        ALint getSourceState() const;
     106
     107        virtual float getRealVolume() = 0;
    100108
    101109        ALuint          audioSource_;
Note: See TracChangeset for help on using the changeset viewer.