From 754cf7e21cf1d7079ee46276ea8af0dc5fb30b50 Mon Sep 17 00:00:00 2001 From: Jeffrey Nelson Date: Sat, 17 Nov 2012 01:44:34 -0500 Subject: [PATCH 1/4] Updated depreciated jack_client_new function call --- libol/libol.c | 6 +++++- output/output.cpp | 5 ++++- tools/playilda.c | 5 ++++- tools/simulator.c | 6 +++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/libol/libol.c b/libol/libol.c index eb2385c..a3ba40c 100644 --- a/libol/libol.c +++ b/libol/libol.c @@ -229,6 +229,10 @@ static int process (nframes_t nframes, void *arg) int olInit(int buffer_count, int max_points) { int i; + char jack_client_name[] = "libol"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; + if (buffer_count < 2) return -1; @@ -257,7 +261,7 @@ int olInit(int buffer_count, int max_points) frames[i].audio_r = malloc(frames[i].pmax * sizeof(float)); } - if ((client = jack_client_new ("libol")) == 0) { + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { olLog ("jack server not running?\n"); return -1; } diff --git a/output/output.cpp b/output/output.cpp index 4fbda9b..6e76cda 100644 --- a/output/output.cpp +++ b/output/output.cpp @@ -226,13 +226,16 @@ int main (int argc, char *argv[]) { int retval; jack_client_t *client; + char jack_client_name[] = "output"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; QApplication app(argc, argv); OutputSettings settings; cfg = &settings.cfg; - if ((client = jack_client_new ("output")) == 0) { + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/tools/playilda.c b/tools/playilda.c index e0cf323..389df2e 100644 --- a/tools/playilda.c +++ b/tools/playilda.c @@ -459,6 +459,9 @@ int main (int argc, char *argv[]) char **argvp = &argv[1]; char *fname; jack_client_t *client; + char jack_client_name[] = "playilda"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; struct stat st1, st2; if (argc > 2 && !strcmp(argvp[0],"-s")) { @@ -478,7 +481,7 @@ int main (int argc, char *argv[]) pointrate = atoi(argvp[1]); } - if ((client = jack_client_new ("playilda")) == 0) { + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/tools/simulator.c b/tools/simulator.c index 8ca4bd9..0595375 100644 --- a/tools/simulator.c +++ b/tools/simulator.c @@ -231,7 +231,11 @@ void init_gl(int width, int height) int main (int argc, char *argv[]) { - if ((client = jack_client_new ("simulator")) == 0) { + char jack_client_name[] = "simulator"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; + + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } From 7cf82fc012fdc01041030eae567b8beabe2839de Mon Sep 17 00:00:00 2001 From: Jeffrey Nelson Date: Sat, 17 Nov 2012 02:02:46 -0500 Subject: [PATCH 2/4] updating more jack_client depreciated functions --- examples/circlescope.c | 5 ++++- examples/scope.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/circlescope.c b/examples/circlescope.c index 285de66..420c008 100644 --- a/examples/circlescope.c +++ b/examples/circlescope.c @@ -104,8 +104,11 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; + char jack_client_name[] = "circlescope"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; - if ((client = jack_client_new ("circlescope")) == 0) { + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/examples/scope.c b/examples/scope.c index 7a28741..8b0cddb 100644 --- a/examples/scope.c +++ b/examples/scope.c @@ -104,8 +104,11 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; + char jack_client_name[] = "scope"; + jack_status_t jack_status; + jack_options_t jack_options = JackNullOption; - if ((client = jack_client_new ("circlescope")) == 0) { + if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } From e1f6bcce5e87a73d9a6d6de1c7e5607da0fdfd3b Mon Sep 17 00:00:00 2001 From: Jeffrey Nelson Date: Tue, 5 Feb 2013 21:00:59 -0500 Subject: [PATCH 3/4] picky picky code practices :) --- examples/circlescope.c | 5 ++--- examples/scope.c | 5 ++--- libol/libol.c | 5 ++--- output/output.cpp | 5 ++--- tools/playilda.c | 5 ++--- tools/simulator.c | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/examples/circlescope.c b/examples/circlescope.c index 420c008..52bb3d8 100644 --- a/examples/circlescope.c +++ b/examples/circlescope.c @@ -104,11 +104,10 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; - char jack_client_name[] = "circlescope"; + const char jack_client_name[] = "circlescope"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/examples/scope.c b/examples/scope.c index 8b0cddb..5b32660 100644 --- a/examples/scope.c +++ b/examples/scope.c @@ -104,11 +104,10 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; - char jack_client_name[] = "scope"; + const char jack_client_name[] = "scope"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/libol/libol.c b/libol/libol.c index a3ba40c..880cea4 100644 --- a/libol/libol.c +++ b/libol/libol.c @@ -229,9 +229,8 @@ static int process (nframes_t nframes, void *arg) int olInit(int buffer_count, int max_points) { int i; - char jack_client_name[] = "libol"; + const char jack_client_name[] = "libol"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; if (buffer_count < 2) return -1; @@ -261,7 +260,7 @@ int olInit(int buffer_count, int max_points) frames[i].audio_r = malloc(frames[i].pmax * sizeof(float)); } - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { olLog ("jack server not running?\n"); return -1; } diff --git a/output/output.cpp b/output/output.cpp index 6e76cda..8182dfb 100644 --- a/output/output.cpp +++ b/output/output.cpp @@ -226,16 +226,15 @@ int main (int argc, char *argv[]) { int retval; jack_client_t *client; - char jack_client_name[] = "output"; + const char jack_client_name[] = "output"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; QApplication app(argc, argv); OutputSettings settings; cfg = &settings.cfg; - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/tools/playilda.c b/tools/playilda.c index 389df2e..1cd2edc 100644 --- a/tools/playilda.c +++ b/tools/playilda.c @@ -459,9 +459,8 @@ int main (int argc, char *argv[]) char **argvp = &argv[1]; char *fname; jack_client_t *client; - char jack_client_name[] = "playilda"; + const char jack_client_name[] = "playilda"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; struct stat st1, st2; if (argc > 2 && !strcmp(argvp[0],"-s")) { @@ -481,7 +480,7 @@ int main (int argc, char *argv[]) pointrate = atoi(argvp[1]); } - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } diff --git a/tools/simulator.c b/tools/simulator.c index 0595375..e16045d 100644 --- a/tools/simulator.c +++ b/tools/simulator.c @@ -231,11 +231,10 @@ void init_gl(int width, int height) int main (int argc, char *argv[]) { - char jack_client_name[] = "simulator"; + const char jack_client_name[] = "simulator"; jack_status_t jack_status; - jack_options_t jack_options = JackNullOption; - if ((client = jack_client_open(jack_client_name, jack_options, &jack_status)) == 0) { + if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { fprintf (stderr, "jack server not running?\n"); return 1; } From 5e9f25c4880c0ab5d6e364264ac7ce5e8ebe6b7a Mon Sep 17 00:00:00 2001 From: Jeffrey Nelson Date: Tue, 5 Feb 2013 21:33:00 -0500 Subject: [PATCH 4/4] adding static to jack client name string to put it in .rodata section in case hector ever wants to run this from a pic10f200 --- examples/circlescope.c | 2 +- examples/scope.c | 2 +- libol/libol.c | 2 +- output/output.cpp | 2 +- tools/playilda.c | 2 +- tools/simulator.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/circlescope.c b/examples/circlescope.c index 52bb3d8..2315307 100644 --- a/examples/circlescope.c +++ b/examples/circlescope.c @@ -104,7 +104,7 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; - const char jack_client_name[] = "circlescope"; + static const char jack_client_name[] = "circlescope"; jack_status_t jack_status; if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { diff --git a/examples/scope.c b/examples/scope.c index 5b32660..ed40443 100644 --- a/examples/scope.c +++ b/examples/scope.c @@ -104,7 +104,7 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { jack_client_t *client; - const char jack_client_name[] = "scope"; + static const char jack_client_name[] = "scope"; jack_status_t jack_status; if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) { diff --git a/libol/libol.c b/libol/libol.c index 880cea4..3387d68 100644 --- a/libol/libol.c +++ b/libol/libol.c @@ -229,7 +229,7 @@ static int process (nframes_t nframes, void *arg) int olInit(int buffer_count, int max_points) { int i; - const char jack_client_name[] = "libol"; + static const char jack_client_name[] = "libol"; jack_status_t jack_status; if (buffer_count < 2) diff --git a/output/output.cpp b/output/output.cpp index 8182dfb..61d93d1 100644 --- a/output/output.cpp +++ b/output/output.cpp @@ -226,7 +226,7 @@ int main (int argc, char *argv[]) { int retval; jack_client_t *client; - const char jack_client_name[] = "output"; + static const char jack_client_name[] = "output"; jack_status_t jack_status; QApplication app(argc, argv); diff --git a/tools/playilda.c b/tools/playilda.c index 1cd2edc..c184db7 100644 --- a/tools/playilda.c +++ b/tools/playilda.c @@ -459,7 +459,7 @@ int main (int argc, char *argv[]) char **argvp = &argv[1]; char *fname; jack_client_t *client; - const char jack_client_name[] = "playilda"; + static const char jack_client_name[] = "playilda"; jack_status_t jack_status; struct stat st1, st2; diff --git a/tools/simulator.c b/tools/simulator.c index e16045d..ccfaa4d 100644 --- a/tools/simulator.c +++ b/tools/simulator.c @@ -231,7 +231,7 @@ void init_gl(int width, int height) int main (int argc, char *argv[]) { - const char jack_client_name[] = "simulator"; + static const char jack_client_name[] = "simulator"; jack_status_t jack_status; if ((client = jack_client_open(jack_client_name, JackNullOption, &jack_status)) == 0) {