Skip to content

Commit

Permalink
openal: Add OpenAL 1.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JayFoxRox committed Apr 14, 2020
1 parent 5f465f2 commit 8a603b1
Show file tree
Hide file tree
Showing 9 changed files with 2,953 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include $(NXDK_DIR)/lib/usb/Makefile
include $(NXDK_DIR)/lib/xboxrt/Makefile
include $(NXDK_DIR)/lib/zlib/Makefile
include $(NXDK_DIR)/lib/libpng/Makefile
include $(NXDK_DIR)/lib/openal/Makefile
108 changes: 108 additions & 0 deletions lib/openal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
OPENAL_DIR = $(NXDK_DIR)/lib/openal
OPENAL_SOFT_DIR = $(OPENAL_DIR)/openal-soft

OPENAL_SOFT_COMMON_SRCS = \
$(OPENAL_SOFT_DIR)/common/alcomplex.c \
$(OPENAL_SOFT_DIR)/common/almalloc.c \
$(OPENAL_SOFT_DIR)/common/atomic.c \
$(OPENAL_SOFT_DIR)/common/rwlock.c \
$(OPENAL_SOFT_DIR)/common/threads.c \
$(OPENAL_SOFT_DIR)/common/uintmap.c

OPENAL_SOFT_OPENAL_SRCS = \
$(OPENAL_SOFT_DIR)/OpenAL32/alAuxEffectSlot.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alBuffer.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alEffect.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alError.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alExtension.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alFilter.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alListener.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alSource.c \
$(OPENAL_SOFT_DIR)/OpenAL32/alState.c \
$(OPENAL_SOFT_DIR)/OpenAL32/event.c \
$(OPENAL_SOFT_DIR)/OpenAL32/sample_cvt.c

OPENAL_SOFT_ALC_SRCS = \
$(OPENAL_SOFT_DIR)/Alc/ALc.c \
$(OPENAL_SOFT_DIR)/Alc/ALu.c \
$(OPENAL_SOFT_DIR)/Alc/alconfig.c \
$(OPENAL_SOFT_DIR)/Alc/bs2b.c \
$(OPENAL_SOFT_DIR)/Alc/converter.c \
$(OPENAL_SOFT_DIR)/Alc/mastering.c \
$(OPENAL_SOFT_DIR)/Alc/ringbuffer.c \
$(OPENAL_SOFT_DIR)/Alc/effects/chorus.c \
$(OPENAL_SOFT_DIR)/Alc/effects/compressor.c \
$(OPENAL_SOFT_DIR)/Alc/effects/dedicated.c \
$(OPENAL_SOFT_DIR)/Alc/effects/distortion.c \
$(OPENAL_SOFT_DIR)/Alc/effects/echo.c \
$(OPENAL_SOFT_DIR)/Alc/effects/equalizer.c \
$(OPENAL_SOFT_DIR)/Alc/effects/fshifter.c \
$(OPENAL_SOFT_DIR)/Alc/effects/modulator.c \
$(OPENAL_SOFT_DIR)/Alc/effects/null.c \
$(OPENAL_SOFT_DIR)/Alc/effects/pshifter.c \
$(OPENAL_SOFT_DIR)/Alc/effects/reverb.c \
$(OPENAL_SOFT_DIR)/Alc/filters/filter.c \
$(OPENAL_SOFT_DIR)/Alc/filters/nfc.c \
$(OPENAL_SOFT_DIR)/Alc/filters/splitter.c \
\
$(OPENAL_SOFT_DIR)/Alc/hrtf.c \
$(OPENAL_SOFT_DIR)/Alc/uhjfilter.c \
$(OPENAL_SOFT_DIR)/Alc/ambdec.c \
$(OPENAL_SOFT_DIR)/Alc/bformatdec.c \
$(OPENAL_SOFT_DIR)/Alc/panning.c \
$(OPENAL_SOFT_DIR)/Alc/mixvoice.c \
$(OPENAL_SOFT_DIR)/Alc/mixer/mixer_c.c

