Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 15, 2009, 10:36:45 PM (14 years ago)
Author:
rgrieder
Message:

Improved synchronisability of the sound classes (not yet Synchronisable though!).

File:
1 edited

Legend:

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

    r6069 r6071  
    5353        virtual void pause();
    5454
    55         bool isPlaying();
    56         bool isPaused();
    57         bool isStopped();
     55        bool isPlaying() { return this->state_ = Playing; }
     56        bool isPaused()  { return this->state_ = Paused; }
     57        bool isStopped() { return this->state_ = Stopped; }
    5858
    5959        virtual void setSource(const std::string& source);
     
    6363        float getVolume() const { return this->volume_; }
    6464
    65         bool getPlayOnLoad() const   { return this->bPlayOnLoad_; }
    66         void setPlayOnLoad(bool val) { this->bPlayOnLoad_ = val; }
    67 
    68         bool getLoop() const   { return this->bLoop_; }
    69         void setLoop(bool val) { this->bLoop_ = val; }
     65        bool getLooping() const   { return this->bLoop_; }
     66        void setLooping(bool val);
    7067
    7168        //ALuint getALAudioSource(void);
     
    7370    protected:
    7471        ALuint loadOggFile();
    75         ALint getSourceState();
    7672
    7773        ALuint audioSource_;
     
    7975
    8076    private:
     77        enum State
     78        {
     79            Stopped,
     80            Playing,
     81            Paused
     82        };
     83
    8184        std::string     source_;
    8285        float           volume_;
    83         bool            bPlayOnLoad_;
    8486        bool            bLoop_;
     87        State           state_;
    8588        DataStreamPtr   dataStream_;
    8689    };
Note: See TracChangeset for help on using the changeset viewer.