Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

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

    r8793 r9869  
    88
    99#include "base_object.h"
     10#include "sound_buffer.h"
    1011#include "alincl.h"
    1112
     
    1415namespace OrxSound
    1516{
    16   class SoundBuffer;
    1717  //! A class that represents a SoundSource
    1818  class SoundSource : public BaseObject
    1919  {
     20    ObjectListDeclaration(SoundSource);
    2021  public:
    21     SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);
     22    SoundSource(const PNode* sourceNode = NULL, const SoundBuffer& buffer = SoundBuffer());
    2223    SoundSource(const SoundSource& source);
    2324    SoundSource& operator=(const SoundSource& source);
     
    2829    // user interaction
    2930    void play();
    30     void play(const SoundBuffer* buffer);
    31     void play(const SoundBuffer* buffer, float gain);
    32     void play(const SoundBuffer* buffer, float gain, bool loop);
     31    void play(const SoundBuffer& buffer);
     32    void play(const SoundBuffer& buffer, float gain);
     33    void play(const SoundBuffer& buffer, float gain, bool loop);
    3334
    34     void gain(const SoundBuffer* buffer, float gain);
     35    void gain(const SoundBuffer& buffer, float gain);
    3536
    3637    void stop();
    3738    void pause();
    3839    void rewind();
    39     void fadein(const SoundBuffer* buffer, ALfloat duration);
     40    void fadein(const SoundBuffer& buffer, ALfloat duration);
    4041
    4142    // development functions
     
    4647    void setSourceNode(const PNode* sourceNode);
    4748    /** @returns the SoundBuffer of this Source */
    48     inline const SoundBuffer* getBuffer() const { return this->buffer; };
     49    inline const SoundBuffer& getBuffer() const { return this->buffer; };
    4950    /** @returns the SourceNode of this Source */
    5051    inline const PNode* getNode() const { return this->sourceNode; };
     
    6566    bool                   resident;    //!< If the alSource should be resident (if true, the alSource will be returned on deletion).
    6667    ALuint                 sourceID;    //!< The ID of the Source
    67     const SoundBuffer*     buffer;      //!< The buffer to play in this source.
     68    SoundBuffer            buffer;      //!< The buffer to play in this source.
    6869    const PNode*           sourceNode;  //!< The SourceNode representing the position/velocity... of this source.
    6970  };
Note: See TracChangeset for help on using the changeset viewer.