From 8d1ff873d8d11c233b4c254b68cb9d20e2296028 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 26 Apr 2018 17:16:52 -0700 Subject: [PATCH] ALC bindings for HL --- lime/_backend/native/NativeCFFI.hx | 17 +- lime/media/openal/ALC.hx | 73 +- lime/media/openal/ALContext.hx | 9 +- project/src/media/openal/OpenALBindings.cpp | 919 +++++++++++++++++++- 4 files changed, 989 insertions(+), 29 deletions(-) diff --git a/lime/_backend/native/NativeCFFI.hx b/lime/_backend/native/NativeCFFI.hx index 0f656ac68..9e970377c 100644 --- a/lime/_backend/native/NativeCFFI.hx +++ b/lime/_backend/native/NativeCFFI.hx @@ -8,6 +8,8 @@ import lime.graphics.opengl.GLRenderbuffer; import lime.graphics.opengl.GLShader; import lime.graphics.opengl.GLTexture; import lime.media.openal.ALAuxiliaryEffectSlot; +import lime.media.openal.ALContext; +import lime.media.openal.ALDevice; import lime.system.CFFIPointer; import lime.utils.DataPointer; @@ -288,7 +290,20 @@ class NativeCFFI { @:cffi private static function lime_alc_suspend_context (context:CFFIPointer):Void; #if hl - @:hlNative("lime", "lime_alc_open_device") private static function hl_lime_alc_open_device (devicename:hl.Bytes):lime.media.openal.ALDevice { return null; }; + @:hlNative("lime", "lime_alc_close_device") private static function hl_lime_alc_close_device (device:ALDevice):Bool { return false; } + @:hlNative("lime", "lime_alc_create_context") private static function hl_lime_alc_create_context (device:ALDevice, attrlist:hl.Bytes):ALContext { return null; } + @:hlNative("lime", "lime_alc_destroy_context") private static function hl_lime_alc_destroy_context (context:ALContext):Void {} + @:hlNative("lime", "lime_alc_get_contexts_device") private static function hl_lime_alc_get_contexts_device (context:ALContext):ALDevice { return null; } + @:hlNative("lime", "lime_alc_get_current_context") private static function hl_lime_alc_get_current_context ():ALContext { return null; } + @:hlNative("lime", "lime_alc_get_error") private static function hl_lime_alc_get_error (device:ALDevice):Int { return 0; } + @:hlNative("lime", "lime_alc_get_integerv") private static function hl_lime_alc_get_integerv (device:ALDevice, param:Int, size:Int, values:hl.Bytes):Void {} + @:hlNative("lime", "lime_alc_get_string") private static function hl_lime_alc_get_string (device:ALDevice, param:Int):hl.Bytes { return null; } + @:hlNative("lime", "lime_alc_make_context_current") private static function hl_lime_alc_make_context_current (context:ALContext):Bool { return false; } + @:hlNative("lime", "lime_alc_open_device") private static function hl_lime_alc_open_device (devicename:hl.Bytes):ALDevice { return null; } + @:hlNative("lime", "lime_alc_pause_device") private static function hl_lime_alc_pause_device (device:ALDevice):Void {} + @:hlNative("lime", "lime_alc_process_context") private static function hl_lime_alc_process_context (context:ALContext):Void {} + @:hlNative("lime", "lime_alc_resume_device") private static function hl_lime_alc_resume_device (device:ALDevice):Void {} + @:hlNative("lime", "lime_alc_suspend_context") private static function hl_lime_alc_suspend_context (context:ALContext):Void {} #end @:cffi private static function lime_al_gen_filter():CFFIPointer; diff --git a/lime/media/openal/ALC.hx b/lime/media/openal/ALC.hx index a74d511ef..6f2eb6386 100644 --- a/lime/media/openal/ALC.hx +++ b/lime/media/openal/ALC.hx @@ -40,9 +40,11 @@ class ALC { public static function closeDevice (device:ALDevice):Bool { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl return NativeCFFI.lime_alc_close_device (device); #else + return NativeCFFI.hl_lime_alc_close_device (device); + #end #else return false; #end @@ -51,7 +53,7 @@ class ALC { public static function createContext (device:ALDevice, attrlist:Array = null):ALContext { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl var handle:Dynamic = NativeCFFI.lime_alc_create_context (device, attrlist); if (handle != null) { @@ -59,7 +61,10 @@ class ALC { return new ALContext (handle); } - #end + #else + var attrlist = (attrlist != null ? hl.Bytes.fromValue (attrlist, null) : null); + return NativeCFFI.hl_lime_alc_create_context (device, attrlist); + #end #end return null; @@ -68,9 +73,11 @@ class ALC { public static function destroyContext (context:ALContext):Void { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl NativeCFFI.lime_alc_destroy_context (context); - #end + #else + NativeCFFI.hl_lime_alc_destroy_context (context); + #end #end } @@ -86,7 +93,7 @@ class ALC { } #else - + return NativeCFFI.hl_lime_alc_get_contexts_device (context); #end #end @@ -97,7 +104,7 @@ class ALC { public static function getCurrentContext ():ALContext { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl var handle:Dynamic = NativeCFFI.lime_alc_get_current_context (); if (handle != null) { @@ -105,7 +112,9 @@ class ALC { return new ALContext (handle); } - #end + #else + return NativeCFFI.hl_lime_alc_get_current_context (); + #end #end return null; @@ -114,9 +123,11 @@ class ALC { public static function getError (device:ALDevice):Int { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl return NativeCFFI.lime_alc_get_error (device); #else + return NativeCFFI.lime_alc_get_error (device); + #end #else return 0; #end @@ -141,9 +152,18 @@ class ALC { public static function getIntegerv (device:ALDevice, param:Int, size:Int):Array { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl return NativeCFFI.lime_alc_get_integerv (device, param, size); #else + // TODO: Make this work + var bytes = new hl.Bytes (size); + NativeCFFI.hl_lime_alc_get_integerv (device, param, size, bytes); + var result = new Array (); + for (i in 0...size) { + result[i] = bytes.getI32 (i); + } + return result; + #end #else return null; #end @@ -152,9 +172,12 @@ class ALC { public static function getString (device:ALDevice, param:Int):String { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl return NativeCFFI.lime_alc_get_string (device, param); #else + // TODO: Is this correct? + return cast NativeCFFI.hl_lime_alc_get_string (device, param); + #end #else return null; #end @@ -163,9 +186,11 @@ class ALC { public static function makeContextCurrent (context:ALContext):Bool { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl return NativeCFFI.lime_alc_make_context_current (context); #else + return NativeCFFI.hl_lime_alc_make_context_current (context); + #end #else return false; #end @@ -194,36 +219,44 @@ class ALC { public static function pauseDevice (device:ALDevice):Void { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl NativeCFFI.lime_alc_pause_device (device); - #end + #else + NativeCFFI.hl_lime_alc_pause_device (device); + #end #end } public static function processContext (context:ALContext):Void { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl NativeCFFI.lime_alc_process_context (context); - #end + #else + NativeCFFI.hl_lime_alc_process_context (context); + #end #end } public static function resumeDevice (device:ALDevice):Void { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl NativeCFFI.lime_alc_resume_device (device); - #end + #else + NativeCFFI.hl_lime_alc_resume_device (device); + #end #end } public static function suspendContext (context:ALContext):Void { - #if (lime_cffi && lime_openal && !macro) + #if (lime_cffi && lime_openal && !macro) #if !hl NativeCFFI.lime_alc_suspend_context (context); - #end + #else + NativeCFFI.hl_lime_alc_suspend_context (context); + #end #end } diff --git a/lime/media/openal/ALContext.hx b/lime/media/openal/ALContext.hx index 5c908e1f9..a2de31863 100644 --- a/lime/media/openal/ALContext.hx +++ b/lime/media/openal/ALContext.hx @@ -1,4 +1,4 @@ -package lime.media.openal; +package lime.media.openal; #if !hl import lime.system.CFFIPointer; @@ -17,4 +17,9 @@ abstract ALContext(CFFIPointer) from CFFIPointer to CFFIPointer { } -} \ No newline at end of file +} + + +#else +typedef ALContext = hl.Abstract<"alc_context">; +#end \ No newline at end of file diff --git a/project/src/media/openal/OpenALBindings.cpp b/project/src/media/openal/OpenALBindings.cpp index 6b8e86c45..2ce038bee 100644 --- a/project/src/media/openal/OpenALBindings.cpp +++ b/project/src/media/openal/OpenALBindings.cpp @@ -127,6 +127,15 @@ namespace lime { } + HL_PRIM void hl_lime_al_auxf (unsigned effectslot, int param, float flValue) { + + #ifdef LIME_OPENALSOFT + alAuxiliaryEffectSlotf (effectslot, param, flValue); + #endif + + } + + void lime_al_auxfv (value aux, int param, value values) { #ifdef LIME_OPENALSOFT @@ -152,6 +161,15 @@ namespace lime { } + HL_PRIM void hl_lime_al_auxfv (unsigned effectslot, int param, vbyte* pflValues) { + + #ifdef LIME_OPENALSOFT + alAuxiliaryEffectSlotfv (effectslot, param, (ALfloat*)pflValues); + #endif + + } + + void lime_al_auxi (value aux, int param, value val) { #ifdef LIME_OPENALSOFT @@ -174,6 +192,15 @@ namespace lime { } + HL_PRIM void hl_lime_al_auxi (unsigned effectslot, int param, int iValue) { + + #ifdef LIME_OPENALSOFT + alAuxiliaryEffectSloti(effectslot, param, iValue); + #endif + + } + + void lime_al_auxiv (value aux, int param, value values) { #ifdef LIME_OPENALSOFT @@ -199,6 +226,15 @@ namespace lime { } + HL_PRIM void hl_lime_al_auxiv (unsigned effectslot, int param, vbyte* piValues) { + + #ifdef LIME_OPENALSOFT + alAuxiliaryEffectSlotiv (effectslot, param, (ALint*)piValues); + #endif + + } + + void lime_al_buffer_data (value buffer, int format, value data, int size, int freq) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -208,6 +244,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_buffer_data (unsigned buffer, int format, vbyte* data, int size, int freq) { + + alBufferData (buffer, format, data, size, freq); + + } + + void lime_al_buffer3f (value buffer, int param, float value1, float value2, float value3) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -216,6 +259,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_buffer3f (unsigned buffer, int param, float value1, float value2, float value3) { + + alBuffer3f (buffer, param, value1, value2, value3); + + } + + void lime_al_buffer3i (value buffer, int param, int value1, int value2, int value3) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -224,11 +274,25 @@ namespace lime { } + HL_PRIM void hl_lime_al_buffer3i (unsigned buffer, int param, int value1, int value2, int value3) { + + alBuffer3i (buffer, param, value1, value2, value3); + + } + + void lime_al_bufferf (value buffer, int param, float value) { - + ALuint id = (ALuint)(uintptr_t)val_data (buffer); alBufferf (id, param, value); - + + } + + + HL_PRIM void hl_lime_al_bufferf (unsigned buffer, int param, float value) { + + alBufferf (buffer, param, value); + } @@ -255,6 +319,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_bufferfv (unsigned buffer, int param, vbyte* values) { + + alBufferfv (buffer, param, (ALfloat*)values); + + } + + void lime_al_bufferi (value buffer, int param, int value) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -263,6 +334,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_bufferi (unsigned buffer, int param, int value) { + + alBufferi (buffer, param, value); + + } + + void lime_al_bufferiv (value buffer, int param, value values) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -286,6 +364,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_bufferiv (unsigned buffer, int param, vbyte* values) { + + alBufferiv (buffer, param, (ALint*)values); + + } + + void lime_al_cleanup () { #ifdef LIME_OPENAL_DELETION_DELAY @@ -361,6 +446,15 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_auxiliary_effect_slot (unsigned aux) { + + #ifdef LIME_OPENALSOFT + alDeleteAuxiliaryEffectSlots (1, &aux); + #endif + + } + + void lime_al_delete_buffer (value buffer) { if (!val_is_null (buffer)) { @@ -382,6 +476,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_buffer (unsigned buffer) { + + alDeleteBuffers (1, &buffer); + + } + + void lime_al_delete_buffers (int n, value buffers) { if (!val_is_null (buffers)) { @@ -430,6 +531,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_buffers (int n, vbyte* buffers) { + + alDeleteBuffers (n, (ALuint*)buffers); + + } + + void lime_al_delete_effect (value effect) { #ifdef LIME_OPENALSOFT @@ -445,6 +553,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_effect (unsigned effect) { + + alDeleteEffects (1, &effect); + + } + + void lime_al_delete_filter (value filter) { #ifdef LIME_OPENALSOFT @@ -460,6 +575,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_filter (unsigned filter) { + + alDeleteFilters (1, &filter); + + } + + void lime_al_delete_source (value source) { if (!val_is_null (source)) { @@ -468,7 +590,7 @@ namespace lime { val_gc (source, 0); #ifdef LIME_OPENAL_DELETION_DELAY al_gc_mutex.Lock (); - alSourcei (data, AL_BUFFER, 0); + alSourcei (data, lime_al_BUFFER, 0); alDeletedSource.push_back (data); alDeletedSourceTime.push_back (time (0)); al_gc_mutex.Unlock (); @@ -481,6 +603,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_source (unsigned source) { + + alDeleteSources (1, &source); + + } + + void lime_al_delete_sources (int n, value sources) { if (!val_is_null (sources)) { @@ -496,7 +625,7 @@ namespace lime { source = val_array_i (sources, i); data = (ALuint)(uintptr_t)val_data (source); - alSourcei (data, AL_BUFFER, 0); + alSourcei (data, lime_al_BUFFER, 0); alDeletedSource.push_back (data); alDeletedSourceTime.push_back (time (0)); val_gc (source, 0); @@ -526,6 +655,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_delete_sources (int n, vbyte* sources) { + + alDeleteSources (n, (ALuint*)sources); + + } + + void lime_al_disable (int capability) { alDisable (capability); @@ -533,6 +669,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_disable (int capability) { + + alDisable (capability); + + } + + void lime_al_distance_model (int distanceModel) { alDistanceModel (distanceModel); @@ -540,6 +683,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_distance_model (int value) { + + alDistanceModel (value); + + } + + void lime_al_doppler_factor (float factor) { alDopplerFactor (factor); @@ -547,6 +697,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_doppler_factor (float value) { + + alDopplerFactor (value); + + } + + void lime_al_doppler_velocity (float velocity) { alDopplerVelocity (velocity); @@ -554,6 +711,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_doppler_velocity (float value) { + + alDopplerVelocity (value); + + } + + void lime_al_effectf (value effect, int param, float value) { #ifdef LIME_OPENALSOFT @@ -564,6 +728,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_effectf (unsigned effect, int param, float flValue) { + + alEffectf (effect, param, flValue); + + } + + void lime_al_effectfv (value effect, int param, value values) { #ifdef LIME_OPENALSOFT @@ -589,6 +760,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_effectfv (unsigned effect, int param, vbyte* pflValues) { + + alEffectfv (effect, param, (ALfloat*)pflValues); + + } + + void lime_al_effecti (value effect, int param, int value) { #ifdef LIME_OPENALSOFT @@ -599,6 +777,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_effecti (unsigned effect, int param, int iValue) { + + alEffecti (effect, param, iValue); + + } + + void lime_al_effectiv (value effect, int param, value values) { #ifdef LIME_OPENALSOFT @@ -624,6 +809,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_effectiv (unsigned effect, int param, vbyte* piValues) { + + alEffectiv (effect, param, (ALint*)piValues); + + } + + void lime_al_enable (int capability) { alEnable (capability); @@ -631,6 +823,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_enable (int capability) { + + alEnable (capability); + + } + + void lime_al_filteri (value filter, int param, value val) { #ifdef LIME_OPENALSOFT @@ -645,6 +844,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_filteri (unsigned filter, int param, int iValue) { + + alFilteri (filter, param, iValue); + + } + + void lime_al_filterf (value filter, int param, float value) { #ifdef LIME_OPENALSOFT @@ -655,6 +861,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_filterf (unsigned filter, int param, float flValue) { + + alFilterf (filter, param, flValue); + + } + + value lime_al_gen_aux () { #ifdef LIME_OPENALSOFT @@ -668,6 +881,19 @@ namespace lime { } + HL_PRIM unsigned hl_lime_al_gen_aux () { + + #ifdef LIME_OPENALSOFT + ALuint aux; + alGenAuxiliaryEffectSlots (1, &aux); + return aux; + #else + return 0; + #endif + + } + + value lime_al_gen_buffer () { alGetError (); @@ -692,6 +918,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_buffer (unsigned buffer) { + + alGenBuffers (1, &buffer); + + } + + value lime_al_gen_buffers (int n) { alGetError (); @@ -731,6 +964,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_buffers (int n, vbyte* buffers) { + + alGenBuffers (n, (ALuint*)buffers); + + } + + value lime_al_gen_effect () { alGetError (); @@ -751,6 +991,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_effect (unsigned effect) { + + alGenEffects (1, &effect); + + } + + value lime_al_gen_filter () { alGetError (); @@ -771,6 +1018,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_filter (unsigned filter) { + + alGenFilters (1, &filter); + + } + + value lime_al_gen_source () { alGetError (); @@ -791,6 +1045,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_source (unsigned source) { + + alGenSources (1, &source); + + } + + value lime_al_gen_sources (int n) { alGetError (); @@ -821,6 +1082,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_gen_sources (int n, vbyte* sources) { + + alGenSources (n, (ALuint*)sources); + + } + + bool lime_al_get_boolean (int param) { return alGetBoolean (param); @@ -828,6 +1096,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_get_boolean (int param) { + + return alGetBoolean (param); + + } + + value lime_al_get_booleanv (int param, int count) { ALboolean* values = new ALboolean[count]; @@ -847,6 +1122,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_booleanv (int param, vbyte* values) { + + alGetBooleanv (param, (ALboolean*)values); + + } + + value lime_al_get_buffer3f (value buffer, int param) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -863,6 +1145,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_buffer3f (unsigned buffer, int param, float *value1, float *value2, float *value3) { + + alGetBuffer3f (buffer, param, value1, value2, value3); + + } + + value lime_al_get_buffer3i (value buffer, int param) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -879,6 +1168,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_buffer3i (unsigned buffer, int param, int *value1, int *value2, int *value3) { + + alGetBuffer3i (buffer, param, value1, value2, value3); + + } + + float lime_al_get_bufferf (value buffer, int param) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -889,6 +1185,15 @@ namespace lime { } + HL_PRIM float hl_lime_al_get_bufferf (unsigned buffer, int param) { + + float value; + alGetBufferf (buffer, param, &value); + return value; + + } + + value lime_al_get_bufferfv (value buffer, int param, int count) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -909,6 +1214,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_bufferfv (unsigned buffer, int param, vbyte* values) { + + alGetBufferfv (buffer, param, (ALfloat*)values); + + } + + int lime_al_get_bufferi (value buffer, int param) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -919,6 +1231,15 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_bufferi (unsigned buffer, int param) { + + int value; + alGetBufferi (buffer, param, &value); + return value; + + } + + value lime_al_get_bufferiv (value buffer, int param, int count) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -939,6 +1260,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_bufferiv (unsigned buffer, int param, vbyte* values) { + + alGetBufferiv (buffer, param, (ALint*)values); + + } + + double lime_al_get_double (int param) { return alGetDouble (param); @@ -946,6 +1274,13 @@ namespace lime { } + HL_PRIM double hl_lime_al_get_double (int param) { + + return alGetDouble (param); + + } + + value lime_al_get_doublev (int param, int count) { ALdouble* values = new ALdouble[count]; @@ -965,6 +1300,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_doublev (int param, vbyte* values) { + + alGetDoublev (param, (ALdouble*)values); + + } + + int lime_al_get_enum_value (HxString ename) { return alGetEnumValue (ename.__s); @@ -972,6 +1314,13 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_enum_value (vbyte* ename) { + + return alGetEnumValue ((char*)ename); + + } + + int lime_al_get_error () { return alGetError (); @@ -979,6 +1328,13 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_error () { + + return alGetError (); + + } + + int lime_al_get_filteri (value filter, int param) { #ifdef LIME_OPENALSOFT @@ -993,6 +1349,15 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_filteri (unsigned filter, int param) { + + int value; + alGetFilteri (filter, param, &value); + return value; + + } + + float lime_al_get_float (int param) { return alGetFloat (param); @@ -1000,6 +1365,13 @@ namespace lime { } + HL_PRIM float hl_lime_al_get_float (int param) { + + return alGetFloat (param); + + } + + value lime_al_get_floatv (int param, int count) { ALfloat* values = new ALfloat[count]; @@ -1019,6 +1391,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_floatv (int param, vbyte* values) { + + alGetFloatv (param, (ALfloat*)values); + + } + + int lime_al_get_integer (int param) { return alGetInteger (param); @@ -1026,6 +1405,13 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_integer (int param) { + + return alGetInteger (param); + + } + + value lime_al_get_integerv (int param, int count) { ALint* values = new ALint[count]; @@ -1045,6 +1431,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_integerv (int param, vbyte* values) { + + alGetIntegerv (param, (ALint*)values); + + } + + value lime_al_get_listener3f (int param) { ALfloat val1, val2, val3; @@ -1060,6 +1453,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_listener3f (int param, float *value1, float *value2, float *value3) { + + alGetListener3f (param, value1, value2, value3); + + } + + value lime_al_get_listener3i (int param) { ALint val1, val2, val3; @@ -1075,6 +1475,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_listener3i (int param, int *value1, int *value2, int *value3) { + + alGetListener3i (param, value1, value2, value3); + + } + + float lime_al_get_listenerf (int param) { ALfloat data; @@ -1084,6 +1491,15 @@ namespace lime { } + HL_PRIM float hl_lime_al_get_listenerf (int param) { + + float value; + alGetListenerf (param, &value); + return value; + + } + + value lime_al_get_listenerfv (int param, int count) { ALfloat* values = new ALfloat[count]; @@ -1103,6 +1519,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_listenerfv (int param, vbyte* values) { + + alGetListenerfv (param, (ALfloat*)values); + + } + + int lime_al_get_listeneri (int param) { ALint data; @@ -1112,6 +1535,15 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_listeneri (int param) { + + int value; + alGetListeneri (param, &value); + return value; + + } + + value lime_al_get_listeneriv (int param, int count) { ALint* values = new ALint[count]; @@ -1131,6 +1563,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_listeneriv (int param, vbyte* values) { + + alGetListeneriv (param, (ALint*)values); + + } + + double lime_al_get_proc_address (HxString fname) { return (uintptr_t)alGetProcAddress (fname.__s); @@ -1154,6 +1593,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_source3f (unsigned source, int param, float *value1, float *value2, float *value3) { + + alGetSource3f (source, param, value1, value2, value3); + + } + + value lime_al_get_source3i (value source, int param) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1170,6 +1616,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_source3i (unsigned source, int param, int *value1, int *value2, int *value3) { + + alGetSource3i (source, param, value1, value2, value3); + + } + + float lime_al_get_sourcef (value source, int param) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1180,6 +1633,15 @@ namespace lime { } + HL_PRIM float hl_lime_al_get_sourcef (unsigned source, int param) { + + float value; + alGetSourcef(source, param, &value); + return value; + + } + + value lime_al_get_sourcefv (value source, int param, int count) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1200,6 +1662,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_sourcefv (unsigned source, int param, vbyte* values) { + + alGetSourcefv (source, param, (ALfloat*)values); + + } + + value lime_al_get_sourcei (value source, int param) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1230,6 +1699,14 @@ namespace lime { } + HL_PRIM int hl_lime_al_get_sourcei (unsigned source, int param) { + + int value; + alGetSourcei (source, param, &value); + return value; + + } + value lime_al_get_sourceiv (value source, int param, int count) { @@ -1251,6 +1728,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_get_sourceiv (unsigned source, int param, vbyte* values) { + + alGetSourceiv (source, param, (ALint*)values); + + } + + value lime_al_get_string (int param) { const char* result = alGetString (param); @@ -1259,6 +1743,13 @@ namespace lime { } + HL_PRIM vbyte* hl_lime_al_get_string (int param) { + + return (vbyte*)alGetString (param); + + } + + bool lime_al_is_aux (value aux) { #ifdef LIME_OPENALSOFT @@ -1271,6 +1762,17 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_aux (unsigned effectslot) { + + #ifdef LIME_OPENALSOFT + return alIsAuxiliaryEffectSlot (effectslot) == AL_TRUE; + #else + return false; + #endif + + } + + bool lime_al_is_buffer (value buffer) { ALuint id = (ALuint)(uintptr_t)val_data (buffer); @@ -1279,6 +1781,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_buffer (unsigned buffer) { + + return alIsBuffer (buffer) == AL_TRUE; + + } + + bool lime_al_is_effect (value effect) { #ifdef LIME_OPENALSOFT @@ -1291,6 +1800,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_effect (unsigned effect) { + + return alIsEffect (effect) == AL_TRUE; + + } + + bool lime_al_is_enabled (int capability) { return alIsEnabled (capability); @@ -1298,6 +1814,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_enabled (int capability) { + + return alIsEnabled (capability) == AL_TRUE; + + } + + bool lime_al_is_extension_present (HxString extname) { #ifdef LIME_OPENALSOFT @@ -1309,6 +1832,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_extension_present (vbyte* extname) { + + return alIsExtensionPresent ((char*)extname) == AL_TRUE; + + } + + bool lime_al_is_filter (value filter) { #ifdef LIME_OPENALSOFT @@ -1321,6 +1851,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_filter (unsigned filter) { + + return alIsFilter (filter) == AL_TRUE; + + } + + bool lime_al_is_source (value source) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1329,6 +1866,13 @@ namespace lime { } + HL_PRIM bool hl_lime_al_is_source (unsigned source) { + + return alIsSource (source) == AL_TRUE; + + } + + void lime_al_listener3f (int param, float value1, float value2, float value3) { alListener3f (param, value1, value2, value3); @@ -1336,6 +1880,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listener3f (int param, float value1, float value2, float value3) { + + alListener3f (param, value1, value2, value3); + + } + + void lime_al_listener3i (int param, int value1, int value2, int value3) { alListener3i (param, value1, value2, value3); @@ -1343,6 +1894,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listener3i (int param, int value1, int value2, int value3) { + + alListener3i (param, value1, value2, value3); + + } + + void lime_al_listenerf (int param, float value1) { alListenerf (param, value1); @@ -1350,6 +1908,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listenerf (int param, float value) { + + alListenerf (param, value); + + } + + void lime_al_listenerfv (int param, value values) { if (!val_is_null (values)) { @@ -1371,6 +1936,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listenerfv (int param, vbyte* values) { + + alListenerfv (param, (ALfloat*)values); + + } + + void lime_al_listeneri (int param, int value1) { alListeneri (param, value1); @@ -1378,6 +1950,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listeneri (int param, int value) { + + alListeneri (param, value); + + } + + void lime_al_listeneriv (int param, value values) { if (!val_is_null (values)) { @@ -1399,6 +1978,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_listeneriv (int param, vbyte* values) { + + alListeneriv (param, (ALint*)values); + + } + + void lime_al_remove_direct_filter (value source) { #ifdef LIME_OPENALSOFT @@ -1427,6 +2013,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_pause (unsigned source) { + + alSourcePause (source); + + } + + void lime_al_source_pausev (int n, value sources) { if (!val_is_null (sources)) { @@ -1448,6 +2041,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_pausev (int n, vbyte* sources) { + + alSourcePausev (n, (ALuint*)sources); + + } + + void lime_al_source_play (value source) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1456,6 +2056,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_play (unsigned source) { + + alSourcePlay (source); + + } + + void lime_al_source_playv (int n, value sources) { if (!val_is_null (sources)) { @@ -1477,6 +2084,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_playv (int n, vbyte* sources) { + + alSourcePlayv (n, (ALuint*)sources); + + } + + void lime_al_source_queue_buffers (value source, int nb, value buffers) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1500,6 +2114,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_queue_buffers (unsigned source, int nb, vbyte* buffers) { + + alSourceQueueBuffers (source, nb, (ALuint*)buffers); + + } + + void lime_al_source_rewind (value source) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1508,6 +2129,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_rewind (unsigned source) { + + alSourceRewind (source); + + } + + void lime_al_source_rewindv (int n, value sources) { if (!val_is_null (sources)) { @@ -1529,6 +2157,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_rewindv (int n, vbyte* sources) { + + alSourceRewindv (n, (ALuint*)sources); + + } + + void lime_al_source_stop (value source) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1537,6 +2172,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_stop (unsigned source) { + + alSourceStop (source); + + } + + void lime_al_source_stopv (int n, value sources) { if (!val_is_null (sources)) { @@ -1558,6 +2200,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_stopv (int n, vbyte* sources) { + + alSourceStopv (n, (ALuint*)sources); + + } + + value lime_al_source_unqueue_buffers (value source, int nb) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1595,6 +2244,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source_unqueue_buffers (unsigned source, int nb, vbyte* buffers) { + + alSourceUnqueueBuffers (source, nb, (ALuint*)buffers); + + } + + void lime_al_source3f (value source, int param, float value1, float value2, float value3) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1603,6 +2259,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source3f (unsigned source, int param, float value1, float value2, float value3) { + + alSource3f (source, param, value1, value2, value3); + + } + + void lime_al_source3i (value source, int param, value value1, int value2, int value3) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1627,6 +2290,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_source3i (unsigned source, int param, int value1, int value2, int value3) { + + alSource3i (source, param, value1, value2, value3); + + } + + void lime_al_sourcef (value source, int param, float value) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1635,6 +2305,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_sourcef (unsigned source, int param, float value) { + + alSourcef (source, param, value); + + } + + void lime_al_sourcefv (value source, int param, value values) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1658,6 +2335,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_sourcefv (unsigned source, int param, vbyte* values) { + + alSourcefv (source, param, (ALfloat*)values); + + } + + void lime_al_sourcei (value source, int param, value val) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1694,6 +2378,14 @@ namespace lime { } + + HL_PRIM void hl_lime_al_sourcei (unsigned source, int param, int value) { + + alSourcei (source, param, value); + + } + + void lime_al_sourceiv (value source, int param, value values) { ALuint id = (ALuint)(uintptr_t)val_data (source); @@ -1717,6 +2409,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_sourceiv (unsigned source, int param, vbyte* values) { + + alSourceiv (source, param, (ALint*)values); + + } + + void lime_al_speed_of_sound (float speed) { alSpeedOfSound (speed); @@ -1724,6 +2423,13 @@ namespace lime { } + HL_PRIM void hl_lime_al_speed_of_sound (float speed) { + + alSpeedOfSound (speed); + + } + + bool lime_alc_close_device (value device) { al_gc_mutex.Lock (); @@ -1736,6 +2442,13 @@ namespace lime { } + HL_PRIM bool hl_lime_alc_close_device (ALCdevice *device) { + + return alcCloseDevice (device) == ALC_TRUE; + + } + + value lime_alc_create_context (value device, value attrlist) { ALCdevice* alcDevice = (ALCdevice*)val_data (device); @@ -1771,6 +2484,13 @@ namespace lime { } + HL_PRIM ALCcontext* hl_lime_alc_create_context (ALCdevice* device, vbyte* attrlist) { + + return alcCreateContext (device, (ALCint*)attrlist); + + } + + void lime_alc_destroy_context (value context) { al_gc_mutex.Lock (); @@ -1782,6 +2502,13 @@ namespace lime { } + HL_PRIM void hl_lime_alc_destroy_context (ALCcontext* context) { + + alcDestroyContext (context); + + } + + value lime_alc_get_contexts_device (value context) { ALCcontext* alcContext = (ALCcontext*)val_data (context); @@ -1806,6 +2533,13 @@ namespace lime { } + HL_PRIM ALCdevice* hl_lime_alc_get_contexts_device (ALCcontext* context) { + + return alcGetContextsDevice (context); + + } + + value lime_alc_get_current_context () { ALCcontext* alcContext = alcGetCurrentContext (); @@ -1829,6 +2563,13 @@ namespace lime { } + HL_PRIM ALCcontext* hl_lime_alc_get_current_context () { + + return alcGetCurrentContext (); + + } + + int lime_alc_get_error (value device) { ALCdevice* alcDevice = (ALCdevice*)val_data (device); @@ -1837,6 +2578,13 @@ namespace lime { } + HL_PRIM int hl_lime_alc_get_error (ALCdevice* device) { + + return alcGetError (device); + + } + + value lime_alc_get_integerv (value device, int param, int size) { ALCdevice* alcDevice = (ALCdevice*)val_data (device); @@ -1858,6 +2606,13 @@ namespace lime { } + HL_PRIM void hl_lime_alc_get_integerv (ALCdevice* device, int param, int size, vbyte* values) { + + alcGetIntegerv (device, param, size, (ALCint*)values); + + } + + value lime_alc_get_string (value device, int param) { ALCdevice* alcDevice = (ALCdevice*)val_data (device); @@ -1867,6 +2622,13 @@ namespace lime { } + HL_PRIM vbyte* hl_lime_alc_get_string (ALCdevice* device, int param) { + + return (vbyte*)alcGetString (device, param); + + } + + bool lime_alc_make_context_current (value context) { ALCcontext* alcContext = (ALCcontext*)val_data (context); @@ -1875,6 +2637,13 @@ namespace lime { } + HL_PRIM bool hl_lime_alc_make_context_current (ALCcontext *context) { + + return alcMakeContextCurrent (context) == ALC_TRUE; + + } + + value lime_alc_open_device (HxString devicename) { ALCdevice* alcDevice = alcOpenDevice (devicename.__s); @@ -1887,7 +2656,7 @@ namespace lime { } - HL_PRIM ALCdevice* hl_lime_alc_open_device (vbyte *devicename) { + HL_PRIM ALCdevice* hl_lime_alc_open_device (vbyte* devicename) { ALCdevice* alcDevice = alcOpenDevice ((char*)devicename); atexit (lime_al_atexit); @@ -1909,6 +2678,15 @@ namespace lime { } + HL_PRIM void hl_lime_alc_pause_device (ALCdevice* device) { + + #ifdef LIME_OPENALSOFT + alcDevicePauseSOFT (device); + #endif + + } + + void lime_alc_process_context (value context) { ALCcontext* alcContext = (ALCcontext*)val_data (context); @@ -1917,6 +2695,13 @@ namespace lime { } + HL_PRIM void hl_lime_alc_process_context (ALCcontext* context) { + + alcProcessContext (context); + + } + + void lime_alc_resume_device (value device) { #ifdef LIME_OPENALSOFT @@ -1927,6 +2712,15 @@ namespace lime { } + HL_PRIM void hl_lime_alc_resume_device (ALCdevice* device) { + + #ifdef LIME_OPENALSOFT + alcDeviceResumeSOFT (device); + #endif + + } + + void lime_alc_suspend_context (value context) { ALCcontext* alcContext = (ALCcontext*)val_data (context); @@ -1935,6 +2729,13 @@ namespace lime { } + HL_PRIM void hl_lime_alc_suspend_context (ALCcontext* context) { + + alcSuspendContext (context); + + } + + DEFINE_PRIME3v (lime_al_auxf); @@ -2055,8 +2856,114 @@ namespace lime { #define TDEVICE _ABSTRACT (alc_device) #define TCONTEXT _ABSTRACT (alc_context) + DEFINE_HL_PRIM (_VOID, lime_al_auxf, _I32 _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_auxfv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_auxi, _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_auxiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_buffer_data, _I32 _I32 _BYTES _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_buffer3f, _I32 _I32 _F32 _F32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_buffer3i, _I32 _I32 _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_bufferf, _I32 _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_bufferfv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_bufferi, _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_bufferiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_delete_auxiliary_effect_slot, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_delete_buffer, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_delete_buffers, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_delete_filter, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_delete_source, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_delete_sources, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_disable, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_distance_model, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_doppler_factor, _F32); + DEFINE_HL_PRIM (_VOID, lime_al_doppler_velocity, _F32); + DEFINE_HL_PRIM (_VOID, lime_al_effectf, _I32 _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_effectfv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_effecti, _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_effectiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_enable, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_filteri, _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_filterf, _I32 _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_gen_aux, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_gen_buffer, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_gen_buffers, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_gen_effect, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_gen_filter, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_gen_source, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_gen_sources, _I32 _BYTES); + DEFINE_HL_PRIM (_BOOL, lime_al_get_boolean, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_booleanv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_get_buffer3f, _I32 _I32 _REF(_F32) _REF(_F32) _REF(_F32)); + DEFINE_HL_PRIM (_VOID, lime_al_get_buffer3i, _I32 _I32 _REF(_I32) _REF(_I32) _REF(_I32)); + DEFINE_HL_PRIM (_F32, lime_al_get_bufferf, _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_bufferfv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_I32, lime_al_get_bufferi, _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_bufferiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_F64, lime_al_get_double, _I32); + DEFINE_HL_PRIM (_I32, lime_al_get_enum_value, _BYTES); + DEFINE_HL_PRIM (_I32, lime_al_get_error, _NO_ARG); + DEFINE_HL_PRIM (_I32, lime_al_get_filteri, _I32 _I32); + DEFINE_HL_PRIM (_F32, lime_al_get_float, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_floatv, _I32 _BYTES); + DEFINE_HL_PRIM (_I32, lime_al_get_integer, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_integerv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_get_listener3f, _I32 _REF(_F32) _REF(_F32) _REF(_F32)); + DEFINE_HL_PRIM (_VOID, lime_al_get_listener3i, _I32 _REF(_I32) _REF(_I32) _REF(_I32)); + DEFINE_HL_PRIM (_F32, lime_al_get_listenerf, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_listenerfv, _I32 _BYTES); + DEFINE_HL_PRIM (_I32, lime_al_get_listeneri, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_listeneriv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_get_source3f, _I32 _I32 _REF(_F32) _REF(_F32) _REF(_F32)); + DEFINE_HL_PRIM (_VOID, lime_al_get_source3i, _I32 _I32 _REF(_I32) _REF(_I32) _REF(_I32)); + DEFINE_HL_PRIM (_F32, lime_al_get_sourcef, _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_sourcefv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_I32, lime_al_get_sourcei, _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_get_sourceiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_BYTES, lime_al_get_string, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_aux, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_buffer, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_effect, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_enabled, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_extension_present, _BYTES); + DEFINE_HL_PRIM (_BOOL, lime_al_is_filter, _I32); + DEFINE_HL_PRIM (_BOOL, lime_al_is_source, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_listener3f, _I32 _F32 _F32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_listener3i, _I32 _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_listenerf, _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_listenerfv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_listeneri, _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_listeneriv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_pause, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_source_pausev, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_play, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_source_playv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_queue_buffers, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_rewind, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_source_rewindv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_stop, _I32); + DEFINE_HL_PRIM (_VOID, lime_al_source_stopv, _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source_unqueue_buffers, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_source3f, _I32 _I32 _F32 _F32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_source3i, _I32 _I32 _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_sourcef, _I32 _I32 _F32); + DEFINE_HL_PRIM (_VOID, lime_al_sourcefv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_sourcei, _I32 _I32 _I32); + DEFINE_HL_PRIM (_VOID, lime_al_sourceiv, _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_VOID, lime_al_speed_of_sound, _F32); + DEFINE_HL_PRIM (TCONTEXT, lime_alc_create_context, TDEVICE _BYTES); + DEFINE_HL_PRIM (_BOOL, lime_alc_close_device, TDEVICE); + DEFINE_HL_PRIM (_VOID, lime_alc_destroy_context, TCONTEXT); + DEFINE_HL_PRIM (TDEVICE, lime_alc_get_contexts_device, TCONTEXT); + DEFINE_HL_PRIM (TCONTEXT, lime_alc_get_current_context, _NO_ARG); + DEFINE_HL_PRIM (_I32, lime_alc_get_error, TDEVICE); + DEFINE_HL_PRIM (_VOID, lime_alc_get_integerv, TDEVICE _I32 _I32 _BYTES); + DEFINE_HL_PRIM (_BYTES, lime_alc_get_string, TDEVICE _I32); + DEFINE_HL_PRIM (_BOOL, lime_alc_make_context_current, TCONTEXT); DEFINE_HL_PRIM (TDEVICE, lime_alc_open_device, _BYTES); - + DEFINE_HL_PRIM (_VOID, lime_alc_pause_device, TDEVICE); + DEFINE_HL_PRIM (_VOID, lime_alc_process_context, TCONTEXT); + DEFINE_HL_PRIM (_VOID, lime_alc_resume_device, TDEVICE); + DEFINE_HL_PRIM (_VOID, lime_alc_suspend_context, TCONTEXT); }