source:
orxonox.OLD/trunk/src/lib/sound/sound_buffer.h
@
6896
Last change on this file since 6896 was 6836, checked in by bensch, 19 years ago | |
---|---|
File size: 893 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 | |
[5386] | 15 | //! A class that represents a datastructure to play Sounds. |
16 | class SoundBuffer : public BaseObject | |
17 | { | |
18 | public: | |
19 | SoundBuffer(const char* fileName); | |
20 | ~SoundBuffer(); | |
[3543] | 21 | |
[6836] | 22 | bool loadWAV(const char* fileName); |
23 | ||
[5386] | 24 | /** @returns the ID of the buffer used in this SoundBuffer */ |
25 | inline ALuint getID() const { return this->bufferID; } | |
[2036] | 26 | |
[5386] | 27 | private: |
[6836] | 28 | ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec); |
29 | ||
30 | private: | |
[5386] | 31 | ALuint bufferID; //!< The address of the Buffer. |
[1853] | 32 | |
[5386] | 33 | ALsizei size; //!< The size of the Buffer. |
34 | ALboolean loop; //!< loop information. | |
[1853] | 35 | }; |
36 | ||
[5386] | 37 | #endif /* _SOUND_BUFFER_H */ |
Note: See TracBrowser
for help on using the repository browser.