improve makefiles and handle unused params
This commit is contained in:
parent
6eb50a309b
commit
96068e3016
@ -6,7 +6,7 @@ else
|
||||
MIN_API := 26
|
||||
endif
|
||||
|
||||
JAVAC = javac
|
||||
JC = javac
|
||||
CXX = ${ANDROID_NDK_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi${MIN_API}-clang++
|
||||
|
||||
APKSIGNER = ${BUILD_TOOLS_DIR}/apksigner
|
||||
@ -29,30 +29,21 @@ CLASSES_PATH := $(subst .,/,$(JAVA_PACKAGE_NAME))
|
||||
CLASSES := \
|
||||
MainActivity \
|
||||
MainActivity$$WebAppInterface
|
||||
|
||||
ifeq (${HAS_MIDI_IN}, yes)
|
||||
CLASSES += MainActivity$$WebAppInterface$$MidiDeviceCallback MainActivity$$WebAppInterface$$1
|
||||
endif
|
||||
|
||||
CXXFLAGS := \
|
||||
-fPIC \
|
||||
-DNDEBUG \
|
||||
-DBW_NO_DEBUG \
|
||||
-O3 \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wpedantic \
|
||||
-std=c++11
|
||||
LDFLAGS := \
|
||||
-shared \
|
||||
-static-libstdc++ \
|
||||
-ljnigraphics \
|
||||
-llog \
|
||||
-landroid
|
||||
JFLAGS =
|
||||
|
||||
CXXFLAGS = -O3 -Wall -Wextra -Wpedantic
|
||||
CXXFLAGS_ALL = -fPIC -std=c++11 ${CXXFLAGS} ${CXXFLAGS_EXTRA}
|
||||
|
||||
LDFLAGS =
|
||||
LDFLAGS_ALL = -shared -static-libstdc++ -landroid
|
||||
ifeq (${HAS_MIDI_IN}, yes)
|
||||
LDFLAGS += -lamidi
|
||||
endif
|
||||
LDFLAGS_ALL += ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
|
||||
all: build/${BUNDLE_NAME}.apk
|
||||
|
||||
@ -73,10 +64,10 @@ build/apk/my_classes.jar: $(foreach class,$(CLASSES),build/obj/$(CLASSES_PATH)/$
|
||||
${D8} $(foreach class,$(CLASSES),'build/obj/$(CLASSES_PATH)/$(class).class') --min-api ${MIN_API} --output $@ --no-desugaring
|
||||
|
||||
build/obj/${CLASSES_PATH}/MainActivity.class: src/MainActivity.java | build/obj
|
||||
${JAVAC} -classpath "$(subst $() $(),:,$(JARS))" -d build/obj $^
|
||||
${JC} ${JFLAGS} -classpath "$(subst $() $(),:,$(JARS))" -d build/obj $^
|
||||
|
||||
build/apk/lib/armeabi-v7a/lib${BUNDLE_NAME}.so: src/jni.cpp | build/apk/lib/armeabi-v7a
|
||||
${CXX} $^ ${CXXFLAGS} ${CXXFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA} -o $@
|
||||
${CXX} $^ ${CXXFLAGS_ALL} ${LDFLAGS_ALL} -o $@
|
||||
|
||||
build/assets/index.html: src/index.html | build/assets
|
||||
cp $^ $@
|
||||
|
@ -11,7 +11,11 @@ endif
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -I${TINYWAV_DIR} -I${MIDI_PARSER_DIR}/include -O3 -fPIC -Wall -Wpedantic -Wextra -Wno-unused-parameter
|
||||
CFLAGS = -O3 -Wall -Wpedantic -Wextra
|
||||
CFLAGS_ALL = -I${TINYWAV_DIR} -I${MIDI_PARSER_DIR}/include -fPIC ${CFLAGS} ${CFLAGS_EXTRA}
|
||||
|
||||
LDFLAGS =
|
||||
LDFLAGS_ALL = ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
|
||||
PROGRAM = ${BUNDLE_NAME}${EXE_SUFFIX}
|
||||
|
||||
@ -23,10 +27,10 @@ build/${PROGRAM}: build/tmp/x86_64 build/tmp/arm64
|
||||
lipo -create -output $@ $^
|
||||
|
||||
build/tmp/x86_64: src/main.c src/data.h src/plugin.h ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c | build
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS_EXTRA} -arch x86_64
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch x86_64
|
||||
|
||||
build/tmp/arm64: src/main.c src/data.h src/plugin.h ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c | build
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS_EXTRA} -arch arm64
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch arm64
|
||||
|
||||
build/tmp:
|
||||
mkdir -p $@
|
||||
@ -34,7 +38,7 @@ build/tmp:
|
||||
else
|
||||
|
||||
build/${PROGRAM}: src/main.c src/data.h src/plugin.h ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c | build
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS_EXTRA}
|
||||
${CC} src/main.c ${TINYWAV_DIR}/tinywav.c ${MIDI_PARSER_DIR}/src/midi-parser.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
||||
|
||||
endif
|
||||
|
||||
|
@ -21,8 +21,11 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS = -O3 -fPIC -Wall -Wpedantic -Wextra -Wno-unused-parameter
|
||||
LDFLAGS = -shared
|
||||
CFLAGS = -O3 -Wall -Wpedantic -Wextra
|
||||
CFLAGS_ALL = -fPIC ${CFLAGS} ${CFLAGS_EXTRA}
|
||||
|
||||
LDFLAGS =
|
||||
LDFLAGS_ALL = -shared ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
|
||||
BUNDLE_DIR = ${BUNDLE_NAME}.lv2
|
||||
|
||||
@ -39,10 +42,10 @@ build/${BUNDLE_DIR}/${DLL_FILE}: build/tmp/x86_64 build/tmp/arm64 | build/${BUND
|
||||
lipo -create -output $@ $^
|
||||
|
||||
build/tmp/x86_64: src/lv2.c src/data.h src/plugin.h | build/tmp
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA} -arch x86_64
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch x86_64
|
||||
|
||||
build/tmp/arm64: src/lv2.c src/data.h src/plugin.h | build/tmp
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA} -arch arm64
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch arm64
|
||||
|
||||
build/tmp:
|
||||
mkdir -p $@
|
||||
@ -50,7 +53,7 @@ build/tmp:
|
||||
else
|
||||
|
||||
build/${BUNDLE_DIR}/${DLL_FILE}: src/lv2.c src/data.h | build/${BUNDLE_DIR}
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
||||
|
||||
endif
|
||||
|
||||
|
@ -49,6 +49,9 @@ typedef struct {
|
||||
} plugin_instance;
|
||||
|
||||
static LV2_Handle instantiate(const struct LV2_Descriptor * descriptor, double sample_rate, const char * bundle_path, const LV2_Feature * const * features) {
|
||||
(void)descriptor;
|
||||
(void)bundle_path;
|
||||
|
||||
plugin_instance *instance = malloc(sizeof(plugin_instance));
|
||||
if (instance == NULL)
|
||||
return NULL;
|
||||
|
@ -23,8 +23,11 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS = -O3 -fPIC -Wall -Wpedantic -Wextra -Wno-unused-parameter
|
||||
LDFLAGS = -shared -lm
|
||||
CFLAGS = -O3 -Wall -Wpedantic -Wextra
|
||||
CFLAGS_ALL = -fPIC ${CFLAGS} ${CFLAGS_EXTRA}
|
||||
|
||||
LDFLAGS =
|
||||
LDFLAGS_ALL = -shared -lm ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
|
||||
BUNDLE_DIR = ${BUNDLE_NAME}.vst3
|
||||
|
||||
@ -42,10 +45,10 @@ build/${BUNDLE_DIR}/${DLL_FILE}: build/tmp/x86_64 build/tmp/arm64 | buindle/${BU
|
||||
lipo -create -output $@ $^
|
||||
|
||||
build/tmp/x86_64: src/vst3.c src/data.h src/plugin.h | build/tmp
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA} -arch x86_64
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch x86_64
|
||||
|
||||
build/tmp/arm64: src/vst3.c src/data.h src/plugin.h | build/tmp
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA} -arch arm64
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch arm64
|
||||
|
||||
build/tmp:
|
||||
mkdir -p $@
|
||||
@ -55,7 +58,7 @@ else
|
||||
all: build/${BUNDLE_DIR}/${DLL_FILE}
|
||||
|
||||
build/${BUNDLE_DIR}/${DLL_FILE}: src/vst3.c src/data.h | build/${BUNDLE_DIR}/${DLL_DIR}
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
${CC} src/vst3.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
||||
|
||||
endif
|
||||
|
||||
|
@ -174,6 +174,8 @@ static Steinberg_tresult pluginTerminate(void *thisInterface) {
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginGetControllerClassId(void *thisInterface, Steinberg_TUID classId) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin get controller class id %p %p\n", thisInterface, classId);
|
||||
if (classId != NULL) {
|
||||
memcpy(classId, dataControllerCID, sizeof(Steinberg_TUID));
|
||||
@ -183,11 +185,16 @@ static Steinberg_tresult pluginGetControllerClassId(void *thisInterface, Steinbe
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginSetIoMode(void *thisInterface, Steinberg_Vst_IoMode mode) {
|
||||
(void)thisInterface;
|
||||
(void)mode;
|
||||
|
||||
TRACE("plugin set io mode\n");
|
||||
return Steinberg_kNotImplemented;
|
||||
}
|
||||
|
||||
static Steinberg_int32 pluginGetBusCount(void *thisInterface, Steinberg_Vst_MediaType type, Steinberg_Vst_BusDirection dir) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin get bus count\n");
|
||||
if (type == Steinberg_Vst_MediaTypes_kAudio) {
|
||||
if (dir == Steinberg_Vst_BusDirections_kInput)
|
||||
@ -204,6 +211,8 @@ static Steinberg_int32 pluginGetBusCount(void *thisInterface, Steinberg_Vst_Medi
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginGetBusInfo(void* thisInterface, Steinberg_Vst_MediaType type, Steinberg_Vst_BusDirection dir, Steinberg_int32 index, struct Steinberg_Vst_BusInfo* bus) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin get bus info\n");
|
||||
if (index < 0)
|
||||
return Steinberg_kInvalidArgument;
|
||||
@ -244,6 +253,10 @@ static Steinberg_tresult pluginGetBusInfo(void* thisInterface, Steinberg_Vst_Med
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginGetRoutingInfo(void* thisInterface, struct Steinberg_Vst_RoutingInfo* inInfo, struct Steinberg_Vst_RoutingInfo* outInfo) {
|
||||
(void)thisInterface;
|
||||
(void)inInfo;
|
||||
(void)outInfo;
|
||||
|
||||
TRACE("plugin get routing info\n");
|
||||
return Steinberg_kNotImplemented;
|
||||
}
|
||||
@ -418,6 +431,8 @@ static Steinberg_uint32 pluginIAudioProcessorRelease(void *thisInterface) {
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginSetBusArrangements(void* thisInterface, Steinberg_Vst_SpeakerArrangement* inputs, Steinberg_int32 numIns, Steinberg_Vst_SpeakerArrangement* outputs, Steinberg_int32 numOuts) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin IAudioProcessor set bus arrangements\n");
|
||||
if (numIns < 0 || numOuts < 0)
|
||||
return Steinberg_kInvalidArgument;
|
||||
@ -442,6 +457,8 @@ static Steinberg_tresult pluginSetBusArrangements(void* thisInterface, Steinberg
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginGetBusArrangement(void* thisInterface, Steinberg_Vst_BusDirection dir, Steinberg_int32 index, Steinberg_Vst_SpeakerArrangement* arr) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin IAudioProcessor get bus arrangement\n");
|
||||
|
||||
#if DATA_PRODUCT_BUSES_AUDIO_INPUT_N > 0
|
||||
@ -462,11 +479,15 @@ static Steinberg_tresult pluginGetBusArrangement(void* thisInterface, Steinberg_
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginCanProcessSampleSize(void* thisInterface, Steinberg_int32 symbolicSampleSize) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin IAudioProcessor can process sample size\n");
|
||||
return symbolicSampleSize == Steinberg_Vst_SymbolicSampleSizes_kSample32 ? Steinberg_kResultOk : Steinberg_kNotImplemented;
|
||||
}
|
||||
|
||||
static Steinberg_uint32 pluginGetLatencySamples(void* thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin IAudioProcessor get latency samples\n");
|
||||
//TBD
|
||||
return 0;
|
||||
@ -480,6 +501,9 @@ static Steinberg_tresult pluginSetupProcessing(void* thisInterface, struct Stein
|
||||
}
|
||||
|
||||
static Steinberg_tresult pluginSetProcessing(void* thisInterface, Steinberg_TBool state) {
|
||||
(void)thisInterface;
|
||||
(void)state;
|
||||
|
||||
TRACE("plugin IAudioProcessor set processing\n");
|
||||
return Steinberg_kNotImplemented;
|
||||
}
|
||||
@ -652,6 +676,8 @@ static Steinberg_tresult pluginProcess(void* thisInterface, struct Steinberg_Vst
|
||||
}
|
||||
|
||||
static Steinberg_uint32 pluginGetTailSamples(void* thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("plugin IAudioProcessor get tail samples\n");
|
||||
//TBD
|
||||
return 0;
|
||||
@ -689,6 +715,8 @@ static Steinberg_uint32 pluginIProcessContextRequirementsRelease(void *thisInter
|
||||
return pluginRelease((pluginInstance *)((char *)thisInterface - offsetof(pluginInstance, vtblIProcessContextRequirements)));
|
||||
}
|
||||
static Steinberg_uint32 pluginGetProcessContextRequirements(void* thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
// TBD
|
||||
return 0;
|
||||
}
|
||||
@ -820,21 +848,31 @@ static Steinberg_tresult controllerSetComponentState(void* thisInterface, struct
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerSetState(void* thisInterface, struct Steinberg_IBStream* state) {
|
||||
(void)thisInterface;
|
||||
(void)state;
|
||||
|
||||
TRACE("controller set state\n");
|
||||
return Steinberg_kNotImplemented;
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerGetState(void* thisInterface, struct Steinberg_IBStream* state) {
|
||||
(void)thisInterface;
|
||||
(void)state;
|
||||
|
||||
TRACE("controller get state\n");
|
||||
return Steinberg_kNotImplemented;
|
||||
}
|
||||
|
||||
static Steinberg_int32 controllerGetParameterCount(void* thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller get parameter count\n");
|
||||
return DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N;
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerGetParameterInfo(void* thisInterface, Steinberg_int32 paramIndex, struct Steinberg_Vst_ParameterInfo* info) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller get parameter info\n");
|
||||
if (paramIndex < 0 || paramIndex >= DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N)
|
||||
return Steinberg_kResultFalse;
|
||||
@ -885,6 +923,8 @@ static void dToStr(double v, Steinberg_Vst_String128 s, int precision) {
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerGetParamStringByValue(void* thisInterface, Steinberg_Vst_ParamID id, Steinberg_Vst_ParamValue valueNormalized, Steinberg_Vst_String128 string) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller get param string by value\n");
|
||||
if (id >= DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N)
|
||||
return Steinberg_kResultFalse;
|
||||
@ -921,6 +961,8 @@ void TCharToD(Steinberg_Vst_TChar* s, double *v) {
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerGetParamValueByString(void* thisInterface, Steinberg_Vst_ParamID id, Steinberg_Vst_TChar* string, Steinberg_Vst_ParamValue* valueNormalized) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller get param value by string\n");
|
||||
if (id >= DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N)
|
||||
return Steinberg_kResultFalse;
|
||||
@ -931,11 +973,15 @@ static Steinberg_tresult controllerGetParamValueByString(void* thisInterface, St
|
||||
}
|
||||
|
||||
static Steinberg_Vst_ParamValue controllerNormalizedParamToPlain(void* thisInterface, Steinberg_Vst_ParamID id, Steinberg_Vst_ParamValue valueNormalized) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller normalized param to plain\n");
|
||||
return id >= DATA_PRODUCT_PARAMETERS_N ? valueNormalized : parameterMap(id, valueNormalized);
|
||||
}
|
||||
|
||||
static Steinberg_Vst_ParamValue controllerPlainParamToNormalized(void* thisInterface, Steinberg_Vst_ParamID id, Steinberg_Vst_ParamValue plainValue) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("controller plain param to normalized\n");
|
||||
return id >= DATA_PRODUCT_PARAMETERS_N ? plainValue : parameterUnmap(id, plainValue);
|
||||
}
|
||||
@ -977,6 +1023,9 @@ static Steinberg_tresult controllerSetComponentHandler(void* thisInterface, stru
|
||||
}
|
||||
|
||||
static struct Steinberg_IPlugView* controllerCreateView(void* thisInterface, Steinberg_FIDString name) {
|
||||
(void)thisInterface;
|
||||
(void)name;
|
||||
|
||||
TRACE("controller create view\n");
|
||||
//TBD
|
||||
return NULL;
|
||||
@ -1024,6 +1073,9 @@ static Steinberg_uint32 controllerIMidiMappingRelease (void* thisInterface) {
|
||||
}
|
||||
|
||||
static Steinberg_tresult controllerGetMidiControllerAssignment(void* thisInterface, Steinberg_int32 busIndex, Steinberg_int16 channel, Steinberg_Vst_CtrlNumber midiControllerNumber, Steinberg_Vst_ParamID* id) {
|
||||
(void)thisInterface;
|
||||
(void)channel;
|
||||
|
||||
TRACE("controller getMidiControllerAssignment\n");
|
||||
if (busIndex < 0 || busIndex >= DATA_PRODUCT_BUSES_MIDI_INPUT_N)
|
||||
return Steinberg_kInvalidArgument;
|
||||
@ -1071,16 +1123,22 @@ static Steinberg_tresult factoryQueryInterface(void *thisInterface, const Steinb
|
||||
}
|
||||
|
||||
static Steinberg_uint32 factoryAddRef(void *thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("factory add ref\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Steinberg_uint32 factoryRelease(void *thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("factory release\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Steinberg_tresult factoryGetFactoryInfo(void *thisInterface, struct Steinberg_PFactoryInfo * info) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("getFactoryInfo\n");
|
||||
strcpy(info->vendor, DATA_COMPANY_NAME);
|
||||
strcpy(info->url, DATA_COMPANY_URL);
|
||||
@ -1090,11 +1148,15 @@ static Steinberg_tresult factoryGetFactoryInfo(void *thisInterface, struct Stein
|
||||
}
|
||||
|
||||
static Steinberg_int32 factoryCountClasses(void *thisInterface) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("countClasses\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
static Steinberg_tresult factoryGetClassInfo(void *thisInterface, Steinberg_int32 index, struct Steinberg_PClassInfo * info) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("getClassInfo\n");
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -1119,6 +1181,8 @@ static Steinberg_tresult factoryGetClassInfo(void *thisInterface, Steinberg_int3
|
||||
}
|
||||
|
||||
static Steinberg_tresult factoryCreateInstance(void *thisInterface, Steinberg_FIDString cid, Steinberg_FIDString iid, void ** obj) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("createInstance\n");
|
||||
if (memcmp(cid, dataPluginCID, sizeof(Steinberg_TUID)) == 0) {
|
||||
TRACE(" plugin\n");
|
||||
@ -1175,6 +1239,8 @@ static Steinberg_tresult factoryCreateInstance(void *thisInterface, Steinberg_FI
|
||||
}
|
||||
|
||||
static Steinberg_tresult factoryGetClassInfo2(void* thisInterface, Steinberg_int32 index, struct Steinberg_PClassInfo2* info) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("getClassInfo2\n");
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -1209,6 +1275,8 @@ static Steinberg_tresult factoryGetClassInfo2(void* thisInterface, Steinberg_int
|
||||
}
|
||||
|
||||
static Steinberg_tresult factoryGetClassInfoUnicode(void* thisInterface, Steinberg_int32 index, struct Steinberg_PClassInfoW* info) {
|
||||
(void)thisInterface;
|
||||
|
||||
TRACE("getClassInfo unicode\n");
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -1243,6 +1311,9 @@ static Steinberg_tresult factoryGetClassInfoUnicode(void* thisInterface, Steinbe
|
||||
}
|
||||
|
||||
static Steinberg_tresult factorySetHostContext(void* thisInterface, struct Steinberg_FUnknown* context) {
|
||||
(void)thisInterface;
|
||||
(void)context;
|
||||
|
||||
TRACE("factory set host context\n");
|
||||
//XXX: Linux run loop...
|
||||
return Steinberg_kNotImplemented;
|
||||
@ -1291,6 +1362,8 @@ Steinberg_IPluginFactory * GetPluginFactory() {
|
||||
|
||||
EXPORT
|
||||
char ENTRY(void *handle) {
|
||||
(void)handle;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
include vars.mk
|
||||
|
||||
CC = clang
|
||||
CFLAGS = --target=wasm32 -flto -fvisibility=hidden -Ofast -Wall -Wextra -Wpedantic
|
||||
LDFLAGS = \
|
||||
|
||||
CFLAGS = -Ofast -Wall -Wpedantic -Wextra
|
||||
CFLAGS_ALL = --target=wasm32 -flto -fvisibility=hidden ${CFLAGS} ${CFLAGS_EXTRA}
|
||||
|
||||
LDFLAGS_ALL = \
|
||||
-Wl,--allow-undefined \
|
||||
-Wl,--no-entry \
|
||||
-Wl,--lto-O3 \
|
||||
@ -17,10 +20,10 @@ LDFLAGS = \
|
||||
-Wl,--export=processor_set_parameter \
|
||||
-Wl,-z,stack-size=$$((8*1024*1024)) \
|
||||
-nostdlib
|
||||
|
||||
ifeq (${HAS_MIDI_IN}, yes)
|
||||
LDFLAGS += -Wl,--export=processor_midi_msg_in
|
||||
LDFLAGS_ALL += -Wl,--export=processor_midi_msg_in
|
||||
endif
|
||||
LDFLAGS_ALL += ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
|
||||
ALL = build/${BUNDLE_NAME}.wasm build/${BUNDLE_NAME}_processor.js build/${BUNDLE_NAME}.js
|
||||
|
||||
@ -31,7 +34,7 @@ default: all
|
||||
all: ${ALL}
|
||||
|
||||
build/${BUNDLE_NAME}.wasm: src/data.h src/memset.h src/plugin.h src/walloc.h src/processor.c | build
|
||||
${CC} src/processor.c -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||
${CC} src/processor.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
||||
|
||||
build/${BUNDLE_NAME}_processor.js: src/processor.js | build
|
||||
cp $^ $@
|
||||
|
Loading…
Reference in New Issue
Block a user