#$(OPENAL_SOFT_DIR)/Alc/helpers.c \
OPENAL_SOFT_SRCS = \
$(OPENAL_SOFT_COMMON_SRCS) \
$(OPENAL_SOFT_OPENAL_SRCS) \
$(OPENAL_SOFT_ALC_SRCS) \
$(OPENAL_SOFT_DIR)/router/al.c \
$(OPENAL_SOFT_DIR)/router/alc.c \
$(OPENAL_SOFT_DIR)/router/router.c

OPENAL_SOFT_OBJS = $(addsuffix .obj, $(basename $(OPENAL_SOFT_SRCS)))

NXDK_CFLAGS := \
-I $(OPENAL_DIR) \
-I $(OPENAL_SOFT_DIR) \
-iquote $(OPENAL_SOFT_DIR)/common \
-I $(OPENAL_SOFT_DIR)/OpenAL32/Include \
-I $(OPENAL_SOFT_DIR)/Alc \
-I $(OPENAL_SOFT_DIR)/include \
${NXDK_CFLAGS} \
-idirafter $(OPENAL_SOFT_DIR)/common

NXDK_CFLAGS += -DAL_LIBTYPE_STATIC
NXDK_CFLAGS += -DHAVE_STRUCT_TIMESPEC

#FIXME: Move to winapi
NXDK_CFLAGS += -DEXCEPTION_CONTINUE_EXECUTION=-1
NXDK_CFLAGS += -DHMODULE=void*
NXDK_CFLAGS += -DAPIENTRY=
NXDK_CFLAGS += -DWIN32_FIND_DATAW=WIN32_FIND_DATAA
NXDK_CFLAGS += -DHINSTANCE=void*
NXDK_CFLAGS += -DDLL_PROCESS_ATTACH=0
NXDK_CFLAGS += -DDLL_THREAD_ATTACH=1
NXDK_CFLAGS += -DDLL_THREAD_DETACH=2
NXDK_CFLAGS += -DDLL_PROCESS_DETACH=3

#NXDK_CXXFLAGS += -DCreateFileW\(...\)=INVALID_HANDLE_VALUE
#NXDK_CXXFLAGS += -DLoadLibraryW\(...\)=NULL
#NXDK_CXXFLAGS += -DGetProcAddress\(...\)=NULL
#NXDK_CXXFLAGS += -DFreeLibrary\(...\)=0
#NXDK_CXXFLAGS += -D_wgetenv\(...\)=NULL
#NXDK_CXXFLAGS += -DWideCharToMultiByte\(...\)=0
#NXDK_CXXFLAGS += -DMultiByteToWideChar\(...\)=0

$(NXDK_DIR)/lib/libopenal.lib: $(OPENAL_SOFT_OBJS)

main.exe: $(NXDK_DIR)/lib/libopenal.lib

CLEANRULES += clean-openal

.PHONY: clean-openal
clean-openal:
$(VE)rm -f $(OPENAL_SOFT_OBJS) $(NXDK_DIR)/lib/libopenal.lib
2,603 changes: 2,603 additions & 0 deletions lib/openal/bsinc_inc.h

Large diffs are not rendered by default.

231 changes: 231 additions & 0 deletions lib/openal/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
/* API declaration export attribute */
#define AL_API
#define ALC_API

/* Define any available alignment declaration */
#define ALIGN(x) __attribute__((aligned(x)))

/* Define a built-in call indicating an aligned data pointer */
//FIXME: #define ASSUME_ALIGNED(x, y) ${ASSUME_ALIGNED_DECL}

/* Define if HRTF data is embedded in the library */
//FIXME: #cmakedefine ALSOFT_EMBED_HRTF_DATA

/* Define if we have the sysconf function */
//FIXME: #cmakedefine HAVE_SYSCONF

/* Define if we have the C11 aligned_alloc function */
//FIXME: #cmakedefine HAVE_ALIGNED_ALLOC

