Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7317 in orxonox.OLD for trunk/src/lib/sound/sound_source.h


Ignore:
Timestamp:
Apr 17, 2006, 2:25:27 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: retrieve Source is better now (more modular)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/sound_source.h

    r7299 r7317  
    3434  // development functions
    3535    /** @returns The ID of this Source */
    36     inline ALuint getID() const { return this->sourceID; }
     36    inline ALuint getID() const { return this->sourceID; };
    3737    /** @returns true, if the Source is Playing */
    3838    inline bool   isPlaying() const { return this->bPlay; };
    39     /** @param sourceNode the Source this is attached to. */
    40     inline void setSourceNode(const PNode* sourceNode) { this->sourceNode = sourceNode;};
     39    void setSourceNode(const PNode* sourceNode);
    4140    /** @returns the SoundBuffer of this Source */
    42     inline const SoundBuffer* getBuffer() const { return this->buffer; }
     41    inline const SoundBuffer* getBuffer() const { return this->buffer; };
    4342    /** @returns the SourceNode of this Source */
    44     inline const PNode* getNode() const { return this->sourceNode;}
     43    inline const PNode* getNode() const { return this->sourceNode; };
     44    /** @param resident if the Source is Resident */
     45    inline void setResident(bool resident) { this->resident = resident; };
     46    /** @returns true if the alSource is Resident */
     47    inline bool isResident() const { return this->resident; };
    4548
    4649    void setRolloffFactor(ALfloat rolloffFactor);
    4750
     51    static void resetSource(ALuint sourceID);
     52
     53  private:
     54    bool retrieveSource();
     55
    4856  private:
    4957    bool                   bPlay;                 //!< If the Source is Playing.
     58    bool                   resident;              //!< If the alSource should be resident (if true, the alSource will be returned on deletion).
    5059    ALuint                 sourceID;              //!< The ID of the Source
    5160    const SoundBuffer*     buffer;                //!< The buffer to play in this source.
Note: See TracChangeset for help on using the changeset viewer.