Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/sound/sound_buffer_data.h @ 10646

Last change on this file since 10646 was 9869, checked in by bensch, 18 years ago

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 size: 1.3 KB
RevLine 
[4838]1/*!
[9803]2 * @file sound_buffer_data.h
3 * @brief Definition of the sound-buffer-datacontainer-class
[3245]4*/
[1853]5
[9803]6#ifndef _SOUND_BUFFER_DATA_H
7#define _SOUND_BUFFER_DATA_H
[1853]8
[3543]9#include "base_object.h"
[5386]10#include "alincl.h"
[9803]11#include "util/count_pointer.h"
[1853]12
[4838]13// FORWARD DECLARATION
[6836]14typedef struct SDL_AudioSpec;
[3543]15
[7460]16namespace OrxSound
[5386]17{
[7460]18  //! A class that represents a datastructure to play Sounds.
[9803]19  class SoundBufferData : public BaseObject
[7460]20  {
[9803]21    ObjectListDeclaration(SoundBufferData);
[5386]22  public:
[9803]23    typedef CountPointer<SoundBufferData> Pointer;
[3543]24
[9803]25  public:
26    SoundBufferData();
27    virtual ~SoundBufferData();
28
29    bool load(const std::string& fileName);
[7221]30    bool loadWAV(const std::string& fileName);
[8969]31    bool loadOGG(const std::string& fileName);
[6836]32
[5386]33    /** @returns the ID of the buffer used in this SoundBuffer */
34    inline ALuint getID() const { return this->bufferID; }
[9805]35    inline bool loaded() const { return bLoaded; };
[2036]36
[5386]37  private:
[6836]38    ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec);
39
40  private:
[5386]41    ALuint        bufferID;             //!< The address of the Buffer.
[1853]42
[5386]43    ALsizei       size;                 //!< The size of the Buffer.
44    ALboolean     loop;                 //!< loop information.
[9805]45    bool          bLoaded;               //!< If the Sound was loaded this is true.
[7460]46  };
47}
[9803]48#endif /* _SOUND_BUFFER_DATA_H */
Note: See TracBrowser for help on using the repository browser.