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

Update dependencies, fix liblo and detect homebrew #281

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,26 @@ def vcpkg_path(root, pkg, triplet):
elif sys.platform == "darwin":
pkgs_3rdpary = {
#package flags: (include, lib, version)
"flac": (False, True, "1.4.2"),
"liblo": (True, True, "0.31"),
"flac": (False, True, "1.4.3"),
"liblo": (True, True, "0.32"),
"libogg": (False, True, "1.3.5"),
"libsndfile": (True, True, "1.2.0"),
"libsndfile": (True, True, "1.2.2"),
"libvorbis": (False, True, "1.3.7"),
"opus": (False, True, "1.3.1"),
"opus": (False, True, "1.5.2"),
"portaudio": (True, True, "19.7.0"),
"portmidi": (True, True, "2.0.4"),
"portmidi": (True, True, "2.0.4_1"),
"lame": (False, True, "3.100"),
"mpg123": (False, True, "1.31.2"),
"mpg123": (False, True, "1.32.7"),
}

# Intel: /usr/local/Cellar
# arm64: /opt/homebrew/Cellar
brew_packages_root = os.environ.get("BREW_PACKAGES_ROOT", "/usr/local/Cellar")
mac_arch = arch = platform.machine()
if mac_arch == "arm64":
brew_default_root = "/opt/homebrew/Cellar"
else:
brew_default_root = "/usr/local/Cellar"
brew_packages_root = os.environ.get("BREW_PACKAGES_ROOT", brew_default_root)

include_dirs = ["include"]
library_dirs = []
Expand Down
5 changes: 3 additions & 2 deletions src/engine/osclistenermodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ OscListener_get(OscListener *self)
Py_RETURN_NONE;
}

/* lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') */
int process_osc(const char *path, const char *types, lo_arg **argv, int argc,
void *data, void *user_data)
lo_message data, void *user_data)
{
OscListener *server = (OscListener *)user_data;
PyObject *tup;
lo_blob *blob = NULL;
lo_blob blob = NULL;
char *blobdata = NULL;
uint32_t blobsize = 0;
PyObject *charlist = NULL;
Expand Down
17 changes: 10 additions & 7 deletions src/objects/oscmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ typedef struct
PyObject *address_path;
} OscReceiver;

/* lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') */
int OscReceiver_handler(const char *path, const char *types, lo_arg **argv, int argc,
void *data, void *user_data)
lo_message data, void *user_data)
{
OscReceiver *self = user_data;
PyObject *pathObj = PyUnicode_FromString(path);
Expand Down Expand Up @@ -787,9 +788,9 @@ OscDataSend_compute_next_data_frame(OscDataSend *self)
PyObject *datalist = NULL;
char *blobdata = NULL;
uint8_t midi[4];
lo_blob *blob = NULL;
lo_blob blob = NULL;
const char *path = NULL;
lo_message *msg;
lo_message msg;

while (self->something_to_send)
{
Expand Down Expand Up @@ -1052,12 +1053,13 @@ typedef struct
int port;
} OscDataReceive;

/* lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') */
int OscDataReceive_handler(const char *path, const char *types, lo_arg **argv, int argc,
void *data, void *user_data)
lo_message data, void *user_data)
{
OscDataReceive *self = user_data;
PyObject *tup, *result = NULL;
lo_blob *blob = NULL;
lo_blob blob = NULL;
char *blobdata = NULL;
uint32_t blobsize = 0;
PyObject *charlist = NULL;
Expand Down Expand Up @@ -1366,8 +1368,9 @@ typedef struct
int num;
} OscListReceiver;

/* lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') */
int OscListReceiver_handler(const char *path, const char *types, lo_arg **argv, int argc,
void *data, void *user_data)
lo_message data, void *user_data)
{
OscListReceiver *self = user_data;

Expand Down Expand Up @@ -1945,4 +1948,4 @@ PyTypeObject OscListReceiveType =
0, /* tp_init */
0, /* tp_alloc */
OscListReceive_new, /* tp_new */
};
};
Loading