rlm@0: /** rlm@0: * OpenAL cross platform audio library rlm@0: * Copyright (C) 1999-2000 by authors. rlm@0: * This library is free software; you can redistribute it and/or rlm@0: * modify it under the terms of the GNU Library General Public rlm@0: * License as published by the Free Software Foundation; either rlm@0: * version 2 of the License, or (at your option) any later version. rlm@0: * rlm@0: * This library is distributed in the hope that it will be useful, rlm@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of rlm@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU rlm@0: * Library General Public License for more details. rlm@0: * rlm@0: * You should have received a copy of the GNU Library General Public rlm@0: * License along with this library; if not, write to the rlm@0: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, rlm@0: * Boston, MA 02111-1307, USA. rlm@0: * Or go to http://www.gnu.org/copyleft/lgpl.html rlm@0: */ rlm@0: rlm@0: #include "config.h" rlm@0: rlm@0: #include "alMain.h" rlm@0: #include "AL/alc.h" rlm@0: #include "alError.h" rlm@0: rlm@0: AL_API ALenum AL_APIENTRY alGetError(ALvoid) rlm@0: { rlm@0: ALCcontext *Context; rlm@0: ALenum errorCode; rlm@0: rlm@0: Context = GetLockedContext(); rlm@0: if(!Context) return AL_INVALID_OPERATION; rlm@0: rlm@0: errorCode = Context->LastError; rlm@0: Context->LastError = AL_NO_ERROR; rlm@0: rlm@0: UnlockContext(Context); rlm@0: rlm@0: return errorCode; rlm@0: } rlm@0: rlm@0: ALvoid alSetError(ALCcontext *Context, ALenum errorCode) rlm@0: { rlm@0: if(Context->LastError == AL_NO_ERROR) rlm@0: Context->LastError = errorCode; rlm@0: }