/* Define if we have the posix_memalign function */
//FIXME: #cmakedefine HAVE_POSIX_MEMALIGN

/* Define if we have the _aligned_malloc function */
//FIXME: #cmakedefine HAVE__ALIGNED_MALLOC

/* Define if we have the proc_pidpath function */
//FIXME: #cmakedefine HAVE_PROC_PIDPATH

/* Define if we have the getopt function */
//FIXME: #cmakedefine HAVE_GETOPT

/* Define if we have SSE CPU extensions */
#define HAVE_SSE
#undef HAVE_SSE2
#undef HAVE_SSE3
#undef HAVE_SSE4_1

/* Define if we have ARM Neon CPU extensions */
#undef HAVE_NEON

/* Define if we have the ALSA backend */
#undef HAVE_ALSA

/* Define if we have the OSS backend */
#undef HAVE_OSS

/* Define if we have the Solaris backend */
#undef HAVE_SOLARIS

/* Define if we have the SndIO backend */
#undef HAVE_SNDIO

/* Define if we have the QSA backend */
#undef HAVE_QSA

/* Define if we have the WASAPI backend */
#undef HAVE_WASAPI

/* Define if we have the DSound backend */
#undef HAVE_DSOUND

/* Define if we have the Windows Multimedia backend */
#undef HAVE_WINMM

/* Define if we have the PortAudio backend */
#undef HAVE_PORTAUDIO

/* Define if we have the PulseAudio backend */
#undef HAVE_PULSEAUDIO

/* Define if we have the JACK backend */
#undef HAVE_JACK

/* Define if we have the CoreAudio backend */
#undef HAVE_COREAUDIO

/* Define if we have the OpenSL backend */
#undef HAVE_OPENSL

/* Define if we have the Wave Writer backend */
#undef HAVE_WAVE

/* Define if we have the SDL2 backend */
#define HAVE_SDL2

/* Define if we have the stat function */
//FIXME: #cmakedefine HAVE_STAT

/* Define if we have the lrintf function */
//FIXME: #cmakedefine HAVE_LRINTF

/* Define if we have the modff function */
//FIXME: #cmakedefine HAVE_MODFF

/* Define if we have the log2f function */
//FIXME: #cmakedefine HAVE_LOG2F

/* Define if we have the cbrtf function */
//FIXME: #cmakedefine HAVE_CBRTF

/* Define if we have the copysignf function */
//FIXME: #cmakedefine HAVE_COPYSIGNF

/* Define if we have the strtof function */
//FIXME: #cmakedefine HAVE_STRTOF

/* Define if we have the strnlen function */
#define HAVE_STRNLEN

/* Define if we have the __int64 type */
//FIXME: #cmakedefine HAVE___INT64

/* Define to the size of a long int type */
#define SIZEOF_LONG sizeof(long)

/* Define to the size of a long long int type */
#define SIZEOF_LONG_LONG sizeof(long long)

/* Define if we have C99 _Bool support */
#define HAVE_C99_BOOL

/* Define if we have C11 _Static_assert support */
#define HAVE_C11_STATIC_ASSERT

/* Define if we have C11 _Alignas support */
//FIXME: #cmakedefine HAVE_C11_ALIGNAS

/* Define if we have C11 _Atomic support */
//FIXME: #cmakedefine HAVE_C11_ATOMIC

/* Define if we have GCC's destructor attribute */
#define HAVE_GCC_DESTRUCTOR

/* Define if we have GCC's format attribute */
//FIXME: #cmakedefine HAVE_GCC_FORMAT

/* Define if we have stdint.h */
#define HAVE_STDINT_H

/* Define if we have stdbool.h */
#define HAVE_STDBOOL_H

/* Define if we have stdalign.h */
//FIXME: #cmakedefine HAVE_STDALIGN_H

/* Define if we have windows.h */
#define HAVE_WINDOWS_H

/* Define if we have dlfcn.h */
//FIXME: #cmakedefine HAVE_DLFCN_H

