Commit 3482655f authored by sletz's avatar sletz
Browse files

Cleanup loopback stuff in server.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3531 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 51f6a078
......@@ -25,6 +25,10 @@ Paul Davis
Jackdmp changes log
---------------------------
2009-05-07 Stephane Letz <letz@grame.fr>
* Cleanup "loopback" stuff in server.
2009-05-06 Stephane Letz <letz@grame.fr>
* Fix transport callback (timebase master, sync) issue when used after jack_activate (RT thread was not running).
......
......@@ -77,10 +77,6 @@ struct jackctl_server
/* int32_t, msecs; if zero, use period size. */
union jackctl_parameter_value client_timeout;
union jackctl_parameter_value default_client_timeout;
/* uint32_t, ports of the loopback driver */
union jackctl_parameter_value loopback_ports;
union jackctl_parameter_value default_loopback_ports;
/* uint32_t, clock source type */
union jackctl_parameter_value clock_source;
......@@ -643,7 +639,7 @@ EXPORT jackctl_server_t * jackctl_server_create()
if (jackctl_add_parameter(
&server_ptr->parameters,
"name",
"server name to use",
"Server name to use.",
"",
JackParamString,
&server_ptr->name,
......@@ -657,7 +653,7 @@ EXPORT jackctl_server_t * jackctl_server_create()
if (jackctl_add_parameter(
&server_ptr->parameters,
"realtime",
"Whether to use realtime mode",
"Whether to use realtime mode.",
"Use realtime scheduling. This is needed for reliable low-latency performance. On most systems, it requires JACK to run with special scheduler and memory allocation privileges, which may be obtained in several ways. On Linux you should use PAM.",
JackParamBool,
&server_ptr->realtime,
......@@ -714,7 +710,7 @@ EXPORT jackctl_server_t * jackctl_server_create()
if (jackctl_add_parameter(
&server_ptr->parameters,
"client-timeout",
"Client timeout limit in milliseconds",
"Client timeout limit in milliseconds.",
"",
JackParamInt,
&server_ptr->client_timeout,
......@@ -724,25 +720,11 @@ EXPORT jackctl_server_t * jackctl_server_create()
goto fail_free_parameters;
}
value.ui = 0;
if (jackctl_add_parameter(
&server_ptr->parameters,
"loopback-ports",
"Number of loopback ports",
"",
JackParamUInt,
&server_ptr->loopback_ports,
&server_ptr->default_loopback_ports,
value) == NULL)
{
goto fail_free_parameters;
}
value.ui = 0;
if (jackctl_add_parameter(
&server_ptr->parameters,
"clock-source",
"Clocksource type : c(ycle) | h(pet) | s(ystem)",
"Clocksource type : c(ycle) | h(pet) | s(ystem).",
"",
JackParamUInt,
&server_ptr->clock_source,
......@@ -756,7 +738,7 @@ EXPORT jackctl_server_t * jackctl_server_create()
if (jackctl_add_parameter(
&server_ptr->parameters,
"replace-registry",
"Replace registry",
"Replace shared memory registry.",
"",
JackParamBool,
&server_ptr->replace_registry,
......@@ -770,7 +752,7 @@ EXPORT jackctl_server_t * jackctl_server_create()
if (jackctl_add_parameter(
&server_ptr->parameters,
"sync",
"Use synchronous mode",
"Use server synchronous mode.",
"",
JackParamBool,
&server_ptr->sync,
......@@ -880,7 +862,6 @@ jackctl_server_start(
server_ptr->client_timeout.i,
server_ptr->realtime.b,
server_ptr->realtime_priority.i,
server_ptr->loopback_ports.ui,
server_ptr->verbose.b,
(jack_timer_type_t)server_ptr->clock_source.ui,
server_ptr->name.str);
......
......@@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackServerGlobals.h"
#include "JackTime.h"
#include "JackFreewheelDriver.h"
#include "JackLoopbackDriver.h"
#include "JackDummyDriver.h"
#include "JackThreadedDriver.h"
#include "JackGlobals.h"
......@@ -39,7 +38,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
namespace Jack
{
JackServer::JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, long loopback, bool verbose, jack_timer_type_t clock, const char* server_name)
JackServer::JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, bool verbose, jack_timer_type_t clock, const char* server_name)
{
if (rt) {
jack_info("JACK server starting in realtime mode with priority %ld", priority);
......@@ -54,7 +53,6 @@ JackServer::JackServer(bool sync, bool temporary, long timeout, bool rt, long pr
fDriverInfo = new JackDriverInfo();
fAudioDriver = NULL;
fFreewheel = false;
fLoopback = loopback;
JackServerGlobals::fInstance = this; // Unique instance
JackServerGlobals::fUserCount = 1; // One user
jack_verbose = verbose;
......
......@@ -57,13 +57,12 @@ class SERVER_EXPORT JackServer
JackConnectionManager fConnectionState;
JackSynchro fSynchroTable[CLIENT_NUM];
bool fFreewheel;
long fLoopback;
int InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int* status);
public:
JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, long loopback, bool verbose, jack_timer_type_t clock, const char* server_name);
JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, bool verbose, jack_timer_type_t clock, const char* server_name);
~JackServer();
int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
......
......@@ -39,12 +39,11 @@ int JackServerGlobals::Start(const char* server_name,
int time_out_ms,
int rt,
int priority,
int loopback,
int verbose,
jack_timer_type_t clock)
{
jack_log("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld ", sync, time_out_ms, rt, priority, verbose);
new JackServer(sync, temporary, time_out_ms, rt, priority, loopback, verbose, clock, server_name); // Will setup fInstance and fUserCount globals
new JackServer(sync, temporary, time_out_ms, rt, priority, verbose, clock, server_name); // Will setup fInstance and fUserCount globals
int res = fInstance->Open(driver_desc, driver_params);
return (res < 0) ? res : fInstance->Start();
}
......@@ -71,7 +70,6 @@ bool JackServerGlobals::Init()
int verbose_aux = 0;
int do_mlock = 1;
unsigned int port_max = 128;
int loopback = 0;
int do_unlock = 0;
int temporary = 0;
......@@ -112,7 +110,6 @@ bool JackServerGlobals::Init()
{ "name", 0, 0, 'n' },
{ "unlock", 0, 0, 'u' },
{ "realtime", 0, 0, 'R' },
{ "loopback", 0, 0, 'L' },
{ "realtime-priority", 1, 0, 'P' },
{ "timeout", 1, 0, 't' },
{ "temporary", 0, 0, 'T' },
......@@ -204,10 +201,6 @@ bool JackServerGlobals::Init()
realtime = 1;
break;
case 'L':
loopback = atoi(optarg);
break;
case 'T':
temporary = 1;
break;
......@@ -296,7 +289,7 @@ bool JackServerGlobals::Init()
free(argv[i]);
}
int res = Start(server_name, driver_desc, driver_params, sync, temporary, client_timeout, realtime, realtime_priority, loopback, verbose_aux, clock_source);
int res = Start(server_name, driver_desc, driver_params, sync, temporary, client_timeout, realtime, realtime_priority, verbose_aux, clock_source);
if (res < 0) {
jack_error("Cannot start server... exit");
Delete();
......
......@@ -52,7 +52,6 @@ struct SERVER_EXPORT JackServerGlobals
int time_out_ms,
int rt,
int priority,
int loopback,
int verbose,
jack_timer_type_t clock);
static void Stop();
......
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