# OpenAL Declarations # # Copyright (C) 2006,2007,2008 PySoy Group # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program; if not, see http://www.gnu.org/licenses # # $Id$ cdef extern from "AL/al.h" : # AL Types ctypedef char ALboolean ctypedef char ALchar ctypedef char ALbyte ctypedef unsigned char ALubyte ctypedef short ALshort ctypedef unsigned short ALushort ctypedef int ALint ctypedef unsigned int ALuint ctypedef int ALsizei ctypedef int ALenum ctypedef float ALfloat ctypedef double ALdouble ctypedef void ALvoid # AL Enumerations ctypedef enum : AL_INVALID AL_ILLEGAL_ENUM AL_ILLEGAL_COMMAND AL_VERSION_1_0 AL_VERSION_1_1 AL_NONE AL_FALSE AL_TRUE AL_SOURCE_RELATIVE AL_CONE_INNER_ANGLE AL_CONE_OUTER_ANGLE AL_PITCH AL_POSITION AL_DIRECTION AL_VELOCITY AL_LOOPING AL_BUFFER AL_GAIN AL_MIN_GAIN AL_MAX_GAIN AL_ORIENTATION AL_SOURCE_STATE AL_INITIAL AL_PLAYING AL_PAUSED AL_STOPPED AL_BUFFERS_QUEUED AL_BUFFERS_PROCESSED AL_SEC_OFFSET AL_SAMPLE_OFFSET AL_BYTE_OFFSET AL_SOURCE_TYPE AL_STATIC AL_STREAMING AL_UNDETERMINED AL_FORMAT_MONO8 AL_FORMAT_MONO16 AL_FORMAT_STEREO8 AL_FORMAT_STEREO16 AL_REFERENCE_DISTANCE AL_ROLLOFF_FACTOR AL_CONE_OUTER_GAIN AL_MAX_DISTANCE AL_FREQUENCY AL_BITS AL_CHANNELS AL_SIZE AL_UNUSED AL_PENDING AL_PROCESSED AL_NO_ERROR AL_INVALID_NAME AL_INVALID_ENUM AL_INVALID_VALUE AL_INVALID_OPERATION AL_OUT_OF_MEMORY AL_VENDOR AL_VERSION AL_RENDERER AL_EXTENSIONS AL_DOPPLER_FACTOR AL_DOPPLER_VELOCITY AL_SPEED_OF_SOUND AL_DISTANCE_MODEL AL_INVERSE_DISTANCE AL_INVERSE_DISTANCE_CLAMPED AL_LINEAR_DISTANCE AL_LINEAR_DISTANCE_CLAMPED AL_EXPONENT_DISTANCE AL_EXPONENT_DISTANCE_CLAMPED # AL Functions cdef : void alEnable ( ALenum ) void alDisable ( ALenum ) ALboolean alIsEnabled ( ALenum ) ALchar* alGetString ( ALenum ) void alGetBooleanv ( ALenum, ALboolean* ) void alGetIntegerv ( ALenum, ALint* ) void alGetFloatv ( ALenum, ALfloat* ) void alGetDoublev ( ALenum, ALdouble* ) ALboolean alGetBoolean ( ALenum ) ALint alGetInteger ( ALenum ) ALfloat alGetFloat ( ALenum ) ALdouble alGetDouble ( ALenum ) ALenum alGetError ( ) ALboolean alIsExtensionPresent ( ALchar* ) void* alGetProcAddress ( ALchar* ) ALenum alGetEnumValue ( ALchar* ) void alListenerf ( ALenum, ALfloat ) void alListener3f ( ALenum, ALfloat, ALfloat, ALfloat ) void alListenerfv ( ALenum, ALfloat* ) void alListeneri ( ALenum, ALint ) void alListener3i ( ALenum, ALint, ALint, ALint ) void alListeneriv ( ALenum, ALint* ) void alGetListenerf ( ALenum, ALfloat* ) void alGetListener3f ( ALenum, ALfloat*, ALfloat*, ALfloat* ) void alGetListenerfv ( ALenum, ALfloat* ) void alGetListeneri ( ALenum, ALint* ) void alGetListener3i ( ALenum, ALint*, ALint*, ALint* ) void alGetListeneriv ( ALenum, ALint* ) void alGenSources ( ALsizei, ALuint* ) void alDeleteSources ( ALsizei, ALuint* ) ALboolean alIsSource ( ALuint ) void alSourcef ( ALuint, ALenum, ALfloat ) void alSource3f ( ALuint, ALenum, ALfloat, ALfloat, ALfloat ) void alSourcefv ( ALuint, ALenum, ALfloat* ) void alSourcei ( ALuint, ALenum, ALint ) void alSource3i ( ALuint, ALenum, ALint, ALint, ALint ) void alSourceiv ( ALuint, ALenum, ALint* ) void alGetSourcef ( ALuint, ALenum, ALfloat* ) void alGetSource3f ( ALuint, ALenum, ALfloat*, ALfloat*, ALfloat* ) void alGetSourcefv ( ALuint, ALenum, ALfloat* ) void alGetSourcei ( ALuint, ALenum, ALint* ) void alGetSource3i ( ALuint, ALenum, ALint*, ALint*, ALint* ) void alGetSourceiv ( ALuint, ALenum, ALint* ) void alSourcePlayv ( ALsizei, ALuint* ) void alSourceStopv ( ALsizei, ALuint* ) void alSourceRewindv ( ALsizei, ALuint* ) void alSourcePausev ( ALsizei, ALuint* ) void alSourcePlay ( ALuint ) void alSourceStop ( ALuint ) void alSourceRewind ( ALuint ) void alSourcePause ( ALuint ) void alSourceQueueBuffers ( ALuint, ALsizei, ALuint* ) void alSourceUnqueueBuffers( ALuint, ALsizei, ALuint* ) void alGenBuffers ( ALsizei, ALuint* ) void alDeleteBuffers ( ALsizei, ALuint* ) ALboolean alIsBuffer ( ALuint ) void alBufferData ( ALuint, ALenum, ALvoid*, ALsizei, ALsizei ) void alBufferf ( ALuint, ALenum, ALfloat ) void alBuffer3f ( ALuint, ALenum, ALfloat, ALfloat, ALfloat ) void alBufferfv ( ALuint, ALenum, ALfloat* ) void alBufferi ( ALuint, ALenum, ALint ) void alBuffer3i ( ALuint, ALenum, ALint, ALint, ALint ) void alBufferiv ( ALuint, ALenum, ALint* ) void alGetBufferf ( ALuint, ALenum, ALfloat* ) void alGetBuffer3f ( ALuint, ALenum, ALfloat*, ALfloat*, ALfloat* ) void alGetBufferfv ( ALuint, ALenum, ALfloat* ) void alGetBufferi ( ALuint, ALenum, ALint* ) void alGetBuffer3i ( ALuint, ALenum, ALint*, ALint*, ALint* ) void alGetBufferiv ( ALuint, ALenum, ALint* ) void alDopplerFactor ( ALfloat ) void alDopplerVelocity ( ALfloat ) void alSpeedOfSound ( ALfloat ) void alDistanceModel ( ALenum ) cdef extern from "AL/alc.h" : # ALC Types ctypedef void* ALCdevice ctypedef void* ALCcontext ctypedef char ALCboolean ctypedef char ALCchar ctypedef char ALCbyte ctypedef unsigned char ALCubyte ctypedef short ALCshort ctypedef unsigned short ALCushort ctypedef int ALCint ctypedef unsigned int ALCuint ctypedef int ALCsizei ctypedef int ALCenum ctypedef float ALCfloat ctypedef double ALCdouble ctypedef void ALCvoid # ALC Enumerations ctypedef enum : ALC_VERSION_0_1 ALC_FALSE ALC_TRUE ALC_FREQUENCY ALC_REFRESH ALC_SYNC ALC_MONO_SOURCES ALC_STEREO_SOURCES ALC_NO_ERROR ALC_INVALID_DEVICE ALC_INVALID_CONTEXT ALC_INVALID_ENUM ALC_INVALID_VALUE ALC_OUT_OF_MEMORY ALC_DEFAULT_DEVICE_SPECIFIER ALC_DEVICE_SPECIFIER ALC_EXTENSIONS ALC_MAJOR_VERSION ALC_MINOR_VERSION ALC_ATTRIBUTES_SIZE ALC_ALL_ATTRIBUTES ALC_CAPTURE_DEVICE_SPECIFIER ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER ALC_CAPTURE_SAMPLES # ALC Functions cdef : # # Context Management ALCcontext* alcCreateContext ( ALCdevice*, ALCint* ) ALCboolean alcMakeContextCurrent( ALCcontext* ) void alcProcessContext ( ALCcontext* ) void alcSuspendContext ( ALCcontext* ) void alcDestroyContext ( ALCcontext* ) ALCcontext* alcGetCurrentContext ( ) ALCdevice* alcGetContextsDevice ( ALCcontext* ) # # Device Management ALCdevice* alcOpenDevice ( ALCchar* ) ALCboolean alcCloseDevice ( ALCdevice* ) # # Error support ALCenum alcGetError ( ALCdevice* ) # # Extension support ALCboolean alcIsExtensionPresent( ALCdevice*, ALCchar* ) void* alcGetProcAddress ( ALCdevice*, ALCchar* ) ALCenum alcGetEnumValue ( ALCdevice*, ALCchar* ) # # Query functions ALCchar* alcGetString ( ALCdevice*, ALCenum ) void alcGetIntegerv ( ALCdevice*, ALCenum, ALCsizei, ALCint* ) # # Capture functions ALCdevice* alcCaptureOpenDevice ( ALCchar*, ALCuint, ALCenum, ALCsizei ) ALCboolean alcCaptureCloseDevice( ALCdevice* ) void alcCaptureStart ( ALCdevice* ) void alcCaptureStop ( ALCdevice* ) void alcCaptureSamples ( ALCdevice*, ALCvoid*, ALCsizei )