Jack2: Jackdmp.cpp Source File

Jack2 1.9.12

Jackdmp.cpp
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004-2013 Grame
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 */
20
21 #include <iostream>
22 #include <assert.h>
23 #include <cassert>
24 #include <csignal>
25 #include <sys/types.h>
26 #include <getopt.h>
27 #include <cstring>
28 #include <cstdio>
29 #include <list>
30
31 #include "types.h"
32 #include "jack.h"
33 #include "control.h"
34 #include "JackConstants.h"
35 #include "JackPlatformPlug.h"
36 #ifdef __ANDROID__
37 #include "JackControlAPIAndroid.h"
38 #endif
39
40 #if defined(JACK_DBUS) && defined(__linux__)
41 #include <cstdlib>
42 #include <dbus/dbus.h>
43 #include "audio_reserve.h"
44 #endif
45
46 /*
47 This is a simple port of the old jackdmp.cpp file to use the new jack2 control API. Available options for the server
48 are "hard-coded" in the source. A much better approach would be to use the control API to:
49 - dynamically retrieve available server parameters and then prepare to parse them
50 - get available drivers and their possible parameters, then prepare to parse them.
51 */
52
53 #ifdef __APPLE__
54 #include <CoreFoundation/CFNotificationCenter.h>
55 #include <CoreFoundation/CoreFoundation.h>
56
57 static void notify_server_start(const char* server_name)
58 {
59 // Send notification to be used in the JackRouter plugin
60 CFStringRef ref = CFStringCreateWithCString(NULL, server_name, kCFStringEncodingMacRoman);
61 CFNotificationCenterPostNotificationWithOptions(CFNotificationCenterGetDistributedCenter(),
62 CFSTR("com.grame.jackserver.start"),
63 ref,
64 NULL,
65 kCFNotificationDeliverImmediately | kCFNotificationPostToAllSessions);
66 CFRelease(ref);
67 }
68
69 static void notify_server_stop(const char* server_name)
70 {
71 // Send notification to be used in the JackRouter plugin
72 CFStringRef ref1 = CFStringCreateWithCString(NULL, server_name, kCFStringEncodingMacRoman);
73 CFNotificationCenterPostNotificationWithOptions(CFNotificationCenterGetDistributedCenter(),
74 CFSTR("com.grame.jackserver.stop"),
75 ref1,
76 NULL,
77 kCFNotificationDeliverImmediately | kCFNotificationPostToAllSessions);
78 CFRelease(ref1);
79 }
80
81 #else
82
83 static void notify_server_start(const char* server_name)
84 {}
85 static void notify_server_stop(const char* server_name)
86 {}
87
88 #endif
89
90 static void copyright(FILE* file)
91 {
92 fprintf(file, "jackdmp " VERSION "\n"
93 "Copyright 2001-2005 Paul Davis and others.\n"
94 "Copyright 2004-2016 Grame.\n"
95 "Copyright 2016-2017 Filipe Coelho.\n"
96 "jackdmp comes with ABSOLUTELY NO WARRANTY\n"
97 "This is free software, and you are welcome to redistribute it\n"
98 "under certain conditions; see the file COPYING for details\n");
99 }
100
101 static jackctl_driver_t * jackctl_server_get_driver(jackctl_server_t *server, const char *driver_name)
102 {
103 const JSList * node_ptr = jackctl_server_get_drivers_list(server);
104
105 while (node_ptr) {
106 if (strcmp(jackctl_driver_get_name((jackctl_driver_t *)node_ptr->data), driver_name) == 0) {
107 return (jackctl_driver_t *)node_ptr->data;
108 }
109 node_ptr = jack_slist_next(node_ptr);
110 }
111
112 return NULL;
113 }
114
115 static jackctl_internal_t * jackctl_server_get_internal(jackctl_server_t *server, const char *internal_name)
116 {
117 const JSList * node_ptr = jackctl_server_get_internals_list(server);
118
119 while (node_ptr) {
120 if (strcmp(jackctl_internal_get_name((jackctl_internal_t *)node_ptr->data), internal_name) == 0) {
121 return (jackctl_internal_t *)node_ptr->data;
122 }
123 node_ptr = jack_slist_next(node_ptr);
124 }
125
126 return NULL;
127 }
128
129 static jackctl_parameter_t * jackctl_get_parameter(const JSList * parameters_list, const char * parameter_name)
130 {
131 while (parameters_list) {
132 if (strcmp(jackctl_parameter_get_name((jackctl_parameter_t *)parameters_list->data), parameter_name) == 0) {
133 return (jackctl_parameter_t *)parameters_list->data;
134 }
135 parameters_list = jack_slist_next(parameters_list);
136 }
137
138 return NULL;
139 }
140
141 #ifdef __ANDROID__
142 static void jackctl_server_switch_master_dummy(jackctl_server_t * server_ctl, char * master_driver_name)
143 {
144 static bool is_dummy_driver = false;
145 if(!strcmp(master_driver_name, "dummy")) {
146 return;
147 }
148 jackctl_driver_t * driver_ctr;
149 if(is_dummy_driver) {
150 is_dummy_driver = false;
151 driver_ctr = jackctl_server_get_driver(server_ctl, master_driver_name);
152 } else {
153 is_dummy_driver = true;
154 driver_ctr = jackctl_server_get_driver(server_ctl, "dummy");
155 }
156 jackctl_server_switch_master(server_ctl, driver_ctr);
157 }
158 #endif
159
160 static void print_server_drivers(jackctl_server_t *server, FILE* file)
161 {
162 const JSList * node_ptr = jackctl_server_get_drivers_list(server);
163
164 fprintf(file, "Available backends:\n");
165
166 while (node_ptr) {
167 jackctl_driver_t* driver = (jackctl_driver_t *)node_ptr->data;
168 fprintf(file, " %s (%s)\n", jackctl_driver_get_name(driver), (jackctl_driver_get_type(driver) == JackMaster) ? "master" : "slave");
169 node_ptr = jack_slist_next(node_ptr);
170 }
171 fprintf(file, "\n");
172 }
173
174 static void print_server_internals(jackctl_server_t *server, FILE* file)
175 {
176 const JSList * node_ptr = jackctl_server_get_internals_list(server);
177
178 fprintf(file, "Available internals:\n");
179
180 while (node_ptr) {
181 jackctl_internal_t* internal = (jackctl_internal_t *)node_ptr->data;
182 fprintf(file, " %s\n", jackctl_internal_get_name(internal));
183 node_ptr = jack_slist_next(node_ptr);
184 }
185 fprintf(file, "\n");
186 }
187
188 static void usage(FILE* file, jackctl_server_t *server, bool full = true)
189 {
190 jackctl_parameter_t * param;
191 const JSList * server_parameters;
192 uint32_t i;
193 union jackctl_parameter_value value;
194
195 fprintf(file, "\n"
196 "Usage: jackdmp [ --no-realtime OR -r ]\n"
197 " [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
198 " (the two previous arguments are mutually exclusive. The default is --realtime)\n"
199 " [ --name OR -n server-name ]\n"
200 " [ --timeout OR -t client-timeout-in-msecs ]\n"
201 " [ --loopback OR -L loopback-port-number ]\n"
202 " [ --port-max OR -p maximum-number-of-ports]\n"
203 " [ --slave-backend OR -X slave-backend-name ]\n"
204 " [ --internal-client OR -I internal-client-name ]\n"
205 " [ --internal-session-file OR -C internal-session-file ]\n"
206 " [ --verbose OR -v ]\n"
207 #ifdef __linux__
208 " [ --clocksource OR -c [ h(pet) | s(ystem) ]\n"
209 #endif
210 " [ --autoconnect OR -a <modechar>]\n");
211
212 server_parameters = jackctl_server_get_parameters(server);
213 param = jackctl_get_parameter(server_parameters, "self-connect-mode");
214 fprintf(file,
215 " where <modechar> is one of:\n");
216 for (i = 0; i < jackctl_parameter_get_enum_constraints_count(param); i++)
217 {
218 value = jackctl_parameter_get_enum_constraint_value(param, i);
219 fprintf(file, " '%c' - %s", value.c, jackctl_parameter_get_enum_constraint_description(param, i));
220 if (value.c == JACK_DEFAULT_SELF_CONNECT_MODE)
221 {
222 fprintf(file, " (default)");
223 }
224 fprintf(file, "\n");
225 }
226
227 fprintf(file,
228 " [ --replace-registry ]\n"
229 " [ --silent OR -s ]\n"
230 " [ --sync OR -S ]\n"
231 " [ --temporary OR -T ]\n"
232 " [ --version OR -V ]\n"
233 " -d master-backend-name [ ... master-backend args ... ]\n"
234 " jackdmp -d master-backend-name --help\n"
235 " to display options for each master backend\n\n");
236
237 if (full) {
238 print_server_drivers(server, file);
239 print_server_internals(server, file);
240 }
241 }
242
243 // Prototype to be found in libjackserver
244 extern "C" void silent_jack_error_callback(const char *desc);
245
246 void print_version()
247 {
248 printf( "jackdmp version " VERSION " tmpdir "
249 jack_server_dir " protocol %d" "\n",
250 JACK_PROTOCOL_VERSION);
251 exit(-1);
252
253 }
254
255 int main(int argc, char** argv)
256 {
257 jackctl_server_t * server_ctl;
258 const JSList * server_parameters;
259 const char* server_name = JACK_DEFAULT_SERVER_NAME;
260 jackctl_driver_t * master_driver_ctl;
261 jackctl_driver_t * loopback_driver_ctl = NULL;
262 int replace_registry = 0;
263
264 for(int a = 1; a < argc; ++a) {
265 if( !strcmp(argv[a], "--version") || !strcmp(argv[a], "-V") ) {
266 print_version();
267 }
268 }
269 const char *options = "-d:X:I:P:uvshrRL:STFl:t:mn:p:C:"
270 "a:"
271 #ifdef __linux__
272 "c:"
273 #endif
274 ;
275
276 struct option long_options[] = {
277 #ifdef __linux__
278 { "clock-source", 1, 0, 'c' },
279 #endif
280 { "internal-session-file", 1, 0, 'C' },
281 { "loopback-driver", 1, 0, 'L' },
282 { "audio-driver", 1, 0, 'd' },
283 { "midi-driver", 1, 0, 'X' },
284 { "internal-client", 1, 0, 'I' },
285 { "verbose", 0, 0, 'v' },
286 { "help", 0, 0, 'h' },
287 { "port-max", 1, 0, 'p' },
288 { "no-mlock", 0, 0, 'm' },
289 { "name", 1, 0, 'n' },
290 { "unlock", 0, 0, 'u' },
291 { "realtime", 0, 0, 'R' },
292 { "no-realtime", 0, 0, 'r' },
293 { "replace-registry", 0, &replace_registry, 0 },
294 { "loopback", 0, 0, 'L' },
295 { "realtime-priority", 1, 0, 'P' },
296 { "timeout", 1, 0, 't' },
297 { "temporary", 0, 0, 'T' },
298 { "silent", 0, 0, 's' },
299 { "sync", 0, 0, 'S' },
300 { "autoconnect", 1, 0, 'a' },
301 { 0, 0, 0, 0 }
302 };
303
304 int i,opt = 0;
305 int option_index = 0;
306 char* internal_session_file = NULL;
307 char* master_driver_name = NULL;
308 char** master_driver_args = NULL;
309 int master_driver_nargs = 1;
310 int loopback = 0;
311 jackctl_sigmask_t * sigmask;
312 jackctl_parameter_t* param;
313 union jackctl_parameter_value value;
314
315 std::list<char*> internals_list;
316 std::list<char*> slaves_list;
317 std::list<char*>::iterator it;
318
319 // Assume that we fail.
320 int return_value = -1;
321 bool notify_sent = false;
322
323 copyright(stdout);
324 #if defined(JACK_DBUS) && defined(__linux__)
325 if (getenv("JACK_NO_AUDIO_RESERVATION"))
326 server_ctl = jackctl_server_create(NULL, NULL);
327 else
328 server_ctl = jackctl_server_create(audio_acquire, audio_release);
329 #else
330 server_ctl = jackctl_server_create(NULL, NULL);
331 #endif
332 if (server_ctl == NULL) {
333 fprintf(stderr, "Failed to create server object\n");
334 return -1;
335 }
336
337 server_parameters = jackctl_server_get_parameters(server_ctl);
338
339 opterr = 0;
340 while (!master_driver_name &&
341 (opt = getopt_long(argc, argv, options,
342 long_options, &option_index)) != EOF) {
343 switch (opt) {
344
345 #ifdef __linux__
346 case 'c':
347 param = jackctl_get_parameter(server_parameters, "clock-source");
348 if (param != NULL) {
349 if (tolower (optarg[0]) == 'h') {
350 value.ui = JACK_TIMER_HPET;
351 jackctl_parameter_set_value(param, &value);
352 } else if (tolower (optarg[0]) == 'c') {
353 /* For backwards compatibility with scripts, allow
354 * the user to request the cycle clock on the
355 * command line, but use the system clock instead
356 */
357 value.ui = JACK_TIMER_SYSTEM_CLOCK;
358 jackctl_parameter_set_value(param, &value);
359 } else if (tolower (optarg[0]) == 's') {
360 value.ui = JACK_TIMER_SYSTEM_CLOCK;
361 jackctl_parameter_set_value(param, &value);
362 } else {
363 usage(stdout, server_ctl);
364 goto destroy_server;
365 }
366 }
367 break;
368 #endif
369
370 case 'a':
371 param = jackctl_get_parameter(server_parameters, "self-connect-mode");
372 if (param != NULL) {
373 bool value_valid = false;
374 for (uint32_t k=0; k<jackctl_parameter_get_enum_constraints_count( param ); k++ ) {
375 value = jackctl_parameter_get_enum_constraint_value( param, k );
376 if( value.c == optarg[0] )
377 value_valid = true;
378 }
379
380 if( value_valid ) {
381 value.c = optarg[0];
382 jackctl_parameter_set_value(param, &value);
383 } else {
384 usage(stdout, server_ctl);
385 goto destroy_server;
386 }
387 }
388 break;
389
390 case 'd':
391 master_driver_name = optarg;
392 break;
393
394 case 'L':
395 loopback = atoi(optarg);
396 break;
397
398 case 'X':
399 slaves_list.push_back(optarg);
400 break;
401
402 case 'I':
403 internals_list.push_back(optarg);
404 break;
405
406 case 'p':
407 param = jackctl_get_parameter(server_parameters, "port-max");
408 if (param != NULL) {
409 value.ui = atoi(optarg);
410 jackctl_parameter_set_value(param, &value);
411 }
412 break;
413
414 case 'm':
415 break;
416
417 case 'u':
418 break;
419
420 case 'v':
421 param = jackctl_get_parameter(server_parameters, "verbose");
422 if (param != NULL) {
423 value.b = true;
424 jackctl_parameter_set_value(param, &value);
425 }
426 break;
427
428 case 's':
429 jack_set_error_function(silent_jack_error_callback);
430 break;
431
432 case 'S':
433 param = jackctl_get_parameter(server_parameters, "sync");
434 if (param != NULL) {
435 value.b = true;
436 jackctl_parameter_set_value(param, &value);
437 }
438 break;
439
440 case 'n':
441 server_name = optarg;
442 param = jackctl_get_parameter(server_parameters, "name");
443 if (param != NULL) {
444 strncpy(value.str, optarg, JACK_PARAM_STRING_MAX);
445 jackctl_parameter_set_value(param, &value);
446 }
447 break;
448
449 case 'C':
450 internal_session_file = optarg;
451 break;
452
453 case 'P':
454 param = jackctl_get_parameter(server_parameters, "realtime-priority");
455 if (param != NULL) {
456 value.i = atoi(optarg);
457 jackctl_parameter_set_value(param, &value);
458 }
459 break;
460
461 case 'r':
462 param = jackctl_get_parameter(server_parameters, "realtime");
463 if (param != NULL) {
464 value.b = false;
465 jackctl_parameter_set_value(param, &value);
466 }
467 break;
468
469 case 'R':
470 param = jackctl_get_parameter(server_parameters, "realtime");
471 if (param != NULL) {
472 value.b = true;
473 jackctl_parameter_set_value(param, &value);
474 }
475 break;
476
477 case 'T':
478 param = jackctl_get_parameter(server_parameters, "temporary");
479 if (param != NULL) {
480 value.b = true;
481 jackctl_parameter_set_value(param, &value);
482 }
483 break;
484
485 case 't':
486 param = jackctl_get_parameter(server_parameters, "client-timeout");
487 if (param != NULL) {
488 value.i = atoi(optarg);
489 jackctl_parameter_set_value(param, &value);
490 }
491 break;
492
493 default:
494 fprintf(stderr, "unknown option character %c\n", optopt);
495 /*fallthru*/
496
497 case 'h':
498 usage(stdout, server_ctl);
499 goto destroy_server;
500 }
501 }
502
503 // Long option with no letter so treated separately
504 param = jackctl_get_parameter(server_parameters, "replace-registry");
505 if (param != NULL) {
506 value.b = replace_registry;
507 jackctl_parameter_set_value(param, &value);
508 }
509
510 if (!master_driver_name) {
511 usage(stderr, server_ctl, false);
512 goto destroy_server;
513 }
514
515 // Master driver
516 master_driver_ctl = jackctl_server_get_driver(server_ctl, master_driver_name);
517 if (master_driver_ctl == NULL) {
518 fprintf(stderr, "Unknown driver \"%s\"\n", master_driver_name);
519 goto destroy_server;
520 }
521
522 if (jackctl_driver_get_type(master_driver_ctl) != JackMaster) {
523 fprintf(stderr, "Driver \"%s\" is not a master \n", master_driver_name);
524 goto destroy_server;
525 }
526
527 if (optind < argc) {
528 master_driver_nargs = 1 + argc - optind;
529 } else {
530 master_driver_nargs = 1;
531 }
532
533 if (master_driver_nargs == 0) {
534 fprintf(stderr, "No driver specified ... hmm. JACK won't do"
535 " anything when run like this.\n");
536 goto destroy_server;
537 }
538
539 master_driver_args = (char **) malloc(sizeof(char *) * master_driver_nargs);
540 master_driver_args[0] = master_driver_name;
541
542 for (i = 1; i < master_driver_nargs; i++) {
543 master_driver_args[i] = argv[optind++];
544 }
545
546 if (jackctl_driver_params_parse(master_driver_ctl, master_driver_nargs, master_driver_args)) {
547 goto destroy_server;
548 }
549
550 // Setup signals
551 sigmask = jackctl_setup_signals(0);
552
553 // Open server
554 if (! jackctl_server_open(server_ctl, master_driver_ctl)) {
555 fprintf(stderr, "Failed to open server\n");
556 goto destroy_server;
557 }
558
559 // Slave drivers
560 for (it = slaves_list.begin(); it != slaves_list.end(); it++) {
561 jackctl_driver_t * slave_driver_ctl = jackctl_server_get_driver(server_ctl, *it);
562 if (slave_driver_ctl == NULL) {
563 fprintf(stderr, "Unknown driver \"%s\"\n", *it);
564 goto close_server;
565 }
566 if (jackctl_driver_get_type(slave_driver_ctl) != JackSlave) {
567 fprintf(stderr, "Driver \"%s\" is not a slave \n", *it);
568 goto close_server;
569 }
570 if (!jackctl_server_add_slave(server_ctl, slave_driver_ctl)) {
571 fprintf(stderr, "Driver \"%s\" cannot be loaded\n", *it);
572 goto close_server;
573 }
574 }
575
576 // Loopback driver
577 if (loopback > 0) {
578 loopback_driver_ctl = jackctl_server_get_driver(server_ctl, "loopback");
579
580 if (loopback_driver_ctl != NULL) {
581 const JSList * loopback_parameters = jackctl_driver_get_parameters(loopback_driver_ctl);
582 param = jackctl_get_parameter(loopback_parameters, "channels");
583 if (param != NULL) {
584 value.ui = loopback;
585 jackctl_parameter_set_value(param, &value);
586 }
587 if (!jackctl_server_add_slave(server_ctl, loopback_driver_ctl)) {
588 fprintf(stderr, "Driver \"loopback\" cannot be loaded\n");
589 goto close_server;
590 }
591 } else {
592 fprintf(stderr, "Driver \"loopback\" not found\n");
593 goto close_server;
594 }
595 }
596
597 // Start the server
598 if (!jackctl_server_start(server_ctl)) {
599 fprintf(stderr, "Failed to start server\n");
600 goto close_server;
601 }
602
603 // Internal clients
604 for (it = internals_list.begin(); it != internals_list.end(); it++) {
605 jackctl_internal_t * internal_driver_ctl = jackctl_server_get_internal(server_ctl, *it);
606 if (internal_driver_ctl == NULL) {
607 fprintf(stderr, "Unknown internal \"%s\"\n", *it);
608 goto stop_server;
609 }
610 if (!jackctl_server_load_internal(server_ctl, internal_driver_ctl)) {
611 fprintf(stderr, "Internal client \"%s\" cannot be loaded\n", *it);
612 goto stop_server;
613 }
614 }
615
616 if (internal_session_file != NULL) {
617 if (!jackctl_server_load_session_file(server_ctl, internal_session_file)) {
618 fprintf(stderr, "Internal session file %s cannot be loaded!\n", internal_session_file);
619 goto stop_server;
620 }
621 }
622
623 notify_server_start(server_name);
624 notify_sent = true;
625 return_value = 0;
626
627 // Waits for signal
628 #ifdef __ANDROID__
629 //reserve SIGUSR2 signal for switching master driver
630 while(1) {
631 int signal = jackctl_wait_signals_and_return(sigmask);
632 if (signal == SIGUSR2) {
633 jackctl_server_switch_master_dummy(server_ctl, master_driver_name);
634 } else {
635 break;
636 }
637 }
638 #else
639 jackctl_wait_signals(sigmask);
640 #endif
641
642 stop_server:
643 if (!jackctl_server_stop(server_ctl)) {
644 fprintf(stderr, "Cannot stop server...\n");
645 }
646
647 close_server:
648 if (loopback > 0 && loopback_driver_ctl) {
649 jackctl_server_remove_slave(server_ctl, loopback_driver_ctl);
650 }
651 // Slave drivers
652 for (it = slaves_list.begin(); it != slaves_list.end(); it++) {
653 jackctl_driver_t * slave_driver_ctl = jackctl_server_get_driver(server_ctl, *it);
654 if (slave_driver_ctl) {
655 jackctl_server_remove_slave(server_ctl, slave_driver_ctl);
656 }
657 }
658
659 // Internal clients
660 for (it = internals_list.begin(); it != internals_list.end(); it++) {
661 jackctl_internal_t * internal_driver_ctl = jackctl_server_get_internal(server_ctl, *it);
662 if (internal_driver_ctl) {
663 jackctl_server_unload_internal(server_ctl, internal_driver_ctl);
664 }
665 }
666 jackctl_server_close(server_ctl);
667
668 destroy_server:
669 jackctl_server_destroy(server_ctl);
670 if (notify_sent) {
671 notify_server_stop(server_name);
672 }
673 return return_value;
674 }
jackctl_driver_params_parse
SERVER_EXPORT int jackctl_driver_params_parse(jackctl_driver *driver_ptr, int argc, char *argv[])
Definition: JackDriverLoader.cpp:264
jackctl_setup_signals
SERVER_EXPORT jackctl_sigmask_t * jackctl_setup_signals(unsigned int flags)
Definition: JackControlAPI.cpp:596
jackctl_server_open
SERVER_EXPORT bool jackctl_server_open(jackctl_server *server_ptr, jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1001
jackctl_server
Definition: JackControlAPI.cpp:61
jackctl_server_create
SERVER_EXPORT jackctl_server_t * jackctl_server_create(bool(*on_device_acquire)(const char *device_name), void(*on_device_release)(const char *device_name))
Definition: JackControlAPI.cpp:744
jackctl_server_switch_master
SERVER_EXPORT bool jackctl_server_switch_master(jackctl_server *server_ptr, jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1424
jackctl_internal_get_name
SERVER_EXPORT const char * jackctl_internal_get_name(jackctl_internal *internal_ptr)
Definition: JackControlAPI.cpp:1320
JackMaster
master driver
Definition: control.h:52
jackctl_parameter_value::i
int32_t i
member used for JackParamInt
Definition: JackControlAPI.h:56
jack_set_error_function
void jack_set_error_function(void(*func)(const char *)) JACK_OPTIONAL_WEAK_EXPORT
option
Definition: getopt.h:84
jackctl_parameter_get_name
SERVER_EXPORT const char * jackctl_parameter_get_name(jackctl_parameter *parameter_ptr)
Definition: JackControlAPI.cpp:1136
jackctl_server_stop
SERVER_EXPORT bool jackctl_server_stop(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:958
jackctl_parameter_value
Type for parameter value.
Definition: JackControlAPI.h:53
jackctl_driver_get_parameters
SERVER_EXPORT const JSList * jackctl_driver_get_parameters(jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1126
jackctl_sigmask
Definition: JackControlAPI.cpp:576
jackctl_server_close
SERVER_EXPORT bool jackctl_server_close(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:968
jackctl_server_remove_slave
SERVER_EXPORT bool jackctl_server_remove_slave(jackctl_server *server_ptr, jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1401
jackctl_parameter_get_enum_constraint_description
SERVER_EXPORT const char * jackctl_parameter_get_enum_constraint_description(jackctl_parameter *parameter_ptr, uint32_t index)
Definition: JackControlAPI.cpp:1209
jackctl_server_get_internals_list
SERVER_EXPORT const JSList * jackctl_server_get_internals_list(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:1315
JackSlave
slave driver
Definition: control.h:53
jackctl_server_get_drivers_list
SERVER_EXPORT const JSList * jackctl_server_get_drivers_list(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:953
jackctl_server_start
SERVER_EXPORT bool jackctl_server_start(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:1100
jackctl_parameter_get_enum_constraints_count
SERVER_EXPORT uint32_t jackctl_parameter_get_enum_constraints_count(jackctl_parameter *parameter_ptr)
Definition: JackControlAPI.cpp:1161
jackctl_parameter_set_value
SERVER_EXPORT bool jackctl_parameter_set_value(jackctl_parameter *parameter_ptr, const union jackctl_parameter_value *value_ptr)
Definition: JackControlAPI.cpp:1290
jackctl_server_add_slave
SERVER_EXPORT bool jackctl_server_add_slave(jackctl_server *server_ptr, jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1378
JACK_PARAM_STRING_MAX
#define JACK_PARAM_STRING_MAX
Max length of string parameter value, excluding terminating null char.
Definition: control.h:60
jackctl_server_load_session_file
SERVER_EXPORT bool jackctl_server_load_session_file(jackctl_server *server_ptr, const char *file)
Definition: JackControlAPI.cpp:1367
jackctl_driver_get_name
SERVER_EXPORT const char * jackctl_driver_get_name(jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1116
jackctl_parameter_get_enum_constraint_value
SERVER_EXPORT union jackctl_parameter_value jackctl_parameter_get_enum_constraint_value(jackctl_parameter *parameter_ptr, uint32_t index)
Definition: JackControlAPI.cpp:1175
control.h
JACK control API.
jackctl_server_unload_internal
SERVER_EXPORT bool jackctl_server_unload_internal(jackctl_server *server_ptr, jackctl_internal *internal)
Definition: JackControlAPI.cpp:1350
jackctl_server_destroy
SERVER_EXPORT void jackctl_server_destroy(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:943
jackctl_driver_get_type
SERVER_EXPORT jackctl_driver_type_t jackctl_driver_get_type(jackctl_driver *driver_ptr)
Definition: JackControlAPI.cpp:1121
jackctl_parameter
Definition: JackControlAPI.cpp:128
jackctl_server_get_parameters
SERVER_EXPORT const JSList * jackctl_server_get_parameters(jackctl_server *server_ptr)
Definition: JackControlAPI.cpp:995
jackctl_internal
Definition: JackControlAPI.cpp:121
_JSList
Definition: linux/alsa/jslist.h:35
jackctl_wait_signals
SERVER_EXPORT void jackctl_wait_signals(jackctl_sigmask_t *sigmask)
Definition: JackControlAPI.cpp:678
jackctl_driver
Definition: JackControlAPI.cpp:114
jackctl_server_load_internal
SERVER_EXPORT bool jackctl_server_load_internal(jackctl_server *server_ptr, jackctl_internal *internal)
Definition: JackControlAPI.cpp:1330