fixed all targets (linux only), to test android and ios
This commit is contained in:
parent
c73b6ecbe3
commit
c833bae2af
@ -21,6 +21,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
#include "data.h"
|
||||
#include "plugin.h"
|
||||
|
||||
@ -225,7 +232,13 @@ JNI_FUNC(nativeAudioStart)(JNIEnv* env, jobject thiz) {
|
||||
if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS)
|
||||
return false;
|
||||
|
||||
plugin_init(&instance);
|
||||
plugin_callbacks cbs = {
|
||||
/* .handle = */ NULL,
|
||||
/* .format = */ "android",
|
||||
/* .get_bindir = */ NULL,
|
||||
/* .get_datadir = */ NULL
|
||||
};
|
||||
plugin_init(&instance, &cbs);
|
||||
|
||||
#if PARAMETERS_N > 0
|
||||
for (size_t i = 0; i < PARAMETERS_N; i++) {
|
||||
|
@ -21,6 +21,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
#include "data.h"
|
||||
#include "plugin.h"
|
||||
|
||||
@ -352,7 +359,13 @@ int main(int argc, char * argv[]) {
|
||||
printf(" %s: %g\n", param_data[i].id, param_values[i]);
|
||||
#endif
|
||||
|
||||
plugin_init(&instance);
|
||||
plugin_callbacks cbs = {
|
||||
/* .handle = */ NULL,
|
||||
/* .format = */ "cmd",
|
||||
/* .get_bindir = */ NULL,
|
||||
/* .get_datadir = */ NULL
|
||||
};
|
||||
plugin_init(&instance, &cbs);
|
||||
|
||||
#if PARAMETERS_N > 0
|
||||
for (size_t i = 0; i < PARAMETERS_N; i++)
|
||||
|
@ -21,6 +21,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
#include "data.h"
|
||||
#include "plugin.h"
|
||||
|
||||
@ -168,7 +175,13 @@ int main() {
|
||||
hardware.SetAudioBlockSize(BLOCK_SIZE);
|
||||
float sample_rate = hardware.AudioSampleRate();
|
||||
|
||||
plugin_init(&instance);
|
||||
plugin_callbacks cbs = {
|
||||
/* .handle = */ NULL,
|
||||
/* .format = */ "daisy-seed",
|
||||
/* .get_bindir = */ NULL,
|
||||
/* .get_datadir = */ NULL
|
||||
};
|
||||
plugin_init(&instance, &cbs);
|
||||
|
||||
plugin_set_sample_rate(&instance, sample_rate);
|
||||
if (plugin_mem_req(&instance) != 0)
|
||||
|
@ -21,6 +21,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
#include "data.h"
|
||||
#include "plugin.h"
|
||||
#if PARAMETERS_N > 0
|
||||
@ -252,7 +259,13 @@ char audioStart() {
|
||||
}
|
||||
#endif
|
||||
|
||||
plugin_init(&instance);
|
||||
plugin_callbacks cbs = {
|
||||
/* .handle = */ NULL,
|
||||
/* .format = */ "ios",
|
||||
/* .get_bindir = */ NULL,
|
||||
/* .get_datadir = */ NULL
|
||||
};
|
||||
plugin_init(&instance, &cbs);
|
||||
|
||||
#if PARAMETERS_N > 0
|
||||
for (size_t i = 0; i < PARAMETERS_N; i++) {
|
||||
@ -356,7 +369,7 @@ void audioPause() {
|
||||
|
||||
extern "C"
|
||||
void audioResume() {
|
||||
// TODO: couldn't this could fail?...
|
||||
// TODO: could this fail?...
|
||||
if (device_inited) {
|
||||
ma_device_init(NULL, &deviceConfig, &device);
|
||||
ma_device_start(&device);
|
||||
|
@ -70,6 +70,7 @@ endif
|
||||
|
||||
ifeq ($(UNAME_S), Linux)
|
||||
CFLAGS_ALL := $(CFLAGS_ALL) -D_GNU_SOURCE
|
||||
LDFLAGS_ALL := $(LDFLAGS_ALL) -ldl
|
||||
ifeq ($(HAS_UI), yes)
|
||||
CFLAGS_ALL := $(CFLAGS_ALL) $(shell pkg-config --cflags x11)
|
||||
LDFLAGS_ALL := $(LDFLAGS_ALL) $(shell pkg-config --libs x11)
|
||||
|
@ -21,6 +21,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
#include "data.h"
|
||||
#include "plugin.h"
|
||||
|
||||
@ -49,7 +56,13 @@ instance * processor_new(float sample_rate) {
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
|
||||
plugin_init(&i->p);
|
||||
plugin_callbacks cbs = {
|
||||
/* .handle = */ NULL,
|
||||
/* .format = */ "web",
|
||||
/* .get_bindir = */ NULL,
|
||||
/* .get_datadir = */ NULL
|
||||
};
|
||||
plugin_init(&i->p, &cbs);
|
||||
|
||||
#if DATA_PRODUCT_PARAMETERS_N > 0
|
||||
for (size_t j = 0; j < DATA_PRODUCT_PARAMETERS_N; j++)
|
||||
|
Loading…
Reference in New Issue
Block a user