Last change
on this file since 7792 was
7460,
checked in by bensch, 19 years ago
|
orxonox/trunk: Namespaces for sound
|
File size:
945 bytes
|
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 | // FORWARD DECLARATION |
---|
13 | typedef struct SDL_AudioSpec; |
---|
14 | |
---|
15 | namespace OrxSound |
---|
16 | { |
---|
17 | //! A class that represents a datastructure to play Sounds. |
---|
18 | class SoundBuffer : public BaseObject |
---|
19 | { |
---|
20 | public: |
---|
21 | SoundBuffer(const std::string& fileName); |
---|
22 | virtual ~SoundBuffer(); |
---|
23 | |
---|
24 | bool loadWAV(const std::string& fileName); |
---|
25 | |
---|
26 | /** @returns the ID of the buffer used in this SoundBuffer */ |
---|
27 | inline ALuint getID() const { return this->bufferID; } |
---|
28 | |
---|
29 | private: |
---|
30 | ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec); |
---|
31 | |
---|
32 | private: |
---|
33 | ALuint bufferID; //!< The address of the Buffer. |
---|
34 | |
---|
35 | ALsizei size; //!< The size of the Buffer. |
---|
36 | ALboolean loop; //!< loop information. |
---|
37 | }; |
---|
38 | } |
---|
39 | #endif /* _SOUND_BUFFER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.