diff options
author | erihel <erihel@gmail.com> | 2012-08-12 15:00:37 +0200 |
---|---|---|
committer | erihel <erihel@gmail.com> | 2012-08-12 15:00:37 +0200 |
commit | 5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3 (patch) | |
tree | d0e4c7bb68a6b07019574b5621fb086e8a07557c /src/sound/plugins/oalsound/check.h | |
parent | 9946459c0cd65c3b66719a2aefc42c7ab2a29c04 (diff) | |
download | colobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.tar.gz colobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.tar.bz2 colobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.zip |
* New CPluginManager class for managing plugins based on colobot.ini
* Moved sound plugin into sound dir
* Minor changes in logger and profile
Diffstat (limited to 'src/sound/plugins/oalsound/check.h')
-rw-r--r-- | src/sound/plugins/oalsound/check.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/sound/plugins/oalsound/check.h b/src/sound/plugins/oalsound/check.h new file mode 100644 index 0000000..cb6b4a1 --- /dev/null +++ b/src/sound/plugins/oalsound/check.h @@ -0,0 +1,39 @@ +// * 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/. + +// check.h + +#pragma once + +#include <AL/al.h> +#include <AL/alc.h> + +#include <common/logger.h> + +static ALenum CODE = AL_NO_ERROR; + +inline bool alCheck() +{ + CODE = alGetError(); + return CODE != AL_NO_ERROR; +} + +inline ALenum alGetCode() +{ + ALenum ret = CODE; + CODE = AL_NO_ERROR; + return ret; +} |