diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-26 19:34:05 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-27 10:19:16 +0200 |
commit | 950a3474d561c48b70a13fb638f169b7e8b34d60 (patch) | |
tree | c284b167190cc44d59684b3ab517648eaa5b65d6 /src/sound/oalsound/buffer.h | |
parent | 8765d58b02c9afd00186bae4a0045dff32f7d102 (diff) | |
download | colobot-950a3474d561c48b70a13fb638f169b7e8b34d60.tar.gz colobot-950a3474d561c48b70a13fb638f169b7e8b34d60.tar.bz2 colobot-950a3474d561c48b70a13fb638f169b7e8b34d60.zip |
Refactored sound code
* fixed formatting and naming to be uniform with rest of code
* moved default implementation of CSound to cpp module
Diffstat (limited to 'src/sound/oalsound/buffer.h')
-rw-r--r-- | src/sound/oalsound/buffer.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/sound/oalsound/buffer.h b/src/sound/oalsound/buffer.h index 7286deb..d847426 100644 --- a/src/sound/oalsound/buffer.h +++ b/src/sound/oalsound/buffer.h @@ -14,10 +14,18 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// buffer.h +/** + * \file buffer.h + * \brief OpenAL buffer + */ #pragma once +#include "sound/sound.h" +#include "common/logger.h" + +#include "sound/oalsound/check.h" + #include <string> #include <vector> #include <array> @@ -25,27 +33,23 @@ #include <AL/al.h> #include <sndfile.h> -#include "sound/sound.h" -#include "common/logger.h" - -#include "check.h" - class Buffer { - public: - Buffer(); - ~Buffer(); - - bool LoadFromFile(std::string, Sound); - bool IsLoaded(); - - Sound GetSoundType(); - ALuint GetBuffer(); - float GetDuration(); - - private: - ALuint mBuffer; - Sound mSound; - bool mLoaded; - float mDuration; +public: + Buffer(); + ~Buffer(); + + bool LoadFromFile(std::string, Sound); + bool IsLoaded(); + + Sound GetSoundType(); + ALuint GetBuffer(); + float GetDuration(); + +private: + ALuint m_buffer; + Sound m_sound; + bool m_loaded; + float m_duration; }; + |