diff --git a/Makefile.am b/Makefile.am index 866be3d..24e0996 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ bin_PROGRAMS = jackd jack_simple_client jack_monitor_client @XTRA@ AM_CFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" @GLIB_CFLAGS@ -AM_CXXFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" @GLIB_CFLAGS@ +AM_CXXFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" jackd_SOURCES = jackd.c engine.c jackd_LDFLAGS = -L. -ljack -lltdl -lpthread $(GLIB_LIBS) diff --git a/TODO b/TODO index 89e8068..fccfac3 100644 --- a/TODO +++ b/TODO @@ -17,6 +17,4 @@ multiple port buffer shm segments (i.e. dynamically increase the total number of ports in the system) wingo (apwingo@eos.ncsu.edu) adds: - - remove glib dependency from api. using it internally is one thing, - but the return value of one function (list_ports()) should not - introduce this dependency. + - add helper functions to access _jack_port_shared without requiring glib diff --git a/conftest b/conftest deleted file mode 100755 index 39e41ff..0000000 Binary files a/conftest and /dev/null differ diff --git a/conftest.c b/conftest.c deleted file mode 100644 index cb8c7a5..0000000 --- a/conftest.c +++ /dev/null @@ -1 +0,0 @@ -static int dummy; diff --git a/fltk_client.cc b/fltk_client.cc index 9c7b5a4..c442f08 100644 --- a/fltk_client.cc +++ b/fltk_client.cc @@ -81,11 +81,11 @@ main (int argc, char *argv[]) printf ("client activated\n"); - if (jack_port_connect (client, "ALSA I/O:Input 1", my_input_port->shared->name)) { + if (jack_port_connect (client, "ALSA I/O:Input 1", "myinput")) { fprintf (stderr, "cannot connect input ports\n"); } - if (jack_port_connect (client, my_output_port->shared->name, "ALSA I/O:Output 1")) { + if (jack_port_connect (client, "myoutput", "ALSA I/O:Output 1")) { fprintf (stderr, "cannot connect output ports\n"); } diff --git a/jack/jack.h b/jack/jack.h index e6c44e3..86f0183 100644 --- a/jack/jack.h +++ b/jack/jack.h @@ -25,9 +25,7 @@ extern "C" { #endif -#include #include -#include #include jack_client_t *jack_client_new (const char *client_name); @@ -188,8 +186,8 @@ unsigned long jack_get_sample_rate (jack_client_t *); nframes_t jack_get_buffer_size (jack_client_t *); -/* This function returns a list of ports that match the specified - arguments. +/* This function returns a NULL-terminated array of ports that match the + specified arguments. port_name_pattern: a regular expression used to select ports by name. if NULL or of zero length, no selection based on @@ -203,10 +201,10 @@ nframes_t jack_get_buffer_size (jack_client_t *); zero, no selection based on flags will be carried out. */ -GSList *jack_get_ports (jack_client_t *, - const char *port_name_pattern, - const char *type_name_pattern, - unsigned long flags); +jack_port_t **jack_get_ports (jack_client_t *, + const char *port_name_pattern, + const char *type_name_pattern, + unsigned long flags); /* If a client is told to become the timebase for the entire system, it calls this function. If it returns zero, then the client has diff --git a/monitor_client.c b/monitor_client.c index 123458e..c7bb098 100644 --- a/monitor_client.c +++ b/monitor_client.c @@ -3,6 +3,9 @@ #include +#define TRUE 1 +#define FALSE 0 + int main (int argc, char *argv[]) diff --git a/simple_client.c b/simple_client.c index 83bbb9a..223fdb0 100644 --- a/simple_client.c +++ b/simple_client.c @@ -66,11 +66,11 @@ main (int argc, char *argv[]) printf ("client activated\n"); - if (jack_port_connect (client, "ALSA I/O:Input 1", my_input_port->shared->name)) { + if (jack_port_connect (client, "ALSA I/O:Input 1", "myinput")) { fprintf (stderr, "cannot connect input ports\n"); } - if (jack_port_connect (client, my_output_port->shared->name, "ALSA I/O:Output 1")) { + if (jack_port_connect (client, "myoutput", "ALSA I/O:Output 1")) { fprintf (stderr, "cannot connect output ports\n"); }