source:
orxonox.OLD/trunk/src/lib/sound/sound_buffer.h
@
8105
Last change on this file since 8105 was 7460, checked in by bensch, 19 years ago | |
---|---|
File size: 945 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5386] | 2 | * @file sound_buffer.h |
3 | * @brief Definition of the sound-buffer-class | |
[3245] | 4 | */ |
[1853] | 5 | |
[5386] | 6 | #ifndef _SOUND_BUFFER_H |
7 | #define _SOUND_BUFFER_H | |
[1853] | 8 | |
[3543] | 9 | #include "base_object.h" |
[5386] | 10 | #include "alincl.h" |
[1853] | 11 | |
[4838] | 12 | // FORWARD DECLARATION |
[6836] | 13 | typedef struct SDL_AudioSpec; |
[3543] | 14 | |
[7460] | 15 | namespace OrxSound |
[5386] | 16 | { |
[7460] | 17 | //! A class that represents a datastructure to play Sounds. |
18 | class SoundBuffer : public BaseObject | |
19 | { | |
[5386] | 20 | public: |
[7221] | 21 | SoundBuffer(const std::string& fileName); |
[6981] | 22 | virtual ~SoundBuffer(); |
[3543] | 23 | |
[7221] | 24 | bool loadWAV(const std::string& fileName); |
[6836] | 25 | |
[5386] | 26 | /** @returns the ID of the buffer used in this SoundBuffer */ |
27 | inline ALuint getID() const { return this->bufferID; } | |
[2036] | 28 | |
[5386] | 29 | private: |
[6836] | 30 | ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec); |
31 | ||
32 | private: | |
[5386] | 33 | ALuint bufferID; //!< The address of the Buffer. |
[1853] | 34 | |
[5386] | 35 | ALsizei size; //!< The size of the Buffer. |
36 | ALboolean loop; //!< loop information. | |
[7460] | 37 | }; |
38 | } | |
[5386] | 39 | #endif /* _SOUND_BUFFER_H */ |
Note: See TracBrowser
for help on using the repository browser.