/* Define if we have pthread_np.h */
//FIXME: #cmakedefine HAVE_PTHREAD_NP_H

/* Define if we have malloc.h */
//FIXME: #cmakedefine HAVE_MALLOC_H

/* Define if we have dirent.h */
#undef HAVE_DIRENT_H

/* Define if we have strings.h */
#define HAVE_STRINGS_H

/* Define if we have cpuid.h */
//FIXME: #cmakedefine HAVE_CPUID_H

/* Define if we have intrin.h */
//FIXME: #cmakedefine HAVE_INTRIN_H

/* Define if we have sys/sysconf.h */
//FIXME: #cmakedefine HAVE_SYS_SYSCONF_H

/* Define if we have guiddef.h */
//FIXME: #cmakedefine HAVE_GUIDDEF_H

/* Define if we have initguid.h */
//FIXME: #cmakedefine HAVE_INITGUID_H

/* Define if we have ieeefp.h */
//FIXME: #cmakedefine HAVE_IEEEFP_H

/* Define if we have float.h */
#define HAVE_FLOAT_H

/* Define if we have fenv.h */
//FIXME: #cmakedefine HAVE_FENV_H

/* Define if we have GCC's __get_cpuid() */
//FIXME: #cmakedefine HAVE_GCC_GET_CPUID

/* Define if we have the __cpuid() intrinsic */
//FIXME: #cmakedefine HAVE_CPUID_INTRINSIC

/* Define if we have the _BitScanForward64() intrinsic */
//FIXME: #cmakedefine HAVE_BITSCANFORWARD64_INTRINSIC

/* Define if we have the _BitScanForward() intrinsic */
//FIXME: #cmakedefine HAVE_BITSCANFORWARD_INTRINSIC

/* Define if we have _controlfp() */
//FIXME: #cmakedefine HAVE__CONTROLFP

/* Define if we have __control87_2() */
//FIXME: #cmakedefine HAVE___CONTROL87_2

/* Define if we have pthread_setschedparam() */
//FIXME: #cmakedefine HAVE_PTHREAD_SETSCHEDPARAM

/* Define if we have pthread_setname_np() */
//FIXME: #cmakedefine HAVE_PTHREAD_SETNAME_NP

/* Define if pthread_setname_np() only accepts one parameter */
//FIXME: #cmakedefine PTHREAD_SETNAME_NP_ONE_PARAM

/* Define if pthread_setname_np() accepts three parameters */
//FIXME: #cmakedefine PTHREAD_SETNAME_NP_THREE_PARAMS

/* Define if we have pthread_set_name_np() */
//FIXME: #cmakedefine HAVE_PTHREAD_SET_NAME_NP

/* Define if we have pthread_mutexattr_setkind_np() */
//FIXME: #cmakedefine HAVE_PTHREAD_MUTEXATTR_SETKIND_NP

/* Define if we have pthread_mutex_timedlock() */
//FIXME: #cmakedefine HAVE_PTHREAD_MUTEX_TIMEDLOCK


// Some includes (required because some files don't include the right headers?)
#define AL_ALEXT_PROTOTYPES
#include <AL/efx.h>
#include <stdio.h>
Empty file added lib/openal/memory.h
Empty file.
Empty file added lib/openal/mmsystem.h
Empty file.
2 changes: 1 addition & 1 deletion lib/openal/openal-soft
Submodule openal-soft updated 326 files
1 change: 1 addition & 0 deletions lib/openal/shlobj.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define SHGetSpecialFolderPathW(...) FALSE
8 changes: 8 additions & 0 deletions lib/openal/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* Define to the library version */
#define ALSOFT_VERSION "1.19.1"

/* Define the branch being built */
#define ALSOFT_GIT_BRANCH "HEAD"

/* Define the hash of the head commit */
#define ALSOFT_GIT_COMMIT_HASH "6761218e"

0 comments on commit 8a603b1

Please sign in to comment.