Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/sound/sound_buffer.h @ 9715

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

renamed newclassid to classid and newobjectlist to objectlist

File size: 1.0 KB
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  {
[9715]20    ObjectListDeclaration(SoundBuffer);
[5386]21  public:
[7221]22    SoundBuffer(const std::string& fileName);
[6981]23    virtual ~SoundBuffer();
[3543]24
[7221]25    bool loadWAV(const std::string& fileName);
[8969]26    bool loadOGG(const std::string& fileName);
[6836]27
[5386]28    /** @returns the ID of the buffer used in this SoundBuffer */
29    inline ALuint getID() const { return this->bufferID; }
[2036]30
[5386]31  private:
[6836]32    ALenum sdlAudioSpecToAlFormat(const SDL_AudioSpec* audiospec);
33
34  private:
[5386]35    ALuint        bufferID;             //!< The address of the Buffer.
[1853]36
[5386]37    ALsizei       size;                 //!< The size of the Buffer.
38    ALboolean     loop;                 //!< loop information.
[7460]39  };
40}
[5386]41#endif /* _SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.