forked from XboxDev/nxdk
-
Notifications
You must be signed in to change notification settings - Fork 0
OpenAL-soft 1.19.1 #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JayFoxRox
wants to merge
12
commits into
master
Choose a base branch
from
openal-1.19
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
deb790d
libc: Implement case-insensitive string comparison functions
thrimbor 68f4170
attempt to fix include order
JayFoxRox 0242671
openal: Add OpenAL 1.19.1
JayFoxRox 18137c1
samples: Add openal
JayFoxRox ded30ee
Move helpers to add hacks
JayFoxRox 39ab0e1
Remove router, add forgotten SSE
JayFoxRox 94d9180
Add defines for case-insensitive comparisons
JayFoxRox b1edf9a
add workaround for DebugBreak
JayFoxRox 26aa299
Fix config and embed HRTF tables
JayFoxRox c239164
Include winnt.h from windows.h
JayFoxRox d299d13
Add LONG64 and PLONG64 types
JayFoxRox 82db36f
Add hacky implementations for interlocked exchange functions
JayFoxRox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_DIR)/helpers.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_SRCS = \ | ||
$(OPENAL_SOFT_COMMON_SRCS) \ | ||
$(OPENAL_SOFT_OPENAL_SRCS) \ | ||
$(OPENAL_SOFT_ALC_SRCS) \ | ||
$(OPENAL_SOFT_DIR)/Alc/mixer/mixer_sse.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 | ||
|
||
NXDK_CFLAGS += -Dstrcasecmp=_stricmp | ||
NXDK_CFLAGS += -Dstrncasecmp=_strnicmp | ||
|
||
#FIXME: Move to winapi | ||
NXDK_CFLAGS += -DDebugBreak\(\)=assert\(0\) | ||
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 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
/* 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 */ | ||
#define ASSUME_ALIGNED(x, y) __builtin_assume_aligned(x, y) | ||
|
||
/* Define if HRTF data is embedded in the library */ | ||
//FIXME: Make this optional? These files consume RAM, even if not used | ||
#define 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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this necessary? |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire block should be elsewhere