Commit e3b0f678 authored by sletz's avatar sletz
Browse files

-L paramater for loopback backend activated again in jackd.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3606 0c269be4-1314-0410-8aa9-9f06e86f4224
parent c970e7e0
......@@ -27,7 +27,8 @@ Paul Davis
2009-07-17 Stephane Letz <letz@grame.fr>
* JackLoopbackDriver reborn as a dynamicalled loadable separated backend.
* JackLoopbackDriver reborn as a dynamicalled loadable separated backend.
* -L paramater for loopback backend activated again in jackd.
2009-07-17 Stephane Letz <letz@grame.fr>
......
......@@ -62,7 +62,7 @@ extern "C"
desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
strcpy(desc->name, "loopback"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy(desc->desc, "Loppback backend"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
strcpy(desc->desc, "Loopback backend"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
desc->nparams = 1;
desc->params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t));
......@@ -72,7 +72,7 @@ extern "C"
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Loopback ports");
strcpy(desc->params[i].short_desc, "Maximum number of loopback ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
return desc;
......
......@@ -97,6 +97,7 @@ static void usage(FILE* file)
"usage: jackdmp [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
" [ --name OR -n server-name ]\n"
" [ --timeout OR -t client-timeout-in-msecs ]\n"
" [ --loopback OR -L loopback-port-number ]\n"
" [ --midi OR -X midi-driver ]\n"
" [ --verbose OR -v ]\n"
#ifdef __linux__
......@@ -161,17 +162,19 @@ int main(int argc, char* argv[])
const char* server_name = "default";
jackctl_driver_t * audio_driver_ctl;
jackctl_driver_t * midi_driver_ctl;
jackctl_driver_t * loopback_driver_ctl;
#ifdef __linux__
const char *options = "-ad:X:P:uvrshVRL:STFl:t:mn:p:c:";
const char *options = "-ad:X:P:uvrshVRL:STFl:t:mn:p:c:L:";
#else
const char *options = "-ad:X:P:uvrshVRL:STFl:t:mn:p:";
const char *options = "-ad:X:P:uvrshVRL:STFl:t:mn:p:L:";
#endif
struct option long_options[] = {
#ifdef __linux__
{ "clock-source", 1, 0, 'c' },
#endif
{ "loopback-driver", 1, 0, 'L' },
{ "audio-driver", 1, 0, 'd' },
{ "midi-driver", 1, 0, 'X' },
{ "verbose", 0, 0, 'v' },
......@@ -205,6 +208,7 @@ int main(int argc, char* argv[])
int port_max = 512;
int do_mlock = 1;
int do_unlock = 0;
int loopback = 0;
bool show_version = false;
sigset_t signals;
jackctl_parameter_t* param;
......@@ -253,6 +257,10 @@ int main(int argc, char* argv[])
seen_audio_driver = true;
audio_driver_name = optarg;
break;
case 'L':
loopback = atoi(optarg);
break;
case 'X':
seen_midi_driver = true;
......@@ -324,14 +332,6 @@ int main(int argc, char* argv[])
}
break;
case 'L':
param = jackctl_get_parameter(server_parameters, "loopback-ports");
if (param != NULL) {
value.ui = atoi(optarg);
jackctl_parameter_set_value(param, &value);
}
break;
case 'T':
param = jackctl_get_parameter(server_parameters, "temporary");
if (param != NULL) {
......@@ -422,6 +422,20 @@ int main(int argc, char* argv[])
jackctl_server_add_slave(server_ctl, midi_driver_ctl);
}
// Loopback driver
if (loopback > 0) {
loopback_driver_ctl = jackctl_server_get_driver(server_ctl, "loopback");
if (loopback_driver_ctl != NULL) {
const JSList * loopback_parameters = jackctl_driver_get_parameters(loopback_driver_ctl);
param = jackctl_get_parameter(loopback_parameters, "channels");
if (param != NULL) {
value.ui = loopback;
jackctl_parameter_set_value(param, &value);
}
jackctl_server_add_slave(server_ctl, loopback_driver_ctl);
}
}
notify_server_start(server_name);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment