Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/sound/sound_buffer.h @ 9364

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

orxonox/trunk: ogg-files loadable (hopefully)

File size: 992 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
13typedef struct SDL_AudioSpec;
14
15namespace 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    bool loadOGG(const std::string& fileName);
26
27    /** @returns the ID of the buffer used in this SoundBuffer */
28    inline ALuint getID() const { return this->bufferID; }
29
30  private:
31    ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec);
32
33  private:
34    ALuint        bufferID;             //!< The address of the Buffer.
35
36    ALsizei       size;                 //!< The size of the Buffer.
37    ALboolean     loop;                 //!< loop information.
38  };
39}
40#endif /* _SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.