aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes/openal/alc.h
diff options
context:
space:
mode:
authorMathieu Féry <[email protected]>2023-11-21 18:01:28 +0100
committerMathieu Féry <[email protected]>2023-11-22 14:37:56 +0100
commit02cc3395f950da98cd7e02a257b0669550be71d7 (patch)
treeafea70f1a09d360ee51cf5c6f6ff4f1d76874b22 /make/stub_includes/openal/alc.h
parent21079539c1f81bae9df328e6487e4d4d174b0b51 (diff)
feat(headers): Update al*.h and efx*.h to latest version of openal-soft embedded
eax.h is 'ignored' because usable reference header file are located inside submodule openal-soft/al/eax/api.h but this header contains many symbol not processed by Gluegen like constexpr and other c++ feature Following extensions has been added : * AL_EXT * AL_EXT_BFORMAT -> https://github.com/Raulshc/OpenAL-EXT-Repository/blob/master/AL%20Extensions/AL_EXT_BFORMAT.txt * AL_EXT_MULAW_BFORMAT -> https://github.com/Raulshc/OpenAL-EXT-Repository/blob/master/AL%20Extensions/AL_EXT_MULAW_BFORMAT.txt * AL_SOFT * AL_SOFT_deferred_updates -> https://openal-soft.org/openal-extensions/SOFT_deferred_updates.txt * AL_SOFT_block_alignment -> https://openal-soft.org/openal-extensions/SOFT_block_alignment.txt * AL_SOFT_MSADPCM -> https://openal-soft.org/openal-extensions/SOFT_MSADPCM.txt * AL_SOFT_source_length -> https://openal-soft.org/openal-extensions/SOFT_source_length.txt * AL_SOFT_buffer_length_query -> https://openal-soft.org/openal-extensions/SOFT_buffer_length_query.txt * AL_SOFT_gain_clamp_ex -> https://openal-soft.org/openal-extensions/SOFT_gain_clamp_ex.txt * AL_SOFT_source_resampler -> https://openal-soft.org/openal-extensions/SOFT_source_resampler.txt * AL_SOFT_source_spatialize -> https://openal-soft.org/openal-extensions/SOFT_source_spatialize.txt * AL_SOFT_direct_channels_remix -> https://openal-soft.org/openal-extensions/SOFT_direct_channels_remix.txt * AL_SOFT_bformat_ex -> https://openal-soft.org/openal-extensions/SOFT_bformat_ex.txt * AL_SOFT_effect_target -> https://openal-soft.org/openal-extensions/SOFT_effect_target.txt * AL_SOFT_callback_buffer -> https://openal-soft.org/openal-extensions/SOFT_callback_buffer.txt * AL_SOFT_UHJ -> https://openal-soft.org/openal-extensions/SOFT_UHJ.txt * AL_SOFT_UHJ_ex -> https://openal-soft.org/openal-extensions/SOFT_UHJ_ex.txt * AL_SOFT_source_start_delay -> https://openal-soft.org/openal-extensions/SOFT_source_start_delay.txt * ALC_EXT * ALC_EXT_DEFAULT_FILTER_ORDER -> https://github.com/Raulshc/OpenAL-EXT-Repository/blob/master/ALC%20Extensions/ALC_EXT_DEFAULT_FILTER_ORDER.txt * ALC_SOFT * ALC_SOFT_pause_device -> https://openal-soft.org/openal-extensions/SOFT_pause_device.txt * ALC_SOFT_HRTF -> https://openal-soft.org/openal-extensions/SOFT_HRTF.txt * ALC_SOFT_output_limiter -> https://openal-soft.org/openal-extensions/SOFT_output_limiter.txt * ALC_SOFT_device_clock -> https://openal-soft.org/openal-extensions/SOFT_device_clock.txt * ALC_SOFT_loopback_bformat -> https://openal-soft.org/openal-extensions/SOFT_loopback_bformat.txt * ALC_SOFT_reopen_device -> https://openal-soft.org/openal-extensions/SOFT_reopen_device.txt * ALC_SOFT_output_mode -> https://openal-soft.org/openal-extensions/SOFT_output_mode.txt
Diffstat (limited to 'make/stub_includes/openal/alc.h')
-rw-r--r--make/stub_includes/openal/alc.h175
1 files changed, 141 insertions, 34 deletions
diff --git a/make/stub_includes/openal/alc.h b/make/stub_includes/openal/alc.h
index 4170b62..f463a0e 100644
--- a/make/stub_includes/openal/alc.h
+++ b/make/stub_includes/openal/alc.h
@@ -1,13 +1,83 @@
+// Based on headers in submodule openal-soft/include/alc.h
+
#ifndef AL_ALC_H
#define AL_ALC_H
-#include "alc-types.h"
-
-#if defined(__cplusplus)
+#ifdef __cplusplus
extern "C" {
#endif
-/* Enumerant values begin at column 50. No tabs. */
+#ifndef ALC_API
+ #if defined(AL_LIBTYPE_STATIC)
+ #define ALC_API
+ #elif defined(_WIN32)
+ #define ALC_API __declspec(dllimport)
+ #else
+ #define ALC_API extern
+ #endif
+#endif
+
+#ifdef _WIN32
+ #define ALC_APIENTRY __cdecl
+#else
+ #define ALC_APIENTRY
+#endif
+
+
+/* Deprecated macros. */
+#define ALCAPI ALC_API
+#define ALCAPIENTRY ALC_APIENTRY
+#define ALC_INVALID 0
+
+/** Supported ALC version? */
+#define ALC_VERSION_0_1 1
+
+/** Opaque device handle */
+typedef struct ALCdevice ALCdevice;
+/** Opaque context handle */
+typedef struct ALCcontext ALCcontext;
+
+/** 8-bit boolean */
+typedef char ALCboolean;
+
+/** character */
+typedef char ALCchar;
+
+/** signed 8-bit integer */
+typedef signed char ALCbyte;
+
+/** unsigned 8-bit integer */
+typedef unsigned char ALCubyte;
+
+/** signed 16-bit integer */
+typedef short ALCshort;
+
+/** unsigned 16-bit integer */
+typedef unsigned short ALCushort;
+
+/** signed 32-bit integer */
+typedef int ALCint;
+
+/** unsigned 32-bit integer */
+typedef unsigned int ALCuint;
+
+/** non-negative 32-bit integer size */
+typedef int ALCsizei;
+
+/** 32-bit enumeration value */
+typedef int ALCenum;
+
+/** 32-bit IEEE-754 floating-point */
+typedef float ALCfloat;
+
+/** 64-bit IEEE-754 floating-point */
+typedef double ALCdouble;
+
+/** void type (for opaque pointers only) */
+typedef void ALCvoid;
+
+
+/* Enumeration values begin at column 50. Do not use tabs. */
/** Boolean False. */
#define ALC_FALSE 0
@@ -21,7 +91,7 @@ extern "C" {
/** Context attribute: <int> Hz. */
#define ALC_REFRESH 0x1008
-/** Context attribute: AL_TRUE or AL_FALSE. */
+/** Context attribute: AL_TRUE or AL_FALSE synchronous context? */
#define ALC_SYNC 0x1009
/** Context attribute: <int> requested Mono (3D) Sources. */
@@ -39,30 +109,32 @@ extern "C" {
/** Invalid context handle. */
#define ALC_INVALID_CONTEXT 0xA002
-/** Invalid enum parameter passed to an ALC call. */
+/** Invalid enumeration passed to an ALC call. */
#define ALC_INVALID_ENUM 0xA003
-/** Invalid value parameter passed to an ALC call. */
+/** Invalid value passed to an ALC call. */
#define ALC_INVALID_VALUE 0xA004
/** Out of memory. */
#define ALC_OUT_OF_MEMORY 0xA005
-/** Runtime ALC version. */
+/** Runtime ALC major version. */
#define ALC_MAJOR_VERSION 0x1000
+/** Runtime ALC minor version. */
#define ALC_MINOR_VERSION 0x1001
-/** Context attribute list properties. */
+/** Context attribute list size. */
#define ALC_ATTRIBUTES_SIZE 0x1002
+/** Context attribute list properties. */
#define ALC_ALL_ATTRIBUTES 0x1003
/** String for the default device specifier. */
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
/**
- * String for the given device's specifier.
+ * Device specifier string.
*
- * If device handle is NULL, it is instead a null-char separated list of
+ * If device handle is NULL, it is instead a null-character separated list of
* strings of known device specifiers (list ends with an empty string).
*/
#define ALC_DEVICE_SPECIFIER 0x1005
@@ -73,9 +145,9 @@ extern "C" {
/** Capture extension */
#define ALC_EXT_CAPTURE 1
/**
- * String for the given capture device's specifier.
+ * Capture device specifier string.
*
- * If device handle is NULL, it is instead a null-char separated list of
+ * If device handle is NULL, it is instead a null-character separated list of
* strings of known capture device specifiers (list ends with an empty string).
*/
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
@@ -90,57 +162,92 @@ extern "C" {
/** String for the default extended device specifier. */
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
/**
- * String for the given extended device's specifier.
+ * Device's extended specifier string.
*
- * If device handle is NULL, it is instead a null-char separated list of
+ * If device handle is NULL, it is instead a null-character separated list of
* strings of known extended device specifiers (list ends with an empty string).
*/
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
-/** Context management. */
-ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist);
+#ifndef ALC_NO_PROTOTYPES
+/* Context management. */
+
+/** Create and attach a context to the given device. */
+ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint *attrlist);
+/**
+ * Makes the given context the active process-wide context. Passing NULL clears
+ * the active context.
+ */
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context);
+/** Resumes processing updates for the given context. */
ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context);
+/** Suspends updates for the given context. */
ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context);
+/** Remove a context from its device and destroys it. */
ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context);
+/** Returns the currently active context. */
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void);
+/** Returns the device that a particular context is attached to. */
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context);
-/** Device management. */
+/* Device management. */
+
+/** Opens the named playback device. */
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename);
+/** Closes the given playback device. */
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device);
+/* Error support. */
-/**
- * Error support.
- *
- * Obtain the most recent Device error.
- */
+/** Obtain the most recent Device error. */
ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device);
+/* Extension support. */
+
/**
- * Extension support.
- *
- * Query for the presence of an extension, and obtain any appropriate
- * function pointers and enum values.
+ * Query for the presence of an extension on the device. Pass a NULL device to
+ * query a device-inspecific extension.
*/
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname);
-ALC_API ALCproc ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname);
+/**
+ * Retrieve the address of a function. Given a non-NULL device, the returned
+ * function may be device-specific.
+ */
+ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname);
+/**
+ * Retrieve the value of an enum. Given a non-NULL device, the returned value
+ * may be device-specific.
+ */
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname);
-/** Query function. */
+/* Query functions. */
+
+/** Returns information about the device, and error strings. */
ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param);
+/** Returns information about the device and the version of OpenAL. */
ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
-/** Capture function. */
+/* Capture functions. */
+
+/**
+ * Opens the named capture device with the given frequency, format, and buffer
+ * size.
+ */
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize);
+/** Closes the given capture device. */
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device);
+/** Starts capturing samples into the device buffer. */
ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device);
+/** Stops capturing samples. Samples in the device buffer remain available. */
ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device);
+/** Reads samples from the device buffer. */
ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
+#endif /* ALC_NO_PROTOTYPES */
-/** Pointer-to-function type, useful for dynamically getting ALC entry points. */
+/* Pointer-to-function types, useful for storing dynamically loaded ALC entry
+ * points.
+ */
typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist);
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context);
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context);
@@ -152,7 +259,7 @@ typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device);
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device);
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname);
-typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname);
+typedef ALCvoid* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname);
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname);
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param);
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
@@ -162,8 +269,8 @@ typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device);
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device);
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
-#if defined(__cplusplus)
-}
+#ifdef __cplusplus
+} /* extern "C" */
#endif
#endif /* AL_ALC_H */