Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/sound/sound_buffer.h @ 9803

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

Ported SoundBuffer to match the Data-Paradigm

File size: 1.0 KB
Line 
1/*!
2 * @file sound_buffer.h
3 * @brief Definition of the sound-buffer-class
4*/
5
6#ifndef _SOUND_BUFFER_H
7#define _SOUND_BUFFER_H
8
9#include "base_object.h"
10#include "alincl.h"
11
12#include "sound_buffer_data.h"
13
14namespace OrxSound
15{
16  //! A class that represents a datastructure to play Sounds.
17  class SoundBuffer : public BaseObject
18  {
19    ObjectListDeclaration(SoundBuffer);
20  public:
21    SoundBuffer();
22    SoundBuffer(const std::string& fileName);
23
24    /** @see SoundBufferData::load */
25    inline bool load(const std::string& fileName) { return this->data->load(fileName); };
26    /** @see SoundBufferData::loadWav */
27    inline bool loadWAV(const std::string& fileName) { return this->data->loadWAV(fileName); };
28    /** @see SoundBufferData::loadOgg */
29    inline bool loadOGG(const std::string& fileName) { return this->data->loadOGG(fileName); };
30
31    /** @returns the ID of the buffer used in this SoundBuffer */
32    inline ALuint getID() const { return this->data->getID(); }
33
34  private:
35    SoundBufferData::Pointer    data;
36  };
37}
38#endif /* _SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.