Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/sound/sound_buffer.h @ 9023

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

orxonox/trunk: ogg-files loadable (hopefully)

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