Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2006, 3:21:12 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: SoundSource completely added as a Resource

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/sound/sound_buffer.h

    r9804 r9805  
    77#define _SOUND_BUFFER_H
    88
    9 #include "base_object.h"
    10 #include "alincl.h"
    11 
    129#include "sound_buffer_data.h"
    1310
     
    1512{
    1613  //! A class that represents a datastructure to play Sounds.
    17   class SoundBuffer : public BaseObject
     14  class SoundBuffer
    1815  {
    19     ObjectListDeclaration(SoundBuffer);
    2016  public:
    2117    SoundBuffer();
    22     SoundBuffer(const SoundBuffer& buffer) { this->data = buffer.data; }
    23     SoundBuffer(const SoundBufferData::Pointer& dataPointer) { this->data = dataPointer; };
     18    SoundBuffer(const SoundBuffer& buffer);
     19    SoundBuffer(const SoundBufferData::Pointer& dataPointer);
    2420    SoundBuffer(const std::string& fileName);
     21
     22    bool operator==(const SoundBuffer& buffer) const {return this->data == buffer.data; };
    2523
    2624    /** @see SoundBufferData::load */
     
    3331    /** @returns the ID of the buffer used in this SoundBuffer */
    3432    inline ALuint getID() const { return this->data->getID(); }
     33    inline bool loaded() const { return this->data->loaded(); }
    3534
    3635    /** @returns the DataPointer */
     
    3837    /** @param dataPointer the data to acquire @brief Buffer shall acquire dataPointers data */
    3938    void acquireData(const SoundBufferData::Pointer& dataPointer)  { data = dataPointer; };
     39
    4040  private:
    41     SoundBufferData::Pointer    data;
     41    SoundBufferData::Pointer    data;                //!< Pointer to the Stored Data
    4242  };
    4343}
Note: See TracChangeset for help on using the changeset viewer.