diff --git a/CMakeLists.txt b/CMakeLists.txt index 8689e9add..eb0052d08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_FLAGS "-O1 -Wall -std=gnu99 -fgnu89-inline") IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_DESKTOP") add_definitions(-DPLATFORM_DESKTOP, -DGRAPHICS_API_OPENGL_33) - include_directories("." "src/" "external/openal_soft/include" "external/glew/include" "external/glfw3/include") + include_directories("." "src/" "external/openal_soft/include" "external/glfw3/include") ENDIF() @@ -22,7 +22,7 @@ ENDIF() IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_WEB") add_definitions(-DPLATFORM_WEB, -GRAPHICS_API_OPENGL_ES2) - include_directories("." "src/" "external/openal_soft/include" "external/glew/include" "external/glfw3/include") + include_directories("." "src/" "external/openal_soft/include" "external/glfw3/include") ENDIF() diff --git a/external/openal_soft/include/AL/alext.h b/external/openal_soft/include/AL/alext.h index 0447f2bb4..6af581aad 100644 --- a/external/openal_soft/include/AL/alext.h +++ b/external/openal_soft/include/AL/alext.h @@ -13,8 +13,8 @@ * * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Or go to http://www.gnu.org/copyleft/lgpl.html */ @@ -348,6 +348,89 @@ AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64 #endif #endif +#ifndef ALC_EXT_DEFAULT_FILTER_ORDER +#define ALC_EXT_DEFAULT_FILTER_ORDER 1 +#define ALC_DEFAULT_FILTER_ORDER 0x1100 +#endif + +#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); +#ifdef AL_ALEXT_PROTOTYPES +AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void); +AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void); +#endif +#endif + +#ifndef AL_SOFT_block_alignment +#define AL_SOFT_block_alignment 1 +#define AL_UNPACK_BLOCK_ALIGNMENT_SOFT 0x200C +#define AL_PACK_BLOCK_ALIGNMENT_SOFT 0x200D +#endif + +#ifndef AL_SOFT_MSADPCM +#define AL_SOFT_MSADPCM 1 +#define AL_FORMAT_MONO_MSADPCM_SOFT 0x1302 +#define AL_FORMAT_STEREO_MSADPCM_SOFT 0x1303 +#endif + +#ifndef AL_SOFT_source_length +#define AL_SOFT_source_length 1 +/*#define AL_BYTE_LENGTH_SOFT 0x2009*/ +/*#define AL_SAMPLE_LENGTH_SOFT 0x200A*/ +/*#define AL_SEC_LENGTH_SOFT 0x200B*/ +#endif + +#ifndef ALC_SOFT_pause_device +#define ALC_SOFT_pause_device 1 +typedef void (ALC_APIENTRY*LPALCDEVICEPAUSESOFT)(ALCdevice *device); +typedef void (ALC_APIENTRY*LPALCDEVICERESUMESOFT)(ALCdevice *device); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API void ALC_APIENTRY alcDevicePauseSOFT(ALCdevice *device); +ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device); +#endif +#endif + +#ifndef AL_EXT_BFORMAT +#define AL_EXT_BFORMAT 1 +#define AL_FORMAT_BFORMAT2D_8 0x20021 +#define AL_FORMAT_BFORMAT2D_16 0x20022 +#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023 +#define AL_FORMAT_BFORMAT3D_8 0x20031 +#define AL_FORMAT_BFORMAT3D_16 0x20032 +#define AL_FORMAT_BFORMAT3D_FLOAT32 0x20033 +#endif + +#ifndef AL_EXT_MULAW_BFORMAT +#define AL_EXT_MULAW_BFORMAT 1 +#define AL_FORMAT_BFORMAT2D_MULAW 0x10031 +#define AL_FORMAT_BFORMAT3D_MULAW 0x10032 +#endif + +#ifndef ALC_SOFT_HRTF +#define ALC_SOFT_HRTF 1 +#define ALC_HRTF_SOFT 0x1992 +#define ALC_DONT_CARE_SOFT 0x0002 +#define ALC_HRTF_STATUS_SOFT 0x1993 +#define ALC_HRTF_DISABLED_SOFT 0x0000 +#define ALC_HRTF_ENABLED_SOFT 0x0001 +#define ALC_HRTF_DENIED_SOFT 0x0002 +#define ALC_HRTF_REQUIRED_SOFT 0x0003 +#define ALC_HRTF_HEADPHONES_DETECTED_SOFT 0x0004 +#define ALC_HRTF_UNSUPPORTED_FORMAT_SOFT 0x0005 +#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994 +#define ALC_HRTF_SPECIFIER_SOFT 0x1995 +#define ALC_HRTF_ID_SOFT 0x1996 +typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index); +typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum paramName, ALCsizei index); +ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCint *attribs); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/external/openal_soft/include/AL/efx-presets.h b/external/openal_soft/include/AL/efx-presets.h index 86dcbda2f..8539fd517 100644 --- a/external/openal_soft/include/AL/efx-presets.h +++ b/external/openal_soft/include/AL/efx-presets.h @@ -345,7 +345,7 @@ typedef struct { /* Driving Presets */ #define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \ - { 1.0000f, 0.0000f, 3.1623f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + { 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } #define EFX_REVERB_PRESET_DRIVING_PITGARAGE \ { 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } diff --git a/external/openal_soft/lib/win32/libopenal32.a b/external/openal_soft/lib/win32/libOpenAL32.dll.a similarity index 71% rename from external/openal_soft/lib/win32/libopenal32.a rename to external/openal_soft/lib/win32/libOpenAL32.dll.a index 5f7352aca..1c4c63c8f 100644 Binary files a/external/openal_soft/lib/win32/libopenal32.a and b/external/openal_soft/lib/win32/libOpenAL32.dll.a differ diff --git a/external/openal_soft/openal32.dll b/external/openal_soft/openal32.dll index 71ced6a21..1e3bddd56 100644 Binary files a/external/openal_soft/openal32.dll and b/external/openal_soft/openal32.dll differ diff --git a/src/audio.c b/src/audio.c index 0c61c0fa8..c72b32aab 100644 --- a/src/audio.c +++ b/src/audio.c @@ -399,7 +399,7 @@ void CloseRawAudioContext(RawAudioContext ctx) CloseMixChannel(mixChannelsActive_g[ctx]); } -int BufferRawAudioContext(RawAudioContext ctx, void *data, int numberElements) +int BufferRawAudioContext(RawAudioContext ctx, void *data, unsigned short numberElements) { int numBuffered = 0; if(ctx >= 0) diff --git a/src/audio.h b/src/audio.h index 1140a60a8..ec00f7b5c 100644 --- a/src/audio.h +++ b/src/audio.h @@ -107,7 +107,7 @@ void SetMusicPitch(int index, float pitch); RawAudioContext InitRawAudioContext(int sampleRate, int channels, bool floatingPoint); void CloseRawAudioContext(RawAudioContext ctx); -int BufferRawAudioContext(RawAudioContext ctx, void *data, int numberElements); // returns number of elements buffered +int BufferRawAudioContext(RawAudioContext ctx, void *data, unsigned short numberElements); // returns number of elements buffered #ifdef __cplusplus } diff --git a/src/raylib.h b/src/raylib.h index d0231be2b..a0cfc7a05 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -926,7 +926,7 @@ void SetMusicPitch(int index, float pitch); RawAudioContext InitRawAudioContext(int sampleRate, int channels, bool floatingPoint); void CloseRawAudioContext(RawAudioContext ctx); -int BufferRawAudioContext(RawAudioContext ctx, void *data, int numberElements); // returns number of elements buffered +int BufferRawAudioContext(RawAudioContext ctx, void *data, unsigned short numberElements); // returns number of elements buffered #ifdef __cplusplus }