Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 10:09:27 PM (14 years ago)
Author:
scheusso
Message:

Approach to make sounds synchronisable (not yet working)

File:
1 edited

Legend:

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

    r6255 r6307  
    6868        virtual void setSource(const std::string& source);
    6969        virtual const std::string& getSource() const { return this->source_; }
     70        inline void sourceChanged(){ this->setSource(this->source_); }
    7071
    7172        void setVolume(float vol);
    7273        float getVolume() const { return this->volume_; }
     74        inline void volumeChanged(){ this->setVolume(this->volume_); }
    7375       
    7476        virtual float getVolumeGain();
    7577        void updateVolume(void);
    7678
    77         bool getLooping() const   { return this->bLoop_; }
     79        bool getLooping() const   { return this->bLooping_; }
    7880        void setLooping(bool val);
     81        inline void loopingChanged(){ this->setLooping(this->bLooping_); }
    7982
    8083        float getPitch() const   { return this->pitch_; }
    8184        void setPitch(float pitch);
     85        inline void pitchChanged(){ this->setPitch(this->pitch_); }
    8286
    8387        //ALuint getALAudioSource(void);
    8488
    8589    protected:
    86         ALint getSourceState() const;
    87 
    88         ALuint          audioSource_;
    89         bool            bPooling_;
    90         shared_ptr<SoundBuffer> soundBuffer_;
    91 
    92     private:
    9390        enum State
    9491        {
     
    9794            Paused
    9895        };
     96        ALint getSourceState() const;
    9997
     98        ALuint          audioSource_;
     99        bool            bPooling_;
     100        shared_ptr<SoundBuffer> soundBuffer_;
    100101        std::string     source_;
    101102        float           volume_;
    102         bool            bLoop_;
     103        bool            bLooping_;
    103104        State           state_;
    104105        float           pitch_;
     106
     107    private:
    105108        DataStreamPtr   dataStream_;
    106109    };
Note: See TracChangeset for help on using the changeset viewer.