Skip to content
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

OpenAL-soft 1.19.1 #72

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

OpenAL-soft 1.19.1 #72

wants to merge 12 commits into from

Conversation

JayFoxRox
Copy link
Owner

This is a port of the older OpenAL which still used C instead of C++. Alternative to #71

There are still various issues.

Compiles but does not link. Contains many hacks in config.h and Makefile.
Some files have been auto-generated by building on my host machine.

The sample has manually been backported to SDL_LoadWAV and remains untested.

@JayFoxRox JayFoxRox added the experiments Experiments (won't be merged) label Apr 14, 2020
// Some includes (required because some files don't include the right headers?)
#define AL_ALEXT_PROTOTYPES
#include <AL/efx.h>
#include <stdio.h>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

NXDK_CFLAGS += -DDLL_PROCESS_ATTACH=0
NXDK_CFLAGS += -DDLL_THREAD_ATTACH=1
NXDK_CFLAGS += -DDLL_THREAD_DETACH=2
NXDK_CFLAGS += -DDLL_PROCESS_DETACH=3
Copy link
Owner Author

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

$(OPENAL_SOFT_DIR)/Alc/mixvoice.c \
$(OPENAL_SOFT_DIR)/Alc/mixer/mixer_c.c

#$(OPENAL_SOFT_DIR)/Alc/helpers.c \
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove this from the gap above

@JayFoxRox JayFoxRox changed the title OpenAL 1.19.1 OpenAL-soft 1.19.1 Apr 14, 2020
static LONG64 InterlockedExchange64(LONG64 volatile *Target, LONG64 Value)
{
return __atomic_exchange_n(Target, Value, __ATOMIC_ACQ_REL);
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang already has these: https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/Builtins.def#L817

So it seems that this merely needs a function or macro to be created with the right signature.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even then, it doesn't provide 64 bit intrinsics on x86. So this is still a lot of work. It also needs to have _MSC_VER defined as ugly hack to deal with clang <intrin.h> header oddity (it attempts to include another intrin.h with #include_next).

OpenAL-soft 1.0 does not need it (no such code). OpenAL-1.19 does need it (custom hackery using this). OpenAL-1.20 does not need it (C++ atomics).

@JayFoxRox JayFoxRox added the depends Depends on some third-party (upstream or otherwise), so it's stuck label May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends Depends on some third-party (upstream or otherwise), so it's stuck experiments Experiments (won't be merged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants