Commit a9e46283 authored by Nedko Arnaudov's avatar Nedko Arnaudov
Browse files

helper functions for jack_driver_desc_t construction

The main goal is to reduce risk of mismatch between allocated
and initialized parameter numbers.
parent cfa7575f
......@@ -834,3 +834,104 @@ JackDriverInfo::~JackDriverInfo()
if (fHandle)
UnloadDriverModule(fHandle);
}
EXPORT
jack_driver_desc_t *
jack_driver_descriptor_construct(
const char * name,
const char * description,
jack_driver_desc_filler_t * filler_ptr)
{
size_t name_len;
size_t description_len;
jack_driver_desc_t * desc_ptr;
name_len = strlen(name);
description_len = strlen(description);
if (name_len > sizeof(desc_ptr->name) - 1 ||
description_len > sizeof(desc_ptr->desc) - 1) {
assert(false);
return 0;
}
desc_ptr = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
if (desc_ptr == NULL) {
jack_error("calloc() failed to allocate memory for driver descriptor struct");
return 0;
}
memcpy(desc_ptr->name, name, name_len + 1);
memcpy(desc_ptr->desc, description, description_len + 1);
desc_ptr->nparams = 0;
if (filler_ptr != NULL) {
filler_ptr->size = 0;
}
return desc_ptr;
}
EXPORT
int
jack_driver_descriptor_add_parameter(
jack_driver_desc_t * desc_ptr,
jack_driver_desc_filler_t * filler_ptr,
const char * name,
char character,
jack_driver_param_type_t type,
const jack_driver_param_value_t * value_ptr,
jack_driver_param_constraint_desc_t * constraint,
const char * short_desc,
const char * long_desc)
{
size_t name_len;
size_t short_desc_len;
size_t long_desc_len;
jack_driver_param_desc_t * param_ptr;
size_t newsize;
name_len = strlen(name);
short_desc_len = strlen(short_desc);
if (long_desc != NULL) {
long_desc_len = strlen(long_desc);
} else {
long_desc = short_desc;
long_desc_len = short_desc_len;
}
if (name_len > sizeof(param_ptr->name) - 1 ||
short_desc_len > sizeof(param_ptr->short_desc) - 1 ||
long_desc_len > sizeof(param_ptr->long_desc) - 1) {
assert(false);
return 0;
}
if (desc_ptr->nparams == filler_ptr->size) {
newsize = filler_ptr->size + 20; // most drivers have less than 20 parameters
param_ptr = (jack_driver_param_desc_t*)realloc (desc_ptr->params, newsize * sizeof (jack_driver_param_desc_t));
if (param_ptr == NULL) {
jack_error("realloc() failed for parameter array of %zu elements", newsize);
return false;
}
filler_ptr->size = newsize;
desc_ptr->params = param_ptr;
}
assert(desc_ptr->nparams < filler_ptr->size);
param_ptr = desc_ptr->params + desc_ptr->nparams;
memcpy(param_ptr->name, name, name_len + 1);
param_ptr->character = character;
param_ptr->type = type;
param_ptr->value = *value_ptr;
param_ptr->constraint = constraint;
memcpy(param_ptr->short_desc, short_desc, short_desc_len + 1);
memcpy(param_ptr->long_desc, long_desc, long_desc_len + 1);
desc_ptr->nparams++;
return true;
}
......@@ -93,63 +93,26 @@ extern "C"
SERVER_EXPORT jack_driver_desc_t * driver_get_descriptor () {
jack_driver_desc_t * desc;
unsigned int i;
desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
strcpy(desc->name, "dummy"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy(desc->desc, "Timer based backend"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
desc->nparams = 6;
desc->params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t));
i = 0;
strcpy(desc->params[i].name, "capture");
desc->params[i].character = 'C';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 2U;
strcpy(desc->params[i].short_desc, "Number of capture ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "playback");
desc->params[i].character = 'P';
desc->params[i].type = JackDriverParamUInt;
desc->params[1].value.ui = 2U;
strcpy(desc->params[i].short_desc, "Number of playback ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "rate");
desc->params[i].character = 'r';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 48000U;
strcpy(desc->params[i].short_desc, "Sample rate");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "monitor");
desc->params[i].character = 'm';
desc->params[i].type = JackDriverParamBool;
desc->params[i].value.i = 0;
strcpy(desc->params[i].short_desc, "Provide monitor ports for the output");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "period");
desc->params[i].character = 'p';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 1024U;
strcpy(desc->params[i].short_desc, "Frames per period");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "wait");
desc->params[i].character = 'w';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 21333U;
strcpy(desc->params[i].short_desc,
"Number of usecs to wait between engine processes");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
jack_driver_desc_filler_t filler;
jack_driver_param_value_t value;
desc = jack_driver_descriptor_construct("dummy", "Timer based backend", &filler);
value.ui = 2U;
jack_driver_descriptor_add_parameter(desc, &filler, "capture", 'C', JackDriverParamUInt, &value, NULL, "Number of capture ports", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "playback", 'P', JackDriverParamUInt, &value, NULL, "Number of playback ports", NULL);
value.ui = 48000U;
jack_driver_descriptor_add_parameter(desc, &filler, "rate", 'r', JackDriverParamUInt, &value, NULL, "Sample rate", NULL);
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "monitor", 'm', JackDriverParamBool, &value, NULL, "Provide monitor ports for the output", NULL);
value.ui = 1024U;
jack_driver_descriptor_add_parameter(desc, &filler, "period", 'p', JackDriverParamUInt, &value, NULL, "Frames per period", NULL);
value.ui = 21333U;
jack_driver_descriptor_add_parameter(desc, &filler, "wait", 'w', JackDriverParamUInt, &value, NULL, "Number of usecs to wait between engine processes", NULL);
return desc;
}
......
......@@ -98,22 +98,13 @@ extern "C"
SERVER_EXPORT jack_driver_desc_t * driver_get_descriptor()
{
jack_driver_desc_t * desc;
unsigned int i;
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, "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));
i = 0;
strcpy(desc->params[i].name, "channels");
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Maximum number of loopback ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
jack_driver_desc_filler_t filler;
jack_driver_param_value_t value;
desc = jack_driver_descriptor_construct("loopback", "Loopback backend", &filler);
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "channels", 'c', JackDriverParamInt, &value, NULL, "Maximum number of loopback ports", NULL);
return desc;
}
......
......@@ -403,112 +403,47 @@ extern "C"
SERVER_EXPORT jack_driver_desc_t* jack_get_descriptor()
{
jack_driver_desc_t* desc = (jack_driver_desc_t*) calloc(1, sizeof(jack_driver_desc_t));
strcpy(desc->name, "netadapter"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy(desc->desc, "netjack net <==> audio backend adapter"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
desc->params = (jack_driver_param_desc_t*) calloc(12, sizeof(jack_driver_param_desc_t));
int i = 0;
strcpy(desc->params[i].name, "multicast_ip");
desc->params[i].character = 'a';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, DEFAULT_MULTICAST_IP);
strcpy(desc->params[i].short_desc, "Multicast Address");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "udp_net_port");
desc->params[i].character = 'p';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = DEFAULT_PORT;
strcpy(desc->params[i].short_desc, "UDP port");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "mtu");
desc->params[i].character = 'M';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = DEFAULT_MTU;
strcpy(desc->params[i].short_desc, "MTU to the master");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "input-ports");
desc->params[i].character = 'C';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = 2;
strcpy(desc->params[i].short_desc, "Number of audio input ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "output-ports");
desc->params[i].character = 'P';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = 2;
strcpy(desc->params[i].short_desc, "Number of audio output ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
jack_driver_desc_t * desc;
jack_driver_desc_filler_t filler;
jack_driver_param_value_t value;
desc = jack_driver_descriptor_construct("netadapter", "netjack net <==> audio backend adapter", &filler);
strcpy(value.str, DEFAULT_MULTICAST_IP);
jack_driver_descriptor_add_parameter(desc, &filler, "multicast_ip", 'a', JackDriverParamString, &value, NULL, "Multicast Address", NULL);
value.i = DEFAULT_PORT;
jack_driver_descriptor_add_parameter(desc, &filler, "udp_net_port", 'p', JackDriverParamInt, &value, NULL, "UDP port", NULL);
value.i = DEFAULT_MTU;
jack_driver_descriptor_add_parameter(desc, &filler, "mtu", 'M', JackDriverParamInt, &value, NULL, "MTU to the master", NULL);
value.i = 2;
jack_driver_descriptor_add_parameter(desc, &filler, "input-ports", 'C', JackDriverParamInt, &value, NULL, "Number of audio input ports", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "output-ports", 'C', JackDriverParamInt, &value, NULL, "Number of audio output ports", NULL);
#if HAVE_CELT
i++;
strcpy(desc->params[i].name, "celt");
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = -1;
strcpy(desc->params[i].short_desc, "Set CELT encoding and number of kBits per channel");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
value.i = -1;
jack_driver_descriptor_add_parameter(desc, &filler, "celt", 'c', JackDriverParamInt, &value, NULL, "Set CELT encoding and number of kBits per channel", NULL);
#endif
i++;
strcpy(desc->params[i].name, "client-name");
desc->params[i].character = 'n';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, "'hostname'");
strcpy(desc->params[i].short_desc, "Name of the jack client");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "transport-sync");
desc->params[i].character = 't';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 1U;
strcpy(desc->params[i].short_desc, "Sync transport with master's");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "mode");
desc->params[i].character = 'm';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, "slow");
strcpy(desc->params[i].short_desc, "Slow, Normal or Fast mode.");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "quality");
desc->params[i].character = 'q';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Resample algorithm quality (0 - 4)");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "ring-buffer");
desc->params[i].character = 'g';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 32768;
strcpy(desc->params[i].short_desc, "Fixed ringbuffer size");
strcpy(desc->params[i].long_desc, "Fixed ringbuffer size (if not set => automatic adaptative)");
i++;
strcpy (desc->params[i].name, "auto-connect");
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamBool;
desc->params[i].value.i = false;
strcpy (desc->params[i].short_desc, "Auto connect netmaster to system ports");
strcpy (desc->params[i].long_desc, desc->params[i].short_desc);
desc->nparams = i + 1;
strcpy(value.str, "'hostname'");
jack_driver_descriptor_add_parameter(desc, &filler, "client-name", 'n', JackDriverParamString, &value, NULL, "Name of the jack client", NULL);
value.ui = 1U;
jack_driver_descriptor_add_parameter(desc, &filler, "transport-sync", 't', JackDriverParamUInt, &value, NULL, "Sync transport with master's", NULL);
strcpy(value.str, "slow");
jack_driver_descriptor_add_parameter(desc, &filler, "mode", 'm', JackDriverParamString, &value, NULL, "Slow, Normal or Fast mode.", NULL);
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "quality", 'q', JackDriverParamInt, &value, NULL, "Resample algorithm quality (0 - 4)", NULL);
value.i = 32768;
jack_driver_descriptor_add_parameter(desc, &filler, "ring-buffer", 'g', JackDriverParamInt, &value, NULL, "Fixed ringbuffer size", "Fixed ringbuffer size (if not set => automatic adaptative)");
value.i = false;
jack_driver_descriptor_add_parameter(desc, &filler, "auto-connect", 'c', JackDriverParamBool, &value, NULL, "Auto connect netmaster to system ports", "");
return desc;
}
......
......@@ -599,103 +599,41 @@ namespace Jack
#endif
SERVER_EXPORT jack_driver_desc_t* driver_get_descriptor()
{
jack_driver_desc_t* desc = (jack_driver_desc_t*) calloc(1, sizeof(jack_driver_desc_t));
strcpy(desc->name, "net"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy(desc->desc, "netjack slave backend component"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
desc->params = (jack_driver_param_desc_t*) calloc(11, sizeof(jack_driver_param_desc_t));
int i = 0;
strcpy(desc->params[i].name, "multicast_ip");
desc->params[i].character = 'a';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, DEFAULT_MULTICAST_IP);
strcpy(desc->params[i].short_desc, "Multicast Address");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "udp_net_port");
desc->params[i].character = 'p';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = DEFAULT_PORT;
strcpy(desc->params[i].short_desc, "UDP port");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "mtu");
desc->params[i].character = 'M';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = DEFAULT_MTU;
strcpy(desc->params[i].short_desc, "MTU to the master");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "input_ports");
desc->params[i].character = 'C';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = -1;
strcpy(desc->params[i].short_desc, "Number of audio input ports");
strcpy(desc->params[i].long_desc, "Number of audio input ports. If -1, audio physical input from the master");
i++;
strcpy(desc->params[i].name, "output_ports");
desc->params[i].character = 'P';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = -1;
strcpy(desc->params[i].short_desc, "Number of audio output ports");
strcpy(desc->params[i].long_desc, "Number of audio output ports. If -1, audio physical output from the master");
i++;
strcpy(desc->params[i].name, "midi_in_ports");
desc->params[i].character = 'i';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = 0;
strcpy(desc->params[i].short_desc, "Number of midi input ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "midi_out_ports");
desc->params[i].character = 'o';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = 0;
strcpy(desc->params[i].short_desc, "Number of midi output ports");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
jack_driver_desc_t * desc;
jack_driver_desc_filler_t filler;
jack_driver_param_value_t value;
desc = jack_driver_descriptor_construct("net", "netjack slave backend component", &filler);
strcpy(value.str, DEFAULT_MULTICAST_IP);
jack_driver_descriptor_add_parameter(desc, &filler, "multicast_ip", 'a', JackDriverParamString, &value, NULL, "Multicast Address", NULL);
value.i = DEFAULT_PORT;
jack_driver_descriptor_add_parameter(desc, &filler, "udp_net_port", 'p', JackDriverParamInt, &value, NULL, "UDP port", NULL);
value.i = DEFAULT_MTU;
jack_driver_descriptor_add_parameter(desc, &filler, "mtu", 'M', JackDriverParamInt, &value, NULL, "MTU to the master", NULL);
value.i = -1;
jack_driver_descriptor_add_parameter(desc, &filler, "input_ports", 'C', JackDriverParamInt, &value, NULL, "Number of audio input ports", "Number of audio input ports. If -1, audio physical input from the master");
jack_driver_descriptor_add_parameter(desc, &filler, "output_ports", 'P', JackDriverParamInt, &value, NULL, "Number of audio output ports", "Number of audio output ports. If -1, audio physical output from the master");
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "midi_in_ports", 'i', JackDriverParamInt, &value, NULL, "Number of midi input ports", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "midi_out_ports", 'o', JackDriverParamInt, &value, NULL, "Number of midi output ports", NULL);
#if HAVE_CELT
i++;
strcpy(desc->params[i].name, "celt");
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = -1;
strcpy(desc->params[i].short_desc, "Set CELT encoding and number of kBits per channel");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
value.i = -1;
jack_driver_descriptor_add_parameter(desc, &filler, "celt", 'c', JackDriverParamInt, &value, NULL, "Set CELT encoding and number of kBits per channel", NULL);
#endif
i++;
strcpy(desc->params[i].name, "client_name");
desc->params[i].character = 'n';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, "'hostname'");
strcpy(desc->params[i].short_desc, "Name of the jack client");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "transport_sync");
desc->params[i].character = 't';
desc->params[i].type = JackDriverParamUInt;
desc->params[i].value.ui = 1U;
strcpy(desc->params[i].short_desc, "Sync transport with master's");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
strcpy(desc->params[i].name, "mode");
desc->params[i].character = 'm';
desc->params[i].type = JackDriverParamString;
strcpy(desc->params[i].value.str, "slow");
strcpy(desc->params[i].short_desc, "Slow, Normal or Fast mode.");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
desc->nparams = i + 1;
strcpy(value.str, "'hostname'");
jack_driver_descriptor_add_parameter(desc, &filler, "client_name", 'n', JackDriverParamString, &value, NULL, "Name of the jack client", NULL);
value.ui = 1U;
jack_driver_descriptor_add_parameter(desc, &filler, "transport_sync", 't', JackDriverParamUInt, &value, NULL, "Sync transport with master's", NULL);
strcpy(value.str, "slow");
jack_driver_descriptor_add_parameter(desc, &filler, "mode", 'm', JackDriverParamString, &value, NULL, "Slow, Normal or Fast mode.", NULL);
return desc;
}
......
......@@ -751,38 +751,20 @@ extern "C"
SERVER_EXPORT jack_driver_desc_t* jack_get_descriptor()
{
jack_driver_desc_t *desc;
desc = ( jack_driver_desc_t* ) calloc ( 1, sizeof ( jack_driver_desc_t ) );
strcpy ( desc->name, "netmanager" ); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy ( desc->desc, "netjack multi-cast master component" ); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
desc->nparams = 3;
desc->params = ( jack_driver_param_desc_t* ) calloc ( desc->nparams, sizeof ( jack_driver_param_desc_t ) );
int i = 0;
strcpy ( desc->params[i].name, "multicast_ip" );
desc->params[i].character = 'a';
desc->params[i].type = JackDriverParamString;
strcpy ( desc->params[i].value.str, DEFAULT_MULTICAST_IP );
strcpy ( desc->params[i].short_desc, "Multicast Address" );
strcpy ( desc->params[i].long_desc, desc->params[i].short_desc );
i++;
strcpy ( desc->params[i].name, "udp_net_port" );
desc->params[i].character = 'p';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.i = DEFAULT_PORT;
strcpy ( desc->params[i].short_desc, "UDP port" );
strcpy ( desc->params[i].long_desc, desc->params[i].short_desc );
i++;
strcpy ( desc->params[i].name, "auto_connect" );
desc->params[i].character = 'c';
desc->params[i].type = JackDriverParamBool;
desc->params[i].value.i = false;
strcpy ( desc->params[i].short_desc, "Auto connect netmaster to system ports" );
strcpy ( desc->params[i].long_desc, desc->params[i].short_desc );
jack_driver_desc_t * desc;
jack_driver_desc_filler_t filler;
jack_driver_param_value_t value;
desc = jack_driver_descriptor_construct("netmanager", "netjack multi-cast master component", &filler);
strcpy(value.str, DEFAULT_MULTICAST_IP );
jack_driver_descriptor_add_parameter(desc, &filler, "multicast_ip", 'a', JackDriverParamString, &value, NULL, "Multicast Address", NULL);
value.i = DEFAULT_PORT;
jack_driver_descriptor_add_parameter(desc, &filler, "udp_net_port", 'p', JackDriverParamInt, &value, NULL, "UDP port", NULL);
value.i = false;
jack_driver_descriptor_add_parameter(desc, &filler, "auto_connect", 'c', JackDriverParamBool, &value, NULL, "Auto connect netmaster to system ports", NULL);
return desc;
}
......
......@@ -778,174 +778,62 @@ extern "C"
#endif
SERVER_EXPORT jack_driver_desc_t* driver_get_descriptor ()
{
jack_driver_desc_t* desc = ( jack_driver_desc_t* ) calloc ( 1, sizeof ( jack_driver_desc_t ) );
jack_driver_param_desc_t * params;
strcpy ( desc->name, "netone" ); // size MUST be less then JACK_DRIVER_NAME_MAX + 1
strcpy ( desc->desc, "netjack one slave backend component" ); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1
params =