|
|
|
@ -1,38 +1,20 @@
|
|
|
|
|
/**
|
|
|
|
|
* OpenAL cross platform audio library
|
|
|
|
|
* Copyright (C) 2008 by authors.
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library 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
|
|
|
|
|
* Library General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
* Or go to https://www.gnu.org/copyleft/lgpl.html
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef AL_ALEXT_H
|
|
|
|
|
#define AL_ALEXT_H
|
|
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
/* Define int64_t and uint64_t types */
|
|
|
|
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#elif defined(_WIN32) && defined(__GNUC__)
|
|
|
|
|
/* Define int64 and uint64 types */
|
|
|
|
|
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
typedef int64_t _alsoft_int64_t;
|
|
|
|
|
typedef uint64_t _alsoft_uint64_t;
|
|
|
|
|
#elif defined(_WIN32)
|
|
|
|
|
typedef __int64 int64_t;
|
|
|
|
|
typedef unsigned __int64 uint64_t;
|
|
|
|
|
typedef __int64 _alsoft_int64_t;
|
|
|
|
|
typedef unsigned __int64 _alsoft_uint64_t;
|
|
|
|
|
#else
|
|
|
|
|
/* Fallback if nothing above works */
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
typedef int64_t _alsoft_int64_t;
|
|
|
|
|
typedef uint64_t _alsoft_uint64_t;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "al.h"
|
|
|
|
@ -98,6 +80,31 @@ extern "C"
|
|
|
|
|
|
|
|
|
|
#ifndef AL_EXT_MCFORMATS
|
|
|
|
|
#define AL_EXT_MCFORMATS 1
|
|
|
|
|
/* Provides support for surround sound buffer formats with 8, 16, and 32-bit
|
|
|
|
|
* samples.
|
|
|
|
|
*
|
|
|
|
|
* QUAD8: Unsigned 8-bit, Quadraphonic (Front Left, Front Right, Rear Left,
|
|
|
|
|
* Rear Right).
|
|
|
|
|
* QUAD16: Signed 16-bit, Quadraphonic.
|
|
|
|
|
* QUAD32: 32-bit float, Quadraphonic.
|
|
|
|
|
* REAR8: Unsigned 8-bit, Rear Stereo (Rear Left, Rear Right).
|
|
|
|
|
* REAR16: Signed 16-bit, Rear Stereo.
|
|
|
|
|
* REAR32: 32-bit float, Rear Stereo.
|
|
|
|
|
* 51CHN8: Unsigned 8-bit, 5.1 Surround (Front Left, Front Right, Front Center,
|
|
|
|
|
* LFE, Side Left, Side Right). Note that some audio systems may label
|
|
|
|
|
* 5.1's Side channels as Rear or Surround; they are equivalent for the
|
|
|
|
|
* purposes of this extension.
|
|
|
|
|
* 51CHN16: Signed 16-bit, 5.1 Surround.
|
|
|
|
|
* 51CHN32: 32-bit float, 5.1 Surround.
|
|
|
|
|
* 61CHN8: Unsigned 8-bit, 6.1 Surround (Front Left, Front Right, Front Center,
|
|
|
|
|
* LFE, Rear Center, Side Left, Side Right).
|
|
|
|
|
* 61CHN16: Signed 16-bit, 6.1 Surround.
|
|
|
|
|
* 61CHN32: 32-bit float, 6.1 Surround.
|
|
|
|
|
* 71CHN8: Unsigned 8-bit, 7.1 Surround (Front Left, Front Right, Front Center,
|
|
|
|
|
* LFE, Rear Left, Rear Right, Side Left, Side Right).
|
|
|
|
|
* 71CHN16: Signed 16-bit, 7.1 Surround.
|
|
|
|
|
* 71CHN32: 32-bit float, 7.1 Surround.
|
|
|
|
|
*/
|
|
|
|
|
#define AL_FORMAT_QUAD8 0x1204
|
|
|
|
|
#define AL_FORMAT_QUAD16 0x1205
|
|
|
|
|
#define AL_FORMAT_QUAD32 0x1206
|
|
|
|
@ -134,9 +141,9 @@ extern "C"
|
|
|
|
|
|
|
|
|
|
#ifndef AL_EXT_STATIC_BUFFER
|
|
|
|
|
#define AL_EXT_STATIC_BUFFER 1
|
|
|
|
|
typedef ALvoid(AL_APIENTRY* PFNALBUFFERDATASTATICPROC)(const ALint, ALenum, ALvoid*, ALsizei, ALsizei);
|
|
|
|
|
typedef void(AL_APIENTRY* PFNALBUFFERDATASTATICPROC)(const ALint, ALenum, ALvoid*, ALsizei, ALsizei);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
AL_API ALvoid AL_APIENTRY alBufferDataStatic(
|
|
|
|
|
AL_API void AL_APIENTRY alBufferDataStatic(
|
|
|
|
|
const ALint buffer, ALenum format, ALvoid* data, ALsizei len, ALsizei freq);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
@ -170,9 +177,9 @@ extern "C"
|
|
|
|
|
#define AL_SOFT_buffer_sub_data 1
|
|
|
|
|
#define AL_BYTE_RW_OFFSETS_SOFT 0x1031
|
|
|
|
|
#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032
|
|
|
|
|
typedef ALvoid(AL_APIENTRY* PFNALBUFFERSUBDATASOFTPROC)(ALuint, ALenum, const ALvoid*, ALsizei, ALsizei);
|
|
|
|
|
typedef void(AL_APIENTRY* PFNALBUFFERSUBDATASOFTPROC)(ALuint, ALenum, const ALvoid*, ALsizei, ALsizei);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(
|
|
|
|
|
AL_API void AL_APIENTRY alBufferSubDataSOFT(
|
|
|
|
|
ALuint buffer, ALenum format, const ALvoid* data, ALsizei offset, ALsizei length);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
@ -326,8 +333,8 @@ extern "C"
|
|
|
|
|
#define AL_SOFT_source_latency 1
|
|
|
|
|
#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200
|
|
|
|
|
#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201
|
|
|
|
|
typedef int64_t ALint64SOFT;
|
|
|
|
|
typedef uint64_t ALuint64SOFT;
|
|
|
|
|
typedef _alsoft_int64_t ALint64SOFT;
|
|
|
|
|
typedef _alsoft_uint64_t ALuint64SOFT;
|
|
|
|
|
typedef void(AL_APIENTRY* LPALSOURCEDSOFT)(ALuint, ALenum, ALdouble);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALSOURCE3DSOFT)(ALuint, ALenum, ALdouble, ALdouble, ALdouble);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALSOURCEDVSOFT)(ALuint, ALenum, const ALdouble*);
|
|
|
|
@ -368,11 +375,11 @@ extern "C"
|
|
|
|
|
#ifndef AL_SOFT_deferred_updates
|
|
|
|
|
#define AL_SOFT_deferred_updates 1
|
|
|
|
|
#define AL_DEFERRED_UPDATES_SOFT 0xC002
|
|
|
|
|
typedef ALvoid(AL_APIENTRY* LPALDEFERUPDATESSOFT)(void);
|
|
|
|
|
typedef ALvoid(AL_APIENTRY* LPALPROCESSUPDATESSOFT)(void);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALDEFERUPDATESSOFT)(void);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALPROCESSUPDATESSOFT)(void);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void);
|
|
|
|
|
AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void);
|
|
|
|
|
AL_API void AL_APIENTRY alDeferUpdatesSOFT(void);
|
|
|
|
|
AL_API void AL_APIENTRY alProcessUpdatesSOFT(void);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -407,6 +414,16 @@ extern "C"
|
|
|
|
|
|
|
|
|
|
#ifndef AL_EXT_BFORMAT
|
|
|
|
|
#define AL_EXT_BFORMAT 1
|
|
|
|
|
/* Provides support for B-Format ambisonic buffers (first-order, FuMa scaling
|
|
|
|
|
* and layout).
|
|
|
|
|
*
|
|
|
|
|
* BFORMAT2D_8: Unsigned 8-bit, 3-channel non-periphonic (WXY).
|
|
|
|
|
* BFORMAT2D_16: Signed 16-bit, 3-channel non-periphonic (WXY).
|
|
|
|
|
* BFORMAT2D_FLOAT32: 32-bit float, 3-channel non-periphonic (WXY).
|
|
|
|
|
* BFORMAT3D_8: Unsigned 8-bit, 4-channel periphonic (WXYZ).
|
|
|
|
|
* BFORMAT3D_16: Signed 16-bit, 4-channel periphonic (WXYZ).
|
|
|
|
|
* BFORMAT3D_FLOAT32: 32-bit float, 4-channel periphonic (WXYZ).
|
|
|
|
|
*/
|
|
|
|
|
#define AL_FORMAT_BFORMAT2D_8 0x20021
|
|
|
|
|
#define AL_FORMAT_BFORMAT2D_16 0x20022
|
|
|
|
|
#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023
|
|
|
|
@ -471,6 +488,152 @@ extern "C"
|
|
|
|
|
#define ALC_OUTPUT_LIMITER_SOFT 0x199A
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef ALC_SOFT_device_clock
|
|
|
|
|
#define ALC_SOFT_device_clock 1
|
|
|
|
|
typedef _alsoft_int64_t ALCint64SOFT;
|
|
|
|
|
typedef _alsoft_uint64_t ALCuint64SOFT;
|
|
|
|
|
#define ALC_DEVICE_CLOCK_SOFT 0x1600
|
|
|
|
|
#define ALC_DEVICE_LATENCY_SOFT 0x1601
|
|
|
|
|
#define ALC_DEVICE_CLOCK_LATENCY_SOFT 0x1602
|
|
|
|
|
#define AL_SAMPLE_OFFSET_CLOCK_SOFT 0x1202
|
|
|
|
|
#define AL_SEC_OFFSET_CLOCK_SOFT 0x1203
|
|
|
|
|
typedef void(ALC_APIENTRY* LPALCGETINTEGER64VSOFT)(
|
|
|
|
|
ALCdevice* device, ALCenum pname, ALsizei size, ALCint64SOFT* values);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
ALC_API void ALC_APIENTRY alcGetInteger64vSOFT(
|
|
|
|
|
ALCdevice* device, ALCenum pname, ALsizei size, ALCint64SOFT* values);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_direct_channels_remix
|
|
|
|
|
#define AL_SOFT_direct_channels_remix 1
|
|
|
|
|
#define AL_DROP_UNMATCHED_SOFT 0x0001
|
|
|
|
|
#define AL_REMIX_UNMATCHED_SOFT 0x0002
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_bformat_ex
|
|
|
|
|
#define AL_SOFT_bformat_ex 1
|
|
|
|
|
#define AL_AMBISONIC_LAYOUT_SOFT 0x1997
|
|
|
|
|
#define AL_AMBISONIC_SCALING_SOFT 0x1998
|
|
|
|
|
|
|
|
|
|
/* Ambisonic layouts */
|
|
|
|
|
#define AL_FUMA_SOFT 0x0000
|
|
|
|
|
#define AL_ACN_SOFT 0x0001
|
|
|
|
|
|
|
|
|
|
/* Ambisonic scalings (normalization) */
|
|
|
|
|
/*#define AL_FUMA_SOFT*/
|
|
|
|
|
#define AL_SN3D_SOFT 0x0001
|
|
|
|
|
#define AL_N3D_SOFT 0x0002
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef ALC_SOFT_loopback_bformat
|
|
|
|
|
#define ALC_SOFT_loopback_bformat 1
|
|
|
|
|
#define ALC_AMBISONIC_LAYOUT_SOFT 0x1997
|
|
|
|
|
#define ALC_AMBISONIC_SCALING_SOFT 0x1998
|
|
|
|
|
#define ALC_AMBISONIC_ORDER_SOFT 0x1999
|
|
|
|
|
#define ALC_MAX_AMBISONIC_ORDER_SOFT 0x199B
|
|
|
|
|
|
|
|
|
|
#define ALC_BFORMAT3D_SOFT 0x1507
|
|
|
|
|
|
|
|
|
|
/* Ambisonic layouts */
|
|
|
|
|
#define ALC_FUMA_SOFT 0x0000
|
|
|
|
|
#define ALC_ACN_SOFT 0x0001
|
|
|
|
|
|
|
|
|
|
/* Ambisonic scalings (normalization) */
|
|
|
|
|
/*#define ALC_FUMA_SOFT*/
|
|
|
|
|
#define ALC_SN3D_SOFT 0x0001
|
|
|
|
|
#define ALC_N3D_SOFT 0x0002
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_effect_target
|
|
|
|
|
#define AL_SOFT_effect_target
|
|
|
|
|
#define AL_EFFECTSLOT_TARGET_SOFT 0x199C
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_events
|
|
|
|
|
#define AL_SOFT_events 1
|
|
|
|
|
#define AL_EVENT_CALLBACK_FUNCTION_SOFT 0x19A2
|
|
|
|
|
#define AL_EVENT_CALLBACK_USER_PARAM_SOFT 0x19A3
|
|
|
|
|
#define AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT 0x19A4
|
|
|
|
|
#define AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT 0x19A5
|
|
|
|
|
#define AL_EVENT_TYPE_DISCONNECTED_SOFT 0x19A6
|
|
|
|
|
typedef void(AL_APIENTRY* ALEVENTPROCSOFT)(
|
|
|
|
|
ALenum eventType, ALuint object, ALuint param, ALsizei length, const ALchar* message, void* userParam);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALEVENTCONTROLSOFT)(ALsizei count, const ALenum* types, ALboolean enable);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALEVENTCALLBACKSOFT)(ALEVENTPROCSOFT callback, void* userParam);
|
|
|
|
|
typedef void*(AL_APIENTRY* LPALGETPOINTERSOFT)(ALenum pname);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALGETPOINTERVSOFT)(ALenum pname, void** values);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum* types, ALboolean enable);
|
|
|
|
|
AL_API void AL_APIENTRY alEventCallbackSOFT(ALEVENTPROCSOFT callback, void* userParam);
|
|
|
|
|
AL_API void* AL_APIENTRY alGetPointerSOFT(ALenum pname);
|
|
|
|
|
AL_API void AL_APIENTRY alGetPointervSOFT(ALenum pname, void** values);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef ALC_SOFT_reopen_device
|
|
|
|
|
#define ALC_SOFT_reopen_device
|
|
|
|
|
typedef ALCboolean(ALC_APIENTRY* LPALCREOPENDEVICESOFT)(
|
|
|
|
|
ALCdevice* device, const ALCchar* deviceName, const ALCint* attribs);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
ALCboolean ALC_APIENTRY alcReopenDeviceSOFT(ALCdevice* device, const ALCchar* deviceName, const ALCint* attribs);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_callback_buffer
|
|
|
|
|
#define AL_SOFT_callback_buffer
|
|
|
|
|
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
|
|
|
|
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
|
|
|
|
typedef ALsizei(AL_APIENTRY* ALBUFFERCALLBACKTYPESOFT)(ALvoid* userptr, ALvoid* sampledata, ALsizei numbytes);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALBUFFERCALLBACKSOFT)(
|
|
|
|
|
ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid* userptr);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid** value);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALGETBUFFER3PTRSOFT)(
|
|
|
|
|
ALuint buffer, ALenum param, ALvoid** value1, ALvoid** value2, ALvoid** value3);
|
|
|
|
|
typedef void(AL_APIENTRY* LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid** values);
|
|
|
|
|
#ifdef AL_ALEXT_PROTOTYPES
|
|
|
|
|
AL_API void AL_APIENTRY alBufferCallbackSOFT(
|
|
|
|
|
ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid* userptr);
|
|
|
|
|
AL_API void AL_APIENTRY alGetBufferPtrSOFT(ALuint buffer, ALenum param, ALvoid** ptr);
|
|
|
|
|
AL_API void AL_APIENTRY alGetBuffer3PtrSOFT(
|
|
|
|
|
ALuint buffer, ALenum param, ALvoid** ptr0, ALvoid** ptr1, ALvoid** ptr2);
|
|
|
|
|
AL_API void AL_APIENTRY alGetBufferPtrvSOFT(ALuint buffer, ALenum param, ALvoid** ptr);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef AL_SOFT_UHJ
|
|
|
|
|
#define AL_SOFT_UHJ
|
|
|
|
|
#define AL_FORMAT_UHJ2CHN8_SOFT 0x19A2
|
|
|
|
|
#define AL_FORMAT_UHJ2CHN16_SOFT 0x19A3
|
|
|
|
|
#define AL_FORMAT_UHJ2CHN_FLOAT32_SOFT 0x19A4
|
|
|
|
|
#define AL_FORMAT_UHJ3CHN8_SOFT 0x19A5
|
|
|
|
|
#define AL_FORMAT_UHJ3CHN16_SOFT 0x19A6
|
|
|
|
|
#define AL_FORMAT_UHJ3CHN_FLOAT32_SOFT 0x19A7
|
|
|
|
|
#define AL_FORMAT_UHJ4CHN8_SOFT 0x19A8
|
|
|
|
|
#define AL_FORMAT_UHJ4CHN16_SOFT 0x19A9
|
|
|
|
|
#define AL_FORMAT_UHJ4CHN_FLOAT32_SOFT 0x19AA
|
|
|
|
|
|
|
|
|
|
#define AL_STEREO_MODE_SOFT 0x19B0
|
|
|
|
|
#define AL_NORMAL_SOFT 0x0000
|
|
|
|
|
#define AL_SUPER_STEREO_SOFT 0x0001
|
|
|
|
|
#define AL_SUPER_STEREO_WIDTH_SOFT 0x19B1
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef ALC_SOFT_output_mode
|
|
|
|
|
#define ALC_SOFT_output_mode
|
|
|
|
|
#define ALC_OUTPUT_MODE_SOFT 0x19AC
|
|
|
|
|
#define ALC_ANY_SOFT 0x19AD
|
|
|
|
|
/*#define ALC_MONO_SOFT 0x1500*/
|
|
|
|
|
/*#define ALC_STEREO_SOFT 0x1501*/
|
|
|
|
|
#define ALC_STEREO_BASIC_SOFT 0x19AE
|
|
|
|
|
#define ALC_STEREO_UHJ_SOFT 0x19AF
|
|
|
|
|
#define ALC_STEREO_HRTF_SOFT 0x19B2
|
|
|
|
|
/*#define ALC_QUAD_SOFT 0x1503*/
|
|
|
|
|
#define ALC_SURROUND_5_1_SOFT 0x1504
|
|
|
|
|
#define ALC_SURROUND_6_1_SOFT 0x1505
|
|
|
|
|
#define ALC_SURROUND_7_1_SOFT 0x1506
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|