fix bw_phase_gen and build on mac

This commit is contained in:
Stefano D'Angelo 2023-09-26 08:28:20 +02:00
parent 313ec711fe
commit 9d4d5759a0
6 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
build
node_modules
package-lock.json
.DS_Store

View File

@ -233,7 +233,7 @@ tresult PLUGIN_API Plugin::process(ProcessData &data) {
P_PROCESS(&instance, inputs, outputs, data.numSamples);
#if defined(__aarch64__)
__asm__ __volatile__ ("msr fpcr, %0" : : "=r"(fpcr));
__asm__ __volatile__ ("msr fpcr, %0" : : "r"(fpcr));
#elif defined(__i386__) || defined(__x86_64__)
_MM_SET_FLUSH_ZERO_MODE(flush_zero_mode);
_MM_SET_DENORMALS_ZERO_MODE(denormals_zero_mode);

View File

@ -17,7 +17,7 @@ OBJ_DIR := build/obj
OBJ_DIR_X86_64 := ${OBJ_DIR}/x86_64
OBJ_DIR_ARM64 := ${OBJ_DIR}/arm64
OBJ_COMMON_X86_64 := $(addprefix ${OBJ_DIR_X86_64}/common/, $(SOURCES_COMMON:.cpp=.o))
OBJ_VST3_SDK_X86_64 := $(addprefix ${OBJ_DIRX86_64}/vst3/, $(SOURCES_VST3_SDK:.cpp=.o))
OBJ_VST3_SDK_X86_64 := $(addprefix ${OBJ_DIR_X86_64}/vst3/, $(SOURCES_VST3_SDK:.cpp=.o))
OBJ_COMMON_ARM64 := $(addprefix ${OBJ_DIR_ARM64}/common/, $(SOURCES_COMMON:.cpp=.o))
OBJ_VST3_SDK_ARM64 := $(addprefix ${OBJ_DIR_ARM64}/vst3/, $(SOURCES_VST3_SDK:.cpp=.o))
@ -52,7 +52,7 @@ ${OBJ_DIR_ARM64}/vst3/%.o: ${VST3_SDK_DIR}/%.cpp
mkdir -p $(dir $@)
${CXX} $^ ${CXXFLAGS} -arch arm64 -c -o $@
build/tmp/${NAME}-x86_64: ${OBJ_COMMON_ARM64} ${OBJ_VST3_SDK_X86_64} ${OBJ_DIR_X86_64}/${NAME}.o | build/tmp
build/tmp/${NAME}-x86_64: ${OBJ_COMMON_X86_64} ${OBJ_VST3_SDK_X86_64} ${OBJ_DIR_X86_64}/${NAME}.o | build/tmp
${CXX} $^ ${LDFLAGS} -arch x86_64 -o $@
build/tmp/${NAME}-arm64: ${OBJ_COMMON_ARM64} ${OBJ_VST3_SDK_ARM64} ${OBJ_DIR_ARM64}/${NAME}.o | build/tmp

View File

@ -28,6 +28,7 @@ SOURCES_VST3_SDK := \
base/source/fstring.cpp \
base/source/fbuffer.cpp \
base/source/updatehandler.cpp \
base/source/fdebug.cpp \
base/thread/source/flock.cpp \
pluginterfaces/base/coreiids.cpp \
pluginterfaces/base/funknown.cpp \

View File

@ -999,7 +999,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
float phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0, y0 != nullptr ? y0.data() : nullptr, yInc0 != nullptr ? yInc0.data() : nullptr);
reset(phase0, y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
}
template<size_t N_CHANNELS>
@ -1016,7 +1016,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0.data(), y0 != nullptr ? y0.data() : nullptr, yInc0 != nullptr ? yInc0.data() : nullptr);
reset(phase0.data(), y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
}
template<size_t N_CHANNELS>

View File

@ -5,7 +5,7 @@ all: build/bw_math
./build/bw_math
build/bw_math: bw_math.c ../include/bw_math.h | build
${CC} ${CFLAGS} $^ -o $@
${CC} ${CFLAGS} bw_math.c -o $@
build:
mkdir -p $@