diff options
author | Chris Robinson <[email protected]> | 2018-01-26 21:32:43 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-26 21:32:43 -0800 |
commit | 5d2196c119f376ca6e58e23b43d4ffbaf4c68c12 (patch) | |
tree | 81871fa2c9c511989213f82da7294726b7019ce3 /OpenAL32 | |
parent | a885fd6d0e28c982e4beb423e31d56be9e6b61dd (diff) |
Don't rely on alMain.h in alBuffer.h
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alBuffer.h | 16 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 73 |
2 files changed, 18 insertions, 71 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h index 50946126..775bf391 100644 --- a/OpenAL32/Include/alBuffer.h +++ b/OpenAL32/Include/alBuffer.h @@ -1,7 +1,13 @@ #ifndef _AL_BUFFER_H_ #define _AL_BUFFER_H_ -#include "alMain.h" +#include "AL/alc.h" +#include "AL/al.h" +#include "AL/alext.h" + +#include "inprogext.h" +#include "atomic.h" +#include "rwlock.h" #ifdef __cplusplus extern "C" { @@ -105,14 +111,6 @@ typedef struct ALbuffer { ALbuffer *NewBuffer(ALCcontext *context); void DeleteBuffer(ALCdevice *device, ALbuffer *buffer); -inline void LockBuffersRead(ALCdevice *device) -{ LockUIntMapRead(&device->BufferMap); } -inline void UnlockBuffersRead(ALCdevice *device) -{ UnlockUIntMapRead(&device->BufferMap); } - -inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) -{ return (ALbuffer*)LookupUIntMapKeyNoLock(&device->BufferMap, id); } - ALvoid ReleaseALBuffers(ALCdevice *device); #ifdef __cplusplus diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 18dc32dd..bf7d2559 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -17,6 +17,7 @@ #include "AL/alc.h" #include "AL/alext.h" +#include "inprogext.h" #include "logging.h" #include "polymorphism.h" #include "static_assert.h" @@ -28,68 +29,6 @@ #include "almalloc.h" #include "threads.h" -#ifndef ALC_SOFT_loopback2 -#define ALC_SOFT_loopback2 1 -#define ALC_AMBISONIC_LAYOUT_SOFT 0xfff0 -#define ALC_AMBISONIC_SCALING_SOFT 0xfff1 -#define ALC_AMBISONIC_ORDER_SOFT 0xfff2 -#define ALC_MAX_AMBISONIC_ORDER_SOFT 0xfff3 - -#define ALC_BFORMAT3D_SOFT 0x1508 - -/* Ambisonic layouts */ -#define ALC_ACN_SOFT 0xfff4 -#define ALC_FUMA_SOFT 0xfff5 - -/* Ambisonic scalings (normalization) */ -/*#define ALC_FUMA_SOFT*/ -#define ALC_SN3D_SOFT 0xfff6 -#define ALC_N3D_SOFT 0xfff7 -#endif - -#ifndef AL_SOFT_map_buffer -#define AL_SOFT_map_buffer 1 -typedef unsigned int ALbitfieldSOFT; -#define AL_MAP_READ_BIT_SOFT 0x00000001 -#define AL_MAP_WRITE_BIT_SOFT 0x00000002 -#define AL_MAP_PERSISTENT_BIT_SOFT 0x00000004 -#define AL_PRESERVE_DATA_BIT_SOFT 0x00000008 -typedef void (AL_APIENTRY*LPALBUFFERSTORAGESOFT)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq, ALbitfieldSOFT flags); -typedef void* (AL_APIENTRY*LPALMAPBUFFERSOFT)(ALuint buffer, ALsizei offset, ALsizei length, ALbitfieldSOFT access); -typedef void (AL_APIENTRY*LPALUNMAPBUFFERSOFT)(ALuint buffer); -typedef void (AL_APIENTRY*LPALFLUSHMAPPEDBUFFERSOFT)(ALuint buffer, ALsizei offset, ALsizei length); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alBufferStorageSOFT(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq, ALbitfieldSOFT flags); -AL_API void* AL_APIENTRY alMapBufferSOFT(ALuint buffer, ALsizei offset, ALsizei length, ALbitfieldSOFT access); -AL_API void AL_APIENTRY alUnmapBufferSOFT(ALuint buffer); -AL_API void AL_APIENTRY alFlushMappedBufferSOFT(ALuint buffer, ALsizei offset, ALsizei length); -#endif -#endif - -#ifndef AL_SOFT_events -#define AL_SOFT_events 1 -#define AL_EVENT_CALLBACK_FUNCTION_SOFT 0x1220 -#define AL_EVENT_CALLBACK_USER_PARAM_SOFT 0x1221 -#define AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT 0x1222 -#define AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT 0x1223 -#define AL_EVENT_TYPE_ERROR_SOFT 0x1224 -#define AL_EVENT_TYPE_PERFORMANCE_SOFT 0x1225 -#define AL_EVENT_TYPE_DEPRECATED_SOFT 0x1226 -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 - #if defined(_WIN64) #define SZFMT "%I64u" @@ -163,6 +102,7 @@ struct DirectHrtfState; struct FrontStablizer; struct Compressor; struct ALCbackend; +struct ALbuffer; struct ALcontextProps; struct ALlistenerProps; struct ALvoiceProps; @@ -680,6 +620,15 @@ inline ALint GetChannelIdxByName(const RealMixParams *real, enum Channel chan) { return GetChannelIndex(real->ChannelName, chan); } +inline void LockBuffersRead(ALCdevice *device) +{ LockUIntMapRead(&device->BufferMap); } +inline void UnlockBuffersRead(ALCdevice *device) +{ UnlockUIntMapRead(&device->BufferMap); } + +inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) +{ return (struct ALbuffer*)LookupUIntMapKeyNoLock(&device->BufferMap, id); } + + vector_al_string SearchDataFiles(const char *match, const char *subdir); #ifdef __cplusplus |