Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/bsp_model/src/lib/sound/sound_buffer.h @ 7549

Last change on this file since 7549 was 7221, checked in by bensch, 19 years ago

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File size: 915 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
15//! A class that represents a datastructure to play Sounds.
16class SoundBuffer : public BaseObject
17{
18  public:
19    SoundBuffer(const std::string& fileName);
20    virtual ~SoundBuffer();
21
22    bool loadWAV(const std::string& fileName);
23
24    /** @returns the ID of the buffer used in this SoundBuffer */
25    inline ALuint getID() const { return this->bufferID; }
26
27  private:
28    ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec);
29
30  private:
31    ALuint        bufferID;             //!< The address of the Buffer.
32
33    ALsizei       size;                 //!< The size of the Buffer.
34    ALboolean     loop;                 //!< loop information.
35};
36
37#endif /* _SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.