Commit 7d7f7de1 authored by sletz's avatar sletz
Browse files

Implementation of server_name setting (-n) working.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1644 0c269be4-1314-0410-8aa9-9f06e86f4224
parent af195e47
......@@ -15,7 +15,7 @@ Tom Szilagyi
2007-10-24 Stephane Letz <letz@grame.fr>
* Implementation of server_name setting (-n) in progress.
* Implementation of server_name setting (-n).
2007-10-23 Stephane Letz <letz@grame.fr>
......
......@@ -56,7 +56,7 @@ static inline bool CheckPort(jack_port_id_t port_index)
return (port_index < PORT_NUM);
}
static jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, ...)
EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...)
{
va_list ap; /* variable argument pointer */
jack_varargs_t va; /* variable arguments */
......@@ -74,10 +74,12 @@ static jack_client_t* jack_client_open_aux(const char* client_name, jack_options
}
/* parse variable arguments */
va_start(ap, status);
jack_varargs_parse(options, ap, &va);
va_end(ap);
JackLog("jack_client_open %s\n", client_name);
if (client_name == NULL) {
jack_error("jack_client_new called with a NULL client_name");
......@@ -118,16 +120,7 @@ EXPORT jack_client_t* jack_client_new(const char* client_name)
if (getenv("JACK_START_SERVER") == NULL)
options |= JackNoStartServer;
return jack_client_open_aux(client_name, (jack_options_t)options, NULL);
}
EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...)
{
va_list ap;
va_start(ap, status);
jack_client_t* res = jack_client_open_aux(client_name, options, status, ap);
va_end(ap);
return res;
return jack_client_open(client_name, (jack_options_t)options, NULL);
}
EXPORT int jack_client_close(jack_client_t* ext_client)
......
......@@ -53,13 +53,10 @@ extern "C"
jack_varargs_init (va);
if ((options & JackServerName)) {
printf("jack_varargs_parse :JackServerName\n");
char *sn = va_arg(ap, char *);
if (sn) {
printf("jack_varargs_parse : FOUND SERVER NAME %s\n", sn);
va->server_name = sn;
}
}
char *sn = va_arg(ap, char *);
if (sn)
va->server_name = sn;
}
if ((options & JackLoadName))
va->load_name = va_arg(ap, char *);
if ((options & JackLoadInit))
......
......@@ -463,9 +463,8 @@ int main (int argc, char *argv[])
{
const char **inports; // array of PHY input/output
const char **outports; // array of PHY input/outputs
//const char *server_name = NULL;
const char *server_name = "titititi";
const char **connexions1;
const char *server_name = NULL;
const char **connexions1;
const char **connexions2;
jack_status_t status;
char portname[128] = "port";
......@@ -481,8 +480,7 @@ int main (int argc, char *argv[])
const char *options = "kRnqvt:";
float ratio; // for speed calculation in freewheel mode
jack_options_t jack_options = JackNullOption;
//jack_options_t jack_options = JackServerName;
struct option long_options[] = {
struct option long_options[] = {
{"realtime", 0, 0, 'R'},
{"non-realtime", 0, 0, 'n'},
{"time", 0, 0, 't'},
......
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