diff options
author | erihel <erihel@gmail.com> | 2012-07-04 19:38:18 +0200 |
---|---|---|
committer | erihel <erihel@gmail.com> | 2012-07-04 19:38:18 +0200 |
commit | ecab9761d46754cd8d7a513a8ac16a8b88499d55 (patch) | |
tree | feca28addca2bf6616c6e6b83a365879088f9986 /src/plugins/sound/oalsound/buffer.h | |
parent | 092e4ae75e28fca8cf13d0315eb3923ba1c27133 (diff) | |
download | colobot-ecab9761d46754cd8d7a513a8ac16a8b88499d55.tar.gz colobot-ecab9761d46754cd8d7a513a8ac16a8b88499d55.tar.bz2 colobot-ecab9761d46754cd8d7a513a8ac16a8b88499d55.zip |
* Added OpenAL sound plugin
Plugin needs some more work and tests. It doesn't support playing music
yet as sound interface is propably going to change a bit.
Diffstat (limited to 'src/plugins/sound/oalsound/buffer.h')
-rw-r--r-- | src/plugins/sound/oalsound/buffer.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/plugins/sound/oalsound/buffer.h b/src/plugins/sound/oalsound/buffer.h new file mode 100644 index 0000000..6eefe72 --- /dev/null +++ b/src/plugins/sound/oalsound/buffer.h @@ -0,0 +1,48 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * 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 + +#pragma once + +#include <string> + +#include <AL/alut.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; +}; |