git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1936 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.71
@@ -247,7 +247,7 @@ static inline void WaitGraphChange() | |||
JackEngineControl* control = GetEngineControl(); | |||
if (manager && control && manager->IsPendingChange()) { | |||
JackLog("WaitGraphChange...\n"); | |||
jack_log("WaitGraphChange..."); | |||
JackSleep(int(control->fPeriodUsecs * 1.1f)); | |||
} | |||
} | |||
@@ -845,7 +845,7 @@ EXPORT int jack_set_graph_order_callback(jack_client_t* ext_client, JackGraphOrd | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackClient* client = (JackClient*)ext_client; | |||
JackLog("jack_set_graph_order_callback ext_client %x client %x \n", ext_client, client); | |||
jack_log("jack_set_graph_order_callback ext_client %x client %x ", ext_client, client); | |||
if (client == NULL) { | |||
jack_error("jack_set_graph_order_callback called with a NULL client"); | |||
return -1; | |||
@@ -874,7 +874,7 @@ EXPORT int jack_set_thread_init_callback(jack_client_t* ext_client, JackThreadIn | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackClient* client = (JackClient*)ext_client; | |||
JackLog("jack_set_thread_init_callback ext_client %x client %x \n", ext_client, client); | |||
jack_log("jack_set_thread_init_callback ext_client %x client %x ", ext_client, client); | |||
if (client == NULL) { | |||
jack_error("jack_set_thread_init_callback called with a NULL client"); | |||
return -1; | |||
@@ -1474,7 +1474,7 @@ EXPORT float jack_get_max_delayed_usecs(jack_client_t* ext_client) | |||
#ifdef __CLIENTDEBUG__ | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackLog("jack_get_max_delayed_usecs: not yet implemented\n"); | |||
jack_log("jack_get_max_delayed_usecs: not yet implemented"); | |||
return 0.f; | |||
} | |||
@@ -1483,7 +1483,7 @@ EXPORT float jack_get_xrun_delayed_usecs(jack_client_t* ext_client) | |||
#ifdef __CLIENTDEBUG__ | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackLog("jack_get_xrun_delayed_usecs: not yet implemented\n"); | |||
jack_log("jack_get_xrun_delayed_usecs: not yet implemented"); | |||
return 0.f; | |||
} | |||
@@ -1492,7 +1492,7 @@ EXPORT void jack_reset_max_delayed_usecs(jack_client_t* ext_client) | |||
#ifdef __CLIENTDEBUG__ | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackLog("jack_reset_max_delayed_usecs: not yet implemented\n"); | |||
jack_log("jack_reset_max_delayed_usecs: not yet implemented"); | |||
} | |||
// thread.h | |||
@@ -210,13 +210,14 @@ extern "C" | |||
#define JACK_LIB "libjack.so.0.0" | |||
#define JACKMP_LIB "libjackmp.so" | |||
static void JackLog(const char *fmt,...) | |||
static void jack_log(const char *fmt,...) | |||
{ | |||
/* | |||
va_list ap; | |||
va_start(ap, fmt); | |||
fprintf(stderr,"Jack: "); | |||
vfprintf(stderr, fmt, ap); | |||
fprintf(stderr,"\n"); | |||
va_end(ap); | |||
*/ | |||
} | |||
@@ -227,7 +228,7 @@ typedef void* (*jack_port_get_buffer_fun_def)(jack_port_t* port, jack_nframes_t | |||
static jack_port_get_buffer_fun_def jack_port_get_buffer_fun = 0; | |||
EXPORT void* jack_port_get_buffer(jack_port_t* port, jack_nframes_t frames) | |||
{ | |||
JackLog("jack_port_get_buffer\n"); | |||
jack_log("jack_port_get_buffer"); | |||
return (*jack_port_get_buffer_fun)(port, frames); | |||
} | |||
@@ -235,7 +236,7 @@ typedef const char* (*jack_port_name_fun_def)(const jack_port_t* port); | |||
static jack_port_name_fun_def jack_port_name_fun = 0; | |||
EXPORT const char* jack_port_name(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_name\n"); | |||
jack_log("jack_port_name"); | |||
return (*jack_port_name_fun)(port); | |||
} | |||
@@ -243,7 +244,7 @@ typedef const char* (*jack_port_short_name_fun_def) (const jack_port_t* port); | |||
static jack_port_short_name_fun_def jack_port_short_name_fun = 0; | |||
EXPORT const char* jack_port_short_name(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_short_name\n"); | |||
jack_log("jack_port_short_name"); | |||
return (*jack_port_short_name_fun)(port); | |||
} | |||
@@ -251,7 +252,7 @@ typedef int (*jack_port_flags_fun_def)(const jack_port_t* port); | |||
static jack_port_flags_fun_def jack_port_flags_fun = 0; | |||
EXPORT int jack_port_flags(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_flags\n"); | |||
jack_log("jack_port_flags"); | |||
return (*jack_port_flags_fun)(port); | |||
} | |||
@@ -259,7 +260,7 @@ typedef const char* (*jack_port_type_fun_def)(const jack_port_t* port); | |||
static jack_port_type_fun_def jack_port_type_fun = 0; | |||
EXPORT const char* jack_port_type(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_type\n"); | |||
jack_log("jack_port_type"); | |||
return (*jack_port_type_fun)(port); | |||
} | |||
@@ -267,7 +268,7 @@ typedef int (*jack_port_connected_fun_def)(const jack_port_t* port); | |||
static jack_port_connected_fun_def jack_port_connected_fun = 0; | |||
EXPORT int jack_port_connected(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_connected\n"); | |||
jack_log("jack_port_connected"); | |||
return (*jack_port_connected_fun)(port); | |||
} | |||
@@ -275,7 +276,7 @@ typedef int (*jack_port_connected_to_fun_def)(const jack_port_t* port, const cha | |||
static jack_port_connected_to_fun_def jack_port_connected_to_fun = 0; | |||
EXPORT int jack_port_connected_to(const jack_port_t* port, const char* portname) | |||
{ | |||
JackLog("jack_port_connected_to\n"); | |||
jack_log("jack_port_connected_to"); | |||
return (*jack_port_connected_to_fun)(port, portname); | |||
} | |||
@@ -283,7 +284,7 @@ typedef int (*jack_port_tie_fun_def)(jack_port_t* src, jack_port_t* dst); | |||
static jack_port_tie_fun_def jack_port_tie_fun = 0; | |||
EXPORT int jack_port_tie(jack_port_t* src, jack_port_t* dst) | |||
{ | |||
JackLog("jack_port_tie\n"); | |||
jack_log("jack_port_tie"); | |||
return (*jack_port_tie_fun)(src, dst); | |||
} | |||
@@ -291,7 +292,7 @@ typedef int (*jack_port_untie_fun_def)(jack_port_t* port); | |||
static jack_port_untie_fun_def jack_port_untie_fun = 0; | |||
EXPORT int jack_port_untie(jack_port_t* port) | |||
{ | |||
JackLog("jack_port_untie\n"); | |||
jack_log("jack_port_untie"); | |||
return (*jack_port_untie_fun)(port); | |||
} | |||
@@ -299,7 +300,7 @@ typedef jack_nframes_t (*jack_port_get_latency_fun_def)(jack_port_t* port); | |||
static jack_port_get_latency_fun_def jack_port_get_latency_fun = 0; | |||
EXPORT jack_nframes_t jack_port_get_latency(jack_port_t* port) | |||
{ | |||
JackLog("jack_port_get_latency\n"); | |||
jack_log("jack_port_get_latency"); | |||
return (*jack_port_get_latency)(port); | |||
} | |||
@@ -307,7 +308,7 @@ typedef void (*jack_port_set_latency_fun_def)(jack_port_t* port, jack_nframes_t | |||
static jack_port_set_latency_fun_def jack_port_set_latency_fun = 0; | |||
EXPORT void jack_port_set_latency(jack_port_t* port, jack_nframes_t frames) | |||
{ | |||
JackLog("jack_port_set_latency\n"); | |||
jack_log("jack_port_set_latency"); | |||
(*jack_port_set_latency_fun)(port, frames); | |||
} | |||
@@ -315,7 +316,7 @@ typedef int (*jack_recompute_total_latency_fun_def)(jack_client_t* ext_client, j | |||
static jack_recompute_total_latency_fun_def jack_recompute_total_latency_fun = 0; | |||
EXPORT int jack_recompute_total_latency(jack_client_t* ext_client, jack_port_t* port) | |||
{ | |||
JackLog("jack_recompute_total_latency\n"); | |||
jack_log("jack_recompute_total_latency"); | |||
return (*jack_recompute_total_latency_fun)(ext_client, port); | |||
} | |||
@@ -323,7 +324,7 @@ typedef int (*jack_recompute_total_latencies_fun_def)(jack_client_t* ext_client) | |||
static jack_recompute_total_latencies_fun_def jack_recompute_total_latencies_fun = 0; | |||
EXPORT int jack_recompute_total_latencies(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_recompute_total_latencies\n"); | |||
jack_log("jack_recompute_total_latencies"); | |||
return (*jack_recompute_total_latencies_fun)(ext_client); | |||
} | |||
@@ -331,7 +332,7 @@ typedef int (*jack_port_set_name_fun_def)(jack_port_t* port, const char* name); | |||
static jack_port_set_name_fun_def jack_port_set_name_fun = 0; | |||
EXPORT int jack_port_set_name(jack_port_t* port, const char* name) | |||
{ | |||
JackLog("jack_port_set_name\n"); | |||
jack_log("jack_port_set_name"); | |||
return (*jack_port_set_name_fun)(port, name); | |||
} | |||
@@ -339,7 +340,7 @@ typedef int (*jack_port_set_alias_fun_def)(jack_port_t* port, const char* alias) | |||
static jack_port_set_alias_fun_def jack_port_set_alias_fun = 0; | |||
EXPORT int jack_port_set_alias(jack_port_t* port, const char* alias) | |||
{ | |||
JackLog("jack_port_set_alias\n"); | |||
jack_log("jack_port_set_alias"); | |||
return (*jack_port_set_alias_fun)(port, alias); | |||
} | |||
@@ -347,7 +348,7 @@ typedef int (*jack_port_unset_alias_fun_def)(jack_port_t* port, const char* alia | |||
static jack_port_unset_alias_fun_def jack_port_unset_alias_fun = 0; | |||
EXPORT int jack_port_unset_alias(jack_port_t* port, const char* alias) | |||
{ | |||
JackLog("jack_port_unset_alias\n"); | |||
jack_log("jack_port_unset_alias"); | |||
return (*jack_port_unset_alias_fun)(port, alias); | |||
} | |||
@@ -355,7 +356,7 @@ typedef int (*jack_port_get_aliases_fun_def)(jack_port_t* port, char* const alia | |||
static jack_port_get_aliases_fun_def jack_port_get_aliases_fun = 0; | |||
EXPORT int jack_port_get_aliases(jack_port_t* port, char* const aliases[2]) | |||
{ | |||
JackLog("jack_port_get_aliases\n"); | |||
jack_log("jack_port_get_aliases"); | |||
return (*jack_port_get_aliases_fun)(port, aliases); | |||
} | |||
@@ -363,7 +364,7 @@ typedef int (*jack_port_request_monitor_fun_def)(jack_port_t* port, int onoff); | |||
static jack_port_request_monitor_fun_def jack_port_request_monitor_fun = 0; | |||
EXPORT int jack_port_request_monitor(jack_port_t* port, int onoff) | |||
{ | |||
JackLog("jack_port_request_monitor\n"); | |||
jack_log("jack_port_request_monitor"); | |||
return (*jack_port_request_monitor_fun)(port, onoff); | |||
} | |||
@@ -371,7 +372,7 @@ typedef int (*jack_port_request_monitor_by_name_fun_def)(jack_client_t* ext_clie | |||
static jack_port_request_monitor_by_name_fun_def jack_port_request_monitor_by_name_fun = 0; | |||
EXPORT int jack_port_request_monitor_by_name(jack_client_t* ext_client, const char* port_name, int onoff) | |||
{ | |||
JackLog("jack_port_request_monitor_by_name\n"); | |||
jack_log("jack_port_request_monitor_by_name"); | |||
return (*jack_port_request_monitor_by_name_fun)(ext_client, port_name, onoff); | |||
} | |||
@@ -379,7 +380,7 @@ typedef int (*jack_port_ensure_monitor_fun_def)(jack_port_t* port, int onoff); | |||
static jack_port_ensure_monitor_fun_def jack_port_ensure_monitor_fun = 0; | |||
EXPORT int jack_port_ensure_monitor(jack_port_t* port, int onoff) | |||
{ | |||
JackLog("jack_port_ensure_monitor\n"); | |||
jack_log("jack_port_ensure_monitor"); | |||
return (*jack_port_ensure_monitor_fun)(port, onoff); | |||
} | |||
@@ -387,7 +388,7 @@ typedef int (*jack_port_monitoring_input_fun_def)(jack_port_t* port); | |||
static jack_port_monitoring_input_fun_def jack_port_monitoring_input_fun = 0; | |||
EXPORT int jack_port_monitoring_input(jack_port_t* port) | |||
{ | |||
JackLog("jack_port_monitoring_input\n"); | |||
jack_log("jack_port_monitoring_input"); | |||
return (*jack_port_monitoring_input_fun)(port); | |||
} | |||
@@ -395,7 +396,7 @@ typedef int (*jack_is_realtime_fun_def)(jack_client_t* ext_client); | |||
static jack_is_realtime_fun_def jack_is_realtime_fun = 0; | |||
EXPORT int jack_is_realtime(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_is_realtime\n"); | |||
jack_log("jack_is_realtime"); | |||
return (*jack_is_realtime_fun)(ext_client); | |||
} | |||
@@ -404,7 +405,7 @@ typedef void (*jack_on_shutdown_fun_def)(jack_client_t* ext_client, shutdown_fun | |||
static jack_on_shutdown_fun_def jack_on_shutdown_fun = 0; | |||
EXPORT void jack_on_shutdown(jack_client_t* ext_client, shutdown_fun callback, void* arg) | |||
{ | |||
JackLog("jack_on_shutdown\n"); | |||
jack_log("jack_on_shutdown"); | |||
(*jack_on_shutdown_fun)(ext_client, callback, arg); | |||
} | |||
@@ -412,7 +413,7 @@ typedef int (*jack_set_process_callback_fun_def)(jack_client_t* ext_client, Jack | |||
static jack_set_process_callback_fun_def jack_set_process_callback_fun = 0; | |||
EXPORT int jack_set_process_callback(jack_client_t* ext_client, JackProcessCallback callback, void* arg) | |||
{ | |||
JackLog("jack_set_process_callback\n"); | |||
jack_log("jack_set_process_callback"); | |||
return (*jack_set_process_callback_fun)(ext_client, callback, arg); | |||
} | |||
@@ -420,7 +421,7 @@ typedef int (*jack_set_freewheel_callback_fun_def)(jack_client_t* ext_client, Ja | |||
static jack_set_freewheel_callback_fun_def jack_set_freewheel_callback_fun = 0; | |||
EXPORT int jack_set_freewheel_callback(jack_client_t* ext_client, JackFreewheelCallback freewheel_callback, void* arg) | |||
{ | |||
JackLog("jack_set_freewheel_callback\n"); | |||
jack_log("jack_set_freewheel_callback"); | |||
return (*jack_set_freewheel_callback_fun)(ext_client, freewheel_callback, arg); | |||
} | |||
@@ -428,7 +429,7 @@ typedef int (*jack_set_freewheel_fun_def)(jack_client_t* ext_client, int onoff); | |||
static jack_set_freewheel_fun_def jack_set_freewheel_fun = 0; | |||
EXPORT int jack_set_freewheel(jack_client_t* ext_client, int onoff) | |||
{ | |||
JackLog("jack_set_freewheel\n"); | |||
jack_log("jack_set_freewheel"); | |||
return (*jack_set_freewheel_fun)(ext_client, onoff); | |||
} | |||
@@ -436,7 +437,7 @@ typedef int (*jack_set_buffer_size_fun_def)(jack_client_t* ext_client, jack_nfra | |||
static jack_set_buffer_size_fun_def jack_set_buffer_size_fun = 0; | |||
EXPORT int jack_set_buffer_size(jack_client_t* ext_client, jack_nframes_t buffer_size) | |||
{ | |||
JackLog("jack_set_buffer_size\n"); | |||
jack_log("jack_set_buffer_size"); | |||
return (*jack_set_buffer_size_fun)(ext_client, buffer_size); | |||
} | |||
@@ -444,7 +445,7 @@ typedef int (*jack_set_buffer_size_callback_fun_def)(jack_client_t* ext_client, | |||
static jack_set_buffer_size_callback_fun_def jack_set_buffer_size_callback_fun = 0; | |||
EXPORT int jack_set_buffer_size_callback(jack_client_t* ext_client, JackBufferSizeCallback bufsize_callback, void* arg) | |||
{ | |||
JackLog("jack_set_buffer_size_callback\n"); | |||
jack_log("jack_set_buffer_size_callback"); | |||
return (*jack_set_buffer_size_callback_fun)(ext_client, bufsize_callback, arg); | |||
} | |||
@@ -452,7 +453,7 @@ typedef int (*jack_set_sample_rate_callback_fun_def)(jack_client_t* ext_client, | |||
static jack_set_sample_rate_callback_fun_def jack_set_sample_rate_callback_fun = 0; | |||
EXPORT int jack_set_sample_rate_callback(jack_client_t* ext_client, JackSampleRateCallback srate_callback, void* arg) | |||
{ | |||
JackLog("jack_set_sample_rate_callback\n"); | |||
jack_log("jack_set_sample_rate_callback"); | |||
return (*jack_set_sample_rate_callback_fun)(ext_client, srate_callback, arg); | |||
} | |||
@@ -460,7 +461,7 @@ typedef int (*jack_set_client_registration_callback_fun_def)(jack_client_t* ext_ | |||
static jack_set_client_registration_callback_fun_def jack_set_client_registration_callback_fun = 0; | |||
EXPORT int jack_set_client_registration_callback(jack_client_t* ext_client, JackClientRegistrationCallback registration_callback, void* arg) | |||
{ | |||
JackLog("jack_set_client_registration_callback\n"); | |||
jack_log("jack_set_client_registration_callback"); | |||
return (*jack_set_client_registration_callback_fun)(ext_client, registration_callback, arg); | |||
} | |||
@@ -468,7 +469,7 @@ typedef int (*jack_set_port_registration_callback_fun_def)(jack_client_t* ext_cl | |||
static jack_set_port_registration_callback_fun_def jack_set_port_registration_callback_fun = 0; | |||
EXPORT int jack_set_port_registration_callback(jack_client_t* ext_client, JackPortRegistrationCallback registration_callback, void* arg) | |||
{ | |||
JackLog("jack_set_port_registration_callback\n"); | |||
jack_log("jack_set_port_registration_callback"); | |||
return (*jack_set_port_registration_callback_fun)(ext_client, registration_callback, arg); | |||
} | |||
@@ -476,7 +477,7 @@ typedef int (*jack_set_port_connect_callback_fun_def)(jack_client_t* ext_client, | |||
static jack_set_port_connect_callback_fun_def jack_set_port_connect_callback_fun = 0; | |||
EXPORT int jack_set_port_connect_callback(jack_client_t* ext_client, JackPortConnectCallback connect_callback, void* arg) | |||
{ | |||
JackLog("jack_set_port_connect_callback\n"); | |||
jack_log("jack_set_port_connect_callback"); | |||
return (*jack_set_port_connect_callback_fun)(ext_client, connect_callback, arg); | |||
} | |||
@@ -484,7 +485,7 @@ typedef int (*jack_set_graph_order_callback_fun_def)(jack_client_t* ext_client, | |||
static jack_set_graph_order_callback_fun_def jack_set_graph_order_callback_fun = 0; | |||
EXPORT int jack_set_graph_order_callback(jack_client_t* ext_client, JackGraphOrderCallback graph_callback, void* arg) | |||
{ | |||
JackLog("jack_set_graph_order_callback\n"); | |||
jack_log("jack_set_graph_order_callback"); | |||
return (*jack_set_graph_order_callback_fun)(ext_client, graph_callback, arg); | |||
} | |||
@@ -492,7 +493,7 @@ typedef int (*jack_set_xrun_callback_fun_def)(jack_client_t* ext_client, JackXRu | |||
static jack_set_xrun_callback_fun_def jack_set_xrun_callback_fun = 0; | |||
EXPORT int jack_set_xrun_callback(jack_client_t* ext_client, JackXRunCallback xrun_callback, void* arg) | |||
{ | |||
JackLog("jack_set_xrun_callback\n"); | |||
jack_log("jack_set_xrun_callback"); | |||
return (*jack_set_xrun_callback_fun)(ext_client, xrun_callback, arg); | |||
} | |||
@@ -500,7 +501,7 @@ typedef int (*jack_set_thread_init_callback_fun_def)(jack_client_t* ext_client, | |||
static jack_set_thread_init_callback_fun_def jack_set_thread_init_callback_fun = 0; | |||
EXPORT int jack_set_thread_init_callback(jack_client_t* ext_client, JackThreadInitCallback init_callback, void *arg) | |||
{ | |||
JackLog("jack_set_thread_init_callback\n"); | |||
jack_log("jack_set_thread_init_callback"); | |||
return (*jack_set_thread_init_callback_fun)(ext_client, init_callback, arg); | |||
} | |||
@@ -508,7 +509,7 @@ typedef int (*jack_activate_fun_def)(jack_client_t* ext_client); | |||
static jack_activate_fun_def jack_activate_fun = 0; | |||
EXPORT int jack_activate(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_activate\n"); | |||
jack_log("jack_activate"); | |||
return (*jack_activate_fun)(ext_client); | |||
} | |||
@@ -516,7 +517,7 @@ typedef int (*jack_deactivate_fun_def)(jack_client_t* ext_client); | |||
static jack_deactivate_fun_def jack_deactivate_fun = 0; | |||
EXPORT int jack_deactivate(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_deactivate\n"); | |||
jack_log("jack_deactivate"); | |||
return (*jack_deactivate_fun)(ext_client); | |||
} | |||
@@ -524,7 +525,7 @@ typedef jack_port_t* (*jack_port_register_fun_def)(jack_client_t* ext_client, co | |||
static jack_port_register_fun_def jack_port_register_fun = 0; | |||
EXPORT jack_port_t* jack_port_register(jack_client_t* ext_client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size) | |||
{ | |||
JackLog("jack_port_register\n"); | |||
jack_log("jack_port_register"); | |||
return (*jack_port_register_fun)(ext_client, port_name, port_type, flags, buffer_size); | |||
} | |||
@@ -532,7 +533,7 @@ typedef int (*jack_port_unregister_fun_def)(jack_client_t* ext_client, jack_port | |||
static jack_port_unregister_fun_def jack_port_unregister_fun = 0; | |||
EXPORT int jack_port_unregister(jack_client_t* ext_client, jack_port_t* port) | |||
{ | |||
JackLog("jack_port_unregister\n"); | |||
jack_log("jack_port_unregister"); | |||
return (*jack_port_unregister_fun)(ext_client, port); | |||
} | |||
@@ -540,7 +541,7 @@ typedef int (*jack_port_is_mine_fun_def)(const jack_client_t* ext_client, const | |||
static jack_port_is_mine_fun_def jack_port_is_mine_fun = 0; | |||
EXPORT int jack_port_is_mine(const jack_client_t* ext_client, const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_is_mine\n"); | |||
jack_log("jack_port_is_mine"); | |||
return (*jack_port_is_mine_fun)(ext_client, port); | |||
} | |||
@@ -548,7 +549,7 @@ typedef const char** (*jack_port_get_connections_fun_def)(const jack_port_t* por | |||
static jack_port_get_connections_fun_def jack_port_get_connections_fun = 0; | |||
EXPORT const char** jack_port_get_connections(const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_get_connections\n"); | |||
jack_log("jack_port_get_connections"); | |||
return (*jack_port_get_connections_fun)(port); | |||
} | |||
@@ -557,7 +558,7 @@ typedef const char** (*jack_port_get_all_connections_fun_def)(const jack_client_ | |||
static jack_port_get_all_connections_fun_def jack_port_get_all_connections_fun = 0; | |||
EXPORT const char** jack_port_get_all_connections(const jack_client_t* ext_client, const jack_port_t* port) | |||
{ | |||
JackLog("jack_port_get_all_connections\n"); | |||
jack_log("jack_port_get_all_connections"); | |||
return (*jack_port_get_all_connections_fun)(ext_client, port); | |||
} | |||
@@ -565,7 +566,7 @@ typedef jack_nframes_t (*jack_port_get_total_latency_fun_def)(jack_client_t* ext | |||
static jack_port_get_total_latency_fun_def jack_port_get_total_latency_fun = 0; | |||
EXPORT jack_nframes_t jack_port_get_total_latency(jack_client_t* ext_client, jack_port_t* port) | |||
{ | |||
JackLog("jack_port_get_total_latency\n"); | |||
jack_log("jack_port_get_total_latency"); | |||
return (*jack_port_get_total_latency_fun)(ext_client, port); | |||
} | |||
@@ -573,7 +574,7 @@ typedef int (*jack_connect_fun_def)(jack_client_t* ext_client, const char* src, | |||
static jack_connect_fun_def jack_connect_fun = 0; | |||
EXPORT int jack_connect(jack_client_t* ext_client, const char* src, const char* dst) | |||
{ | |||
JackLog("jack_connect\n"); | |||
jack_log("jack_connect"); | |||
return (*jack_connect_fun)(ext_client, src, dst); | |||
} | |||
@@ -581,7 +582,7 @@ typedef int (*jack_disconnect_fun_def)(jack_client_t* ext_client, const char* sr | |||
static jack_disconnect_fun_def jack_disconnect_fun = 0; | |||
EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const char* dst) | |||
{ | |||
JackLog("jack_disconnect\n"); | |||
jack_log("jack_disconnect"); | |||
return (*jack_disconnect_fun)(ext_client, src, dst); | |||
} | |||
@@ -589,7 +590,7 @@ typedef int (*jack_port_disconnect_fun_def)(jack_client_t* ext_client, jack_port | |||
static jack_port_disconnect_fun_def jack_port_disconnect_fun = 0; | |||
EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src) | |||
{ | |||
JackLog("jack_port_disconnect\n"); | |||
jack_log("jack_port_disconnect"); | |||
return (*jack_port_disconnect_fun)(ext_client, src); | |||
} | |||
@@ -597,7 +598,7 @@ typedef jack_nframes_t (*jack_get_sample_rate_fun_def)(jack_client_t* ext_client | |||
static jack_get_sample_rate_fun_def jack_get_sample_rate_fun = 0; | |||
EXPORT jack_nframes_t jack_get_sample_rate(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_sample_rate\n"); | |||
jack_log("jack_get_sample_rate"); | |||
return (*jack_get_sample_rate_fun)(ext_client); | |||
} | |||
@@ -605,7 +606,7 @@ typedef jack_nframes_t (*jack_get_buffer_size_fun_def)(jack_client_t* ext_client | |||
static jack_get_buffer_size_fun_def jack_get_buffer_size_fun = 0; | |||
EXPORT jack_nframes_t jack_get_buffer_size(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_buffer_size\n"); | |||
jack_log("jack_get_buffer_size"); | |||
return (*jack_get_buffer_size_fun)(ext_client); | |||
} | |||
@@ -613,7 +614,7 @@ typedef const char** (*jack_get_ports_fun_def)(jack_client_t* ext_client, const | |||
static jack_get_ports_fun_def jack_get_ports_fun = 0; | |||
EXPORT const char** jack_get_ports(jack_client_t* ext_client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags) | |||
{ | |||
JackLog("jack_get_ports\n"); | |||
jack_log("jack_get_ports"); | |||
return (*jack_get_ports_fun)(ext_client, port_name_pattern, type_name_pattern, flags); | |||
} | |||
@@ -621,7 +622,7 @@ typedef jack_port_t* (*jack_port_by_name_fun_def)(jack_client_t* ext_client, con | |||
static jack_port_by_name_fun_def jack_port_by_name_fun = 0; | |||
EXPORT jack_port_t* jack_port_by_name(jack_client_t* ext_client, const char* portname) | |||
{ | |||
JackLog("jack_port_by_name\n"); | |||
jack_log("jack_port_by_name"); | |||
return (*jack_port_by_name_fun)(ext_client, portname); | |||
} | |||
@@ -629,7 +630,7 @@ typedef jack_port_t* (*jack_port_by_id_fun_def)(const jack_client_t* ext_client, | |||
static jack_port_by_id_fun_def jack_port_by_id_fun = 0; | |||
EXPORT jack_port_t* jack_port_by_id(const jack_client_t* ext_client, jack_port_id_t id) | |||
{ | |||
JackLog("jack_port_by_id\n"); | |||
jack_log("jack_port_by_id"); | |||
return (*jack_port_by_id_fun)(ext_client, id); | |||
} | |||
@@ -637,7 +638,7 @@ typedef int (*jack_engine_takeover_timebase_fun_def)(jack_client_t* ext_client); | |||
static jack_engine_takeover_timebase_fun_def jack_engine_takeover_timebase_fun = 0; | |||
EXPORT int jack_engine_takeover_timebase(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_engine_takeover_timebase\n"); | |||
jack_log("jack_engine_takeover_timebase"); | |||
return (*jack_engine_takeover_timebase_fun)(ext_client); | |||
} | |||
@@ -645,7 +646,7 @@ typedef jack_nframes_t (*jack_frames_since_cycle_start_fun_def)(const jack_clien | |||
static jack_frames_since_cycle_start_fun_def jack_frames_since_cycle_start_fun = 0; | |||
EXPORT jack_nframes_t jack_frames_since_cycle_start(const jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_frames_since_cycle_start\n"); | |||
jack_log("jack_frames_since_cycle_start"); | |||
return (*jack_frames_since_cycle_start_fun)(ext_client); | |||
} | |||
@@ -653,7 +654,7 @@ typedef jack_time_t (*jack_get_time_fun_def)(); | |||
static jack_get_time_fun_def jack_get_time_fun = 0; | |||
EXPORT jack_time_t jack_get_time() | |||
{ | |||
JackLog("jack_get_time\n"); | |||
jack_log("jack_get_time"); | |||
return (*jack_get_time_fun)(); | |||
} | |||
@@ -661,7 +662,7 @@ typedef jack_nframes_t (*jack_time_to_frames_fun_def)(const jack_client_t* ext_c | |||
static jack_time_to_frames_fun_def jack_time_to_frames_fun = 0; | |||
EXPORT jack_nframes_t jack_time_to_frames(const jack_client_t* ext_client, jack_time_t time) | |||
{ | |||
JackLog("jack_time_to_frames\n"); | |||
jack_log("jack_time_to_frames"); | |||
return (*jack_time_to_frames_fun)(ext_client, time); | |||
} | |||
@@ -669,7 +670,7 @@ typedef jack_time_t (*jack_frames_to_time_fun_def)(const jack_client_t* ext_clie | |||
static jack_frames_to_time_fun_def jack_frames_to_time_fun = 0; | |||
EXPORT jack_time_t jack_frames_to_time(const jack_client_t* ext_client, jack_nframes_t frames) | |||
{ | |||
JackLog("jack_frames_to_time\n"); | |||
jack_log("jack_frames_to_time"); | |||
return (*jack_frames_to_time_fun)(ext_client, frames); | |||
} | |||
@@ -677,7 +678,7 @@ typedef jack_nframes_t (*jack_frame_time_fun_def)(const jack_client_t* ext_clien | |||
static jack_frame_time_fun_def jack_frame_time_fun = 0; | |||
EXPORT jack_nframes_t jack_frame_time(const jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_frame_time\n"); | |||
jack_log("jack_frame_time"); | |||
return (*jack_frame_time_fun)(ext_client); | |||
} | |||
@@ -685,7 +686,7 @@ typedef jack_nframes_t (*jack_last_frame_time_fun_def)(const jack_client_t* ext_ | |||
static jack_last_frame_time_fun_def jack_last_frame_time_fun = 0; | |||
EXPORT jack_nframes_t jack_last_frame_time(const jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_last_frame_time\n"); | |||
jack_log("jack_last_frame_time"); | |||
return (*jack_last_frame_time_fun)(ext_client); | |||
} | |||
@@ -693,7 +694,7 @@ typedef float (*jack_cpu_load_fun_def)(jack_client_t* ext_client); | |||
static jack_cpu_load_fun_def jack_cpu_load_fun = 0; | |||
EXPORT float jack_cpu_load(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_cpu_load\n"); | |||
jack_log("jack_cpu_load"); | |||
return (*jack_cpu_load_fun)(ext_client); | |||
} | |||
@@ -701,7 +702,7 @@ typedef pthread_t (*jack_client_thread_id_fun_def)(jack_client_t* ext_client); | |||
static jack_client_thread_id_fun_def jack_client_thread_id_fun = 0; | |||
EXPORT pthread_t jack_client_thread_id(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_client_thread_id\n"); | |||
jack_log("jack_client_thread_id"); | |||
return (*jack_client_thread_id_fun)(ext_client); | |||
} | |||
@@ -710,7 +711,7 @@ static jack_set_error_function_fun_def jack_set_error_function_fun = 0; | |||
//EXPORT void jack_set_error_function(void (*func)(const char *) error_fun) | |||
EXPORT void jack_set_error_function(error_callback fun) | |||
{ | |||
JackLog("jack_set_error_function\n"); | |||
jack_log("jack_set_error_function\n"); | |||
(*jack_set_error_function_fun)(fun); | |||
} | |||
@@ -718,7 +719,7 @@ typedef char* (*jack_get_client_name_fun_def)(jack_client_t* ext_client); | |||
static jack_get_client_name_fun_def jack_get_client_name_fun = 0; | |||
EXPORT char* jack_get_client_name (jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_client_name\n"); | |||
jack_log("jack_get_client_name"); | |||
return (*jack_get_client_name_fun)(ext_client); | |||
} | |||
@@ -730,7 +731,7 @@ EXPORT int jack_internal_client_new (const char *client_name, | |||
const char *load_name, | |||
const char *load_init) | |||
{ | |||
JackLog("jack_internal_client_new\n"); | |||
jack_log("jack_internal_client_new"); | |||
return (*jack_internal_client_new_fun)(client_name, load_name, load_init); | |||
} | |||
@@ -738,7 +739,7 @@ typedef void (*jack_internal_client_close_fun_def)(const char *client_name); | |||
static jack_internal_client_close_fun_def jack_internal_client_close_fun = 0; | |||
EXPORT void jack_internal_client_close (const char *client_name) | |||
{ | |||
JackLog("jack_internal_client_close\n"); | |||
jack_log("jack_internal_client_close"); | |||
(*jack_internal_client_close_fun)(client_name); | |||
} | |||
@@ -746,7 +747,7 @@ typedef int (*jack_client_name_size_fun_def)(void); | |||
static jack_client_name_size_fun_def jack_client_name_size_fun = 0; | |||
EXPORT int jack_client_name_size(void) | |||
{ | |||
JackLog("jack_client_name_size\n"); | |||
jack_log("jack_client_name_size"); | |||
return (*jack_client_name_size_fun)(); | |||
} | |||
@@ -754,7 +755,7 @@ typedef int (*jack_port_name_size_fun_def)(void); | |||
static jack_port_name_size_fun_def jack_port_name_size_fun = 0; | |||
EXPORT int jack_port_name_size(void) | |||
{ | |||
JackLog("jack_port_name_size\n"); | |||
jack_log("jack_port_name_size"); | |||
return (*jack_port_name_size_fun)(); | |||
} | |||
@@ -762,7 +763,7 @@ typedef int (*jack_port_type_size_fun_def)(void); | |||
static jack_port_type_size_fun_def jack_port_type_size_fun = 0; | |||
EXPORT int jack_port_type_size(void) | |||
{ | |||
JackLog("jack_port_type_size\n"); | |||
jack_log("jack_port_type_size"); | |||
return (*jack_port_type_size_fun)(); | |||
} | |||
@@ -772,7 +773,7 @@ typedef int (*jack_release_timebase_fun_def)(jack_client_t* ext_client); | |||
static jack_release_timebase_fun_def jack_release_timebase_fun = 0; | |||
EXPORT int jack_release_timebase(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_release_timebase\n"); | |||
jack_log("jack_release_timebase"); | |||
return (*jack_release_timebase_fun)(ext_client); | |||
} | |||
@@ -780,7 +781,7 @@ typedef int (*jack_set_sync_callback_fun_def)(jack_client_t* ext_client, JackSyn | |||
static jack_set_sync_callback_fun_def jack_set_sync_callback_fun = 0; | |||
EXPORT int jack_set_sync_callback(jack_client_t* ext_client, JackSyncCallback sync_callback, void *arg) | |||
{ | |||
JackLog("jack_set_sync_callback\n"); | |||
jack_log("jack_set_sync_callback"); | |||
return (*jack_set_sync_callback_fun)(ext_client, sync_callback, arg); | |||
} | |||
@@ -788,7 +789,7 @@ typedef int (*jack_set_sync_timeout_fun_def)(jack_client_t* ext_client, jack_tim | |||
static jack_set_sync_timeout_fun_def jack_set_sync_timeout_fun = 0; | |||
EXPORT int jack_set_sync_timeout(jack_client_t* ext_client, jack_time_t timeout) | |||
{ | |||
JackLog("jack_set_sync_timeout\n"); | |||
jack_log("jack_set_sync_timeout"); | |||
return (*jack_set_sync_timeout_fun)(ext_client, timeout); | |||
} | |||
@@ -796,7 +797,7 @@ typedef int (*jack_set_timebase_callback_fun_def)(jack_client_t* ext_client, int | |||
static jack_set_timebase_callback_fun_def jack_set_timebase_callback_fun = 0; | |||
EXPORT int jack_set_timebase_callback(jack_client_t* ext_client, int conditional, JackTimebaseCallback timebase_callback, void* arg) | |||
{ | |||
JackLog("jack_set_timebase_callback\n"); | |||
jack_log("jack_set_timebase_callback"); | |||
return (*jack_set_timebase_callback_fun)(ext_client, conditional, timebase_callback, arg); | |||
} | |||
@@ -804,7 +805,7 @@ typedef int (*jack_transport_locate_fun_def)(jack_client_t* ext_client, jack_nfr | |||
static jack_transport_locate_fun_def jack_transport_locate_fun = 0; | |||
EXPORT int jack_transport_locate(jack_client_t* ext_client, jack_nframes_t frame) | |||
{ | |||
JackLog("jack_transport_locate\n"); | |||
jack_log("jack_transport_locate"); | |||
return (*jack_transport_locate_fun)(ext_client, frame); | |||
} | |||
@@ -812,7 +813,7 @@ typedef jack_transport_state_t (*jack_transport_query_fun_def)(const jack_client | |||
static jack_transport_query_fun_def jack_transport_query_fun = 0; | |||
EXPORT jack_transport_state_t jack_transport_query(const jack_client_t* ext_client, jack_position_t* pos) | |||
{ | |||
JackLog("jack_transport_query\n"); | |||
jack_log("jack_transport_query"); | |||
return (*jack_transport_query_fun)(ext_client, pos); | |||
} | |||
@@ -820,7 +821,7 @@ typedef jack_nframes_t (*jack_get_current_transport_frame_fun_def)(const jack_cl | |||
static jack_get_current_transport_frame_fun_def jack_get_current_transport_frame_fun = 0; | |||
EXPORT jack_nframes_t jack_get_current_transport_frame(const jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_current_transport_frame\n"); | |||
jack_log("jack_get_current_transport_frame"); | |||
return (*jack_get_current_transport_frame_fun)(ext_client); | |||
} | |||
@@ -828,7 +829,7 @@ typedef int (*jack_transport_reposition_fun_def)(jack_client_t* ext_client, jack | |||
static jack_transport_reposition_fun_def jack_transport_reposition_fun = 0; | |||
EXPORT int jack_transport_reposition(jack_client_t* ext_client, jack_position_t* pos) | |||
{ | |||
JackLog("jack_transport_reposition\n"); | |||
jack_log("jack_transport_reposition"); | |||
return (*jack_transport_reposition_fun)(ext_client, pos); | |||
} | |||
@@ -836,7 +837,7 @@ typedef void (*jack_transport_start_fun_def)(jack_client_t* ext_client); | |||
static jack_transport_start_fun_def jack_transport_start_fun = 0; | |||
EXPORT void jack_transport_start(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_transport_start\n"); | |||
jack_log("jack_transport_start"); | |||
(*jack_transport_start_fun)(ext_client); | |||
} | |||
@@ -844,7 +845,7 @@ typedef void (*jack_transport_stop_fun_def)(jack_client_t* ext_client); | |||
static jack_transport_stop_fun_def jack_transport_stop_fun = 0; | |||
EXPORT void jack_transport_stop(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_transport_stop\n"); | |||
jack_log("jack_transport_stop"); | |||
(*jack_transport_stop_fun)(ext_client); | |||
} | |||
@@ -854,7 +855,7 @@ typedef void (*jack_get_transport_info_fun_def)(jack_client_t* ext_client, jack_ | |||
static jack_get_transport_info_fun_def jack_get_transport_info_fun = 0; | |||
EXPORT void jack_get_transport_info(jack_client_t* ext_client, jack_transport_info_t* tinfo) | |||
{ | |||
JackLog("jack_get_transport_info\n"); | |||
jack_log("jack_get_transport_info"); | |||
(*jack_get_transport_info_fun)(ext_client, tinfo); | |||
} | |||
@@ -862,7 +863,7 @@ typedef void (*jack_set_transport_info_fun_def)(jack_client_t* ext_client, jack_ | |||
static jack_set_transport_info_fun_def jack_set_transport_info_fun = 0; | |||
EXPORT void jack_set_transport_info(jack_client_t* ext_client, jack_transport_info_t* tinfo) | |||
{ | |||
JackLog("jack_set_transport_info\n"); | |||
jack_log("jack_set_transport_info"); | |||
(*jack_set_transport_info_fun)(ext_client, tinfo); | |||
} | |||
@@ -872,7 +873,7 @@ typedef float (*jack_get_max_delayed_usecs_fun_def)(jack_client_t* ext_client); | |||
static jack_get_max_delayed_usecs_fun_def jack_get_max_delayed_usecs_fun = 0; | |||
EXPORT float jack_get_max_delayed_usecs(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_max_delayed_usecs\n"); | |||
jack_log("jack_get_max_delayed_usecs"); | |||
return (*jack_get_max_delayed_usecs_fun)(ext_client); | |||
} | |||
@@ -880,7 +881,7 @@ typedef float (*jack_get_xrun_delayed_usecs_fun_def)(jack_client_t* ext_client); | |||
static jack_get_xrun_delayed_usecs_fun_def jack_get_xrun_delayed_usecs_fun = 0; | |||
EXPORT float jack_get_xrun_delayed_usecs(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_get_xrun_delayed_usecs\n"); | |||
jack_log("jack_get_xrun_delayed_usecs"); | |||
return (*jack_get_xrun_delayed_usecs_fun)(ext_client); | |||
} | |||
@@ -888,7 +889,7 @@ typedef void (*jack_reset_max_delayed_usecs_fun_def)(jack_client_t* ext_client); | |||
static jack_reset_max_delayed_usecs_fun_def jack_reset_max_delayed_usecs_fun = 0; | |||
EXPORT void jack_reset_max_delayed_usecs(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_reset_max_delayed_usecs\n"); | |||
jack_log("jack_reset_max_delayed_usecs"); | |||
(*jack_reset_max_delayed_usecs)(ext_client); | |||
} | |||
@@ -898,7 +899,7 @@ typedef int (*jack_acquire_real_time_scheduling_fun_def)(pthread_t thread, int p | |||
static jack_acquire_real_time_scheduling_fun_def jack_acquire_real_time_scheduling_fun = 0; | |||
EXPORT int jack_acquire_real_time_scheduling(pthread_t thread, int priority) | |||
{ | |||
JackLog("jack_acquire_real_time_scheduling\n"); | |||
jack_log("jack_acquire_real_time_scheduling"); | |||
return (*jack_acquire_real_time_scheduling_fun)(thread, priority); | |||
} | |||
@@ -917,7 +918,7 @@ EXPORT int jack_client_create_thread(jack_client_t* client, | |||
start_routine callback, | |||
void *arg) | |||
{ | |||
JackLog("jack_client_create_thread\n"); | |||
jack_log("jack_client_create_thread"); | |||
return (*jack_client_create_thread_fun)(client, thread, priority, realtime, callback, arg); | |||
} | |||
@@ -925,7 +926,7 @@ typedef int (*jack_drop_real_time_scheduling_fun_def)(pthread_t thread); | |||
static jack_drop_real_time_scheduling_fun_def jack_drop_real_time_scheduling_fun = 0; | |||
EXPORT int jack_drop_real_time_scheduling(pthread_t thread) | |||
{ | |||
JackLog("jack_client_create_thread\n"); | |||
jack_log("jack_client_create_thread"); | |||
return (*jack_drop_real_time_scheduling_fun)(thread); | |||
} | |||
@@ -935,7 +936,7 @@ typedef char* (*jack_get_internal_client_name_fun_def)(jack_client_t* ext_client | |||
static jack_get_internal_client_name_fun_def jack_get_internal_client_name_fun = 0; | |||
EXPORT char* jack_get_internal_client_name(jack_client_t* ext_client, jack_intclient_t intclient) | |||
{ | |||
JackLog("jack_get_internal_client_name\n"); | |||
jack_log("jack_get_internal_client_name"); | |||
return (*jack_get_internal_client_name_fun)(ext_client, intclient); | |||
} | |||
@@ -943,7 +944,7 @@ typedef jack_intclient_t (*jack_internal_client_handle_fun_def)(jack_client_t* e | |||
static jack_internal_client_handle_fun_def jack_internal_client_handle_fun = 0; | |||
EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t* ext_client, const char* client_name, jack_status_t* status) | |||
{ | |||
JackLog("jack_internal_client_handle\n"); | |||
jack_log("jack_internal_client_handle"); | |||
return (*jack_internal_client_handle_fun)(ext_client, client_name, status); | |||
} | |||
@@ -951,7 +952,7 @@ typedef jack_intclient_t (*jack_internal_client_load_fun_def)(jack_client_t* ext | |||
static jack_internal_client_load_fun_def jack_internal_client_load_fun = 0; | |||
EXPORT jack_intclient_t jack_internal_client_load(jack_client_t* ext_client, const char* client_name, jack_options_t options, jack_status_t* status, ...) | |||
{ | |||
JackLog("jack_internal_client_load\n"); | |||
jack_log("jack_internal_client_load"); | |||
va_list ap; | |||
va_start(ap, status); | |||
jack_intclient_t res = (*jack_internal_client_load_fun)(ext_client, client_name, options, status, ap); | |||
@@ -963,7 +964,7 @@ typedef jack_status_t (*jack_internal_client_unload_fun_def)(jack_client_t* ext_ | |||
static jack_internal_client_unload_fun_def jack_internal_client_unload_fun = 0; | |||
EXPORT jack_status_t jack_internal_client_unload(jack_client_t* ext_client, jack_intclient_t intclient) | |||
{ | |||
JackLog("jack_internal_client_unload\n"); | |||
jack_log("jack_internal_client_unload"); | |||
return (*jack_internal_client_unload_fun)(ext_client, intclient); | |||
} | |||
@@ -979,7 +980,7 @@ static jack_client_open_fun_def jack_client_open_fun = 0; | |||
EXPORT jack_client_t * jack_client_open(const char *client_name, jack_options_t options, jack_status_t *status, ...) | |||
{ | |||
// TODO : in "autostart mode", has to load jackdrc file and figure out which server has to be started... | |||
JackLog("jack_client_open\n"); | |||
jack_log("jack_client_open"); | |||
// Library check... | |||
if (!open_library()) | |||
@@ -996,7 +997,7 @@ typedef jack_client_t * (*jack_client_new_fun_def)(const char *client_name); | |||
static jack_client_new_fun_def jack_client_new_fun = 0; | |||
EXPORT jack_client_t * jack_client_new(const char *client_name) | |||
{ | |||
JackLog("jack_client_new\n"); | |||
jack_log("jack_client_new"); | |||
// Library check... | |||
if (!open_library()) | |||
return 0; | |||
@@ -1008,7 +1009,7 @@ typedef int (*jack_client_close_fun_def)(jack_client_t *client); | |||
static jack_client_close_fun_def jack_client_close_fun = 0; | |||
EXPORT int jack_client_close(jack_client_t *client) | |||
{ | |||
JackLog("jack_client_close\n"); | |||
jack_log("jack_client_close"); | |||
int res = (*jack_client_close_fun)(client); | |||
close_library(); | |||
return res; | |||
@@ -74,12 +74,12 @@ Requirement: | |||
The fCounter is an array of indexes to access the current and 3 different "pending" states. | |||
ÂĄ WriteNextStateStart(int index) must return a valid state to be written into, and must invalidate state "index" ==> cur state switch. | |||
ÂĄ WriteNextStateStop(int index) makes the "index" state become "switchable" with the current state. | |||
ÂĄ TrySwitchState(int index) must detect that pending state is a new state, and does the switch | |||
ÂĄ ReadCurrentState() must return the state | |||
ÂĄ GetCurrentIndex() must return an index increased each new switch. | |||
ÂĄ WriteNextStateStart(int index1) and WriteNextStateStart(int index2) can be interleaved | |||
WriteNextStateStart(int index) must return a valid state to be written into, and must invalidate state "index" ==> cur state switch. | |||
WriteNextStateStop(int index) makes the "index" state become "switchable" with the current state. | |||
TrySwitchState(int index) must detect that pending state is a new state, and does the switch | |||
ReadCurrentState() must return the state | |||
GetCurrentIndex() must return an index increased each new switch. | |||
WriteNextStateStart(int index1) and WriteNextStateStart(int index2) can be interleaved | |||
[switch counter][index state][index state][cur index] | |||
@@ -136,7 +136,7 @@ class JackAtomicArrayState | |||
JackAtomicArrayState() | |||
{ | |||
JackLog("JackAtomicArrayState constructor\n"); | |||
jack_log("JackAtomicArrayState constructor"); | |||
Counter1(fCounter) = 0; | |||
} | |||
@@ -91,7 +91,7 @@ int JackAudioDriver::Attach() | |||
unsigned long port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal; | |||
int i; | |||
JackLog("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
jack_log("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
for (i = 0; i < fCaptureChannels; i++) { | |||
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fClientControl->fName, fCaptureDriverName, i + 1); | |||
@@ -104,7 +104,7 @@ int JackAudioDriver::Attach() | |||
port->SetAlias(alias); | |||
port->SetLatency(fEngineControl->fBufferSize + fCaptureLatency); | |||
fCapturePortList[i] = port_index; | |||
JackLog("JackAudioDriver::Attach fCapturePortList[i] port_index = %ld\n", port_index); | |||
jack_log("JackAudioDriver::Attach fCapturePortList[i] port_index = %ld", port_index); | |||
} | |||
port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal; | |||
@@ -120,11 +120,11 @@ int JackAudioDriver::Attach() | |||
port->SetAlias(alias); | |||
port->SetLatency(fEngineControl->fBufferSize + fPlaybackLatency); | |||
fPlaybackPortList[i] = port_index; | |||
JackLog("JackAudioDriver::Attach fPlaybackPortList[i] port_index = %ld\n", port_index); | |||
jack_log("JackAudioDriver::Attach fPlaybackPortList[i] port_index = %ld", port_index); | |||
// Monitor ports | |||
if (fWithMonitorPorts) { | |||
JackLog("Create monitor port \n"); | |||
jack_log("Create monitor port "); | |||
snprintf(name, sizeof(name) - 1, "%s:%s:monitor_%u", fClientControl->fName, fPlaybackDriverName, i + 1); | |||
if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, fEngineControl->fBufferSize)) == NO_PORT) { | |||
jack_error("Cannot register monitor port for %s", name); | |||
@@ -143,7 +143,7 @@ int JackAudioDriver::Attach() | |||
int JackAudioDriver::Detach() | |||
{ | |||
int i; | |||
JackLog("JackAudioDriver::Detach\n"); | |||
jack_log("JackAudioDriver::Detach"); | |||
for (i = 0; i < fCaptureChannels; i++) { | |||
fGraphManager->ReleasePort(fClientControl->fRefNum, fCapturePortList[i]); | |||
@@ -77,7 +77,7 @@ JackClient::~JackClient() | |||
int JackClient::Close() | |||
{ | |||
JackLog("JackClient::Close ref = %ld\n", GetClientControl()->fRefNum); | |||
jack_log("JackClient::Close ref = %ld", GetClientControl()->fRefNum); | |||
Deactivate(); | |||
int result = -1; | |||
fChannel->ClientClose(GetClientControl()->fRefNum, &result); | |||
@@ -105,12 +105,12 @@ pthread_t JackClient::GetThreadID() | |||
void JackClient::SetupDriverSync(bool freewheel) | |||
{ | |||
if (!freewheel && !GetEngineControl()->fSyncMode) { | |||
JackLog("JackClient::SetupDriverSync driver sem in flush mode\n"); | |||
jack_log("JackClient::SetupDriverSync driver sem in flush mode"); | |||
fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(true); | |||
fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(true); | |||
fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(true); | |||
} else { | |||
JackLog("JackClient::SetupDriverSync driver sem in normal mode\n"); | |||
jack_log("JackClient::SetupDriverSync driver sem in normal mode"); | |||
fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(false); | |||
fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(false); | |||
fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(false); | |||
@@ -142,7 +142,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
break; | |||
case kActivateClient: | |||
JackLog("JackClient::kActivateClient name = %s ref = %ld \n", name, refnum); | |||
jack_log("JackClient::kActivateClient name = %s ref = %ld ", name, refnum); | |||
Init(); | |||
break; | |||
} | |||
@@ -156,31 +156,31 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
switch (notify) { | |||
case kAddClient: | |||
JackLog("JackClient::kAddClient fName = %s name = %s\n", GetClientControl()->fName, name); | |||
jack_log("JackClient::kAddClient fName = %s name = %s", GetClientControl()->fName, name); | |||
if (fClientRegistration && strcmp(GetClientControl()->fName, name) != 0) // Don't call the callback for the registering client itself | |||
fClientRegistration(name, 1, fClientRegistrationArg); | |||
break; | |||
case kRemoveClient: | |||
JackLog("JackClient::kRemoveClient fName = %s name = %s\n", GetClientControl()->fName, name); | |||
jack_log("JackClient::kRemoveClient fName = %s name = %s", GetClientControl()->fName, name); | |||
if (fClientRegistration && strcmp(GetClientControl()->fName, name) != 0) // Don't call the callback for the registering client itself | |||
fClientRegistration(name, 0, fClientRegistrationArg); | |||
break; | |||
case kBufferSizeCallback: | |||
JackLog("JackClient::kBufferSizeCallback buffer_size = %ld\n", value1); | |||
jack_log("JackClient::kBufferSizeCallback buffer_size = %ld", value1); | |||
if (fBufferSize) | |||
res = fBufferSize(value1, fBufferSizeArg); | |||
break; | |||
case kGraphOrderCallback: | |||
JackLog("JackClient::kGraphOrderCallback\n"); | |||
jack_log("JackClient::kGraphOrderCallback"); | |||
if (fGraphOrder) | |||
res = fGraphOrder(fGraphOrderArg); | |||
break; | |||
case kStartFreewheelCallback: | |||
JackLog("JackClient::kStartFreewheel\n"); | |||
jack_log("JackClient::kStartFreewheel"); | |||
SetupDriverSync(true); | |||
fThread->DropRealTime(); | |||
if (fFreewheel) | |||
@@ -188,7 +188,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
break; | |||
case kStopFreewheelCallback: | |||
JackLog("JackClient::kStopFreewheel\n"); | |||
jack_log("JackClient::kStopFreewheel"); | |||
SetupDriverSync(false); | |||
if (fFreewheel) | |||
fFreewheel(0, fFreewheelArg); | |||
@@ -196,31 +196,31 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
break; | |||
case kPortRegistrationOnCallback: | |||
JackLog("JackClient::kPortRegistrationOn port_index = %ld\n", value1); | |||
jack_log("JackClient::kPortRegistrationOn port_index = %ld", value1); | |||
if (fPortRegistration) | |||
fPortRegistration(value1, 1, fPortRegistrationArg); | |||
break; | |||
case kPortRegistrationOffCallback: | |||
JackLog("JackClient::kPortRegistrationOff port_index = %ld \n", value1); | |||
jack_log("JackClient::kPortRegistrationOff port_index = %ld ", value1); | |||
if (fPortRegistration) | |||
fPortRegistration(value1, 0, fPortRegistrationArg); | |||
break; | |||
case kPortConnectCallback: | |||
JackLog("JackClient::kPortConnectCallback src = %ld dst = %ld\n", value1, value2); | |||
jack_log("JackClient::kPortConnectCallback src = %ld dst = %ld", value1, value2); | |||
if (fPortConnect) | |||
fPortConnect(value1, value2, 1, fPortConnectArg); | |||
break; | |||
case kPortDisconnectCallback: | |||
JackLog("JackClient::kPortDisconnectCallback src = %ld dst = %ld\n", value1, value2); | |||
jack_log("JackClient::kPortDisconnectCallback src = %ld dst = %ld", value1, value2); | |||
if (fPortConnect) | |||
fPortConnect(value1, value2, 0, fPortConnectArg); | |||
break; | |||
case kXRunCallback: | |||
JackLog("JackClient::kXRunCallback\n"); | |||
jack_log("JackClient::kXRunCallback"); | |||
if (fXrun) | |||
res = fXrun(fXrunArg); | |||
break; | |||
@@ -236,7 +236,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
*/ | |||
int JackClient::Activate() | |||
{ | |||
JackLog("JackClient::Activate \n"); | |||
jack_log("JackClient::Activate "); | |||
if (IsActive()) | |||
return 0; | |||
@@ -273,7 +273,7 @@ int JackClient::Activate() | |||
*/ | |||
int JackClient::Deactivate() | |||
{ | |||
JackLog("JackClient::Deactivate \n"); | |||
jack_log("JackClient::Deactivate "); | |||
if (!IsActive()) | |||
return 0; | |||
@@ -281,7 +281,7 @@ int JackClient::Deactivate() | |||
int result = -1; | |||
fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result); | |||
JackLog("JackClient::Deactivate res = %ld \n", result); | |||
jack_log("JackClient::Deactivate res = %ld ", result); | |||
// We need to wait for the new engine cycle before stopping the RT thread, but this is done by ClientDeactivate | |||
/* TODO : solve WIN32 thread Kill issue | |||
@@ -306,7 +306,7 @@ int JackClient::Deactivate() | |||
bool JackClient::Init() | |||
{ | |||
if (fInit) { | |||
JackLog("JackClient::Init calling client thread init callback\n"); | |||
jack_log("JackClient::Init calling client thread init callback"); | |||
fInit(fInitArg); | |||
} | |||
return true; | |||
@@ -314,7 +314,7 @@ bool JackClient::Init() | |||
int JackClient::StartThread() | |||
{ | |||
JackLog("JackClient::StartThread : period = %ld computation = %ld constraint = %ld\n", | |||
jack_log("JackClient::StartThread : period = %ld computation = %ld constraint = %ld", | |||
long(int64_t(GetEngineControl()->fPeriod) / 1000.0f), | |||
long(int64_t(GetEngineControl()->fComputation) / 1000.0f), | |||
long(int64_t(GetEngineControl()->fConstraint) / 1000.0f)); | |||
@@ -362,7 +362,7 @@ inline bool JackClient::WaitFirstSync() | |||
return false; | |||
return true; | |||
} else { | |||
JackLog("Process called for an inactive client\n"); | |||
jack_log("Process called for an inactive client"); | |||
} | |||
SignalSync(); | |||
} | |||
@@ -453,7 +453,7 @@ inline void JackClient::SignalSync() | |||
inline int JackClient::End() | |||
{ | |||
JackLog("JackClient::Execute end name = %s\n", GetClientControl()->fName); | |||
jack_log("JackClient::Execute end name = %s", GetClientControl()->fName); | |||
// Hum... not sure about this, the following "close" code is called in the RT thread... | |||
int result; | |||
fThread->DropRealTime(); | |||
@@ -505,12 +505,12 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig | |||
return 0; // Means failure here... | |||
} | |||
JackLog("JackClient::PortRegister ref = %ld name = %s type = %s\n", GetClientControl()->fRefNum, name.c_str(), port_type); | |||
jack_log("JackClient::PortRegister ref = %ld name = %s type = %s", GetClientControl()->fRefNum, name.c_str(), port_type); | |||
int result = -1; | |||
unsigned int port_index = NO_PORT; | |||
fChannel->PortRegister(GetClientControl()->fRefNum, name.c_str(), port_type, flags, buffer_size, &port_index, &result); | |||
JackLog("JackClient::PortRegister port_index = %ld \n", port_index); | |||
jack_log("JackClient::PortRegister port_index = %ld ", port_index); | |||
if (result == 0) { | |||
fPortList.push_back(port_index); | |||
@@ -522,7 +522,7 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig | |||
int JackClient::PortUnRegister(jack_port_id_t port_index) | |||
{ | |||
JackLog("JackClient::PortUnRegister port_index = %ld\n", port_index); | |||
jack_log("JackClient::PortUnRegister port_index = %ld", port_index); | |||
list<jack_port_id_t>::iterator it = find(fPortList.begin(), fPortList.end(), port_index); | |||
if (it != fPortList.end()) { | |||
@@ -538,7 +538,7 @@ int JackClient::PortUnRegister(jack_port_id_t port_index) | |||
int JackClient::PortConnect(const char* src, const char* dst) | |||
{ | |||
JackLog("JackClient::Connect src = %s dst = %s\n", src, dst); | |||
jack_log("JackClient::Connect src = %s dst = %s", src, dst); | |||
int result = -1; | |||
fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result); | |||
return result; | |||
@@ -546,7 +546,7 @@ int JackClient::PortConnect(const char* src, const char* dst) | |||
int JackClient::PortDisconnect(const char* src, const char* dst) | |||
{ | |||
JackLog("JackClient::Disconnect src = %s dst = %s\n", src, dst); | |||
jack_log("JackClient::Disconnect src = %s dst = %s", src, dst); | |||
int result = -1; | |||
fChannel->PortDisconnect(GetClientControl()->fRefNum, src, dst, &result); | |||
return result; | |||
@@ -554,7 +554,7 @@ int JackClient::PortDisconnect(const char* src, const char* dst) | |||
int JackClient::PortDisconnect(jack_port_id_t src) | |||
{ | |||
JackLog("JackClient::PortDisconnect src = %ld\n", src); | |||
jack_log("JackClient::PortDisconnect src = %ld", src); | |||
int result = -1; | |||
fChannel->PortDisconnect(GetClientControl()->fRefNum, src, ALL_PORTS, &result); | |||
return result; | |||
@@ -593,7 +593,7 @@ ShutDown is called: | |||
void JackClient::ShutDown() | |||
{ | |||
JackLog("ShutDown\n"); | |||
jack_log("ShutDown"); | |||
if (fShutdown) { | |||
GetClientControl()->fActive = false; | |||
fShutdown(fShutdownArg); | |||
@@ -638,7 +638,7 @@ int JackClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timeba | |||
if (IsActive()) { | |||
int result = -1; | |||
fChannel->SetTimebaseCallback(GetClientControl()->fRefNum, conditional, &result); | |||
JackLog("SetTimebaseCallback result = %ld\n", result); | |||
jack_log("SetTimebaseCallback result = %ld", result); | |||
if (result == 0) { | |||
fTimebase = timebase_callback; | |||
fTimebaseArg = arg; | |||
@@ -646,7 +646,7 @@ int JackClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timeba | |||
fTimebase = NULL; | |||
fTimebaseArg = NULL; | |||
} | |||
JackLog("SetTimebaseCallback OK result = %ld\n", result); | |||
jack_log("SetTimebaseCallback OK result = %ld", result); | |||
return result; | |||
} else { | |||
fTimebase = timebase_callback; | |||
@@ -663,7 +663,7 @@ int JackClient::RequestNewPos(jack_position_t* pos) | |||
jack_position_t* request = transport.WriteNextStateStart(2); | |||
pos->unique_1 = pos->unique_2 = transport.GenerateUniqueID(); | |||
JackTransportEngine::TransportCopyPosition(pos, request); | |||
JackLog("RequestNewPos pos = %ld\n", pos->frame); | |||
jack_log("RequestNewPos pos = %ld", pos->frame); | |||
transport.WriteNextStateStop(2); | |||
return 0; | |||
} | |||
@@ -673,14 +673,14 @@ int JackClient::TransportLocate(jack_nframes_t frame) | |||
jack_position_t pos; | |||
pos.frame = frame; | |||
pos.valid = (jack_position_bits_t)0; | |||
JackLog("TransportLocate pos = %ld\n", pos.frame); | |||
jack_log("TransportLocate pos = %ld", pos.frame); | |||
return RequestNewPos(&pos); | |||
} | |||
int JackClient::TransportReposition(jack_position_t* pos) | |||
{ | |||
jack_position_t tmp = *pos; | |||
JackLog("TransportReposition pos = %ld\n", pos->frame); | |||
jack_log("TransportReposition pos = %ld", pos->frame); | |||
return (tmp.valid & ~JACK_POSITION_MASK) ? EINVAL : RequestNewPos(&tmp); | |||
} | |||
@@ -837,7 +837,7 @@ int JackClient::SetInitCallback(JackThreadInitCallback callback, void *arg) | |||
int JackClient::SetGraphOrderCallback(JackGraphOrderCallback callback, void *arg) | |||
{ | |||
JackLog("SetGraphOrderCallback \n"); | |||
jack_log("SetGraphOrderCallback "); | |||
if (IsActive()) { | |||
jack_error("You cannot set callbacks on an active client"); | |||
@@ -29,7 +29,7 @@ namespace Jack | |||
JackConnectionManager::JackConnectionManager() | |||
{ | |||
int i; | |||
JackLog("JackConnectionManager::InitConnections size = %ld \n", sizeof(JackConnectionManager)); | |||
jack_log("JackConnectionManager::InitConnections size = %ld ", sizeof(JackConnectionManager)); | |||
for (i = 0; i < PORT_NUM; i++) { | |||
fConnection[i].Init(); | |||
@@ -37,7 +37,7 @@ JackConnectionManager::JackConnectionManager() | |||
fLoopFeedback.Init(); | |||
JackLog("JackConnectionManager::InitClients\n"); | |||
jack_log("JackConnectionManager::InitClients"); | |||
for (i = 0; i < CLIENT_NUM; i++) { | |||
InitRefNum(i); | |||
} | |||
@@ -52,7 +52,7 @@ JackConnectionManager::~JackConnectionManager() | |||
bool JackConnectionManager::IsLoopPathAux(int ref1, int ref2) const | |||
{ | |||
JackLog("JackConnectionManager::IsLoopPathAux ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::IsLoopPathAux ref1 = %ld ref2 = %ld", ref1, ref2); | |||
if (ref1 == AUDIO_DRIVER_REFNUM // Driver is reached | |||
|| ref2 == AUDIO_DRIVER_REFNUM | |||
@@ -93,7 +93,7 @@ int JackConnectionManager::GetActivation(int refnum) const | |||
*/ | |||
int JackConnectionManager::Connect(jack_port_id_t port_src, jack_port_id_t port_dst) | |||
{ | |||
JackLog("JackConnectionManager::Connect port_src = %ld port_dst = %ld\n", port_src, port_dst); | |||
jack_log("JackConnectionManager::Connect port_src = %ld port_dst = %ld", port_src, port_dst); | |||
if (fConnection[port_src].AddItem(port_dst)) { | |||
return 0; | |||
@@ -108,7 +108,7 @@ int JackConnectionManager::Connect(jack_port_id_t port_src, jack_port_id_t port_ | |||
*/ | |||
int JackConnectionManager::Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst) | |||
{ | |||
JackLog("JackConnectionManager::Disconnect port_src = %ld port_dst = %ld\n", port_src, port_dst); | |||
jack_log("JackConnectionManager::Disconnect port_src = %ld port_dst = %ld", port_src, port_dst); | |||
if (fConnection[port_src].RemoveItem(port_dst)) { | |||
return 0; | |||
@@ -158,7 +158,7 @@ const jack_int_t* JackConnectionManager::GetConnections(jack_port_id_t port_inde | |||
int JackConnectionManager::AddInputPort(int refnum, jack_port_id_t port_index) | |||
{ | |||
if (fInputPort[refnum].AddItem(port_index)) { | |||
JackLog("JackConnectionManager::AddInputPort ref = %ld port = %ld\n", refnum, port_index); | |||
jack_log("JackConnectionManager::AddInputPort ref = %ld port = %ld", refnum, port_index); | |||
return 0; | |||
} else { | |||
jack_error("Maximum number of input ports is reached for application ref = %ld", refnum); | |||
@@ -172,7 +172,7 @@ int JackConnectionManager::AddInputPort(int refnum, jack_port_id_t port_index) | |||
int JackConnectionManager::AddOutputPort(int refnum, jack_port_id_t port_index) | |||
{ | |||
if (fOutputPort[refnum].AddItem(port_index)) { | |||
JackLog("JackConnectionManager::AddOutputPort ref = %ld port = %ld\n", refnum, port_index); | |||
jack_log("JackConnectionManager::AddOutputPort ref = %ld port = %ld", refnum, port_index); | |||
return 0; | |||
} else { | |||
jack_error("Maximum number of output ports is reached for application ref = %ld", refnum); | |||
@@ -185,7 +185,7 @@ int JackConnectionManager::AddOutputPort(int refnum, jack_port_id_t port_index) | |||
*/ | |||
int JackConnectionManager::RemoveInputPort(int refnum, jack_port_id_t port_index) | |||
{ | |||
JackLog("JackConnectionManager::RemoveInputPort ref = %ld port_index = %ld \n", refnum, port_index); | |||
jack_log("JackConnectionManager::RemoveInputPort ref = %ld port_index = %ld ", refnum, port_index); | |||
if (fInputPort[refnum].RemoveItem(port_index)) { | |||
return 0; | |||
@@ -200,7 +200,7 @@ int JackConnectionManager::RemoveInputPort(int refnum, jack_port_id_t port_index | |||
*/ | |||
int JackConnectionManager::RemoveOutputPort(int refnum, jack_port_id_t port_index) | |||
{ | |||
JackLog("JackConnectionManager::RemoveOutputPort ref = %ld port_index = %ld \n", refnum, port_index); | |||
jack_log("JackConnectionManager::RemoveOutputPort ref = %ld port_index = %ld ", refnum, port_index); | |||
if (fOutputPort[refnum].RemoveItem(port_index)) { | |||
return 0; | |||
@@ -285,7 +285,7 @@ int JackConnectionManager::ResumeRefNum(JackClientControl* control, JackSynchro* | |||
timing[i].fSignaledAt = current_date; | |||
if (!fInputCounter[i].Signal(table[i], control)) { | |||
JackLog("JackConnectionManager::ResumeRefNum error: ref = %ld output = %ld \n", control->fRefNum, i); | |||
jack_log("JackConnectionManager::ResumeRefNum error: ref = %ld output = %ld ", control->fRefNum, i); | |||
res = -1; | |||
} | |||
} | |||
@@ -305,7 +305,7 @@ void JackConnectionManager::IncDirectConnection(jack_port_id_t port_src, jack_po | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
DirectConnect(ref1, ref2); | |||
JackLog("JackConnectionManager::IncConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::IncConnectionRef: ref1 = %ld ref2 = %ld", ref1, ref2); | |||
} | |||
/*! | |||
@@ -319,7 +319,7 @@ void JackConnectionManager::DecDirectConnection(jack_port_id_t port_src, jack_po | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
DirectDisconnect(ref1, ref2); | |||
JackLog("JackConnectionManager::DecConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::DecConnectionRef: ref1 = %ld ref2 = %ld", ref1, ref2); | |||
} | |||
/*! | |||
@@ -330,7 +330,7 @@ void JackConnectionManager::DirectConnect(int ref1, int ref2) | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
if (fConnectionRef.IncItem(ref1, ref2) == 1) { // First connection between client ref1 and client ref2 | |||
JackLog("JackConnectionManager::DirectConnect first: ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::DirectConnect first: ref1 = %ld ref2 = %ld", ref1, ref2); | |||
fInputCounter[ref2].IncValue(); | |||
} | |||
} | |||
@@ -343,7 +343,7 @@ void JackConnectionManager::DirectDisconnect(int ref1, int ref2) | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
if (fConnectionRef.DecItem(ref1, ref2) == 0) { // Last connection between client ref1 and client ref2 | |||
JackLog("JackConnectionManager::DirectDisconnect last: ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::DirectDisconnect last: ref1 = %ld ref2 = %ld", ref1, ref2); | |||
fInputCounter[ref2].DecValue(); | |||
} | |||
} | |||
@@ -402,7 +402,7 @@ bool JackConnectionManager::IncFeedbackConnection(jack_port_id_t port_src, jack_ | |||
int ref2 = GetInputRefNum(port_dst); | |||
// Add an activation connection in the other direction | |||
JackLog("JackConnectionManager::IncFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::IncFeedbackConnection ref1 = %ld ref2 = %ld", ref1, ref2); | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
if (ref1 != ref2) | |||
@@ -417,7 +417,7 @@ bool JackConnectionManager::DecFeedbackConnection(jack_port_id_t port_src, jack_ | |||
int ref2 = GetInputRefNum(port_dst); | |||
// Remove an activation connection in the other direction | |||
JackLog("JackConnectionManager::DecFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackConnectionManager::DecFeedbackConnection ref1 = %ld ref2 = %ld", ref1, ref2); | |||
assert(ref1 >= 0 && ref2 >= 0); | |||
if (ref1 != ref2) | |||
@@ -255,7 +255,7 @@ class JackLoopFeedback | |||
fTable[i][0] = ref1; | |||
fTable[i][1] = ref2; | |||
fTable[i][2] = 1; | |||
JackLog("JackLoopFeedback::AddConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackLoopFeedback::AddConnectionAux ref1 = %ld ref2 = %ld", ref1, ref2); | |||
return true; | |||
} | |||
} | |||
@@ -273,7 +273,7 @@ class JackLoopFeedback | |||
fTable[i][0] = EMPTY; | |||
fTable[i][1] = EMPTY; | |||
fTable[i][2] = 0; | |||
JackLog("JackLoopFeedback::RemoveConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2); | |||
jack_log("JackLoopFeedback::RemoveConnectionAux ref1 = %ld ref2 = %ld", ref1, ref2); | |||
return true; | |||
} | |||
} | |||
@@ -328,7 +328,7 @@ class JackLoopFeedback | |||
int index = GetConnectionIndex(ref1, ref2); | |||
if (index >= 0) { | |||
JackLog("JackLoopFeedback::DecConnection ref1 = %ld ref2 = %ld index = %ld\n", ref1, ref2, index); | |||
jack_log("JackLoopFeedback::DecConnection ref1 = %ld ref2 = %ld index = %ld", ref1, ref2, index); | |||
return (DecConnection(index) == 0) ? RemoveConnectionAux(ref1, ref2) : true; | |||
} else { | |||
return false; | |||
@@ -97,7 +97,7 @@ int JackDebugClient::Open(const char* server_name, const char* name, jack_option | |||
*fStream << "Open client with name '" << name << "'." << endl; | |||
} | |||
} else { | |||
JackLog("JackDebugClient::Open : cannot open log file\n"); | |||
jack_log("JackDebugClient::Open : cannot open log file"); | |||
} | |||
strcpy(fClientName, name); | |||
return res; | |||
@@ -62,7 +62,7 @@ JackDriver::JackDriver() | |||
JackDriver::~JackDriver() | |||
{ | |||
JackLog("~JackDriver\n"); | |||
jack_log("~JackDriver"); | |||
delete fClientControl; | |||
} | |||
@@ -94,8 +94,8 @@ int JackDriver::Open(jack_nframes_t nframes, | |||
jack_nframes_t capture_latency, | |||
jack_nframes_t playback_latency) | |||
{ | |||
JackLog("JackDriver::Open capture_driver_name = %s\n", capture_driver_name); | |||
JackLog("JackDriver::Open playback_driver_name = %s\n", playback_driver_name); | |||
jack_log("JackDriver::Open capture_driver_name = %s", capture_driver_name); | |||
jack_log("JackDriver::Open playback_driver_name = %s", playback_driver_name); | |||
int refnum = -1; | |||
if (fEngine->ClientInternalOpen(fClientControl->fName, &refnum, &fEngineControl, &fGraphManager, this, false) != 0) { | |||
@@ -128,7 +128,7 @@ int JackDriver::Open(jack_nframes_t nframes, | |||
int JackDriver::Close() | |||
{ | |||
JackLog("JackDriver::Close\n"); | |||
jack_log("JackDriver::Close"); | |||
fGraphManager->DirectDisconnect(fClientControl->fRefNum, fClientControl->fRefNum); // Disconnect driver from itself for sync | |||
fClientControl->fActive = false; | |||
return fEngine->ClientInternalClose(fClientControl->fRefNum, false); | |||
@@ -142,10 +142,10 @@ int JackDriver::Close() | |||
void JackDriver::SetupDriverSync(int ref, bool freewheel) | |||
{ | |||
if (!freewheel && !fEngineControl->fSyncMode) { | |||
JackLog("JackDriver::SetupDriverSync driver sem in flush mode\n"); | |||
jack_log("JackDriver::SetupDriverSync driver sem in flush mode"); | |||
fSynchroTable[ref]->SetFlush(true); | |||
} else { | |||
JackLog("JackDriver::SetupDriverSync driver sem in normal mode\n"); | |||
jack_log("JackDriver::SetupDriverSync driver sem in normal mode"); | |||
fSynchroTable[ref]->SetFlush(false); | |||
} | |||
} | |||
@@ -155,12 +155,12 @@ int JackDriver::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
switch (notify) { | |||
case kStartFreewheelCallback: | |||
JackLog("JackDriver::kStartFreewheel\n"); | |||
jack_log("JackDriver::kStartFreewheel"); | |||
SetupDriverSync(fClientControl->fRefNum, true); | |||
break; | |||
case kStopFreewheelCallback: | |||
JackLog("JackDriver::kStopFreewheel\n"); | |||
jack_log("JackDriver::kStopFreewheel"); | |||
SetupDriverSync(fClientControl->fRefNum, false); | |||
break; | |||
} | |||
@@ -59,7 +59,7 @@ JackEngine::~JackEngine() | |||
int JackEngine::Open() | |||
{ | |||
JackLog("JackEngine::Open\n"); | |||
jack_log("JackEngine::Open"); | |||
// Open audio thread => request thread communication channel | |||
if (fChannel->Open(fEngineControl->fServerName) < 0) { | |||
@@ -72,14 +72,14 @@ int JackEngine::Open() | |||
int JackEngine::Close() | |||
{ | |||
JackLog("JackEngine::Close\n"); | |||
jack_log("JackEngine::Close"); | |||
fChannel->Close(); | |||
// Close (possibly) remaining clients (RT is stopped) | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = fClientTable[i]; | |||
if (client) { | |||
JackLog("JackEngine::Close remaining client %ld\n", i); | |||
jack_log("JackEngine::Close remaining client %ld", i); | |||
fClientTable[i] = NULL; | |||
client->Close(); | |||
delete client; | |||
@@ -98,7 +98,7 @@ int JackEngine::AllocateRefnum() | |||
{ | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
if (!fClientTable[i]) { | |||
JackLog("JackEngine::AllocateRefNum ref = %ld\n", i); | |||
jack_log("JackEngine::AllocateRefNum ref = %ld", i); | |||
return i; | |||
} | |||
} | |||
@@ -117,7 +117,7 @@ void JackEngine::ReleaseRefnum(int ref) | |||
} | |||
if (i == CLIENT_NUM) { | |||
// last client and temporay case: quit the server | |||
JackLog("JackEngine::ReleaseRefnum server quit\n"); | |||
jack_log("JackEngine::ReleaseRefnum server quit"); | |||
fEngineControl->fTemporary = false; | |||
#ifndef WIN32 | |||
kill(getpid(), SIGINT); | |||
@@ -157,13 +157,13 @@ bool JackEngine::Process(jack_time_t callback_usecs) | |||
ProcessNext(callback_usecs); | |||
res = true; | |||
} else { | |||
JackLog("Process: graph not finished!\n"); | |||
jack_log("Process: graph not finished!"); | |||
if (callback_usecs > fLastSwitchUsecs + fEngineControl->fTimeOutUsecs) { | |||
JackLog("Process: switch to next state delta = %ld\n", long(callback_usecs - fLastSwitchUsecs)); | |||
jack_log("Process: switch to next state delta = %ld", long(callback_usecs - fLastSwitchUsecs)); | |||
ProcessNext(callback_usecs); | |||
res = true; | |||
} else { | |||
JackLog("Process: waiting to switch delta = %ld\n", long(callback_usecs - fLastSwitchUsecs)); | |||
jack_log("Process: waiting to switch delta = %ld", long(callback_usecs - fLastSwitchUsecs)); | |||
ProcessCurrent(callback_usecs); | |||
res = false; | |||
} | |||
@@ -212,12 +212,12 @@ void JackEngine::NotifyClient(int refnum, int event, int sync, int value1, int v | |||
// The client may be notified by the RT thread while closing | |||
if (!client) { | |||
JackLog("JackEngine::NotifyClient: client not available anymore\n"); | |||
jack_log("JackEngine::NotifyClient: client not available anymore"); | |||
} else if (client->GetClientControl()->fCallback[event]) { | |||
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, value1, value2) < 0) | |||
jack_error("NotifyClient fails name = %s event = %ld = val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2); | |||
} else { | |||
JackLog("JackEngine::NotifyClient: no callback for event = %ld\n", event); | |||
jack_log("JackEngine::NotifyClient: no callback for event = %ld", event); | |||
} | |||
} | |||
@@ -230,7 +230,7 @@ void JackEngine::NotifyClients(int event, int sync, int value1, int value2) | |||
if (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, value1, value2) < 0) | |||
jack_error("NotifyClient fails name = %s event = %ld = val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2); | |||
} else { | |||
JackLog("JackEngine::NotifyClients: no callback for event = %ld\n", event); | |||
jack_log("JackEngine::NotifyClients: no callback for event = %ld", event); | |||
} | |||
} | |||
} | |||
@@ -339,7 +339,7 @@ int JackEngine::InternalClientHandle(const char* client_name, int* status, int* | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = fClientTable[i]; | |||
if (client && dynamic_cast<JackLoadableInternalClient*>(client) && (strcmp(client->GetClientControl()->fName, client_name) == 0)) { | |||
JackLog("InternalClientHandle found client name = %s ref = %ld\n", client_name, i); | |||
jack_log("InternalClientHandle found client name = %s ref = %ld", client_name, i); | |||
*int_ref = i; | |||
return 0; | |||
} | |||
@@ -374,7 +374,7 @@ int JackEngine::ClientCheck(const char* name, char* name_res, int protocol, int | |||
*status = 0; | |||
strcpy(name_res, name); | |||
JackLog("Check protocol client %ld server = %ld\n", protocol, JACK_PROTOCOL_VERSION); | |||
jack_log("Check protocol client %ld server = %ld", protocol, JACK_PROTOCOL_VERSION); | |||
if (protocol != JACK_PROTOCOL_VERSION) { | |||
*status |= (JackFailure | JackVersionError); | |||
@@ -448,7 +448,7 @@ bool JackEngine::ClientCheckName(const char* name) | |||
// Used for external clients | |||
int JackEngine::ClientExternalOpen(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager) | |||
{ | |||
JackLog("JackEngine::ClientOpen: name = %s \n", name); | |||
jack_log("JackEngine::ClientOpen: name = %s ", name); | |||
int refnum = AllocateRefnum(); | |||
if (refnum < 0) { | |||
@@ -497,7 +497,7 @@ error: | |||
// Used for server driver clients | |||
int JackEngine::ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, bool wait) | |||
{ | |||
JackLog("JackEngine::ClientInternalNew: name = %s\n", name); | |||
jack_log("JackEngine::ClientInternalNew: name = %s", name); | |||
int refnum = AllocateRefnum(); | |||
if (refnum < 0) { | |||
@@ -554,7 +554,7 @@ int JackEngine::ClientInternalClose(int refnum, bool wait) | |||
int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wait) | |||
{ | |||
JackLog("JackEngine::ClientCloseAux ref = %ld name = %s\n", | |||
jack_log("JackEngine::ClientCloseAux ref = %ld name = %s", | |||
refnum, | |||
(client->GetClientControl()) ? client->GetClientControl()->fName : "No name"); | |||
@@ -600,7 +600,7 @@ int JackEngine::ClientActivate(int refnum) | |||
JackClientInterface* client = fClientTable[refnum]; | |||
assert(fClientTable[refnum]); | |||
JackLog("JackEngine::ClientActivate ref = %ld name = %s\n", refnum, client->GetClientControl()->fName); | |||
jack_log("JackEngine::ClientActivate ref = %ld name = %s", refnum, client->GetClientControl()->fName); | |||
fGraphManager->Activate(refnum); | |||
// Wait for graph state change to be effective | |||
@@ -620,7 +620,7 @@ int JackEngine::ClientDeactivate(int refnum) | |||
if (client == NULL) | |||
return -1; | |||
JackLog("JackEngine::ClientDeactivate ref = %ld name = %s\n", refnum, client->GetClientControl()->fName); | |||
jack_log("JackEngine::ClientDeactivate ref = %ld name = %s", refnum, client->GetClientControl()->fName); | |||
fGraphManager->Deactivate(refnum); | |||
fLastSwitchUsecs = 0; // Force switch to occur next cycle, even when called with "dead" clients | |||
@@ -639,7 +639,7 @@ int JackEngine::ClientDeactivate(int refnum) | |||
int JackEngine::PortRegister(int refnum, const char* name, const char *type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index) | |||
{ | |||
JackLog("JackEngine::PortRegister ref = %ld name = %s type = %s flags = %d buffer_size = %d\n", refnum, name, type, flags, buffer_size); | |||
jack_log("JackEngine::PortRegister ref = %ld name = %s type = %s flags = %d buffer_size = %d", refnum, name, type, flags, buffer_size); | |||
assert(fClientTable[refnum]); | |||
*port_index = fGraphManager->AllocatePort(refnum, name, type, (JackPortFlags)flags, fEngineControl->fBufferSize); | |||
@@ -653,7 +653,7 @@ int JackEngine::PortRegister(int refnum, const char* name, const char *type, uns | |||
int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index) | |||
{ | |||
JackLog("JackEngine::PortUnRegister ref = %ld port_index = %ld\n", refnum, port_index); | |||
jack_log("JackEngine::PortUnRegister ref = %ld port_index = %ld", refnum, port_index); | |||
assert(fClientTable[refnum]); | |||
if (fGraphManager->ReleasePort(refnum, port_index) == 0) { | |||
@@ -666,7 +666,7 @@ int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index) | |||
int JackEngine::PortConnect(int refnum, const char* src, const char* dst) | |||
{ | |||
JackLog("JackEngine::PortConnect src = %s dst = %s\n", src, dst); | |||
jack_log("JackEngine::PortConnect src = %s dst = %s", src, dst); | |||
jack_port_id_t port_src, port_dst; | |||
return (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0) | |||
@@ -676,7 +676,7 @@ int JackEngine::PortConnect(int refnum, const char* src, const char* dst) | |||
int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst) | |||
{ | |||
JackLog("JackEngine::PortConnect src = %d dst = %d\n", src, dst); | |||
jack_log("JackEngine::PortConnect src = %d dst = %d", src, dst); | |||
JackClientInterface* client; | |||
int ref; | |||
@@ -713,7 +713,7 @@ int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst) | |||
int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst) | |||
{ | |||
JackLog("JackEngine::PortDisconnect src = %s dst = %s\n", src, dst); | |||
jack_log("JackEngine::PortDisconnect src = %s dst = %s", src, dst); | |||
jack_port_id_t port_src, port_dst; | |||
if (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0) { | |||
@@ -729,7 +729,7 @@ int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst) | |||
int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst) | |||
{ | |||
JackLog("JackEngine::PortDisconnect src = %d dst = %d\n", src, dst); | |||
jack_log("JackEngine::PortDisconnect src = %d dst = %d", src, dst); | |||
if (dst == ALL_PORTS) { | |||
@@ -740,13 +740,13 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds | |||
JackPort* port = fGraphManager->GetPort(src); | |||
if (port->GetFlags() & JackPortIsOutput) { | |||
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | |||
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", src, connections[i]); | |||
jack_log("NotifyPortConnect src = %ld dst = %ld false", src, connections[i]); | |||
NotifyPortConnect(src, connections[i], false); | |||
NotifyPortConnect(connections[i], src, false); | |||
} | |||
} else { | |||
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | |||
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", connections[i], src); | |||
jack_log("NotifyPortConnect src = %ld dst = %ld false", connections[i], src); | |||
NotifyPortConnect(connections[i], src, false); | |||
NotifyPortConnect(connections[i], src, false); | |||
} | |||
@@ -66,7 +66,7 @@ EXPORT void jack_info_multiline(const char *fmt, ...) | |||
va_end(ap); | |||
} | |||
EXPORT void JackLog(const char *fmt,...) | |||
EXPORT void jack_log(const char *fmt,...) | |||
{ | |||
if (jack_verbose) { | |||
va_list ap; | |||
@@ -38,10 +38,8 @@ extern "C" | |||
EXPORT void jack_info(const char *fmt, ...); | |||
/* like jack_info but does not add newline */ | |||
EXPORT void jack_info_multiline(const char *fmt, ...); | |||
EXPORT void JackLog(const char *fmt, ...); | |||
// like jack_info() but only if verbose mode is enabled | |||
EXPORT void jack_log(const char *fmt, ...); | |||
extern int jack_verbose; | |||
@@ -39,7 +39,7 @@ JackExternalClient::~JackExternalClient() | |||
int JackExternalClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
{ | |||
int result = -1; | |||
JackLog("JackExternalClient::ClientNotify ref = %ld name = %s notify = %ld\n", refnum, name, notify); | |||
jack_log("JackExternalClient::ClientNotify ref = %ld name = %s notify = %ld", refnum, name, notify); | |||
fChannel->ClientNotify(refnum, name, notify, sync, value1, value2, &result); | |||
return result; | |||
} | |||
@@ -60,7 +60,7 @@ int JackExternalClient::Open(const char* name, int refnum, int* shared_client) | |||
} | |||
*shared_client = fClientControl->GetShmIndex(); | |||
JackLog("JackExternalClient::Open name = %s index = %ld base = %x\n", name, fClientControl->GetShmIndex(), fClientControl->GetShmAddress()); | |||
jack_log("JackExternalClient::Open name = %s index = %ld base = %x", name, fClientControl->GetShmIndex(), fClientControl->GetShmAddress()); | |||
return 0; | |||
} catch (std::exception e) { | |||
@@ -119,7 +119,7 @@ bool JackFifo::Allocate(const char* name, const char* server_name, int value) | |||
struct stat statbuf; | |||
BuildName(name, server_name, fName); | |||
JackLog("JackFifo::Allocate name = %s\n", fName); | |||
jack_log("JackFifo::Allocate name = %s", fName); | |||
if (stat(fName, &statbuf)) { | |||
if (errno == ENOENT) { | |||
@@ -152,11 +152,11 @@ bool JackFifo::Allocate(const char* name, const char* server_name, int value) | |||
bool JackFifo::ConnectAux(const char* name, const char* server_name, int access) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackFifo::ConnectAux name = %s\n", fName); | |||
jack_log("JackFifo::ConnectAux name = %s", fName); | |||
// Temporary... | |||
if (fFifo >= 0) { | |||
JackLog("Already connected name = %s\n", name); | |||
jack_log("Already connected name = %s", name); | |||
return true; | |||
} | |||
@@ -188,7 +188,7 @@ bool JackFifo::ConnectInput(const char* name, const char* server_name) | |||
bool JackFifo::Disconnect() | |||
{ | |||
if (fFifo >= 0) { | |||
JackLog("JackFifo::Disconnect %s\n", fName); | |||
jack_log("JackFifo::Disconnect %s", fName); | |||
if (close(fFifo) != 0) { | |||
jack_error("Disconnect: can't disconnect named fifo name = %s err = %s", fName, strerror(errno)); | |||
return false; | |||
@@ -205,7 +205,7 @@ bool JackFifo::Disconnect() | |||
void JackFifo::Destroy() | |||
{ | |||
if (fFifo > 0) { | |||
JackLog("JackFifo::Destroy name = %s\n", fName); | |||
jack_log("JackFifo::Destroy name = %s", fName); | |||
unlink(fName); | |||
if (close(fFifo) != 0) { | |||
jack_error("Destroy: can't destroy fifo name = %s err = %s", fName, strerror(errno)); | |||
@@ -33,7 +33,7 @@ namespace Jack | |||
int JackFreewheelDriver::Process() | |||
{ | |||
if (fIsMaster) { | |||
JackLog("JackFreewheelDriver::Process master %lld\n", fEngineControl->fTimeOutUsecs); | |||
jack_log("JackFreewheelDriver::Process master %lld", fEngineControl->fTimeOutUsecs); | |||
fLastWaitUst = GetMicroSeconds(); | |||
fEngine->Process(fLastWaitUst); | |||
fGraphManager->ResumeRefNum(fClientControl, fSynchroTable); // Signal all clients | |||
@@ -228,7 +228,7 @@ class JackGlobals | |||
static void InitServer() | |||
{ | |||
JackLog("JackGlobals InitServer\n"); | |||
jack_log("JackGlobals InitServer"); | |||
if (!fInstance) { | |||
#ifdef __APPLE__ | |||
@@ -248,7 +248,7 @@ class JackGlobals | |||
static void InitClient() | |||
{ | |||
JackLog("JackGlobals InitClient\n"); | |||
jack_log("JackGlobals InitClient"); | |||
if (!fInstance) { | |||
#ifdef __APPLE__ | |||
@@ -268,7 +268,7 @@ class JackGlobals | |||
static void Destroy() | |||
{ | |||
JackLog("JackGlobals Destroy\n"); | |||
jack_log("JackGlobals Destroy"); | |||
if (fInstance) { | |||
delete fInstance; | |||
fInstance = NULL; | |||
@@ -35,7 +35,7 @@ static inline jack_nframes_t MAX(jack_nframes_t a, jack_nframes_t b) | |||
static void AssertPort(jack_port_id_t port_index) | |||
{ | |||
if (port_index >= PORT_NUM) { | |||
JackLog("JackGraphManager::AssertPort port_index = %ld\n", port_index); | |||
jack_log("JackGraphManager::AssertPort port_index = %ld", port_index); | |||
assert(port_index < PORT_NUM); | |||
} | |||
} | |||
@@ -43,7 +43,7 @@ static void AssertPort(jack_port_id_t port_index) | |||
static void AssertBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
if (buffer_size > BUFFER_SIZE_MAX) { | |||
JackLog("JackGraphManager::AssertBufferSize frames = %ld\n", buffer_size); | |||
jack_log("JackGraphManager::AssertBufferSize frames = %ld", buffer_size); | |||
assert(buffer_size <= BUFFER_SIZE_MAX); | |||
} | |||
} | |||
@@ -121,7 +121,7 @@ void JackGraphManager::DirectConnect(int ref1, int ref2) | |||
{ | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
manager->DirectConnect(ref1, ref2); | |||
JackLog("JackGraphManager::ConnectRefNum cur_index = %ld ref1 = %ld ref2 = %ld\n", CurIndex(fCounter), ref1, ref2); | |||
jack_log("JackGraphManager::ConnectRefNum cur_index = %ld ref1 = %ld ref2 = %ld", CurIndex(fCounter), ref1, ref2); | |||
WriteNextStateStop(); | |||
} | |||
@@ -130,7 +130,7 @@ void JackGraphManager::DirectDisconnect(int ref1, int ref2) | |||
{ | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
manager->DirectDisconnect(ref1, ref2); | |||
JackLog("JackGraphManager::DisconnectRefNum cur_index = %ld ref1 = %ld ref2 = %ld\n", CurIndex(fCounter), ref1, ref2); | |||
jack_log("JackGraphManager::DisconnectRefNum cur_index = %ld ref1 = %ld ref2 = %ld", CurIndex(fCounter), ref1, ref2); | |||
WriteNextStateStop(); | |||
} | |||
@@ -152,7 +152,7 @@ void* JackGraphManager::GetBuffer(jack_port_id_t port_index, jack_nframes_t buff | |||
if (!port->IsUsed()) { | |||
// This happens when a port has just been unregistered and is still used by the RT code. | |||
JackLog("JackGraphManager::GetBuffer : port = %ld is released state\n", port_index); | |||
jack_log("JackGraphManager::GetBuffer : port = %ld is released state", port_index); | |||
return GetBuffer(0); // port_index 0 is not used | |||
} | |||
@@ -255,7 +255,7 @@ int JackGraphManager::ComputeTotalLatency(jack_port_id_t port_index) | |||
next_index = GetCurrentIndex(); | |||
} while (cur_index != next_index); // Until a coherent state has been read | |||
JackLog("JackGraphManager::GetTotalLatency port_index = %ld total latency = %ld\n", port_index, port->fTotalLatency); | |||
jack_log("JackGraphManager::GetTotalLatency port_index = %ld total latency = %ld", port_index, port->fTotalLatency); | |||
return 0; | |||
} | |||
@@ -275,7 +275,7 @@ int JackGraphManager::ComputeTotalLatencies() | |||
void JackGraphManager::SetBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
JackLock lock (this); | |||
JackLog("JackGraphManager::SetBufferSize size = %ld\n", (long int)buffer_size); | |||
jack_log("JackGraphManager::SetBufferSize size = %ld", (long int)buffer_size); | |||
jack_port_id_t port_index; | |||
for (port_index = FIRST_AVAILABLE_PORT; port_index < PORT_NUM; port_index++) { | |||
@@ -294,7 +294,7 @@ jack_port_id_t JackGraphManager::AllocatePortAux(int refnum, const char* port_na | |||
for (port_index = FIRST_AVAILABLE_PORT; port_index < PORT_NUM; port_index++) { | |||
JackPort* port = GetPort(port_index); | |||
if (!port->IsUsed()) { | |||
JackLog("JackGraphManager::AllocatePortAux port_index = %ld name = %s type = %s\n", port_index, port_name, port_type); | |||
jack_log("JackGraphManager::AllocatePortAux port_index = %ld name = %s type = %s", port_index, port_name, port_type); | |||
if (!port->Allocate(refnum, port_name, port_type, flags)) | |||
return NO_PORT; | |||
break; | |||
@@ -373,7 +373,7 @@ void JackGraphManager::GetOutputPorts(int refnum, jack_int_t* res) | |||
// Server | |||
void JackGraphManager::RemoveAllPorts(int refnum) | |||
{ | |||
JackLog("JackGraphManager::RemoveAllPorts ref = %ld\n", refnum); | |||
jack_log("JackGraphManager::RemoveAllPorts ref = %ld", refnum); | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
jack_port_id_t port_index; | |||
@@ -396,7 +396,7 @@ void JackGraphManager::RemoveAllPorts(int refnum) | |||
void JackGraphManager::DisconnectAllPorts(int refnum) | |||
{ | |||
int i; | |||
JackLog("JackGraphManager::DisconnectAllPorts ref = %ld\n", refnum); | |||
jack_log("JackGraphManager::DisconnectAllPorts ref = %ld", refnum); | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
const jack_int_t* input = manager->GetInputPorts(refnum); | |||
@@ -415,12 +415,12 @@ void JackGraphManager::DisconnectAllPorts(int refnum) | |||
// Server | |||
void JackGraphManager::DisconnectAllInput(jack_port_id_t port_index) | |||
{ | |||
JackLog("JackGraphManager::DisconnectAllInput port_index = %ld \n", port_index); | |||
jack_log("JackGraphManager::DisconnectAllInput port_index = %ld ", port_index); | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
for (int i = 0; i < PORT_NUM; i++) { | |||
if (manager->IsConnected(i, port_index)) { | |||
JackLog("JackGraphManager::Disconnect i = %ld port_index = %ld\n", i, port_index); | |||
jack_log("JackGraphManager::Disconnect i = %ld port_index = %ld", i, port_index); | |||
Disconnect(i, port_index); | |||
} | |||
} | |||
@@ -430,7 +430,7 @@ void JackGraphManager::DisconnectAllInput(jack_port_id_t port_index) | |||
// Server | |||
void JackGraphManager::DisconnectAllOutput(jack_port_id_t port_index) | |||
{ | |||
JackLog("JackGraphManager::DisconnectAllOutput port_index = %ld \n", port_index); | |||
jack_log("JackGraphManager::DisconnectAllOutput port_index = %ld ", port_index); | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
const jack_int_t* connections = manager->GetConnections(port_index); | |||
@@ -484,14 +484,14 @@ void JackGraphManager::Deactivate(int refnum) | |||
if (IsDirectConnection(refnum, FREEWHEEL_DRIVER_REFNUM)) { | |||
DirectDisconnect(refnum, FREEWHEEL_DRIVER_REFNUM); | |||
} else { | |||
JackLog("JackServer::Deactivate: client = %ld was not activated \n", refnum); | |||
jack_log("JackServer::Deactivate: client = %ld was not activated ", refnum); | |||
} | |||
// Disconnect only when needed | |||
if (IsDirectConnection(FREEWHEEL_DRIVER_REFNUM, refnum)) { | |||
DirectDisconnect(FREEWHEEL_DRIVER_REFNUM, refnum); | |||
} else { | |||
JackLog("JackServer::Deactivate: client = %ld was not activated \n", refnum); | |||
jack_log("JackServer::Deactivate: client = %ld was not activated ", refnum); | |||
} | |||
} | |||
@@ -518,7 +518,7 @@ int JackGraphManager::GetOutputRefNum(jack_port_id_t port_index) | |||
int JackGraphManager::Connect(jack_port_id_t port_src, jack_port_id_t port_dst) | |||
{ | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
JackLog("JackGraphManager::Connect port_src = %ld port_dst = %ld\n", port_src, port_dst); | |||
jack_log("JackGraphManager::Connect port_src = %ld port_dst = %ld", port_src, port_dst); | |||
JackPort* src = GetPort(port_src); | |||
JackPort* dst = GetPort(port_dst); | |||
int res = 0; | |||
@@ -554,7 +554,7 @@ int JackGraphManager::Connect(jack_port_id_t port_src, jack_port_id_t port_dst) | |||
} | |||
if (manager->IsLoopPath(port_src, port_dst)) { | |||
JackLog("JackGraphManager::Connect: LOOP detected\n"); | |||
jack_log("JackGraphManager::Connect: LOOP detected"); | |||
manager->IncFeedbackConnection(port_src, port_dst); | |||
} else { | |||
manager->IncDirectConnection(port_src, port_dst); | |||
@@ -569,7 +569,7 @@ end: | |||
int JackGraphManager::Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst) | |||
{ | |||
JackConnectionManager* manager = WriteNextStateStart(); | |||
JackLog("JackGraphManager::Disconnect port_src = %ld port_dst = %ld\n", port_src, port_dst); | |||
jack_log("JackGraphManager::Disconnect port_src = %ld port_dst = %ld", port_src, port_dst); | |||
bool in_use_src = GetPort(port_src)->fInUse; | |||
bool in_use_dst = GetPort(port_dst)->fInUse; | |||
int res = 0; | |||
@@ -600,7 +600,7 @@ int JackGraphManager::Disconnect(jack_port_id_t port_src, jack_port_id_t port_ds | |||
} | |||
if (manager->IsFeedbackConnection(port_src, port_dst)) { | |||
JackLog("JackGraphManager::Disconnect: FEEDBACK removed\n"); | |||
jack_log("JackGraphManager::Disconnect: FEEDBACK removed"); | |||
manager->DecFeedbackConnection(port_src, port_dst); | |||
} else { | |||
manager->DecDirectConnection(port_src, port_dst); | |||
@@ -639,7 +639,7 @@ int JackGraphManager::CheckPorts(jack_port_id_t port_src, jack_port_id_t port_ds | |||
int JackGraphManager::CheckPorts(const char* src_name, const char* dst_name, jack_port_id_t* port_src, jack_port_id_t* port_dst) | |||
{ | |||
JackLog("JackGraphManager::CheckConnect src_name = %s dst_name = %s\n", src_name, dst_name); | |||
jack_log("JackGraphManager::CheckConnect src_name = %s dst_name = %s", src_name, dst_name); | |||
if ((*port_src = GetPort(src_name)) == NO_PORT) { | |||
jack_error("Unknown source port in attempted (dis)connection src_name [%s] dst_name [%s]", src_name, dst_name); | |||
@@ -786,7 +786,7 @@ const char** JackGraphManager::GetPorts(const char* port_name_pattern, const cha | |||
cur_index = GetCurrentIndex(); | |||
if (matching_ports) { | |||
free(matching_ports); | |||
JackLog("JackGraphManager::GetPorts retry... \n"); | |||
jack_log("JackGraphManager::GetPorts retry... "); | |||
} | |||
matching_ports = GetPortsAux(port_name_pattern, type_name_pattern, flags); | |||
next_index = GetCurrentIndex(); | |||
@@ -69,7 +69,7 @@ int JackInternalClient::Open(const char* server_name, const char* name, jack_opt | |||
{ | |||
int result; | |||
char name_res[JACK_CLIENT_NAME_SIZE]; | |||
JackLog("JackInternalClient::Open name = %s\n", name); | |||
jack_log("JackInternalClient::Open name = %s", name); | |||
snprintf(fServerName, sizeof(fServerName), server_name); | |||
@@ -127,7 +127,7 @@ JackLoadableInternalClient::JackLoadableInternalClient(JackServer* server, JackS | |||
snprintf(fObjectData, JACK_LOAD_INIT_LIMIT, object_data); | |||
fHandle = LoadJackModule(path_to_so); | |||
JackLog("JackLoadableInternalClient::JackLoadableInternalClient path_to_so = %s\n", path_to_so); | |||
jack_log("JackLoadableInternalClient::JackLoadableInternalClient path_to_so = %s", path_to_so); | |||
if (fHandle == 0) { | |||
jack_error("error loading %s", so_name); | |||
@@ -81,7 +81,7 @@ EXPORT jack_client_t* jack_client_open_aux(const char* ext_client_name, jack_opt | |||
va_end(ap); | |||
JackLog("jack_client_open %s\n", client_name); | |||
jack_log("jack_client_open %s", client_name); | |||
if (client_name == NULL) { | |||
jack_error("jack_client_open called with a NULL client_name"); | |||
return NULL; | |||
@@ -130,7 +130,7 @@ EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options | |||
EXPORT int jack_client_close(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_client_close\n"); | |||
jack_log("jack_client_close"); | |||
JackClient* client = (JackClient*)ext_client; | |||
if (client == NULL) { | |||
jack_error("jack_client_close called with a NULL client"); | |||
@@ -138,7 +138,7 @@ EXPORT int jack_client_close(jack_client_t* ext_client) | |||
} else { | |||
int res = client->Close(); | |||
delete client; | |||
JackLog("jack_client_close OK\n"); | |||
jack_log("jack_client_close OK"); | |||
JackLibGlobals::Destroy(); // jack library destruction | |||
return res; | |||
} | |||
@@ -54,20 +54,20 @@ JackSynchro** GetSynchroTable() | |||
JackLibClient::JackLibClient(JackSynchro** table): JackClient(table) | |||
{ | |||
JackLog("JackLibClient::JackLibClient table = %x\n", table); | |||
jack_log("JackLibClient::JackLibClient table = %x", table); | |||
fChannel = JackGlobals::MakeClientChannel(); | |||
} | |||
JackLibClient::~JackLibClient() | |||
{ | |||
JackLog("JackLibClient::~JackLibClient\n"); | |||
jack_log("JackLibClient::~JackLibClient"); | |||
delete fChannel; | |||
} | |||
int JackLibClient::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status) | |||
{ | |||
int shared_engine, shared_client, shared_graph, result; | |||
JackLog("JackLibClient::Open %s\n", name); | |||
jack_log("JackLibClient::Open %s", name); | |||
snprintf(fServerName, sizeof(fServerName), server_name); | |||
@@ -119,7 +119,7 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_ | |||
goto error; | |||
} | |||
JackLog("JackLibClient::Open name = %s refnum = %ld\n", name_res, fClientControl->fRefNum); | |||
jack_log("JackLibClient::Open name = %s refnum = %ld", name_res, fClientControl->fRefNum); | |||
return 0; | |||
error: | |||
@@ -139,13 +139,13 @@ int JackLibClient::ClientNotifyImp(int refnum, const char* name, int notify, int | |||
switch (notify) { | |||
case kAddClient: | |||
JackLog("JackClient::AddClient name = %s, ref = %ld \n", name, refnum); | |||
jack_log("JackClient::AddClient name = %s, ref = %ld ", name, refnum); | |||
// the synchro must be usable in I/O mode when several clients live in the same process | |||
res = fSynchroTable[refnum]->Connect(name, fServerName) ? 0 : -1; | |||
break; | |||
case kRemoveClient: | |||
JackLog("JackClient::RemoveClient name = %s, ref = %ld \n", name, refnum); | |||
jack_log("JackClient::RemoveClient name = %s, ref = %ld ", name, refnum); | |||
if (strcmp(GetClientControl()->fName, name) != 0) | |||
res = fSynchroTable[refnum]->Disconnect() ? 0 : -1; | |||
break; | |||
@@ -54,7 +54,7 @@ struct JackLibGlobals | |||
JackLibGlobals() | |||
{ | |||
JackLog("JackLibGlobals\n"); | |||
jack_log("JackLibGlobals"); | |||
for (int i = 0; i < CLIENT_NUM; i++) | |||
fSynchroTable[i] = JackGlobals::MakeSynchro(); | |||
fGraphManager = -1; | |||
@@ -63,7 +63,7 @@ struct JackLibGlobals | |||
virtual ~JackLibGlobals() | |||
{ | |||
JackLog("~JackLibGlobals\n"); | |||
jack_log("~JackLibGlobals"); | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
fSynchroTable[i]->Disconnect(); | |||
delete fSynchroTable[i]; | |||
@@ -73,7 +73,7 @@ struct JackLibGlobals | |||
static void Init() | |||
{ | |||
if (fClientCount++ == 0 && !fGlobals) { | |||
JackLog("JackLibGlobals Init %x\n", fGlobals); | |||
jack_log("JackLibGlobals Init %x", fGlobals); | |||
JackGlobals::InitClient(); | |||
InitTime(); | |||
fGlobals = new JackLibGlobals(); | |||
@@ -83,7 +83,7 @@ struct JackLibGlobals | |||
static void Destroy() | |||
{ | |||
if (--fClientCount == 0 && fGlobals) { | |||
JackLog("JackLibGlobals Destroy %x\n", fGlobals); | |||
jack_log("JackLibGlobals Destroy %x", fGlobals); | |||
delete fGlobals; | |||
fGlobals = NULL; | |||
JackGlobals::Destroy(); | |||
@@ -116,8 +116,8 @@ bool JackPosixSemaphore::TimedWait(long usec) // unusable semantic !! | |||
if ((res = sem_timedwait(fSemaphore, &time)) != 0) { | |||
jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno)); | |||
JackLog("now %ld %ld \n", now.tv_sec, now.tv_usec); | |||
JackLog("next %ld %ld \n", time.tv_sec, time.tv_nsec/1000); | |||
jack_log("now %ld %ld ", now.tv_sec, now.tv_usec); | |||
jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000); | |||
} | |||
return (res == 0); | |||
} | |||
@@ -143,7 +143,7 @@ bool JackPosixSemaphore::TimedWait(long usec) | |||
bool JackPosixSemaphore::Allocate(const char* name, const char* server_name, int value) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackPosixSemaphore::Allocate name = %s val = %ld\n", fName, value); | |||
jack_log("JackPosixSemaphore::Allocate name = %s val = %ld", fName, value); | |||
if ((fSemaphore = sem_open(fName, O_CREAT, 0777, value)) == (sem_t*)SEM_FAILED) { | |||
jack_error("Allocate: can't check in named semaphore name = %s err = %s", fName, strerror(errno)); | |||
@@ -157,11 +157,11 @@ bool JackPosixSemaphore::Allocate(const char* name, const char* server_name, int | |||
bool JackPosixSemaphore::ConnectInput(const char* name, const char* server_name) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackPosixSemaphore::Connect %s\n", fName); | |||
jack_log("JackPosixSemaphore::Connect %s", fName); | |||
// Temporary... | |||
if (fSemaphore) { | |||
JackLog("Already connected name = %s\n", name); | |||
jack_log("Already connected name = %s", name); | |||
return true; | |||
} | |||
@@ -171,7 +171,7 @@ bool JackPosixSemaphore::ConnectInput(const char* name, const char* server_name) | |||
} else { | |||
int val = 0; | |||
sem_getvalue(fSemaphore, &val); | |||
JackLog("JackPosixSemaphore::Connect sem_getvalue %ld\n", val); | |||
jack_log("JackPosixSemaphore::Connect sem_getvalue %ld", val); | |||
return true; | |||
} | |||
} | |||
@@ -188,7 +188,7 @@ bool JackPosixSemaphore::ConnectOutput(const char* name, const char* server_name | |||
bool JackPosixSemaphore::Disconnect() | |||
{ | |||
JackLog("JackPosixSemaphore::Disconnect %s\n", fName); | |||
jack_log("JackPosixSemaphore::Disconnect %s", fName); | |||
if (fSemaphore) { | |||
if (sem_close(fSemaphore) != 0) { | |||
@@ -207,7 +207,7 @@ bool JackPosixSemaphore::Disconnect() | |||
void JackPosixSemaphore::Destroy() | |||
{ | |||
if (fSemaphore != NULL) { | |||
JackLog("JackPosixSemaphore::Destroy\n"); | |||
jack_log("JackPosixSemaphore::Destroy"); | |||
sem_unlink(fName); | |||
if (sem_close(fSemaphore) != 0) { | |||
jack_error("Destroy: can't destroy semaphore name = %s err = %s", fName, strerror(errno)); | |||
@@ -41,7 +41,7 @@ void* JackPosixThread::ThreadHandler(void* arg) | |||
return 0; | |||
} | |||
JackLog("ThreadHandler: start\n"); | |||
jack_log("ThreadHandler: start"); | |||
// If Init succeed, start the thread loop | |||
bool res = true; | |||
@@ -49,7 +49,7 @@ void* JackPosixThread::ThreadHandler(void* arg) | |||
res = runnable->Execute(); | |||
} | |||
JackLog("ThreadHandler: exit\n"); | |||
jack_log("ThreadHandler: exit"); | |||
return 0; | |||
} | |||
@@ -72,7 +72,7 @@ int JackPosixThread::StartImp(pthread_t* thread, int priority, int realtime, voi | |||
if (realtime) { | |||
JackLog("Create RT thread\n"); | |||
jack_log("Create RT thread"); | |||
/* Get the client thread to run as an RT-FIFO | |||
scheduled thread of appropriate priority. | |||
@@ -123,7 +123,7 @@ int JackPosixThread::StartImp(pthread_t* thread, int priority, int realtime, voi | |||
return 0; | |||
} else { | |||
JackLog("Create non RT thread\n"); | |||
jack_log("Create non RT thread"); | |||
if ((res = pthread_create(thread, 0, start_routine, arg))) { | |||
jack_error("Cannot set create thread %d %s", res, strerror(errno)); | |||
@@ -142,7 +142,7 @@ int JackPosixThread::StartSync() | |||
int JackPosixThread::Kill() | |||
{ | |||
if (fThread) { // If thread has been started | |||
JackLog("JackPosixThread::Kill\n"); | |||
jack_log("JackPosixThread::Kill"); | |||
void* status; | |||
pthread_cancel(fThread); | |||
pthread_join(fThread, &status); | |||
@@ -157,7 +157,7 @@ int JackPosixThread::Kill() | |||
int JackPosixThread::Stop() | |||
{ | |||
if (fThread) { // If thread has been started | |||
JackLog("JackPosixThread::Stop\n"); | |||
jack_log("JackPosixThread::Stop"); | |||
void* status; | |||
fRunning = false; // Request for the thread to stop | |||
pthread_join(fThread, &status); | |||
@@ -223,7 +223,7 @@ pthread_t JackPosixThread::GetThreadID() | |||
void JackPosixThread::Terminate() | |||
{ | |||
JackLog("JackPosixThread::Terminate\n"); | |||
jack_log("JackPosixThread::Terminate"); | |||
pthread_exit(0); | |||
} | |||
@@ -75,7 +75,7 @@ class JackProcessSync : public JackSyncInterface | |||
int res; | |||
pthread_mutex_lock(&fLock); | |||
JackLog("JackProcessSync::Wait time out = %ld\n", usec); | |||
jack_log("JackProcessSync::Wait time out = %ld", usec); | |||
gettimeofday(&T0, 0); | |||
static const UInt64 kNanosPerSec = 1000000000ULL; | |||
@@ -90,7 +90,7 @@ class JackProcessSync : public JackSyncInterface | |||
gettimeofday(&T1, 0); | |||
pthread_mutex_unlock(&fLock); | |||
JackLog("JackProcessSync::Wait finished delta = %5.1lf\n", | |||
jack_log("JackProcessSync::Wait finished delta = %5.1lf", | |||
(1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec)); | |||
return (res == 0); | |||
} | |||
@@ -99,11 +99,11 @@ class JackProcessSync : public JackSyncInterface | |||
{ | |||
int res; | |||
pthread_mutex_lock(&fLock); | |||
JackLog("JackProcessSync::Wait...\n"); | |||
jack_log("JackProcessSync::Wait..."); | |||
if ((res = pthread_cond_wait(&fCond, &fLock)) != 0) | |||
jack_error("pthread_cond_wait error err = %s", strerror(errno)); | |||
pthread_mutex_unlock(&fLock); | |||
JackLog("JackProcessSync::Wait finished\n"); | |||
jack_log("JackProcessSync::Wait finished"); | |||
} | |||
void SignalAll() | |||
@@ -153,11 +153,11 @@ class JackInterProcessSync : public JackSyncInterface | |||
bool TimedWait(long usec) | |||
{ | |||
struct timeval T0, T1; | |||
JackLog("JackInterProcessSync::Wait...\n"); | |||
jack_log("JackInterProcessSync::Wait..."); | |||
gettimeofday(&T0, 0); | |||
bool res = fSynchro->TimedWait(usec); | |||
gettimeofday(&T1, 0); | |||
JackLog("JackInterProcessSync::Wait finished delta = %5.1lf\n", | |||
jack_log("JackInterProcessSync::Wait finished delta = %5.1lf", | |||
(1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec)); | |||
return res; | |||
} | |||
@@ -134,7 +134,7 @@ int JackServer::Open(jack_driver_desc_t* driver_desc, JSList* driver_params) | |||
int JackServer::Close() | |||
{ | |||
JackLog("JackServer::Close\n"); | |||
jack_log("JackServer::Close"); | |||
fChannel->Close(); | |||
fAudioDriver->Detach(); | |||
if (fLoopback > 0) | |||
@@ -171,20 +171,20 @@ int JackServer::InternalClientLoad(const char* client_name, const char* so_name, | |||
int JackServer::Start() | |||
{ | |||
JackLog("JackServer::Start\n"); | |||
jack_log("JackServer::Start"); | |||
fEngineControl->InitFrameTime(); | |||
return fAudioDriver->Start(); | |||
} | |||
int JackServer::Stop() | |||
{ | |||
JackLog("JackServer::Stop\n"); | |||
jack_log("JackServer::Stop"); | |||
return fAudioDriver->Stop(); | |||
} | |||
int JackServer::SetBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
JackLog("JackServer::SetBufferSize nframes = %ld\n", buffer_size); | |||
jack_log("JackServer::SetBufferSize nframes = %ld", buffer_size); | |||
jack_nframes_t current_buffer_size = fEngineControl->fBufferSize; | |||
if (fAudioDriver->Stop() != 0) { | |||
@@ -219,7 +219,7 @@ no graph state change can be done during freewheel mode. | |||
int JackServer::SetFreewheel(bool onoff) | |||
{ | |||
JackLog("JackServer::SetFreewheel state = %ld\n", onoff); | |||
jack_log("JackServer::SetFreewheel state = %ld", onoff); | |||
if (fFreewheel) { | |||
if (onoff) { | |||
@@ -262,7 +262,7 @@ void JackServer::Notify(int refnum, int notify, int value) | |||
break; | |||
case kDeadClient: | |||
JackLog("JackServer: kDeadClient ref = %ld\n", refnum); | |||
jack_log("JackServer: kDeadClient ref = %ld", refnum); | |||
if (fEngine->ClientDeactivate(refnum) < 0) | |||
jack_error("JackServer: DeadClient ref = %ld cannot be removed from the graph !!", refnum); | |||
fEngine->ClientExternalClose(refnum); | |||
@@ -82,7 +82,7 @@ EXPORT jack_client_t* jack_client_open_aux(const char* ext_client_name, jack_opt | |||
jack_varargs_parse(options, ap, &va); | |||
va_end(ap); | |||
JackLog("jack_client_open %s\n", client_name); | |||
jack_log("jack_client_open %s", client_name); | |||
if (client_name == NULL) { | |||
jack_error("jack_client_open called with a NULL client_name"); | |||
return NULL; | |||
@@ -127,7 +127,7 @@ EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options | |||
EXPORT int jack_client_close(jack_client_t* ext_client) | |||
{ | |||
JackLog("jack_client_close\n"); | |||
jack_log("jack_client_close"); | |||
JackClient* client = (JackClient*)ext_client; | |||
if (client == NULL) { | |||
jack_error("jack_client_close called with a NULL client"); | |||
@@ -135,7 +135,7 @@ EXPORT int jack_client_close(jack_client_t* ext_client) | |||
} else { | |||
int res = client->Close(); | |||
delete client; | |||
JackLog("jack_client_close OK\n"); | |||
jack_log("jack_client_close OK"); | |||
JackServerGlobals::Destroy(); // jack server destruction | |||
return res; | |||
} | |||
@@ -50,7 +50,7 @@ int JackServerGlobals::Start(const char* server_name, | |||
int loopback, | |||
int verbose) | |||
{ | |||
JackLog("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld \n", sync, time_out_ms, rt, priority, verbose); | |||
jack_log("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld ", sync, time_out_ms, rt, priority, verbose); | |||
fServer = new JackServer(sync, temporary, time_out_ms, rt, priority, loopback, verbose, server_name); | |||
int res = fServer->Open(driver_desc, driver_params); | |||
return (res < 0) ? res : fServer->Start(); | |||
@@ -60,16 +60,16 @@ int JackServerGlobals::Stop() | |||
{ | |||
fServer->Stop(); | |||
fServer->Close(); | |||
JackLog("Jackdmp: server close\n"); | |||
jack_log("Jackdmp: server close"); | |||
delete fServer; | |||
JackLog("Jackdmp: delete server\n"); | |||
jack_log("Jackdmp: delete server"); | |||
return 0; | |||
} | |||
int JackServerGlobals::Delete() | |||
{ | |||
delete fServer; | |||
JackLog("Jackdmp: delete server\n"); | |||
jack_log("Jackdmp: delete server"); | |||
return 0; | |||
} | |||
@@ -77,7 +77,7 @@ bool JackServerGlobals::Init() | |||
{ | |||
if (fClientCount++ == 0) { | |||
JackLog("JackServerGlobals Init\n"); | |||
jack_log("JackServerGlobals Init"); | |||
int realtime = 0; | |||
int client_timeout = 0; /* msecs; if zero, use period size. */ | |||
int realtime_priority = 10; | |||
@@ -316,7 +316,7 @@ error: | |||
void JackServerGlobals::Destroy() | |||
{ | |||
if (--fClientCount == 0) { | |||
JackLog("JackServerGlobals Destroy\n"); | |||
jack_log("JackServerGlobals Destroy"); | |||
Stop(); | |||
jack_cleanup_shm(); | |||
#ifndef WIN32 | |||
@@ -55,7 +55,7 @@ void* JackShmMem::operator new(size_t size) | |||
gInfo.size = size; | |||
gInfo.attached_at = info.attached_at; | |||
JackLog("JackShmMem::new index = %ld attached = %x size = %ld \n", info.index, info.attached_at, size); | |||
jack_log("JackShmMem::new index = %ld attached = %x size = %ld ", info.index, info.attached_at, size); | |||
return obj; | |||
error: | |||
@@ -70,7 +70,7 @@ void JackShmMem::operator delete(void* p, size_t size) | |||
info.index = obj->fInfo.index; | |||
info.attached_at = obj->fInfo.attached_at; | |||
JackLog("JackShmMem::delete size = %ld index = %ld\n", size, info.index); | |||
jack_log("JackShmMem::delete size = %ld index = %ld", size, info.index); | |||
jack_release_shm(&info); | |||
jack_destroy_shm(&info); | |||
@@ -79,7 +79,7 @@ void JackShmMem::operator delete(void* p, size_t size) | |||
void LockMemoryImp(void* ptr, size_t size) | |||
{ | |||
if (CHECK_MLOCK(ptr, size)) { | |||
JackLog("Succeeded in locking %u byte memory area\n", size); | |||
jack_log("Succeeded in locking %u byte memory area", size); | |||
} else { | |||
jack_error("Cannot lock down memory area (%s)", strerror(errno)); | |||
} | |||
@@ -88,7 +88,7 @@ void LockMemoryImp(void* ptr, size_t size) | |||
void UnlockMemoryImp(void* ptr, size_t size) | |||
{ | |||
if (CHECK_MUNLOCK(ptr, size)) { | |||
JackLog("Succeeded in unlocking %u byte memory area\n", size); | |||
jack_log("Succeeded in unlocking %u byte memory area", size); | |||
} else { | |||
jack_error("Cannot unlock down memory area (%s)", strerror(errno)); | |||
} | |||
@@ -97,7 +97,7 @@ void UnlockMemoryImp(void* ptr, size_t size) | |||
void LockAllMemory() | |||
{ | |||
if (CHECK_MLOCKALL()) { | |||
JackLog("Succeeded in locking all memory\n"); | |||
jack_log("Succeeded in locking all memory"); | |||
} else { | |||
jack_error("Cannot lock down memory area (%s)", strerror(errno)); | |||
} | |||
@@ -106,7 +106,7 @@ void LockAllMemory() | |||
void UnlockAllMemory() | |||
{ | |||
if (CHECK_MUNLOCKALL()) { | |||
JackLog("Succeeded in unlocking all memory\n"); | |||
jack_log("Succeeded in unlocking all memory"); | |||
} else { | |||
jack_error("Cannot unlock down memory area (%s)", strerror(errno)); | |||
} | |||
@@ -154,7 +154,7 @@ class JackShmReadWritePtr | |||
void Init(int index, const char* server_name = "default") | |||
{ | |||
if (fInfo.index < 0 && index >= 0) { | |||
JackLog("JackShmReadWritePtr::Init %ld %ld\n", index, fInfo.index); | |||
jack_log("JackShmReadWritePtr::Init %ld %ld", index, fInfo.index); | |||
if (jack_initialize_shm(server_name) < 0) | |||
throw - 1; | |||
fInfo.index = index; | |||
@@ -181,7 +181,7 @@ class JackShmReadWritePtr | |||
virtual ~JackShmReadWritePtr() | |||
{ | |||
if (fInfo.index >= 0) { | |||
JackLog("JackShmReadWritePtr::~JackShmReadWritePtr %ld\n", fInfo.index); | |||
jack_log("JackShmReadWritePtr::~JackShmReadWritePtr %ld", fInfo.index); | |||
jack_release_shm(&fInfo); | |||
fInfo.index = -1; | |||
} | |||
@@ -234,7 +234,7 @@ class JackShmReadWritePtr1 | |||
void Init(int index, const char* server_name = "default") | |||
{ | |||
if (fInfo.index < 0 && index >= 0) { | |||
JackLog("JackShmReadWritePtr1::Init %ld %ld\n", index, fInfo.index); | |||
jack_log("JackShmReadWritePtr1::Init %ld %ld", index, fInfo.index); | |||
if (jack_initialize_shm(server_name) < 0) | |||
throw - 1; | |||
fInfo.index = index; | |||
@@ -267,7 +267,7 @@ class JackShmReadWritePtr1 | |||
virtual ~JackShmReadWritePtr1() | |||
{ | |||
if (fInfo.index >= 0) { | |||
JackLog("JackShmReadWritePtr1::~JackShmReadWritePtr1 %ld\n", fInfo.index); | |||
jack_log("JackShmReadWritePtr1::~JackShmReadWritePtr1 %ld", fInfo.index); | |||
jack_release_shm(&fInfo); | |||
fInfo.index = -1; | |||
} | |||
@@ -320,7 +320,7 @@ class JackShmReadPtr | |||
void Init(int index, const char* server_name = "default") | |||
{ | |||
if (fInfo.index < 0 && index >= 0) { | |||
JackLog("JackShmPtrRead::Init %ld %ld\n", index, fInfo.index); | |||
jack_log("JackShmPtrRead::Init %ld %ld", index, fInfo.index); | |||
if (jack_initialize_shm(server_name) < 0) | |||
throw - 1; | |||
fInfo.index = index; | |||
@@ -347,7 +347,7 @@ class JackShmReadPtr | |||
virtual ~JackShmReadPtr() | |||
{ | |||
if (fInfo.index >= 0) { | |||
JackLog("JackShmPtrRead::~JackShmPtrRead %ld\n", fInfo.index); | |||
jack_log("JackShmPtrRead::~JackShmPtrRead %ld", fInfo.index); | |||
jack_release_shm(&fInfo); | |||
fInfo.index = -1; | |||
} | |||
@@ -33,7 +33,7 @@ void JackClientSocket::SetReadTimeOut(long sec) | |||
timout.tv_sec = sec; | |||
timout.tv_usec = 0; | |||
if (setsockopt(fSocket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timout, sizeof(timeval)) < 0) { | |||
JackLog("setsockopt SO_RCVTIMEO fd = %ld err = %s\n", fSocket, strerror(errno)); | |||
jack_log("setsockopt SO_RCVTIMEO fd = %ld err = %s", fSocket, strerror(errno)); | |||
} | |||
} | |||
@@ -43,7 +43,7 @@ void JackClientSocket::SetWriteTimeOut(long sec) | |||
timout.tv_sec = sec ; | |||
timout.tv_usec = 0; | |||
if (setsockopt(fSocket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timout, sizeof(timeval)) < 0) { | |||
JackLog("setsockopt SO_SNDTIMEO fd = %ld err = %s\n", fSocket, strerror(errno)); | |||
jack_log("setsockopt SO_SNDTIMEO fd = %ld err = %s", fSocket, strerror(errno)); | |||
} | |||
} | |||
@@ -58,7 +58,7 @@ int JackClientSocket::Connect(const char* dir, const char* name, int which) // A | |||
addr.sun_family = AF_UNIX; | |||
snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s_%d", dir, name, which); | |||
JackLog("Connect: addr.sun_path %s\n", addr.sun_path); | |||
jack_log("Connect: addr.sun_path %s", addr.sun_path); | |||
if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { | |||
jack_error("Cannot connect to server socket err = %s", strerror(errno)); | |||
@@ -69,7 +69,7 @@ int JackClientSocket::Connect(const char* dir, const char* name, int which) // A | |||
#ifdef __APPLE__ | |||
int on = 1 ; | |||
if (setsockopt(fSocket, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) { | |||
JackLog("setsockopt SO_NOSIGPIPE fd = %ld err = %s\n", fSocket, strerror(errno)); | |||
jack_log("setsockopt SO_NOSIGPIPE fd = %ld err = %s", fSocket, strerror(errno)); | |||
} | |||
#endif | |||
@@ -87,7 +87,7 @@ int JackClientSocket::Connect(const char* dir, int which) | |||
addr.sun_family = AF_UNIX; | |||
snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%d", dir, which); | |||
JackLog("Connect: addr.sun_path %s\n", addr.sun_path); | |||
jack_log("Connect: addr.sun_path %s", addr.sun_path); | |||
if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { | |||
jack_error("Cannot connect to server socket err = %s", strerror(errno)); | |||
@@ -98,7 +98,7 @@ int JackClientSocket::Connect(const char* dir, int which) | |||
#ifdef __APPLE__ | |||
int on = 1 ; | |||
if (setsockopt(fSocket, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) { | |||
JackLog("setsockopt SO_NOSIGPIPE fd = %ld err = %s\n", fSocket, strerror(errno)); | |||
jack_log("setsockopt SO_NOSIGPIPE fd = %ld err = %s", fSocket, strerror(errno)); | |||
} | |||
#endif | |||
@@ -107,7 +107,7 @@ int JackClientSocket::Connect(const char* dir, int which) | |||
int JackClientSocket::Close() | |||
{ | |||
JackLog("JackClientSocket::Close\n"); | |||
jack_log("JackClientSocket::Close"); | |||
//shutdown(fSocket, SHUT_RDWR); | |||
if (fSocket > 0) { | |||
close(fSocket); | |||
@@ -125,7 +125,7 @@ int JackClientSocket::Read(void* data, int len) | |||
if ((len1 = read(fSocket, data, len)) != len) { | |||
jack_error("Cannot read socket fd = %d err = %s", fSocket, strerror(errno)); | |||
if (errno == EWOULDBLOCK) { | |||
JackLog("JackClientSocket::Read time out\n"); | |||
jack_log("JackClientSocket::Read time out"); | |||
return 0; | |||
} else { | |||
return -1; | |||
@@ -165,7 +165,7 @@ int JackServerSocket::Bind(const char* dir, const char* name, int which) // A re | |||
} | |||
*/ | |||
JackLog("Bind: addr.sun_path %s\n", addr.sun_path); | |||
jack_log("Bind: addr.sun_path %s", addr.sun_path); | |||
unlink(fName); // Security... | |||
if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { | |||
@@ -216,7 +216,7 @@ int JackServerSocket::Bind(const char* dir, int which) // A revoir : utilisation | |||
} | |||
*/ | |||
JackLog("Bind: addr.sun_path %s\n", addr.sun_path); | |||
jack_log("Bind: addr.sun_path %s", addr.sun_path); | |||
unlink(fName); // Security... | |||
if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { | |||
@@ -256,7 +256,7 @@ JackClientSocket* JackServerSocket::Accept() | |||
int JackServerSocket::Close() | |||
{ | |||
JackLog("JackServerSocket::Close %s\n", fName); | |||
jack_log("JackServerSocket::Close %s", fName); | |||
//shutdown(fSocket, SHUT_RDWR); | |||
if (fSocket > 0) { | |||
//shutdown(fSocket, SHUT_RDWR); | |||
@@ -40,7 +40,7 @@ JackSocketClientChannel::~JackSocketClientChannel() | |||
int JackSocketClientChannel::ServerCheck(const char* server_name) | |||
{ | |||
JackLog("JackSocketClientChannel::ServerCheck = %s\n", server_name); | |||
jack_log("JackSocketClientChannel::ServerCheck = %s", server_name); | |||
// Connect to server | |||
if (fRequestSocket.Connect(jack_server_dir, server_name, 0) < 0) { | |||
@@ -55,7 +55,7 @@ int JackSocketClientChannel::ServerCheck(const char* server_name) | |||
int JackSocketClientChannel::Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status) | |||
{ | |||
int result = 0; | |||
JackLog("JackSocketClientChannel::Open name = %s\n", name); | |||
jack_log("JackSocketClientChannel::Open name = %s", name); | |||
if (fRequestSocket.Connect(jack_server_dir, server_name, 0) < 0) { | |||
jack_error("Cannot connect to server socket"); | |||
@@ -97,7 +97,7 @@ void JackSocketClientChannel::Close() | |||
int JackSocketClientChannel::Start() | |||
{ | |||
JackLog("JackSocketClientChannel::Start\n"); | |||
jack_log("JackSocketClientChannel::Start"); | |||
if (fThread->Start() != 0) { | |||
jack_error("Cannot start Jack client listener"); | |||
return -1; | |||
@@ -108,7 +108,7 @@ int JackSocketClientChannel::Start() | |||
void JackSocketClientChannel::Stop() | |||
{ | |||
JackLog("JackSocketClientChannel::Stop\n"); | |||
jack_log("JackSocketClientChannel::Stop"); | |||
fThread->Kill(); | |||
} | |||
@@ -286,7 +286,7 @@ void JackSocketClientChannel::InternalClientUnload(int refnum, int int_ref, int* | |||
bool JackSocketClientChannel::Init() | |||
{ | |||
JackLog("JackSocketClientChannel::Init \n"); | |||
jack_log("JackSocketClientChannel::Init "); | |||
fNotificationSocket = fNotificationListenSocket.Accept(); | |||
// No more needed | |||
fNotificationListenSocket.Close(); | |||
@@ -28,7 +28,7 @@ namespace Jack | |||
// Server to client | |||
int JackSocketNotifyChannel::Open(const char* name) | |||
{ | |||
JackLog("JackSocketNotifyChannel::Open name = %s\n", name); | |||
jack_log("JackSocketNotifyChannel::Open name = %s", name); | |||
// Connect to client listen socket | |||
if (fNotifySocket.Connect(jack_client_dir, name, 0) < 0) { | |||
@@ -42,7 +42,7 @@ int JackSocketNotifyChannel::Open(const char* name) | |||
void JackSocketNotifyChannel::Close() | |||
{ | |||
JackLog("JackSocketNotifyChannel::Close\n"); | |||
jack_log("JackSocketNotifyChannel::Close"); | |||
fNotifySocket.Close(); | |||
} | |||
@@ -46,12 +46,12 @@ JackSocketServerChannel::~JackSocketServerChannel() | |||
int JackSocketServerChannel::Open(const char* server_name, JackServer* server) | |||
{ | |||
JackLog("JackSocketServerChannel::Open \n"); | |||
jack_log("JackSocketServerChannel::Open "); | |||
fServer = server; | |||
// Prepare request socket | |||
if (fRequestListenSocket.Bind(jack_server_dir, server_name, 0) < 0) { | |||
JackLog("JackSocketServerChannel::Open : cannot create result listen socket\n"); | |||
jack_log("JackSocketServerChannel::Open : cannot create result listen socket"); | |||
return -1; | |||
} | |||
@@ -79,7 +79,7 @@ void JackSocketServerChannel::Close() | |||
void JackSocketServerChannel::ClientCreate() | |||
{ | |||
JackLog("JackSocketServerChannel::ClientCreate socket\n"); | |||
jack_log("JackSocketServerChannel::ClientCreate socket"); | |||
JackClientSocket* socket = fRequestListenSocket.Accept(); | |||
if (socket) { | |||
fSocketTable[socket->GetFd()] = make_pair( -1, socket); | |||
@@ -91,7 +91,7 @@ void JackSocketServerChannel::ClientCreate() | |||
void JackSocketServerChannel::ClientAdd(int fd, char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result) | |||
{ | |||
JackLog("JackSocketServerChannel::ClientAdd\n"); | |||
jack_log("JackSocketServerChannel::ClientAdd"); | |||
int refnum = -1; | |||
*result = fServer->GetEngine()->ClientExternalOpen(name, &refnum, shared_engine, shared_client, shared_graph); | |||
if (*result == 0) { | |||
@@ -107,7 +107,7 @@ void JackSocketServerChannel::ClientRemove(int fd, int refnum) | |||
pair<int, JackClientSocket*> elem = fSocketTable[fd]; | |||
JackClientSocket* socket = elem.second; | |||
assert(socket); | |||
JackLog("JackSocketServerChannel::ClientRemove ref = %d\n", refnum); | |||
jack_log("JackSocketServerChannel::ClientRemove ref = %d", refnum); | |||
fSocketTable.erase(fd); | |||
socket->Close(); | |||
delete socket; | |||
@@ -121,10 +121,10 @@ void JackSocketServerChannel::ClientKill(int fd) | |||
int refnum = elem.first; | |||
assert(socket); | |||
JackLog("JackSocketServerChannel::ClientKill ref = %d\n", refnum); | |||
jack_log("JackSocketServerChannel::ClientKill ref = %d", refnum); | |||
if (refnum == -1) { // Should never happen... correspond to a client that started the socket but never opened... | |||
JackLog("Client was not opened : probably correspond to server_check\n"); | |||
jack_log("Client was not opened : probably correspond to server_check"); | |||
} else { | |||
fServer->Notify(refnum, kDeadClient, 0); | |||
} | |||
@@ -152,7 +152,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
switch (header.fType) { | |||
case JackRequest::kClientCheck: { | |||
JackLog("JackRequest::kClientCheck\n"); | |||
jack_log("JackRequest::kClientCheck"); | |||
JackClientCheckRequest req; | |||
JackClientCheckResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -163,7 +163,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kClientOpen: { | |||
JackLog("JackRequest::ClientOpen\n"); | |||
jack_log("JackRequest::ClientOpen"); | |||
JackClientOpenRequest req; | |||
JackClientOpenResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -174,7 +174,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kClientClose: { | |||
JackLog("JackRequest::ClientClose\n"); | |||
jack_log("JackRequest::ClientClose"); | |||
JackClientCloseRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -187,7 +187,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
case JackRequest::kActivateClient: { | |||
JackActivateRequest req; | |||
JackResult res; | |||
JackLog("JackRequest::ActivateClient\n"); | |||
jack_log("JackRequest::ActivateClient"); | |||
if (req.Read(socket) == 0) | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum); | |||
if (res.Write(socket) < 0) | |||
@@ -196,7 +196,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kDeactivateClient: { | |||
JackLog("JackRequest::DeactivateClient\n"); | |||
jack_log("JackRequest::DeactivateClient"); | |||
JackDeactivateRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -207,7 +207,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kRegisterPort: { | |||
JackLog("JackRequest::RegisterPort\n"); | |||
jack_log("JackRequest::RegisterPort"); | |||
JackPortRegisterRequest req; | |||
JackPortRegisterResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -218,7 +218,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kUnRegisterPort: { | |||
JackLog("JackRequest::UnRegisterPort\n"); | |||
jack_log("JackRequest::UnRegisterPort"); | |||
JackPortUnRegisterRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -229,7 +229,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kConnectNamePorts: { | |||
JackLog("JackRequest::ConnectPorts\n"); | |||
jack_log("JackRequest::ConnectPorts"); | |||
JackPortConnectNameRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -240,7 +240,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kDisconnectNamePorts: { | |||
JackLog("JackRequest::DisconnectPorts\n"); | |||
jack_log("JackRequest::DisconnectPorts"); | |||
JackPortDisconnectNameRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -251,7 +251,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kConnectPorts: { | |||
JackLog("JackRequest::ConnectPorts\n"); | |||
jack_log("JackRequest::ConnectPorts"); | |||
JackPortConnectRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -262,7 +262,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kDisconnectPorts: { | |||
JackLog("JackRequest::DisconnectPorts\n"); | |||
jack_log("JackRequest::DisconnectPorts"); | |||
JackPortDisconnectRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -273,7 +273,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kSetBufferSize: { | |||
JackLog("JackRequest::SetBufferSize\n"); | |||
jack_log("JackRequest::SetBufferSize"); | |||
JackSetBufferSizeRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -284,7 +284,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kSetFreeWheel: { | |||
JackLog("JackRequest::SetFreeWheel\n"); | |||
jack_log("JackRequest::SetFreeWheel"); | |||
JackSetFreeWheelRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -295,7 +295,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kReleaseTimebase: { | |||
JackLog("JackRequest::kReleaseTimebase\n"); | |||
jack_log("JackRequest::kReleaseTimebase"); | |||
JackReleaseTimebaseRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -306,7 +306,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kSetTimebaseCallback: { | |||
JackLog("JackRequest::kSetTimebaseCallback\n"); | |||
jack_log("JackRequest::kSetTimebaseCallback"); | |||
JackSetTimebaseCallbackRequest req; | |||
JackResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -317,7 +317,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kGetInternalClientName: { | |||
JackLog("JackRequest::kGetInternalClientName\n"); | |||
jack_log("JackRequest::kGetInternalClientName"); | |||
JackGetInternalClientNameRequest req; | |||
JackGetInternalClientNameResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -328,7 +328,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kInternalClientHandle: { | |||
JackLog("JackRequest::kInternalClientHandle\n"); | |||
jack_log("JackRequest::kInternalClientHandle"); | |||
JackInternalClientHandleRequest req; | |||
JackInternalClientHandleResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -339,7 +339,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kInternalClientLoad: { | |||
JackLog("JackRequest::kInternalClientLoad\n"); | |||
jack_log("JackRequest::kInternalClientLoad"); | |||
JackInternalClientLoadRequest req; | |||
JackInternalClientLoadResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -350,7 +350,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kInternalClientUnload: { | |||
JackLog("JackRequest::kInternalClientUnload\n"); | |||
jack_log("JackRequest::kInternalClientUnload"); | |||
JackInternalClientUnloadRequest req; | |||
JackInternalClientUnloadResult res; | |||
if (req.Read(socket) == 0) | |||
@@ -361,7 +361,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
case JackRequest::kNotification: { | |||
JackLog("JackRequest::Notification\n"); | |||
jack_log("JackRequest::Notification"); | |||
JackClientNotificationRequest req; | |||
if (req.Read(socket) == 0) | |||
fServer->Notify(req.fRefNum, req.fNotify, req.fValue); | |||
@@ -369,7 +369,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||
} | |||
default: | |||
JackLog("Unknown request %ld\n", header.fType); | |||
jack_log("Unknown request %ld", header.fType); | |||
break; | |||
} | |||
@@ -383,7 +383,7 @@ void JackSocketServerChannel::BuildPoolTable() | |||
delete[] fPollTable; | |||
fPollTable = new pollfd[fSocketTable.size() + 1]; | |||
JackLog("JackSocketServerChannel::BuildPoolTable size = %d\n", fSocketTable.size() + 1); | |||
jack_log("JackSocketServerChannel::BuildPoolTable size = %d", fSocketTable.size() + 1); | |||
// First fd is the server request socket | |||
fPollTable[0].fd = fRequestListenSocket.GetFd(); | |||
@@ -394,7 +394,7 @@ void JackSocketServerChannel::BuildPoolTable() | |||
int i; | |||
for (i = 1, it = fSocketTable.begin(); it != fSocketTable.end(); it++, i++) { | |||
JackLog("fSocketTable i = %ld fd = %ld\n", i, it->first); | |||
jack_log("fSocketTable i = %ld fd = %ld", i, it->first); | |||
fPollTable[i].fd = it->first; | |||
fPollTable[i].events = POLLIN | POLLPRI | POLLERR | POLLHUP | POLLNVAL; | |||
} | |||
@@ -412,9 +412,9 @@ bool JackSocketServerChannel::Execute() | |||
// Poll all clients | |||
for (unsigned int i = 1; i < fSocketTable.size() + 1; i++) { | |||
int fd = fPollTable[i].fd; | |||
JackLog("fPollTable i = %ld fd = %ld\n", i, fd); | |||
jack_log("fPollTable i = %ld fd = %ld", i, fd); | |||
if (fPollTable[i].revents & ~POLLIN) { | |||
JackLog("Poll client error err = %s\n", strerror(errno)); | |||
jack_log("Poll client error err = %s", strerror(errno)); | |||
ClientKill(fd); | |||
} else if (fPollTable[i].revents & POLLIN) { | |||
if (HandleRequest(fd) < 0) { | |||
@@ -45,7 +45,7 @@ JackThreadedDriver::~JackThreadedDriver() | |||
int JackThreadedDriver::Start() | |||
{ | |||
JackLog("JackThreadedDriver::Start\n"); | |||
jack_log("JackThreadedDriver::Start"); | |||
int res; | |||
if ((res = fDriver->Start()) < 0) { | |||
@@ -58,7 +58,7 @@ int JackThreadedDriver::Start() | |||
} | |||
if (fDriver->IsRealTime()) { | |||
JackLog("JackThreadedDriver::Start IsRealTime\n"); | |||
jack_log("JackThreadedDriver::Start IsRealTime"); | |||
if (fThread->AcquireRealTime(GetEngineControl()->fPriority) < 0) | |||
jack_error("AcquireRealTime error"); | |||
} | |||
@@ -68,7 +68,7 @@ int JackThreadedDriver::Start() | |||
int JackThreadedDriver::Stop() | |||
{ | |||
JackLog("JackThreadedDriver::Stop\n"); | |||
jack_log("JackThreadedDriver::Stop"); | |||
int res; | |||
if ((res = fThread->Stop()) < 0) { // Stop when the thread cycle is finished | |||
@@ -28,7 +28,7 @@ double __jack_time_ratio; | |||
/* This should only be called ONCE per process. */ | |||
void InitTime() | |||
{ | |||
JackLog("InitTime\n"); | |||
jack_log("InitTime"); | |||
mach_timebase_info_data_t info; | |||
mach_timebase_info(&info); | |||
__jack_time_ratio = ((float)info.numer / info.denom) / 1000; | |||
@@ -43,7 +43,7 @@ EXPORT LARGE_INTEGER _jack_freq; | |||
void InitTime() | |||
{ | |||
QueryPerformanceFrequency(&_jack_freq); | |||
JackLog("InitTime freq = %ld %ld\n", _jack_freq.HighPart, _jack_freq.LowPart); | |||
jack_log("InitTime freq = %ld %ld", _jack_freq.HighPart, _jack_freq.LowPart); | |||
_jack_freq.QuadPart = _jack_freq.QuadPart / 1000000; // by usec | |||
} | |||
@@ -46,7 +46,7 @@ void JackTransportEngine::SyncTimeout(jack_nframes_t frame_rate, jack_nframes_t | |||
{ | |||
long buf_usecs = (long)((buffer_size * (jack_time_t) 1000000) / frame_rate); | |||
fSyncTimeLeft = fSyncTimeout / buf_usecs; | |||
JackLog("SyncTimeout fSyncTimeout = %ld fSyncTimeLeft = %ld\n", (long)fSyncTimeout, (long)fSyncTimeLeft); | |||
jack_log("SyncTimeout fSyncTimeout = %ld fSyncTimeLeft = %ld", (long)fSyncTimeout, (long)fSyncTimeLeft); | |||
} | |||
int JackTransportEngine::ResetTimebase(int refnum) | |||
@@ -66,15 +66,15 @@ int JackTransportEngine::SetTimebase(int refnum, bool conditionnal) | |||
{ | |||
if (conditionnal && fTimeBaseMaster > 0) { | |||
if (refnum != fTimeBaseMaster) { | |||
JackLog("conditional timebase for ref = %ld failed: %ld is already the master\n", refnum, fTimeBaseMaster); | |||
jack_log("conditional timebase for ref = %ld failed: %ld is already the master", refnum, fTimeBaseMaster); | |||
return EBUSY; | |||
} else { | |||
JackLog("ref = %ld was already timebase master\n", refnum); | |||
jack_log("ref = %ld was already timebase master", refnum); | |||
return 0; | |||
} | |||
} else { | |||
fTimeBaseMaster = refnum; | |||
JackLog("new timebase master: ref = %ld\n", refnum); | |||
jack_log("new timebase master: ref = %ld", refnum); | |||
return 0; | |||
} | |||
} | |||
@@ -84,7 +84,7 @@ bool JackTransportEngine::CheckOneSynching(JackClientInterface** table) | |||
for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = table[i]; | |||
if (client && client->GetClientControl()->fTransportState == JackTransportSynching) { | |||
JackLog("CheckOneSynching\n"); | |||
jack_log("CheckOneSynching"); | |||
return true; | |||
} | |||
} | |||
@@ -96,11 +96,11 @@ bool JackTransportEngine::CheckAllRolling(JackClientInterface** table) | |||
for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = table[i]; | |||
if (client && client->GetClientControl()->fTransportState != JackTransportRolling) { | |||
JackLog("CheckAllRolling refnum = %ld is not rolling\n", i); | |||
jack_log("CheckAllRolling refnum = %ld is not rolling", i); | |||
return false; | |||
} | |||
} | |||
JackLog("CheckAllRolling\n"); | |||
jack_log("CheckAllRolling"); | |||
return true; | |||
} | |||
@@ -111,10 +111,10 @@ void JackTransportEngine::MakeAllStarting(JackClientInterface** table) | |||
if (client) { | |||
// Unactive clients don't have their process function called at all, they appear as already "rolling" for the transport.... | |||
client->GetClientControl()->fTransportState = (client->GetClientControl()->fActive) ? JackTransportStarting : JackTransportRolling; | |||
JackLog("MakeAllStarting refnum = %ld \n", i); | |||
jack_log("MakeAllStarting refnum = %ld ", i); | |||
} | |||
} | |||
JackLog("MakeAllStarting\n"); | |||
jack_log("MakeAllStarting"); | |||
} | |||
void JackTransportEngine::CycleBegin(jack_nframes_t frame_rate, jack_time_t time) // really needed?? (would be done in CycleEnd...) | |||
@@ -133,7 +133,7 @@ void JackTransportEngine::CycleEnd(JackClientInterface** table, jack_nframes_t f | |||
transport_command_t cmd = fTransportCmd; | |||
if (cmd != fPreviousCmd) { | |||
fPreviousCmd = cmd; | |||
JackLog("transport command: %s\n", (cmd == TransportCommandStart ? "START" : "STOP")); | |||
jack_log("transport command: %s", (cmd == TransportCommandStart ? "START" : "STOP")); | |||
} else { | |||
cmd = TransportCommandNone; | |||
} | |||
@@ -146,13 +146,13 @@ void JackTransportEngine::CycleEnd(JackClientInterface** table, jack_nframes_t f | |||
fTransportState = JackTransportStarting; | |||
MakeAllStarting(table); | |||
SyncTimeout(frame_rate, buffer_size); | |||
JackLog("transport locate ==> starting....\n"); | |||
jack_log("transport locate ==> starting...."); | |||
} else if (fPendingPos) { | |||
fTransportState = JackTransportSynching; | |||
JackLog("transport locate ==> locate....\n"); | |||
jack_log("transport locate ==> locate...."); | |||
} else { | |||
fTransportState = JackTransportStopped; | |||
JackLog("transport locate ==> stopped....\n"); | |||
jack_log("transport locate ==> stopped...."); | |||
} | |||
break; | |||
@@ -162,38 +162,38 @@ void JackTransportEngine::CycleEnd(JackClientInterface** table, jack_nframes_t f | |||
fTransportState = JackTransportStarting; | |||
MakeAllStarting(table); | |||
SyncTimeout(frame_rate, buffer_size); | |||
JackLog("transport stopped ==> starting....\n"); | |||
jack_log("transport stopped ==> starting...."); | |||
} else if (fPendingPos || CheckOneSynching(table)) { | |||
fTransportState = JackTransportSynching; | |||
JackLog("transport stopped ==> locate....\n"); | |||
jack_log("transport stopped ==> locate...."); | |||
} | |||
break; | |||
case JackTransportStarting: | |||
JackLog("transport starting fSyncTimeLeft %ld\n", fSyncTimeLeft); | |||
jack_log("transport starting fSyncTimeLeft %ld", fSyncTimeLeft); | |||
if (cmd == TransportCommandStop) { | |||
fTransportState = JackTransportStopped; | |||
JackLog("transport starting ==> stopped\n"); | |||
jack_log("transport starting ==> stopped"); | |||
} else if (fPendingPos) { | |||
fTransportState = JackTransportStarting; | |||
MakeAllStarting(table); | |||
SyncTimeout(frame_rate, buffer_size); | |||
} else if (--fSyncTimeLeft == 0 || CheckAllRolling(table)) { | |||
fTransportState = JackTransportRolling; | |||
JackLog("transport starting ==> rolling.... fSyncTimeLeft %ld\n", fSyncTimeLeft); | |||
jack_log("transport starting ==> rolling.... fSyncTimeLeft %ld", fSyncTimeLeft); | |||
} | |||
break; | |||
case JackTransportRolling: | |||
if (cmd == TransportCommandStop) { | |||
fTransportState = JackTransportStopped; | |||
JackLog("transport rolling ==> stopped\n"); | |||
jack_log("transport rolling ==> stopped"); | |||
} else if (fPendingPos || CheckOneSynching(table)) { | |||
fTransportState = JackTransportStarting; | |||
MakeAllStarting(table); | |||
SyncTimeout(frame_rate, buffer_size); | |||
JackLog("transport rolling ==> starting....\n"); | |||
jack_log("transport rolling ==> starting...."); | |||
} | |||
break; | |||
@@ -211,7 +211,7 @@ void JackTransportEngine::CycleEnd(JackClientInterface** table, jack_nframes_t f | |||
/* See if an asynchronous position request arrived during the last cycle. */ | |||
jack_position_t* request = WriteNextStateStart(2, &fPendingPos); | |||
if (fPendingPos) { | |||
JackLog("New pos = %ld\n", request->frame); | |||
jack_log("New pos = %ld", request->frame); | |||
jack_position_t* pending = WriteNextStateStart(1); | |||
TransportCopyPosition(request, pending); | |||
WriteNextStateStop(1); | |||
@@ -106,7 +106,7 @@ static void DoNothingHandler(int sig) | |||
static int JackStart(const char* server_name, jack_driver_desc_t* driver_desc, JSList* driver_params, int sync, int temporary, int time_out_ms, int rt, int priority, int loopback, int verbose) | |||
{ | |||
JackLog("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld \n", sync, time_out_ms, rt, priority, verbose); | |||
jack_log("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld ", sync, time_out_ms, rt, priority, verbose); | |||
fServer = new JackServer(sync, temporary, time_out_ms, rt, priority, loopback, verbose, server_name); | |||
int res = fServer->Open(driver_desc, driver_params); | |||
return (res < 0) ? res : fServer->Start(); | |||
@@ -116,16 +116,16 @@ static int JackStop() | |||
{ | |||
fServer->Stop(); | |||
fServer->Close(); | |||
JackLog("Jackdmp: server close\n"); | |||
jack_log("Jackdmp: server close"); | |||
delete fServer; | |||
JackLog("Jackdmp: delete server\n"); | |||
jack_log("Jackdmp: delete server"); | |||
return 0; | |||
} | |||
static int JackDelete() | |||
{ | |||
delete fServer; | |||
JackLog("Jackdmp: delete server\n"); | |||
jack_log("Jackdmp: delete server"); | |||
return 0; | |||
} | |||
@@ -123,7 +123,7 @@ JackAlsaDriver::alsa_driver_check_card_type (alsa_driver_t *driver) | |||
char tmp[5]; | |||
strncpy(tmp, strstr(driver->alsa_name_playback, "hw"), 4); | |||
tmp[4] = '\0'; | |||
JackLog("control device %s\n", tmp); | |||
jack_log("control device %s", tmp); | |||
ctl_name = strdup(tmp); | |||
} else { | |||
ctl_name = strdup(driver->alsa_name_playback); | |||
@@ -256,21 +256,21 @@ JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
switch (driver->dither) { | |||
case Rectangular: | |||
JackLog("Rectangular dithering at 16 bits\n"); | |||
jack_log("Rectangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_rect_d16_sSs : | |||
sample_move_dither_rect_d16_sS; | |||
break; | |||
case Triangular: | |||
JackLog("Triangular dithering at 16 bits\n"); | |||
jack_log("Triangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_tri_d16_sSs : | |||
sample_move_dither_tri_d16_sS; | |||
break; | |||
case Shaped: | |||
JackLog("Noise-shaped dithering at 16 bits\n"); | |||
jack_log("Noise-shaped dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_shaped_d16_sSs : | |||
sample_move_dither_shaped_d16_sS; | |||
@@ -292,21 +292,21 @@ JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
switch (driver->dither) { | |||
case Rectangular: | |||
JackLog("Rectangular dithering at 16 bits\n"); | |||
jack_log("Rectangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_rect_d24_sSs : | |||
sample_move_dither_rect_d24_sS; | |||
break; | |||
case Triangular: | |||
JackLog("Triangular dithering at 16 bits\n"); | |||
jack_log("Triangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_tri_d24_sSs : | |||
sample_move_dither_tri_d24_sS; | |||
break; | |||
case Shaped: | |||
JackLog("Noise-shaped dithering at 16 bits\n"); | |||
jack_log("Noise-shaped dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_shaped_d24_sSs : | |||
sample_move_dither_shaped_d24_sS; | |||
@@ -328,21 +328,21 @@ JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
switch (driver->dither) { | |||
case Rectangular: | |||
JackLog("Rectangular dithering at 16 bits\n"); | |||
jack_log("Rectangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_rect_d32u24_sSs : | |||
sample_move_dither_rect_d32u24_sS; | |||
break; | |||
case Triangular: | |||
JackLog("Triangular dithering at 16 bits\n"); | |||
jack_log("Triangular dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_tri_d32u24_sSs : | |||
sample_move_dither_tri_d32u24_sS; | |||
break; | |||
case Shaped: | |||
JackLog("Noise-shaped dithering at 16 bits\n"); | |||
jack_log("Noise-shaped dithering at 16 bits"); | |||
driver->write_via_copy = driver->quirk_bswap ? | |||
sample_move_dither_shaped_d32u24_sSs : | |||
sample_move_dither_shaped_d32u24_sS; | |||
@@ -1317,7 +1317,7 @@ JackAlsaDriver::alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *stat | |||
if (poll (driver->pfd, nfds, driver->poll_timeout) < 0) { | |||
if (errno == EINTR) { | |||
JackLog ("poll interrupt\n"); | |||
jack_log("poll interrupt"); | |||
// this happens mostly when run | |||
// under gdb, or when exiting due to a signal | |||
// steph | |||
@@ -1521,7 +1521,7 @@ JackAlsaDriver::alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *stat | |||
int JackAlsaDriver::SetBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
JackLog("JackAlsaDriver::SetBufferSize %ld\n", buffer_size); | |||
jack_log("JackAlsaDriver::SetBufferSize %ld", buffer_size); | |||
int res = alsa_driver_reset_parameters((alsa_driver_t *)fDriver, buffer_size, | |||
((alsa_driver_t *)fDriver)->user_nperiods, | |||
((alsa_driver_t *)fDriver)->frame_rate); | |||
@@ -2118,7 +2118,7 @@ int JackAlsaDriver::Attach() | |||
JackAudioDriver::SetBufferSize(alsa_driver->frames_per_cycle); | |||
JackAudioDriver::SetSampleRate(alsa_driver->frame_rate); | |||
JackLog("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
jack_log("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
for (int i = 0; i < fCaptureChannels; i++) { | |||
snprintf(alias, sizeof(alias) - 1, "%s:capture_%u", fClientControl->fName, i + 1); | |||
@@ -2131,7 +2131,7 @@ int JackAlsaDriver::Attach() | |||
port->SetAlias(alias); | |||
port->SetLatency(alsa_driver->frames_per_cycle + alsa_driver->capture_frame_latency); | |||
fCapturePortList[i] = port_index; | |||
JackLog("JackAudioDriver::Attach fCapturePortList[i] %ld \n", port_index); | |||
jack_log("JackAudioDriver::Attach fCapturePortList[i] %ld ", port_index); | |||
} | |||
port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal; | |||
@@ -2147,11 +2147,11 @@ int JackAlsaDriver::Attach() | |||
port->SetAlias(alias); | |||
port->SetLatency((alsa_driver->frames_per_cycle * (alsa_driver->user_nperiods - 1)) + alsa_driver->playback_frame_latency); | |||
fPlaybackPortList[i] = port_index; | |||
JackLog("JackAudioDriver::Attach fPlaybackPortList[i] %ld \n", port_index); | |||
jack_log("JackAudioDriver::Attach fPlaybackPortList[i] %ld ", port_index); | |||
// Monitor ports | |||
if (fWithMonitorPorts) { | |||
JackLog("Create monitor port \n"); | |||
jack_log("Create monitor port "); | |||
snprintf(name, sizeof(name) - 1, "%s:monitor_%lu", fClientControl->fName, i + 1); | |||
if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, fEngineControl->fBufferSize)) == NO_PORT) { | |||
jack_error ("ALSA: cannot register monitor port for %s", name); | |||
@@ -2280,7 +2280,7 @@ int JackAlsaDriver::Read() | |||
* clients about the delay. | |||
*/ | |||
//engine->delay (engine, delayed_usecs); | |||
JackLog("ALSA XRun \n"); | |||
jack_log("ALSA XRun "); | |||
//NotifyXRun(jack_get_microseconds()); | |||
NotifyXRun(fLastWaitUst); | |||
//return 0; | |||
@@ -2289,7 +2289,7 @@ int JackAlsaDriver::Read() | |||
//fLastWaitUst = GetMicroSeconds(); // Take callback date here | |||
if (nframes != fEngineControl->fBufferSize) | |||
JackLog("JackAlsaDriver::Read nframes = %ld\n", nframes); | |||
jack_log("JackAlsaDriver::Read nframes = %ld", nframes); | |||
//return engine->run_cycle (engine, nframes, delayed_usecs); | |||
fDelayedUst = (jack_time_t)delayed_usecs; | |||
@@ -2298,13 +2298,13 @@ int JackAlsaDriver::Read() | |||
int JackAlsaDriver::Write() | |||
{ | |||
//JackLog("write\n"); | |||
//jack_log("write"); | |||
int res = alsa_driver_write((alsa_driver_t *)fDriver, fEngineControl->fBufferSize); | |||
jack_time_t write_time = GetMicroSeconds(); | |||
/* | |||
if (write_time > (fLastWaitUst - fDelayedUst) + fEngineControl->fPeriodUsecs) { | |||
JackLog("ALSA write XRun \n"); | |||
jack_log("ALSA write XRun "); | |||
NotifyXRun(write_time); | |||
} | |||
*/ | |||
@@ -2649,7 +2649,7 @@ extern "C" | |||
capture = TRUE; | |||
if (strcmp (param->value.str, "none") != 0) { | |||
capture_pcm_name = strdup (param->value.str); | |||
JackLog("capture device %s\n", capture_pcm_name); | |||
jack_log("capture device %s", capture_pcm_name); | |||
} | |||
break; | |||
@@ -2657,7 +2657,7 @@ extern "C" | |||
playback = TRUE; | |||
if (strcmp (param->value.str, "none") != 0) { | |||
playback_pcm_name = strdup (param->value.str); | |||
JackLog("playback device %s\n", playback_pcm_name); | |||
jack_log("playback device %s", playback_pcm_name); | |||
} | |||
break; | |||
@@ -2669,8 +2669,8 @@ extern "C" | |||
case 'd': | |||
playback_pcm_name = strdup (param->value.str); | |||
capture_pcm_name = strdup (param->value.str); | |||
JackLog("playback device %s\n", playback_pcm_name); | |||
JackLog("capture device %s\n", capture_pcm_name); | |||
jack_log("playback device %s", playback_pcm_name); | |||
jack_log("capture device %s", capture_pcm_name); | |||
break; | |||
case 'H': | |||
@@ -2687,12 +2687,12 @@ extern "C" | |||
case 'r': | |||
srate = param->value.ui; | |||
JackLog("apparent rate = %d\n", srate); | |||
jack_log("apparent rate = %d", srate); | |||
break; | |||
case 'p': | |||
frames_per_interrupt = param->value.ui; | |||
JackLog("frames per period = %d\n", frames_per_interrupt); | |||
jack_log("frames per period = %d", frames_per_interrupt); | |||
break; | |||
case 'n': | |||
@@ -425,7 +425,7 @@ int JackFFADODriver::Attach() | |||
ffado_driver_t* driver = (ffado_driver_t*)fDriver; | |||
JackLog("JackFFADODriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
jack_log("JackFFADODriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
g_verbose = (fEngineControl->fVerbose ? 1 : 0); | |||
@@ -511,7 +511,7 @@ int JackFFADODriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency(driver->period_size + driver->capture_frame_latency); | |||
fCapturePortList[chn] = port_index; | |||
JackLog("JackFFADODriver::Attach fCapturePortList[i] %ld \n", port_index); | |||
jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index); | |||
fCaptureChannels++; | |||
} else if (driver->capture_channels[chn].stream_type == ffado_stream_type_midi) { | |||
@@ -542,7 +542,7 @@ int JackFFADODriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency(driver->period_size + driver->capture_frame_latency); | |||
fCapturePortList[chn] = port_index; | |||
JackLog("JackFFADODriver::Attach fCapturePortList[i] %ld \n", port_index); | |||
jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index); | |||
fCaptureChannels++; | |||
} else { | |||
printMessage ("Don't register capture port %s", portname); | |||
@@ -587,7 +587,7 @@ int JackFFADODriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency((driver->period_size * (driver->device_options.nb_buffers - 1)) + driver->playback_frame_latency); | |||
fPlaybackPortList[chn] = port_index; | |||
JackLog("JackFFADODriver::Attach fPlaybackPortList[i] %ld \n", port_index); | |||
jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index); | |||
fPlaybackChannels++; | |||
} else if (driver->playback_channels[chn].stream_type == ffado_stream_type_midi) { | |||
snprintf(buf, sizeof(buf) - 1, "%s:MP%d_%s", fClientControl->fName, (int)chn, portname); | |||
@@ -615,7 +615,7 @@ int JackFFADODriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency((driver->period_size * (driver->device_options.nb_buffers - 1)) + driver->playback_frame_latency); | |||
fPlaybackPortList[chn] = port_index; | |||
JackLog("JackFFADODriver::Attach fPlaybackPortList[i] %ld \n", port_index); | |||
jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index); | |||
fPlaybackChannels++; | |||
} else { | |||
printMessage ("Don't register playback port %s", portname); | |||
@@ -639,7 +639,7 @@ int JackFFADODriver::Detach() | |||
{ | |||
unsigned int chn; | |||
ffado_driver_t* driver = (ffado_driver_t*)fDriver; | |||
JackLog("JackFFADODriver::Detach\n"); | |||
jack_log("JackFFADODriver::Detach"); | |||
// finish the libfreebob streaming | |||
ffado_streaming_finish(driver->dev); | |||
@@ -727,7 +727,7 @@ int JackFFADODriver::Read() | |||
* clients about the delay. | |||
*/ | |||
//engine->delay (engine, delayed_usecs); | |||
JackLog("FFADO XRun \n"); | |||
jack_log("FFADO XRun "); | |||
//NotifyXRun(jack_get_microseconds()); | |||
NotifyXRun(fLastWaitUst); | |||
//return 0; | |||
@@ -736,7 +736,7 @@ int JackFFADODriver::Read() | |||
//fLastWaitUst = GetMicroSeconds(); // Take callback date here | |||
if (nframes != fEngineControl->fBufferSize) | |||
JackLog("JackFFADODriver::Read nframes = %ld\n", nframes); | |||
jack_log("JackFFADODriver::Read nframes = %ld", nframes); | |||
//return engine->run_cycle (engine, nframes, delayed_usecs); | |||
fDelayedUst = (jack_time_t)delayed_usecs; | |||
@@ -675,7 +675,7 @@ int JackFreebobDriver::Attach() | |||
freebob_driver_t* driver = (freebob_driver_t*)fDriver; | |||
JackLog("JackFreebobDriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
jack_log("JackFreebobDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
g_verbose = (fEngineControl->fVerbose ? 1 : 0); | |||
driver->device_options.verbose = (fEngineControl->fVerbose ? 1 : 0); | |||
@@ -743,7 +743,7 @@ int JackFreebobDriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency(driver->period_size + driver->capture_frame_latency); | |||
fCapturePortList[i] = port_index; | |||
JackLog("JackFreebobDriver::Attach fCapturePortList[i] %ld \n", port_index); | |||
jack_log("JackFreebobDriver::Attach fCapturePortList[i] %ld ", port_index); | |||
driver->capture_nchannels_audio++; | |||
} | |||
} | |||
@@ -773,7 +773,7 @@ int JackFreebobDriver::Attach() | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetLatency((driver->period_size * (driver->device_options.nb_buffers - 1)) + driver->playback_frame_latency); | |||
fPlaybackPortList[i] = port_index; | |||
JackLog("JackFreebobDriver::Attach fPlaybackPortList[i] %ld \n", port_index); | |||
jack_log("JackFreebobDriver::Attach fPlaybackPortList[i] %ld ", port_index); | |||
driver->playback_nchannels_audio++; | |||
} | |||
} | |||
@@ -792,7 +792,7 @@ int JackFreebobDriver::Attach() | |||
int JackFreebobDriver::Detach() | |||
{ | |||
freebob_driver_t* driver = (freebob_driver_t*)fDriver; | |||
JackLog("JackFreebobDriver::Detach\n"); | |||
jack_log("JackFreebobDriver::Detach"); | |||
// finish the libfreebob streaming | |||
freebob_streaming_finish(driver->dev); | |||
@@ -871,7 +871,7 @@ int JackFreebobDriver::Read() | |||
* clients about the delay. | |||
*/ | |||
//engine->delay (engine, delayed_usecs); | |||
JackLog("FreeBoB XRun \n"); | |||
jack_log("FreeBoB XRun "); | |||
//NotifyXRun(jack_get_microseconds()); | |||
NotifyXRun(fLastWaitUst); | |||
//return 0; | |||
@@ -880,7 +880,7 @@ int JackFreebobDriver::Read() | |||
//fLastWaitUst = GetMicroSeconds(); // Take callback date here | |||
if (nframes != fEngineControl->fBufferSize) | |||
JackLog("JackFreebobDriver::Read nframes = %ld\n", nframes); | |||
jack_log("JackFreebobDriver::Read nframes = %ld", nframes); | |||
//return engine->run_cycle (engine, nframes, delayed_usecs); | |||
fDelayedUst = (jack_time_t)delayed_usecs; | |||
@@ -35,83 +35,83 @@ namespace Jack | |||
static void PrintStreamDesc(AudioStreamBasicDescription *inDesc) | |||
{ | |||
JackLog("- - - - - - - - - - - - - - - - - - - -\n"); | |||
JackLog(" Sample Rate:%f\n", inDesc->mSampleRate); | |||
JackLog(" Format ID:%.*s\n", (int) sizeof(inDesc->mFormatID), (char*)&inDesc->mFormatID); | |||
JackLog(" Format Flags:%lX\n", inDesc->mFormatFlags); | |||
JackLog(" Bytes per Packet:%ld\n", inDesc->mBytesPerPacket); | |||
JackLog(" Frames per Packet:%ld\n", inDesc->mFramesPerPacket); | |||
JackLog(" Bytes per Frame:%ld\n", inDesc->mBytesPerFrame); | |||
JackLog(" Channels per Frame:%ld\n", inDesc->mChannelsPerFrame); | |||
JackLog(" Bits per Channel:%ld\n", inDesc->mBitsPerChannel); | |||
JackLog("- - - - - - - - - - - - - - - - - - - -\n"); | |||
jack_log("- - - - - - - - - - - - - - - - - - - -"); | |||
jack_log(" Sample Rate:%f", inDesc->mSampleRate); | |||
jack_log(" Format ID:%.*s", (int) sizeof(inDesc->mFormatID), (char*)&inDesc->mFormatID); | |||
jack_log(" Format Flags:%lX", inDesc->mFormatFlags); | |||
jack_log(" Bytes per Packet:%ld", inDesc->mBytesPerPacket); | |||
jack_log(" Frames per Packet:%ld", inDesc->mFramesPerPacket); | |||
jack_log(" Bytes per Frame:%ld", inDesc->mBytesPerFrame); | |||
jack_log(" Channels per Frame:%ld", inDesc->mChannelsPerFrame); | |||
jack_log(" Bits per Channel:%ld", inDesc->mBitsPerChannel); | |||
jack_log("- - - - - - - - - - - - - - - - - - - -"); | |||
} | |||
static void printError(OSStatus err) | |||
{ | |||
switch (err) { | |||
case kAudioHardwareNoError: | |||
JackLog("error code : kAudioHardwareNoError\n"); | |||
jack_log("error code : kAudioHardwareNoError"); | |||
break; | |||
case kAudioConverterErr_FormatNotSupported: | |||
JackLog("error code : kAudioConverterErr_FormatNotSupported\n"); | |||
jack_log("error code : kAudioConverterErr_FormatNotSupported"); | |||
break; | |||
case kAudioConverterErr_OperationNotSupported: | |||
JackLog("error code : kAudioConverterErr_OperationNotSupported\n"); | |||
jack_log("error code : kAudioConverterErr_OperationNotSupported"); | |||
break; | |||
case kAudioConverterErr_PropertyNotSupported: | |||
JackLog("error code : kAudioConverterErr_PropertyNotSupported\n"); | |||
jack_log("error code : kAudioConverterErr_PropertyNotSupported"); | |||
break; | |||
case kAudioConverterErr_InvalidInputSize: | |||
JackLog("error code : kAudioConverterErr_InvalidInputSize\n"); | |||
jack_log("error code : kAudioConverterErr_InvalidInputSize"); | |||
break; | |||
case kAudioConverterErr_InvalidOutputSize: | |||
JackLog("error code : kAudioConverterErr_InvalidOutputSize\n"); | |||
jack_log("error code : kAudioConverterErr_InvalidOutputSize"); | |||
break; | |||
case kAudioConverterErr_UnspecifiedError: | |||
JackLog("error code : kAudioConverterErr_UnspecifiedError\n"); | |||
jack_log("error code : kAudioConverterErr_UnspecifiedError"); | |||
break; | |||
case kAudioConverterErr_BadPropertySizeError: | |||
JackLog("error code : kAudioConverterErr_BadPropertySizeError\n"); | |||
jack_log("error code : kAudioConverterErr_BadPropertySizeError"); | |||
break; | |||
case kAudioConverterErr_RequiresPacketDescriptionsError: | |||
JackLog("error code : kAudioConverterErr_RequiresPacketDescriptionsError\n"); | |||
jack_log("error code : kAudioConverterErr_RequiresPacketDescriptionsError"); | |||
break; | |||
case kAudioConverterErr_InputSampleRateOutOfRange: | |||
JackLog("error code : kAudioConverterErr_InputSampleRateOutOfRange\n"); | |||
jack_log("error code : kAudioConverterErr_InputSampleRateOutOfRange"); | |||
break; | |||
case kAudioConverterErr_OutputSampleRateOutOfRange: | |||
JackLog("error code : kAudioConverterErr_OutputSampleRateOutOfRange\n"); | |||
jack_log("error code : kAudioConverterErr_OutputSampleRateOutOfRange"); | |||
break; | |||
case kAudioHardwareNotRunningError: | |||
JackLog("error code : kAudioHardwareNotRunningError\n"); | |||
jack_log("error code : kAudioHardwareNotRunningError"); | |||
break; | |||
case kAudioHardwareUnknownPropertyError: | |||
JackLog("error code : kAudioHardwareUnknownPropertyError\n"); | |||
jack_log("error code : kAudioHardwareUnknownPropertyError"); | |||
break; | |||
case kAudioHardwareIllegalOperationError: | |||
JackLog("error code : kAudioHardwareIllegalOperationError\n"); | |||
jack_log("error code : kAudioHardwareIllegalOperationError"); | |||
break; | |||
case kAudioHardwareBadDeviceError: | |||
JackLog("error code : kAudioHardwareBadDeviceError\n"); | |||
jack_log("error code : kAudioHardwareBadDeviceError"); | |||
break; | |||
case kAudioHardwareBadStreamError: | |||
JackLog("error code : kAudioHardwareBadStreamError\n"); | |||
jack_log("error code : kAudioHardwareBadStreamError"); | |||
break; | |||
case kAudioDeviceUnsupportedFormatError: | |||
JackLog("error code : kAudioDeviceUnsupportedFormatError\n"); | |||
jack_log("error code : kAudioDeviceUnsupportedFormatError"); | |||
break; | |||
case kAudioDevicePermissionsError: | |||
JackLog("error code : kAudioDevicePermissionsError\n"); | |||
jack_log("error code : kAudioDevicePermissionsError"); | |||
break; | |||
case kAudioHardwareBadObjectError: | |||
JackLog("error code : kAudioHardwareBadObjectError\n"); | |||
jack_log("error code : kAudioHardwareBadObjectError"); | |||
break; | |||
case kAudioHardwareUnsupportedOperationError: | |||
JackLog("error code : kAudioHardwareUnsupportedOperationError\n"); | |||
jack_log("error code : kAudioHardwareUnsupportedOperationError"); | |||
break; | |||
default: | |||
JackLog("error code : unknown\n"); | |||
jack_log("error code : unknown"); | |||
break; | |||
} | |||
} | |||
@@ -214,7 +214,7 @@ OSStatus JackCoreAudioDriver::MeasureCallback(AudioDeviceID inDevice, | |||
JackCoreAudioDriver* driver = (JackCoreAudioDriver*)inClientData; | |||
AudioDeviceStop(driver->fDeviceID, MeasureCallback); | |||
AudioDeviceRemoveIOProc(driver->fDeviceID, MeasureCallback); | |||
JackLog("JackCoreAudioDriver::MeasureCallback called\n"); | |||
jack_log("JackCoreAudioDriver::MeasureCallback called"); | |||
JackMachThread::GetParams(&driver->fEngineControl->fPeriod, &driver->fEngineControl->fComputation, &driver->fEngineControl->fConstraint); | |||
return noErr; | |||
} | |||
@@ -230,7 +230,7 @@ OSStatus JackCoreAudioDriver::SRNotificationCallback(AudioDeviceID inDevice, | |||
switch (inPropertyID) { | |||
case kAudioDevicePropertyNominalSampleRate: { | |||
JackLog("JackCoreAudioDriver::SRNotificationCallback kAudioDevicePropertyNominalSampleRate \n"); | |||
jack_log("JackCoreAudioDriver::SRNotificationCallback kAudioDevicePropertyNominalSampleRate "); | |||
driver->fState = true; | |||
break; | |||
} | |||
@@ -252,7 +252,7 @@ OSStatus JackCoreAudioDriver::DeviceNotificationCallback(AudioDeviceID inDevice, | |||
switch (inPropertyID) { | |||
case kAudioDeviceProcessorOverload: | |||
JackLog("JackCoreAudioDriver::DeviceNotificationCallback kAudioDeviceProcessorOverload\n"); | |||
jack_log("JackCoreAudioDriver::DeviceNotificationCallback kAudioDeviceProcessorOverload"); | |||
driver->NotifyXRun(GetMicroSeconds()); | |||
break; | |||
@@ -276,7 +276,7 @@ OSStatus JackCoreAudioDriver::DeviceNotificationCallback(AudioDeviceID inDevice, | |||
jack_error("Cannot get current sample rate"); | |||
printError(err); | |||
} | |||
JackLog("JackCoreAudioDriver::DeviceNotificationCallback kAudioDevicePropertyNominalSampleRate %ld\n", long(sampleRate)); | |||
jack_log("JackCoreAudioDriver::DeviceNotificationCallback kAudioDevicePropertyNominalSampleRate %ld", long(sampleRate)); | |||
if (driver->SetupDevices(driver->fCaptureUID, driver->fPlaybackUID, capture_driver_name, playback_driver_name) < 0) | |||
return -1; | |||
@@ -332,7 +332,7 @@ OSStatus JackCoreAudioDriver::GetDeviceIDFromUID(const char* UID, AudioDeviceID* | |||
} else { | |||
OSStatus res = AudioHardwareGetProperty(kAudioHardwarePropertyDeviceForUID, &size, &value); | |||
CFRelease(inIUD); | |||
JackLog("get_device_id_from_uid %s %ld \n", UID, *id); | |||
jack_log("get_device_id_from_uid %s %ld ", UID, *id); | |||
return (*id == kAudioDeviceUnknown) ? kAudioHardwareBadDeviceError : res; | |||
} | |||
} | |||
@@ -350,7 +350,7 @@ OSStatus JackCoreAudioDriver::GetDefaultDevice(AudioDeviceID* id) | |||
if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &theSize, &outDefault)) != noErr) | |||
return res; | |||
JackLog("GetDefaultDevice: input = %ld output = %ld\n", inDefault, outDefault); | |||
jack_log("GetDefaultDevice: input = %ld output = %ld", inDefault, outDefault); | |||
// Get the device only if default input and ouput are the same | |||
if (inDefault == outDefault) { | |||
@@ -371,7 +371,7 @@ OSStatus JackCoreAudioDriver::GetDefaultInputDevice(AudioDeviceID* id) | |||
if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &theSize, &inDefault)) != noErr) | |||
return res; | |||
JackLog("GetDefaultInputDevice: input = %ld \n", inDefault); | |||
jack_log("GetDefaultInputDevice: input = %ld ", inDefault); | |||
*id = inDefault; | |||
return noErr; | |||
} | |||
@@ -385,7 +385,7 @@ OSStatus JackCoreAudioDriver::GetDefaultOutputDevice(AudioDeviceID* id) | |||
if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &theSize, &outDefault)) != noErr) | |||
return res; | |||
JackLog("GetDefaultOutputDevice: output = %ld\n", outDefault); | |||
jack_log("GetDefaultOutputDevice: output = %ld", outDefault); | |||
*id = outDefault; | |||
return noErr; | |||
} | |||
@@ -434,7 +434,7 @@ int JackCoreAudioDriver::SetupDevices(const char* capture_driver_uid, const char | |||
// Duplex | |||
if (strcmp(capture_driver_uid, "") != 0 && strcmp(playback_driver_uid, "") != 0) { | |||
JackLog("JackCoreAudioDriver::Open duplex \n"); | |||
jack_log("JackCoreAudioDriver::Open duplex "); | |||
if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) { | |||
if (GetDefaultDevice(&fDeviceID) != noErr) { | |||
jack_error("Cannot open default device"); | |||
@@ -448,7 +448,7 @@ int JackCoreAudioDriver::SetupDevices(const char* capture_driver_uid, const char | |||
// Capture only | |||
} else if (strcmp(capture_driver_uid, "") != 0) { | |||
JackLog("JackCoreAudioDriver::Open capture only \n"); | |||
jack_log("JackCoreAudioDriver::Open capture only "); | |||
if (GetDeviceIDFromUID(capture_driver_uid, &fDeviceID) != noErr) { | |||
if (GetDefaultInputDevice(&fDeviceID) != noErr) { | |||
jack_error("Cannot open default device"); | |||
@@ -462,7 +462,7 @@ int JackCoreAudioDriver::SetupDevices(const char* capture_driver_uid, const char | |||
// Playback only | |||
} else if (strcmp(playback_driver_uid, "") != 0) { | |||
JackLog("JackCoreAudioDriver::Open playback only \n"); | |||
jack_log("JackCoreAudioDriver::Open playback only "); | |||
if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) { | |||
if (GetDefaultOutputDevice(&fDeviceID) != noErr) { | |||
jack_error("Cannot open default device"); | |||
@@ -476,7 +476,7 @@ int JackCoreAudioDriver::SetupDevices(const char* capture_driver_uid, const char | |||
// Use default driver in duplex mode | |||
} else { | |||
JackLog("JackCoreAudioDriver::Open default driver \n"); | |||
jack_log("JackCoreAudioDriver::Open default driver "); | |||
if (GetDefaultDevice(&fDeviceID) != noErr) { | |||
jack_error("Cannot open default device"); | |||
return -1; | |||
@@ -525,12 +525,12 @@ int JackCoreAudioDriver::SetupChannels(bool capturing, bool playing, int& inchan | |||
} | |||
if (inchannels == 0) { | |||
JackLog("Setup max in channels = %ld\n", in_nChannels); | |||
jack_log("Setup max in channels = %ld", in_nChannels); | |||
inchannels = in_nChannels; | |||
} | |||
if (outchannels == 0) { | |||
JackLog("Setup max out channels = %ld\n", out_nChannels); | |||
jack_log("Setup max out channels = %ld", out_nChannels); | |||
outchannels = out_nChannels; | |||
} | |||
@@ -583,7 +583,7 @@ int JackCoreAudioDriver::SetupBufferSizeAndSampleRate(jack_nframes_t nframes, ja | |||
int count = 0; | |||
while (!fState && count++ < 100) { | |||
usleep(100000); | |||
JackLog("Wait count = %ld\n", count); | |||
jack_log("Wait count = %ld", count); | |||
} | |||
// Remove SR change notification | |||
@@ -607,7 +607,7 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing, | |||
UInt32 enableIO; | |||
AudioStreamBasicDescription srcFormat, dstFormat; | |||
JackLog("OpenAUHAL capturing = %ld playing = %ld playing = %ld outchannels = %ld in_nChannels = %ld out_nChannels = %ld \n", capturing, playing, inchannels, inchannels, in_nChannels, out_nChannels); | |||
jack_log("OpenAUHAL capturing = %ld playing = %ld playing = %ld outchannels = %ld in_nChannels = %ld out_nChannels = %ld ", capturing, playing, inchannels, inchannels, in_nChannels, out_nChannels); | |||
// AUHAL | |||
ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0}; | |||
@@ -630,7 +630,7 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing, | |||
// Start I/O | |||
enableIO = 1; | |||
if (capturing && inchannels > 0) { | |||
JackLog("Setup AUHAL input\n"); | |||
jack_log("Setup AUHAL input"); | |||
err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &enableIO, sizeof(enableIO)); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input"); | |||
@@ -641,7 +641,7 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing, | |||
} | |||
if (playing && outchannels > 0) { | |||
JackLog("Setup AUHAL output\n"); | |||
jack_log("Setup AUHAL output"); | |||
err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, 0, &enableIO, sizeof(enableIO)); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO,kAudioUnitScope_Output"); | |||
@@ -713,7 +713,7 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing, | |||
} | |||
// Setup stream converters | |||
JackLog("Setup AUHAL input stream converter SR = %ld\n", samplerate); | |||
jack_log("Setup AUHAL input stream converter SR = %ld", samplerate); | |||
srcFormat.mSampleRate = samplerate; | |||
srcFormat.mFormatID = kAudioFormatLinearPCM; | |||
srcFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved; | |||
@@ -729,7 +729,7 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing, | |||
printError(err1); | |||
} | |||
JackLog("Setup AUHAL output stream converter SR = %ld\n", samplerate); | |||
jack_log("Setup AUHAL output stream converter SR = %ld", samplerate); | |||
dstFormat.mSampleRate = samplerate; | |||
dstFormat.mFormatID = kAudioFormatLinearPCM; | |||
dstFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved; | |||
@@ -937,7 +937,7 @@ error: | |||
int JackCoreAudioDriver::Close() | |||
{ | |||
JackLog("JackCoreAudioDriver::Close\n"); | |||
jack_log("JackCoreAudioDriver::Close"); | |||
Stop(); | |||
JackAudioDriver::Close(); | |||
RemoveListeners(); | |||
@@ -958,17 +958,17 @@ int JackCoreAudioDriver::Attach() | |||
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; | |||
unsigned long port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal; | |||
JackLog("JackCoreAudioDriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
jack_log("JackCoreAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); | |||
for (int i = 0; i < fCaptureChannels; i++) { | |||
err = AudioDeviceGetPropertyInfo(fDeviceID, i + 1, true, kAudioDevicePropertyChannelName, &size, &isWritable); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetPropertyInfo kAudioDevicePropertyChannelName error \n"); | |||
jack_log("AudioDeviceGetPropertyInfo kAudioDevicePropertyChannelName error "); | |||
if (err == noErr && size > 0) { | |||
err = AudioDeviceGetProperty(fDeviceID, i + 1, true, kAudioDevicePropertyChannelName, &size, channel_name); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertyChannelName error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertyChannelName error "); | |||
snprintf(alias, sizeof(alias) - 1, "%s:%s:out_%s%u", fClientControl->fName, fCaptureDriverName, channel_name, i + 1); | |||
} else { | |||
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%u", fClientControl->fName, fCaptureDriverName, i + 1); | |||
@@ -986,10 +986,10 @@ int JackCoreAudioDriver::Attach() | |||
UInt32 value2 = 0; | |||
err = AudioDeviceGetProperty(fDeviceID, 0, true, kAudioDevicePropertyLatency, &size, &value1); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertyLatency error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertyLatency error "); | |||
err = AudioDeviceGetProperty(fDeviceID, 0, true, kAudioDevicePropertySafetyOffset, &size, &value2); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertySafetyOffset error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertySafetyOffset error "); | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetAlias(alias); | |||
@@ -1003,11 +1003,11 @@ int JackCoreAudioDriver::Attach() | |||
err = AudioDeviceGetPropertyInfo(fDeviceID, i + 1, false, kAudioDevicePropertyChannelName, &size, &isWritable); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetPropertyInfo kAudioDevicePropertyChannelName error \n"); | |||
jack_log("AudioDeviceGetPropertyInfo kAudioDevicePropertyChannelName error "); | |||
if (err == noErr && size > 0) { | |||
err = AudioDeviceGetProperty(fDeviceID, i + 1, false, kAudioDevicePropertyChannelName, &size, channel_name); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertyChannelName error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertyChannelName error "); | |||
snprintf(alias, sizeof(alias) - 1, "%s:%s:in_%s%u", fClientControl->fName, fPlaybackDriverName, channel_name, i + 1); | |||
} else { | |||
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%u", fClientControl->fName, fPlaybackDriverName, i + 1); | |||
@@ -1025,10 +1025,10 @@ int JackCoreAudioDriver::Attach() | |||
UInt32 value2 = 0; | |||
err = AudioDeviceGetProperty(fDeviceID, 0, false, kAudioDevicePropertyLatency, &size, &value1); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertyLatency error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertyLatency error "); | |||
err = AudioDeviceGetProperty(fDeviceID, 0, false, kAudioDevicePropertySafetyOffset, &size, &value2); | |||
if (err != noErr) | |||
JackLog("AudioDeviceGetProperty kAudioDevicePropertySafetyOffset error \n"); | |||
jack_log("AudioDeviceGetProperty kAudioDevicePropertySafetyOffset error "); | |||
port = fGraphManager->GetPort(port_index); | |||
port->SetAlias(alias); | |||
@@ -1037,7 +1037,7 @@ int JackCoreAudioDriver::Attach() | |||
// Monitor ports | |||
if (fWithMonitorPorts) { | |||
JackLog("Create monitor port \n"); | |||
jack_log("Create monitor port "); | |||
snprintf(name, sizeof(name) - 1, "%s:%s:monitor_%u", fClientControl->fName, fPlaybackDriverName, i + 1); | |||
if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, fEngineControl->fBufferSize)) == NO_PORT) { | |||
jack_error("Cannot register monitor port for %s", name); | |||
@@ -1060,7 +1060,7 @@ int JackCoreAudioDriver::Attach() | |||
int JackCoreAudioDriver::Start() | |||
{ | |||
JackLog("JackCoreAudioDriver::Start\n"); | |||
jack_log("JackCoreAudioDriver::Start"); | |||
JackAudioDriver::Start(); | |||
OSStatus err = AudioDeviceAddIOProc(fDeviceID, MeasureCallback, this); | |||
@@ -1082,7 +1082,7 @@ int JackCoreAudioDriver::Start() | |||
int JackCoreAudioDriver::Stop() | |||
{ | |||
JackLog("JackCoreAudioDriver::Stop\n"); | |||
jack_log("JackCoreAudioDriver::Stop"); | |||
AudioDeviceStop(fDeviceID, MeasureCallback); | |||
AudioDeviceRemoveIOProc(fDeviceID, MeasureCallback); | |||
return (AudioOutputUnitStop(fAUHAL) == noErr) ? 0 : -1; | |||
@@ -33,7 +33,7 @@ using namespace Jack; | |||
rpc_type server_rpc_jack_client_check(mach_port_t private_port, client_name_t name, client_name_t name_res, int protocol, int options, int* status, int* result) | |||
{ | |||
JackLog("rpc_jack_client_check\n"); | |||
jack_log("rpc_jack_client_check"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
channel->ClientCheck((char*)name, (char*)name_res, protocol, options, status, result); | |||
@@ -42,7 +42,7 @@ rpc_type server_rpc_jack_client_check(mach_port_t private_port, client_name_t na | |||
rpc_type server_rpc_jack_client_open(mach_port_t server_port, client_name_t name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_graph, int* result) | |||
{ | |||
JackLog("rpc_jack_client_new %s\n", name); | |||
jack_log("rpc_jack_client_new %s", name); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[server_port]; | |||
assert(channel); | |||
channel->ClientOpen((char*)name, private_port, shared_engine, shared_client, shared_graph, result); | |||
@@ -51,7 +51,7 @@ rpc_type server_rpc_jack_client_open(mach_port_t server_port, client_name_t name | |||
rpc_type server_rpc_jack_client_close(mach_port_t private_port, int refnum, int* result) | |||
{ | |||
JackLog("rpc_jack_client_close\n"); | |||
jack_log("rpc_jack_client_close"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
channel->ClientClose(private_port, refnum); | |||
@@ -61,7 +61,7 @@ rpc_type server_rpc_jack_client_close(mach_port_t private_port, int refnum, int* | |||
rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int* result) | |||
{ | |||
JackLog("rpc_jack_client_activate\n"); | |||
jack_log("rpc_jack_client_activate"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->ClientActivate(refnum); | |||
@@ -70,7 +70,7 @@ rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, i | |||
rpc_type server_rpc_jack_client_deactivate(mach_port_t private_port, int refnum, int* result) | |||
{ | |||
JackLog("rpc_jack_client_deactivate\n"); | |||
jack_log("rpc_jack_client_deactivate"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->ClientDeactivate(refnum); | |||
@@ -83,7 +83,7 @@ rpc_type server_rpc_jack_client_deactivate(mach_port_t private_port, int refnum, | |||
rpc_type server_rpc_jack_port_register(mach_port_t private_port, int refnum, client_port_name_t name, client_port_type_t type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result) | |||
{ | |||
JackLog("rpc_jack_port_register %ld %s\n", refnum, name); | |||
jack_log("rpc_jack_port_register %ld %s", refnum, name); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortRegister(refnum, name, type, flags, buffer_size, port_index); | |||
@@ -92,7 +92,7 @@ rpc_type server_rpc_jack_port_register(mach_port_t private_port, int refnum, cli | |||
rpc_type server_rpc_jack_port_unregister(mach_port_t private_port, int refnum, int port, int* result) | |||
{ | |||
JackLog("rpc_jack_port_unregister %ld %ld \n", refnum, port); | |||
jack_log("rpc_jack_port_unregister %ld %ld ", refnum, port); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortUnRegister(refnum, port); | |||
@@ -101,7 +101,7 @@ rpc_type server_rpc_jack_port_unregister(mach_port_t private_port, int refnum, i | |||
rpc_type server_rpc_jack_port_connect_name(mach_port_t private_port, int refnum, client_port_name_t src, client_port_name_t dst, int* result) | |||
{ | |||
JackLog("rpc_jack_port_connect_name\n"); | |||
jack_log("rpc_jack_port_connect_name"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortConnect(refnum, src, dst); | |||
@@ -110,7 +110,7 @@ rpc_type server_rpc_jack_port_connect_name(mach_port_t private_port, int refnum, | |||
rpc_type server_rpc_jack_port_disconnect_name(mach_port_t private_port, int refnum, client_port_name_t src, client_port_name_t dst, int* result) | |||
{ | |||
JackLog("rpc_jack_port_disconnect_name\n"); | |||
jack_log("rpc_jack_port_disconnect_name"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortDisconnect(refnum, src, dst); | |||
@@ -119,7 +119,7 @@ rpc_type server_rpc_jack_port_disconnect_name(mach_port_t private_port, int refn | |||
rpc_type server_rpc_jack_port_connect(mach_port_t private_port, int refnum, int src, int dst, int* result) | |||
{ | |||
JackLog("rpc_jack_port_connect\n"); | |||
jack_log("rpc_jack_port_connect"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortConnect(refnum, src, dst); | |||
@@ -128,7 +128,7 @@ rpc_type server_rpc_jack_port_connect(mach_port_t private_port, int refnum, int | |||
rpc_type server_rpc_jack_port_disconnect(mach_port_t private_port, int refnum, int src, int dst, int* result) | |||
{ | |||
JackLog("rpc_jack_port_disconnect\n"); | |||
jack_log("rpc_jack_port_disconnect"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortDisconnect(refnum, src, dst); | |||
@@ -141,7 +141,7 @@ rpc_type server_rpc_jack_port_disconnect(mach_port_t private_port, int refnum, i | |||
rpc_type server_rpc_jack_set_buffer_size(mach_port_t private_port, int buffer_size, int* result) | |||
{ | |||
JackLog("server_rpc_jack_set_buffer_size\n"); | |||
jack_log("server_rpc_jack_set_buffer_size"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->SetBufferSize(buffer_size); | |||
@@ -150,7 +150,7 @@ rpc_type server_rpc_jack_set_buffer_size(mach_port_t private_port, int buffer_si | |||
rpc_type server_rpc_jack_set_freewheel(mach_port_t private_port, int onoff, int* result) | |||
{ | |||
JackLog("server_rpc_jack_set_freewheel\n"); | |||
jack_log("server_rpc_jack_set_freewheel"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->SetFreewheel(onoff); | |||
@@ -163,7 +163,7 @@ rpc_type server_rpc_jack_set_freewheel(mach_port_t private_port, int onoff, int* | |||
rpc_type server_rpc_jack_release_timebase(mach_port_t private_port, int refnum, int* result) | |||
{ | |||
JackLog("server_rpc_jack_release_timebase\n"); | |||
jack_log("server_rpc_jack_release_timebase"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->ReleaseTimebase(refnum); | |||
@@ -172,7 +172,7 @@ rpc_type server_rpc_jack_release_timebase(mach_port_t private_port, int refnum, | |||
rpc_type server_rpc_jack_set_timebase_callback(mach_port_t private_port, int refnum, int conditional, int* result) | |||
{ | |||
JackLog("server_rpc_jack_set_timebase_callback\n"); | |||
jack_log("server_rpc_jack_set_timebase_callback"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->SetTimebaseCallback(refnum, conditional); | |||
@@ -185,7 +185,7 @@ rpc_type server_rpc_jack_set_timebase_callback(mach_port_t private_port, int ref | |||
rpc_type server_rpc_jack_get_internal_clientname(mach_port_t private_port, int refnum, int int_ref, client_name_t name_res, int* result) | |||
{ | |||
JackLog("server_rpc_jack_get_internal_clientname\n"); | |||
jack_log("server_rpc_jack_get_internal_clientname"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->GetEngine()->GetInternalClientName(int_ref, (char*)name_res); | |||
@@ -194,7 +194,7 @@ rpc_type server_rpc_jack_get_internal_clientname(mach_port_t private_port, int r | |||
rpc_type server_rpc_jack_internal_clienthandle(mach_port_t private_port, int refnum, client_name_t client_name, int* status, int* int_ref, int* result) | |||
{ | |||
JackLog("server_rpc_jack_internal_clienthandle\n"); | |||
jack_log("server_rpc_jack_internal_clienthandle"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->GetEngine()->InternalClientHandle(client_name, status, int_ref); | |||
@@ -203,7 +203,7 @@ rpc_type server_rpc_jack_internal_clienthandle(mach_port_t private_port, int ref | |||
rpc_type server_rpc_jack_internal_clientload(mach_port_t private_port, int refnum, client_name_t client_name, so_name_t so_name, objet_data_t objet_data, int options, int* status, int* int_ref, int* result) | |||
{ | |||
JackLog("server_rpc_jack_internal_clientload\n"); | |||
jack_log("server_rpc_jack_internal_clientload"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->InternalClientLoad(client_name, so_name, objet_data, options, int_ref, status); | |||
@@ -212,7 +212,7 @@ rpc_type server_rpc_jack_internal_clientload(mach_port_t private_port, int refnu | |||
rpc_type server_rpc_jack_internal_clientunload(mach_port_t private_port, int refnum, int int_ref, int* status, int* result) | |||
{ | |||
JackLog("server_rpc_jack_internal_clientunload\n"); | |||
jack_log("server_rpc_jack_internal_clientunload"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetServer()->GetEngine()->InternalClientUnload(int_ref, status); | |||
@@ -225,7 +225,7 @@ rpc_type server_rpc_jack_internal_clientunload(mach_port_t private_port, int ref | |||
rpc_type server_rpc_jack_client_rt_notify(mach_port_t server_port, int refnum, int notify, int value) | |||
{ | |||
JackLog("rpc_jack_client_rt_notify ref = %ld notify = %ld value = %ld\n", refnum, notify, value); | |||
jack_log("rpc_jack_client_rt_notify ref = %ld notify = %ld value = %ld", refnum, notify, value); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[server_port]; | |||
assert(channel); | |||
assert(channel->GetServer()); | |||
@@ -29,7 +29,7 @@ using namespace Jack; | |||
rpc_type rpc_jack_client_sync_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, int value1, int value2, int* result) | |||
{ | |||
JackLog("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld\n", refnum, name, notify, value1, value2); | |||
jack_log("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld", refnum, name, notify, value1, value2); | |||
JackClient* client = JackLibGlobals::fGlobals->fClientTable[client_port]; | |||
assert(client); | |||
*result = client->ClientNotify(refnum, name, notify, true, value1, value2); | |||
@@ -38,7 +38,7 @@ rpc_type rpc_jack_client_sync_notify(mach_port_t client_port, int refnum, client | |||
rpc_type rpc_jack_client_async_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, int value1, int value2) | |||
{ | |||
JackLog("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld\n", refnum, name, notify, value1, value2); | |||
jack_log("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld", refnum, name, notify, value1, value2); | |||
JackClient* client = JackLibGlobals::fGlobals->fClientTable[client_port]; | |||
assert(client); | |||
client->ClientNotify(refnum, name, notify, false, value1, value2); | |||
@@ -43,7 +43,7 @@ JackMachClientChannel::~JackMachClientChannel() | |||
int JackMachClientChannel::ServerCheck(const char* server_name) | |||
{ | |||
JackLog("JackMachClientChannel::ServerCheck = %s\n", server_name); | |||
jack_log("JackMachClientChannel::ServerCheck = %s", server_name); | |||
char jack_server_entry_name[512]; | |||
snprintf(jack_server_entry_name, sizeof(jack_server_entry_name), "%s_%s", jack_server_entry, server_name); | |||
@@ -58,7 +58,7 @@ int JackMachClientChannel::ServerCheck(const char* server_name) | |||
int JackMachClientChannel::Open(const char* server_name, const char* name, char* name_res, JackClient* client, jack_options_t options, jack_status_t* status) | |||
{ | |||
JackLog("JackMachClientChannel::Open name = %s\n", name); | |||
jack_log("JackMachClientChannel::Open name = %s", name); | |||
char jack_server_entry_name[512]; | |||
snprintf(jack_server_entry_name, sizeof(jack_server_entry_name), "%s_%s", jack_server_entry, server_name); | |||
@@ -95,7 +95,7 @@ int JackMachClientChannel::Open(const char* server_name, const char* name, char* | |||
void JackMachClientChannel::Close() | |||
{ | |||
JackLog("JackMachClientChannel::Close\n"); | |||
jack_log("JackMachClientChannel::Close"); | |||
JackLibGlobals::fGlobals->fClientTable.erase(fClientPort.GetPort()); | |||
fServerPort.DisconnectPort(); | |||
fClientPort.DestroyPort(); | |||
@@ -109,7 +109,7 @@ void JackMachClientChannel::Close() | |||
int JackMachClientChannel::Start() | |||
{ | |||
JackLog("JackMachClientChannel::Start\n"); | |||
jack_log("JackMachClientChannel::Start"); | |||
if (fThread->Start() != 0) { | |||
jack_error("Cannot start Jack client listener"); | |||
return -1; | |||
@@ -120,7 +120,7 @@ int JackMachClientChannel::Start() | |||
void JackMachClientChannel::Stop() | |||
{ | |||
JackLog("JackMachClientChannel::Stop\n"); | |||
jack_log("JackMachClientChannel::Stop"); | |||
fThread->Kill(); | |||
} | |||
@@ -29,7 +29,7 @@ namespace Jack | |||
int JackMachNotifyChannel::Open(const char* name) | |||
{ | |||
JackLog("JackMachNotifyChannel::Open name = %s\n", name); | |||
jack_log("JackMachNotifyChannel::Open name = %s", name); | |||
char buf[256]; | |||
snprintf(buf, sizeof(buf) - 1, "%s:%s", jack_client_entry, name); | |||
@@ -56,7 +56,7 @@ bool JackMachPort::AllocatePort(const char* name, int queue) | |||
jack_error("Allocate: mach_port_get_attributes error err = %s", name, mach_error_string(res)); | |||
} | |||
JackLog("AllocatePort: queue limit %ld\n", qlimits.mpl_qlimit); | |||
jack_log("AllocatePort: queue limit %ld", qlimits.mpl_qlimit); | |||
if (queue > 0 ) { | |||
qlimits.mpl_qlimit = queue; | |||
@@ -81,7 +81,7 @@ bool JackMachPort::ConnectPort(const char* name) | |||
{ | |||
kern_return_t res; | |||
JackLog("JackMachPort::ConnectPort %s\n", name); | |||
jack_log("JackMachPort::ConnectPort %s", name); | |||
if ((res = task_get_bootstrap_port(mach_task_self(), &fBootPort)) != KERN_SUCCESS) { | |||
jack_error("ConnectPort: can't find bootstrap port err = %s", mach_error_string(res)); | |||
@@ -98,7 +98,7 @@ bool JackMachPort::ConnectPort(const char* name) | |||
bool JackMachPort::DisconnectPort() | |||
{ | |||
JackLog("JackMacRPC::DisconnectPort\n"); | |||
jack_log("JackMacRPC::DisconnectPort"); | |||
kern_return_t res; | |||
mach_port_t task = mach_task_self(); | |||
@@ -115,7 +115,7 @@ bool JackMachPort::DisconnectPort() | |||
bool JackMachPort::DestroyPort() | |||
{ | |||
JackLog("JackMacRPC::DisconnectPort\n"); | |||
jack_log("JackMacRPC::DisconnectPort"); | |||
kern_return_t res; | |||
mach_port_t task = mach_task_self(); | |||
@@ -140,7 +140,7 @@ bool JackMachPortSet::AllocatePort(const char* name, int queue) | |||
kern_return_t res; | |||
mach_port_t task = mach_task_self(); | |||
JackLog("JackMachPortSet::AllocatePort\n"); | |||
jack_log("JackMachPortSet::AllocatePort"); | |||
if ((res = task_get_bootstrap_port(task, &fBootPort)) != KERN_SUCCESS) { | |||
jack_error("AllocatePort: Can't find bootstrap mach port err = %s", mach_error_string(res)); | |||
@@ -178,7 +178,7 @@ bool JackMachPortSet::AllocatePort(const char* name, int queue) | |||
jack_error("Allocate: mach_port_get_attributes error name = %s err = %s", name, mach_error_string(res)); | |||
} | |||
JackLog("AllocatePort: queue limit = %ld\n", qlimits.mpl_qlimit); | |||
jack_log("AllocatePort: queue limit = %ld", qlimits.mpl_qlimit); | |||
if (queue > 0 ) { | |||
qlimits.mpl_qlimit = queue; | |||
@@ -203,7 +203,7 @@ bool JackMachPortSet::DisconnectPort() | |||
kern_return_t res; | |||
mach_port_t task = mach_task_self(); | |||
JackLog("JackMachPortSet::DisconnectPort\n"); | |||
jack_log("JackMachPortSet::DisconnectPort"); | |||
if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) { | |||
jack_error("JackMachPortSet::DisconnectPort mach_port_deallocate fBootPort err = %s", mach_error_string(res)); | |||
@@ -221,7 +221,7 @@ bool JackMachPortSet::DestroyPort() | |||
kern_return_t res; | |||
mach_port_t task = mach_task_self(); | |||
JackLog("JackMachPortSet::DisconnectPort\n"); | |||
jack_log("JackMachPortSet::DisconnectPort"); | |||
if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) { | |||
jack_error("JackMachPortSet::DisconnectPort mach_port_deallocate err = %s", mach_error_string(res)); | |||
@@ -245,7 +245,7 @@ mach_port_t JackMachPortSet::AddPort() | |||
mach_port_t task = mach_task_self(); | |||
mach_port_t old_port, result = 0; | |||
JackLog("JackMachPortSet::AddPort\n"); | |||
jack_log("JackMachPortSet::AddPort"); | |||
if ((res = mach_port_allocate(task, MACH_PORT_RIGHT_RECEIVE, &result)) != KERN_SUCCESS) { | |||
jack_error("AddPort: can't allocate mach port err = %s", mach_error_string(res)); | |||
@@ -127,20 +127,20 @@ bool JackMachSemaphore::Allocate(const char* name, const char* server_name, int | |||
/* service not currently registered, "a good thing" (tm) */ | |||
break; | |||
case BOOTSTRAP_NOT_PRIVILEGED : | |||
JackLog("bootstrap_register(): bootstrap not privileged\n"); | |||
jack_log("bootstrap_register(): bootstrap not privileged"); | |||
break; | |||
case BOOTSTRAP_SERVICE_ACTIVE : | |||
JackLog("bootstrap_register(): bootstrap service active\n"); | |||
jack_log("bootstrap_register(): bootstrap service active"); | |||
break; | |||
default : | |||
JackLog("bootstrap_register() err = %s\n", mach_error_string(res)); | |||
jack_log("bootstrap_register() err = %s", mach_error_string(res)); | |||
break; | |||
} | |||
return false; | |||
} | |||
JackLog("JackMachSemaphore::Allocate name = %s\n", fName); | |||
jack_log("JackMachSemaphore::Allocate name = %s", fName); | |||
return true; | |||
} | |||
@@ -153,7 +153,7 @@ bool JackMachSemaphore::ConnectInput(const char* name, const char* server_name) | |||
// Temporary... A REVOIR | |||
/* | |||
if (fSemaphore > 0) { | |||
JackLog("Already connected name = %s\n", name); | |||
jack_log("Already connected name = %s", name); | |||
return true; | |||
} | |||
*/ | |||
@@ -170,7 +170,7 @@ bool JackMachSemaphore::ConnectInput(const char* name, const char* server_name) | |||
return false; | |||
} | |||
JackLog("JackMachSemaphore::Connect name = %s \n", fName); | |||
jack_log("JackMachSemaphore::Connect name = %s ", fName); | |||
return true; | |||
} | |||
@@ -187,7 +187,7 @@ bool JackMachSemaphore::ConnectOutput(const char* name, const char* server_name) | |||
bool JackMachSemaphore::Disconnect() | |||
{ | |||
if (fSemaphore > 0) { | |||
JackLog("JackMachSemaphore::Disconnect name = %s\n", fName); | |||
jack_log("JackMachSemaphore::Disconnect name = %s", fName); | |||
fSemaphore = 0; | |||
} | |||
// Nothing to do | |||
@@ -200,7 +200,7 @@ void JackMachSemaphore::Destroy() | |||
kern_return_t res; | |||
if (fSemaphore > 0) { | |||
JackLog("JackMachSemaphore::Destroy\n"); | |||
jack_log("JackMachSemaphore::Destroy"); | |||
if ((res = semaphore_destroy(mach_task_self(), fSemaphore)) != KERN_SUCCESS) { | |||
jack_error("JackMachSemaphore::Destroy can't destroy semaphore err = %s", mach_error_string(res)); | |||
} | |||
@@ -44,7 +44,7 @@ JackMachServerChannel::~JackMachServerChannel() | |||
int JackMachServerChannel::Open(const char* server_name, JackServer* server) | |||
{ | |||
JackLog("JackMachServerChannel::Open\n"); | |||
jack_log("JackMachServerChannel::Open"); | |||
char jack_server_entry_name[512]; | |||
snprintf(jack_server_entry_name, sizeof(jack_server_entry_name), "%s_%s", jack_server_entry, server_name); | |||
@@ -65,7 +65,7 @@ int JackMachServerChannel::Open(const char* server_name, JackServer* server) | |||
void JackMachServerChannel::Close() | |||
{ | |||
JackLog("JackMachServerChannel::Close\n"); | |||
jack_log("JackMachServerChannel::Close"); | |||
fThread->Kill(); | |||
fServerPort.DestroyPort(); | |||
} | |||
@@ -119,7 +119,7 @@ void JackMachServerChannel::ClientClose(mach_port_t private_port, int refnum) | |||
void JackMachServerChannel::ClientKill(mach_port_t private_port) | |||
{ | |||
JackLog("JackMachServerChannel::ClientKill\n"); | |||
jack_log("JackMachServerChannel::ClientKill"); | |||
int refnum = fClientTable[private_port]; | |||
assert(refnum > 0); | |||
fServer->Notify(refnum, kDeadClient, 0); | |||
@@ -135,7 +135,7 @@ void JackMachServerChannel::ClientKill(mach_port_t private_port) | |||
boolean_t JackMachServerChannel::MessageHandler(mach_msg_header_t* Request, mach_msg_header_t* Reply) | |||
{ | |||
if (Request->msgh_id == MACH_NOTIFY_NO_SENDERS) { | |||
JackLog("MACH_NOTIFY_NO_SENDERS %ld\n", Request->msgh_local_port); | |||
jack_log("MACH_NOTIFY_NO_SENDERS %ld", Request->msgh_local_port); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[Request->msgh_local_port]; | |||
assert(channel); | |||
channel->ClientKill(Request->msgh_local_port); | |||
@@ -149,7 +149,7 @@ bool JackMachServerChannel::Execute() | |||
{ | |||
kern_return_t res; | |||
if ((res = mach_msg_server(MessageHandler, 1024, fServerPort.GetPortSet(), 0)) != KERN_SUCCESS) { | |||
JackLog("JackMachServerChannel::Execute: err = %s\n", mach_error_string(res)); | |||
jack_log("JackMachServerChannel::Execute: err = %s", mach_error_string(res)); | |||
} | |||
//return (res == KERN_SUCCESS); mach_msg_server can fail if the client reply port is not valid anymore (crashed client) | |||
return true; | |||
@@ -27,7 +27,7 @@ namespace Jack | |||
int JackMachServerNotifyChannel::Open(const char* server_name) | |||
{ | |||
JackLog("JackMachServerChannel::Open\n"); | |||
jack_log("JackMachServerChannel::Open"); | |||
char jack_server_entry_name[512]; | |||
snprintf(jack_server_entry_name, sizeof(jack_server_entry_name), "%s_%s", jack_server_entry, server_name); | |||
@@ -35,7 +35,7 @@ int JackMachThread::SetThreadToPriority(pthread_t thread, UInt32 inPriority, Boo | |||
theTCPolicy.constraint = AudioConvertNanosToHostTime(constraint); | |||
theTCPolicy.preemptible = true; | |||
kern_return_t res = thread_policy_set(pthread_mach_thread_np(thread), THREAD_TIME_CONSTRAINT_POLICY, (thread_policy_t) & theTCPolicy, THREAD_TIME_CONSTRAINT_POLICY_COUNT); | |||
JackLog("JackMachThread::thread_policy_set %ld\n", res); | |||
jack_log("JackMachThread::thread_policy_set %ld", res); | |||
return (res == KERN_SUCCESS) ? 0 : -1; | |||
} else { | |||
// OTHER THREADS | |||
@@ -58,7 +58,7 @@ int JackMachThread::SetThreadToPriority(pthread_t thread, UInt32 inPriority, Boo | |||
thePrecedencePolicy.importance = relativePriority; | |||
kern_return_t res = thread_policy_set(pthread_mach_thread_np(thread), THREAD_PRECEDENCE_POLICY, (thread_policy_t) & thePrecedencePolicy, THREAD_PRECEDENCE_POLICY_COUNT); | |||
JackLog("JackMachThread::thread_policy_set %ld\n", res); | |||
jack_log("JackMachThread::thread_policy_set %ld", res); | |||
return (res == KERN_SUCCESS) ? 0 : -1; | |||
} | |||
} | |||
@@ -133,7 +133,7 @@ int JackMachThread::GetParams(UInt64* period, UInt64* computation, UInt64* const | |||
*period = AudioConvertHostTimeToNanos(theTCPolicy.period); | |||
*computation = AudioConvertHostTimeToNanos(theTCPolicy.computation); | |||
*constraint = AudioConvertHostTimeToNanos(theTCPolicy.constraint); | |||
JackLog("JackMachThread::GetParams period = %ld computation = %ld constraint = %ld\n", long(*period / 1000.0f), long(*computation / 1000.0f), long(*constraint / 1000.0f)); | |||
jack_log("JackMachThread::GetParams period = %ld computation = %ld constraint = %ld", long(*period / 1000.0f), long(*computation / 1000.0f), long(*constraint / 1000.0f)); | |||
return 0; | |||
} else { | |||
return -1; | |||
@@ -154,7 +154,7 @@ int JackMachThread::Kill() | |||
int JackMachThread::AcquireRealTime() | |||
{ | |||
JackLog("JackMachThread::AcquireRealTime fPeriod = %ld fComputation = %ld fConstraint = %ld\n", | |||
jack_log("JackMachThread::AcquireRealTime fPeriod = %ld fComputation = %ld fConstraint = %ld", | |||
long(fPeriod / 1000), long(fComputation / 1000), long(fConstraint / 1000)); | |||
return (fThread) ? AcquireRealTimeImp(fThread, fPeriod, fComputation, fConstraint) : -1; | |||
@@ -461,13 +461,13 @@ int JackASIODriver::Close() | |||
int JackASIODriver::Start() | |||
{ | |||
JackLog("JackASIODriver::Start\n"); | |||
jack_log("JackASIODriver::Start"); | |||
return 0; | |||
} | |||
int JackASIODriver::Stop() | |||
{ | |||
JackLog("JackASIODriver::Stop\n"); | |||
jack_log("JackASIODriver::Stop"); | |||
return 0; | |||
} | |||
@@ -259,7 +259,7 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, | |||
int in_max = 0; | |||
int out_max = 0; | |||
JackLog("JackPortAudioDriver::Open nframes = %ld in = %ld out = %ld capture name = %s playback name = %s samplerate = %ld\n", | |||
jack_log("JackPortAudioDriver::Open nframes = %ld in = %ld out = %ld capture name = %s playback name = %s samplerate = %ld", | |||
nframes, inchannels, outchannels, capture_driver_uid, playback_driver_uid, samplerate); | |||
// Generic JackAudioDriver Open | |||
@@ -273,12 +273,12 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, | |||
goto error; | |||
} | |||
JackLog("JackPortAudioDriver::Pa_GetDefaultInputDevice %ld\n", Pa_GetDefaultInputDevice()); | |||
JackLog("JackPortAudioDriver::Pa_GetDefaultOutputDevice %ld\n", Pa_GetDefaultOutputDevice()); | |||
jack_log("JackPortAudioDriver::Pa_GetDefaultInputDevice %ld", Pa_GetDefaultInputDevice()); | |||
jack_log("JackPortAudioDriver::Pa_GetDefaultOutputDevice %ld", Pa_GetDefaultOutputDevice()); | |||
if (capturing) { | |||
if (!GetInputDeviceFromName(capture_driver_uid, &fInputDevice, &in_max)) { | |||
JackLog("JackPortAudioDriver::GetInputDeviceFromName cannot open %s\n", capture_driver_uid); | |||
jack_log("JackPortAudioDriver::GetInputDeviceFromName cannot open %s", capture_driver_uid); | |||
fInputDevice = Pa_GetDefaultInputDevice(); | |||
if (fInputDevice == paNoDevice) | |||
goto error; | |||
@@ -295,7 +295,7 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, | |||
if (playing) { | |||
if (!GetOutputDeviceFromName(playback_driver_uid, &fOutputDevice, &out_max)) { | |||
JackLog("JackPortAudioDriver::GetOutputDeviceFromName cannot open %s\n", playback_driver_uid); | |||
jack_log("JackPortAudioDriver::GetOutputDeviceFromName cannot open %s", playback_driver_uid); | |||
fOutputDevice = Pa_GetDefaultOutputDevice(); | |||
if (fOutputDevice == paNoDevice) | |||
goto error; | |||
@@ -311,12 +311,12 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, | |||
} | |||
if (inchannels == 0) { | |||
JackLog("JackPortAudioDriver::Open setup max in channels = %ld\n", in_max); | |||
jack_log("JackPortAudioDriver::Open setup max in channels = %ld", in_max); | |||
inchannels = in_max; | |||
} | |||
if (outchannels == 0) { | |||
JackLog("JackPortAudioDriver::Open setup max out channels = %ld\n", out_max); | |||
jack_log("JackPortAudioDriver::Open setup max out channels = %ld", out_max); | |||
outchannels = out_max; | |||
} | |||
@@ -375,7 +375,7 @@ error: | |||
int JackPortAudioDriver::Close() | |||
{ | |||
JackAudioDriver::Close(); | |||
JackLog("JackPortAudioDriver::Close\n"); | |||
jack_log("JackPortAudioDriver::Close"); | |||
Pa_CloseStream(fStream); | |||
Pa_Terminate(); | |||
return 0; | |||
@@ -383,7 +383,7 @@ int JackPortAudioDriver::Close() | |||
int JackPortAudioDriver::Start() | |||
{ | |||
JackLog("JackPortAudioDriver::Start\n"); | |||
jack_log("JackPortAudioDriver::Start"); | |||
JackAudioDriver::Start(); | |||
PaError err = Pa_StartStream(fStream); | |||
return (err == paNoError) ? 0 : -1; | |||
@@ -391,7 +391,7 @@ int JackPortAudioDriver::Start() | |||
int JackPortAudioDriver::Stop() | |||
{ | |||
JackLog("JackPortAudioDriver::Stop\n"); | |||
jack_log("JackPortAudioDriver::Stop"); | |||
PaError err = Pa_StopStream(fStream); | |||
return (err == paNoError) ? 0 : -1; | |||
} | |||
@@ -87,11 +87,11 @@ bool JackWinEvent::TimedWait(long usec) | |||
bool JackWinEvent::ConnectInput(const char* name, const char* server_name) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackWinEvent::Connect %s\n", fName); | |||
jack_log("JackWinEvent::Connect %s", fName); | |||
// Temporary... | |||
if (fEvent) { | |||
JackLog("Already connected name = %s\n", name); | |||
jack_log("Already connected name = %s", name); | |||
return true; | |||
} | |||
@@ -116,7 +116,7 @@ bool JackWinEvent::ConnectOutput(const char* name, const char* server_name) | |||
bool JackWinEvent::Disconnect() | |||
{ | |||
if (fEvent) { | |||
JackLog("JackWinEvent::Disconnect %s\n", fName); | |||
jack_log("JackWinEvent::Disconnect %s", fName); | |||
CloseHandle(fEvent); | |||
fEvent = NULL; | |||
return true; | |||
@@ -128,7 +128,7 @@ bool JackWinEvent::Disconnect() | |||
bool JackWinEvent::Allocate(const char* name, const char* server_name, int value) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackWinEvent::Allocate name = %s val = %ld\n", fName, value); | |||
jack_log("JackWinEvent::Allocate name = %s val = %ld", fName, value); | |||
/* create an auto reset event */ | |||
if ((fEvent = CreateEvent(NULL, FALSE, FALSE, fName)) == NULL) { | |||
@@ -147,7 +147,7 @@ bool JackWinEvent::Allocate(const char* name, const char* server_name, int value | |||
void JackWinEvent::Destroy() | |||
{ | |||
if (fEvent != NULL) { | |||
JackLog("JackWinEvent::Destroy %s\n", fName); | |||
jack_log("JackWinEvent::Destroy %s", fName); | |||
CloseHandle(fEvent); | |||
fEvent = NULL; | |||
} else { | |||
@@ -53,7 +53,7 @@ int JackWinNamedPipe::Write(void* data, int len) | |||
int JackWinNamedPipeClient::Connect(const char* dir, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which); | |||
JackLog("Connect: fName %s\n", fName); | |||
jack_log("Connect: fName %s", fName); | |||
fNamedPipe = CreateFile(fName, // pipe name | |||
GENERIC_READ | // read and write access | |||
@@ -75,7 +75,7 @@ int JackWinNamedPipeClient::Connect(const char* dir, int which) | |||
int JackWinNamedPipeClient::Connect(const char* dir, const char* name, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%s_%d", dir, name, which); | |||
JackLog("Connect: fName %s\n", fName); | |||
jack_log("Connect: fName %s", fName); | |||
fNamedPipe = CreateFile(fName, // pipe name | |||
GENERIC_READ | // read and write access | |||
@@ -181,9 +181,9 @@ int JackWinAsyncNamedPipeClient::FinishIO() | |||
int JackWinAsyncNamedPipeClient::Read(void* data, int len) | |||
{ | |||
DWORD read; | |||
JackLog("JackWinNamedPipeClient::Read len = %ld\n", len); | |||
jack_log("JackWinNamedPipeClient::Read len = %ld", len); | |||
BOOL res = ReadFile(fNamedPipe, data, len, &read, &fOverlap); | |||
JackLog("JackWinNamedPipeClient::Read res = %ld read %ld\n", res, read); | |||
jack_log("JackWinNamedPipeClient::Read res = %ld read %ld", res, read); | |||
if (res && read != 0) { | |||
fPendingIO = false; | |||
@@ -201,7 +201,7 @@ int JackWinAsyncNamedPipeClient::Read(void* data, int len) | |||
int JackWinAsyncNamedPipeClient::Write(void* data, int len) | |||
{ | |||
DWORD written; | |||
JackLog("JackWinNamedPipeClient::Write len = %ld\n", len); | |||
jack_log("JackWinNamedPipeClient::Write len = %ld", len); | |||
BOOL res = WriteFile(fNamedPipe, data, len, &written, &fOverlap); | |||
if (res && written != 0) { | |||
@@ -222,7 +222,7 @@ int JackWinAsyncNamedPipeClient::Write(void* data, int len) | |||
int JackWinNamedPipeServer::Bind(const char* dir, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which); | |||
JackLog("Bind: fName %s\n", fName); | |||
jack_log("Bind: fName %s", fName); | |||
if ((fNamedPipe = CreateNamedPipe(fName, | |||
PIPE_ACCESS_DUPLEX, // read/write access | |||
@@ -244,7 +244,7 @@ int JackWinNamedPipeServer::Bind(const char* dir, int which) | |||
int JackWinNamedPipeServer::Bind(const char* dir, const char* name, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%s_%d", dir, name, which); | |||
JackLog("Bind: fName %s\n", fName); | |||
jack_log("Bind: fName %s", fName); | |||
if ((fNamedPipe = CreateNamedPipe(fName, | |||
PIPE_ACCESS_DUPLEX, // read/write access | |||
@@ -301,7 +301,7 @@ JackWinNamedPipeClient* JackWinNamedPipeServer::AcceptClient() | |||
int JackWinNamedPipeServer::Close() | |||
{ | |||
JackLog("JackWinNamedPipeServer::Close\n"); | |||
jack_log("JackWinNamedPipeServer::Close"); | |||
if (fNamedPipe != INVALID_HANDLE_VALUE) { | |||
DisconnectNamedPipe(fNamedPipe); | |||
@@ -318,7 +318,7 @@ int JackWinNamedPipeServer::Close() | |||
int JackWinAsyncNamedPipeServer::Bind(const char* dir, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which); | |||
JackLog("Bind: fName %s\n", fName); | |||
jack_log("Bind: fName %s", fName); | |||
if ((fNamedPipe = CreateNamedPipe(fName, | |||
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access | |||
@@ -340,7 +340,7 @@ int JackWinAsyncNamedPipeServer::Bind(const char* dir, int which) | |||
int JackWinAsyncNamedPipeServer::Bind(const char* dir, const char* name, int which) | |||
{ | |||
sprintf(fName, "\\\\.\\pipe\\%s_jack_%s_%d", dir, name, which); | |||
JackLog("Bind: fName %s\n", fName); | |||
jack_log("Bind: fName %s", fName); | |||
if ((fNamedPipe = CreateNamedPipe(fName, | |||
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access | |||
@@ -38,7 +38,7 @@ JackWinNamedPipeClientChannel::~JackWinNamedPipeClientChannel() | |||
int JackWinNamedPipeClientChannel::ServerCheck(const char* server_name) | |||
{ | |||
JackLog("JackWinNamedPipeClientChannel::ServerCheck = %s\n", server_name); | |||
jack_log("JackWinNamedPipeClientChannel::ServerCheck = %s", server_name); | |||
// Connect to server | |||
if (fRequestPipe.Connect(jack_server_dir, server_name, 0) < 0) { | |||
@@ -52,7 +52,7 @@ int JackWinNamedPipeClientChannel::ServerCheck(const char* server_name) | |||
int JackWinNamedPipeClientChannel::Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status) | |||
{ | |||
int result = 0; | |||
JackLog("JackWinNamedPipeClientChannel::Open name = %s\n", name); | |||
jack_log("JackWinNamedPipeClientChannel::Open name = %s", name); | |||
/* | |||
16/08/07: was called before doing "fRequestPipe.Connect" .... still necessary? | |||
@@ -99,7 +99,7 @@ void JackWinNamedPipeClientChannel::Close() | |||
int JackWinNamedPipeClientChannel::Start() | |||
{ | |||
JackLog("JackWinNamedPipeClientChannel::Start\n"); | |||
jack_log("JackWinNamedPipeClientChannel::Start"); | |||
if (fThread->Start() != 0) { | |||
jack_error("Cannot start Jack client listener"); | |||
@@ -111,7 +111,7 @@ int JackWinNamedPipeClientChannel::Start() | |||
void JackWinNamedPipeClientChannel::Stop() | |||
{ | |||
JackLog("JackWinNamedPipeClientChannel::Stop\n"); | |||
jack_log("JackWinNamedPipeClientChannel::Stop"); | |||
fThread->Kill(); // Unsafe on WIN32... TODO : solve WIN32 thread Kill issue | |||
} | |||
@@ -289,7 +289,7 @@ void JackWinNamedPipeClientChannel::InternalClientUnload(int refnum, int int_ref | |||
bool JackWinNamedPipeClientChannel::Init() | |||
{ | |||
JackLog("JackWinNamedPipeClientChannel::Init \n"); | |||
jack_log("JackWinNamedPipeClientChannel::Init "); | |||
if (!fNotificationListenPipe.Accept()) { | |||
jack_error("JackWinNamedPipeClientChannel: cannot establish notification pipe"); | |||
@@ -28,7 +28,7 @@ namespace Jack | |||
// Server to client | |||
int JackWinNamedPipeNotifyChannel::Open(const char* name) | |||
{ | |||
JackLog("JackWinNamedPipeNotifyChannel::Open name = %s\n", name); | |||
jack_log("JackWinNamedPipeNotifyChannel::Open name = %s", name); | |||
// Connect to client listen pipe | |||
if (fNotifyPipe.Connect(jack_client_dir, name, 0) < 0) { | |||
@@ -42,7 +42,7 @@ int JackWinNamedPipeNotifyChannel::Open(const char* name) | |||
void JackWinNamedPipeNotifyChannel::Close() | |||
{ | |||
JackLog("JackWinNamedPipeNotifyChannel::Close\n"); | |||
jack_log("JackWinNamedPipeNotifyChannel::Close"); | |||
fNotifyPipe.Close(); | |||
} | |||
@@ -49,7 +49,7 @@ JackClientPipeThread::JackClientPipeThread(JackWinNamedPipeClient* pipe) | |||
JackClientPipeThread::~JackClientPipeThread() | |||
{ | |||
JackLog("JackClientPipeThread::~JackClientPipeThread\n"); | |||
jack_log("JackClientPipeThread::~JackClientPipeThread"); | |||
delete fPipe; | |||
delete fThread; | |||
} | |||
@@ -69,7 +69,7 @@ int JackClientPipeThread::Open(JackServer* server) // Open the Server/Client con | |||
void JackClientPipeThread::Close() // Close the Server/Client connection | |||
{ | |||
JackLog("JackClientPipeThread::Close %x %ld\n", this, fRefNum); | |||
jack_log("JackClientPipeThread::Close %x %ld", this, fRefNum); | |||
/* | |||
TODO : solve WIN32 thread Kill issue | |||
This would hang.. since Close will be followed by a delete, | |||
@@ -83,7 +83,7 @@ void JackClientPipeThread::Close() // Close the Server/Client connection | |||
bool JackClientPipeThread::Execute() | |||
{ | |||
JackLog("JackClientPipeThread::Execute\n"); | |||
jack_log("JackClientPipeThread::Execute"); | |||
return (HandleRequest() == 0); | |||
} | |||
@@ -108,7 +108,7 @@ int JackClientPipeThread::HandleRequest() | |||
switch (header.fType) { | |||
case JackRequest::kClientCheck: { | |||
JackLog("JackRequest::kClientCheck\n"); | |||
jack_log("JackRequest::kClientCheck"); | |||
JackClientCheckRequest req; | |||
JackClientCheckResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -118,7 +118,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kClientOpen: { | |||
JackLog("JackRequest::ClientOpen\n"); | |||
jack_log("JackRequest::ClientOpen"); | |||
JackClientOpenRequest req; | |||
JackClientOpenResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -128,7 +128,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kClientClose: { | |||
JackLog("JackRequest::ClientClose\n"); | |||
jack_log("JackRequest::ClientClose"); | |||
JackClientCloseRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -142,7 +142,7 @@ int JackClientPipeThread::HandleRequest() | |||
case JackRequest::kActivateClient: { | |||
JackActivateRequest req; | |||
JackResult res; | |||
JackLog("JackRequest::ActivateClient\n"); | |||
jack_log("JackRequest::ActivateClient"); | |||
if (req.Read(fPipe) == 0) | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum); | |||
res.Write(fPipe); | |||
@@ -150,7 +150,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kDeactivateClient: { | |||
JackLog("JackRequest::DeactivateClient\n"); | |||
jack_log("JackRequest::DeactivateClient"); | |||
JackDeactivateRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -160,7 +160,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kRegisterPort: { | |||
JackLog("JackRequest::RegisterPort\n"); | |||
jack_log("JackRequest::RegisterPort"); | |||
JackPortRegisterRequest req; | |||
JackPortRegisterResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -170,7 +170,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kUnRegisterPort: { | |||
JackLog("JackRequest::UnRegisterPort\n"); | |||
jack_log("JackRequest::UnRegisterPort"); | |||
JackPortUnRegisterRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -180,7 +180,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kConnectNamePorts: { | |||
JackLog("JackRequest::ConnectPorts\n"); | |||
jack_log("JackRequest::ConnectPorts"); | |||
JackPortConnectNameRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -190,7 +190,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kDisconnectNamePorts: { | |||
JackLog("JackRequest::DisconnectPorts\n"); | |||
jack_log("JackRequest::DisconnectPorts"); | |||
JackPortDisconnectNameRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -200,7 +200,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kConnectPorts: { | |||
JackLog("JackRequest::ConnectPorts\n"); | |||
jack_log("JackRequest::ConnectPorts"); | |||
JackPortConnectRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -210,7 +210,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kDisconnectPorts: { | |||
JackLog("JackRequest::DisconnectPorts\n"); | |||
jack_log("JackRequest::DisconnectPorts"); | |||
JackPortDisconnectRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -220,7 +220,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kSetBufferSize: { | |||
JackLog("JackRequest::SetBufferSize\n"); | |||
jack_log("JackRequest::SetBufferSize"); | |||
JackSetBufferSizeRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -230,7 +230,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kSetFreeWheel: { | |||
JackLog("JackRequest::SetFreeWheel\n"); | |||
jack_log("JackRequest::SetFreeWheel"); | |||
JackSetFreeWheelRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -240,7 +240,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kReleaseTimebase: { | |||
JackLog("JackRequest::kReleaseTimebase\n"); | |||
jack_log("JackRequest::kReleaseTimebase"); | |||
JackReleaseTimebaseRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -250,7 +250,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kSetTimebaseCallback: { | |||
JackLog("JackRequest::kSetTimebaseCallback\n"); | |||
jack_log("JackRequest::kSetTimebaseCallback"); | |||
JackSetTimebaseCallbackRequest req; | |||
JackResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -260,7 +260,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kGetInternalClientName: { | |||
JackLog("JackRequest::kGetInternalClientName\n"); | |||
jack_log("JackRequest::kGetInternalClientName"); | |||
JackGetInternalClientNameRequest req; | |||
JackGetInternalClientNameResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -270,7 +270,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kInternalClientHandle: { | |||
JackLog("JackRequest::kInternalClientHandle\n"); | |||
jack_log("JackRequest::kInternalClientHandle"); | |||
JackInternalClientHandleRequest req; | |||
JackInternalClientHandleResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -280,7 +280,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kInternalClientLoad: { | |||
JackLog("JackRequest::kInternalClientLoad\n"); | |||
jack_log("JackRequest::kInternalClientLoad"); | |||
JackInternalClientLoadRequest req; | |||
JackInternalClientLoadResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -290,7 +290,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kInternalClientUnload: { | |||
JackLog("JackRequest::kInternalClientUnload\n"); | |||
jack_log("JackRequest::kInternalClientUnload"); | |||
JackInternalClientUnloadRequest req; | |||
JackInternalClientUnloadResult res; | |||
if (req.Read(fPipe) == 0) | |||
@@ -300,7 +300,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
case JackRequest::kNotification: { | |||
JackLog("JackRequest::Notification\n"); | |||
jack_log("JackRequest::Notification"); | |||
JackClientNotificationRequest req; | |||
if (req.Read(fPipe) == 0) | |||
fServer->Notify(req.fRefNum, req.fNotify, req.fValue); | |||
@@ -308,7 +308,7 @@ int JackClientPipeThread::HandleRequest() | |||
} | |||
default: | |||
JackLog("Unknown request %ld\n", header.fType); | |||
jack_log("Unknown request %ld", header.fType); | |||
break; | |||
} | |||
} | |||
@@ -320,14 +320,14 @@ int JackClientPipeThread::HandleRequest() | |||
void JackClientPipeThread::ClientAdd(char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result) | |||
{ | |||
JackLog("JackClientPipeThread::ClientAdd %s\n", name); | |||
jack_log("JackClientPipeThread::ClientAdd %s", name); | |||
fRefNum = -1; | |||
*result = fServer->GetEngine()->ClientExternalOpen(name, &fRefNum, shared_engine, shared_client, shared_graph); | |||
} | |||
void JackClientPipeThread::ClientRemove() | |||
{ | |||
JackLog("JackClientPipeThread::ClientRemove ref = %d\n", fRefNum); | |||
jack_log("JackClientPipeThread::ClientRemove ref = %d", fRefNum); | |||
/* TODO : solve WIN32 thread Kill issue | |||
Close(); | |||
*/ | |||
@@ -337,12 +337,12 @@ void JackClientPipeThread::ClientRemove() | |||
void JackClientPipeThread::ClientKill() | |||
{ | |||
JackLog("JackClientPipeThread::ClientKill ref = %d\n", fRefNum); | |||
jack_log("JackClientPipeThread::ClientKill ref = %d", fRefNum); | |||
if (fRefNum == -1) { // Correspond to an already removed client. | |||
JackLog("Kill a closed client\n"); | |||
jack_log("Kill a closed client"); | |||
} else if (fRefNum == 0) { // Correspond to a still not opened client. | |||
JackLog("Kill a not opened client\n"); | |||
jack_log("Kill a not opened client"); | |||
} else { | |||
fServer->Notify(fRefNum, kDeadClient, 0); | |||
} | |||
@@ -370,7 +370,7 @@ JackWinNamedPipeServerChannel::~JackWinNamedPipeServerChannel() | |||
int JackWinNamedPipeServerChannel::Open(const char* server_name, JackServer* server) | |||
{ | |||
JackLog("JackWinNamedPipeServerChannel::Open \n"); | |||
jack_log("JackWinNamedPipeServerChannel::Open "); | |||
fServer = server; | |||
snprintf(fServerName, sizeof(fServerName), server_name); | |||
@@ -410,7 +410,7 @@ void JackWinNamedPipeServerChannel::Close() | |||
bool JackWinNamedPipeServerChannel::Init() | |||
{ | |||
JackLog("JackWinNamedPipeServerChannel::Init \n"); | |||
jack_log("JackWinNamedPipeServerChannel::Init "); | |||
JackWinNamedPipeClient* pipe; | |||
// Accept first client, that is the JackWinNamedPipeServerNotifyChannel object | |||
@@ -447,11 +447,11 @@ void JackWinNamedPipeServerChannel::ClientAdd(JackWinNamedPipeClient* pipe) | |||
std::list<JackClientPipeThread*>::iterator it = fClientList.begin(); | |||
JackClientPipeThread* client; | |||
JackLog("ClientAdd size %ld\n", fClientList.size()); | |||
jack_log("ClientAdd size %ld", fClientList.size()); | |||
while (it != fClientList.end()) { | |||
client = *it; | |||
JackLog("Remove dead client = %x running = %ld\n", client, client->IsRunning()); | |||
jack_log("Remove dead client = %x running = %ld", client, client->IsRunning()); | |||
if (client->IsRunning()) { | |||
it++; | |||
} else { | |||
@@ -66,17 +66,17 @@ class JackWinProcessSync : public JackSyncInterface | |||
bool TimedWait(long usec) | |||
{ | |||
JackLog("JackWinProcessSync::Wait time out = %ld\n", usec); | |||
jack_log("JackWinProcessSync::Wait time out = %ld", usec); | |||
DWORD res = WaitForSingleObject(fEvent, usec / 1000); | |||
JackLog("JackWinProcessSync::Wait finished res = %ld\n", res == WAIT_OBJECT_0); | |||
jack_log("JackWinProcessSync::Wait finished res = %ld", res == WAIT_OBJECT_0); | |||
return (res == WAIT_OBJECT_0); | |||
} | |||
void Wait() | |||
{ | |||
JackLog("JackWinProcessSync::Wait...\n"); | |||
jack_log("JackWinProcessSync::Wait..."); | |||
WaitForSingleObject(fEvent, INFINITE); | |||
JackLog("JackWinProcessSync::Wait finished\n"); | |||
jack_log("JackWinProcessSync::Wait finished"); | |||
} | |||
void SignalAll() | |||
@@ -84,11 +84,11 @@ bool JackWinSemaphore::TimedWait(long usec) | |||
bool JackWinSemaphore::ConnectInput(const char* name, const char* server_name) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackWinSemaphore::Connect %s\n", fName); | |||
jack_log("JackWinSemaphore::Connect %s", fName); | |||
// Temporary... | |||
if (fSemaphore) { | |||
JackLog("Already connected name = %s\n", name); | |||
jack_log("Already connected name = %s", name); | |||
return true; | |||
} | |||
@@ -113,7 +113,7 @@ bool JackWinSemaphore::ConnectOutput(const char* name, const char* server_name) | |||
bool JackWinSemaphore::Disconnect() | |||
{ | |||
if (fSemaphore) { | |||
JackLog("JackWinSemaphore::Disconnect %s\n", fName); | |||
jack_log("JackWinSemaphore::Disconnect %s", fName); | |||
CloseHandle(fSemaphore); | |||
fSemaphore = NULL; | |||
return true; | |||
@@ -125,7 +125,7 @@ bool JackWinSemaphore::Disconnect() | |||
bool JackWinSemaphore::Allocate(const char* name, const char* server_name, int value) | |||
{ | |||
BuildName(name, server_name, fName); | |||
JackLog("JackWinSemaphore::Allocate name = %s val = %ld\n", fName, value); | |||
jack_log("JackWinSemaphore::Allocate name = %s val = %ld", fName, value); | |||
if ((fSemaphore = CreateSemaphore(NULL, value, 32767, fName)) == NULL) { | |||
jack_error("Allocate: can't check in named semaphore name = %s err = %ld", fName, GetLastError()); | |||
@@ -143,7 +143,7 @@ bool JackWinSemaphore::Allocate(const char* name, const char* server_name, int v | |||
void JackWinSemaphore::Destroy() | |||
{ | |||
if (fSemaphore != NULL) { | |||
JackLog("JackWinSemaphore::Destroy %s\n", fName); | |||
jack_log("JackWinSemaphore::Destroy %s", fName); | |||
CloseHandle(fSemaphore); | |||
fSemaphore = NULL; | |||
} else { | |||
@@ -42,7 +42,7 @@ DWORD WINAPI JackWinThread::ThreadHandler(void* arg) | |||
SetEvent(obj->fEvent); | |||
} | |||
JackLog("ThreadHandler: start\n"); | |||
jack_log("ThreadHandler: start"); | |||
// If Init succeed, start the thread loop | |||
bool res = true; | |||
@@ -51,7 +51,7 @@ DWORD WINAPI JackWinThread::ThreadHandler(void* arg) | |||
} | |||
SetEvent(obj->fEvent); | |||
JackLog("ThreadHandler: exit\n"); | |||
jack_log("ThreadHandler: exit"); | |||
return 0; | |||
} | |||
@@ -93,7 +93,7 @@ int JackWinThread::StartImp(pthread_t* thread, int priority, int realtime, Threa | |||
if (realtime) { | |||
JackLog("Create RT thread\n"); | |||
jack_log("Create RT thread"); | |||
*thread = CreateThread(NULL, 0, start_routine, arg, 0, &id); | |||
if (*thread == NULL) { | |||
@@ -110,7 +110,7 @@ int JackWinThread::StartImp(pthread_t* thread, int priority, int realtime, Threa | |||
} else { | |||
JackLog("Create non RT thread\n"); | |||
jack_log("Create non RT thread"); | |||
*thread = CreateThread(NULL, 0, start_routine, arg, 0, &id); | |||
if (thread == NULL) { | |||
@@ -134,7 +134,7 @@ int JackWinThread::StartSync() | |||
if (fRealTime) { | |||
JackLog("Create RT thread\n"); | |||
jack_log("Create RT thread"); | |||
fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id); | |||
if (fThread == NULL) { | |||
@@ -156,7 +156,7 @@ int JackWinThread::StartSync() | |||
} else { | |||
JackLog("Create non RT thread\n"); | |||
jack_log("Create non RT thread"); | |||
fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id); | |||
if (fThread == NULL) { | |||
@@ -181,7 +181,7 @@ int JackWinThread::Kill() | |||
TerminateThread(fThread, 0); | |||
WaitForSingleObject(fThread, INFINITE); | |||
CloseHandle(fThread); | |||
JackLog("JackWinThread::Kill 2\n"); | |||
jack_log("JackWinThread::Kill 2"); | |||
fThread = NULL; | |||
fRunning = false; | |||
return 0; | |||
@@ -193,7 +193,7 @@ int JackWinThread::Kill() | |||
int JackWinThread::Stop() | |||
{ | |||
if (fThread) { // If thread has been started | |||
JackLog("JackWinThread::Stop\n"); | |||
jack_log("JackWinThread::Stop"); | |||
fRunning = false; // Request for the thread to stop | |||
WaitForSingleObject(fEvent, INFINITE); | |||
CloseHandle(fThread); | |||
@@ -217,10 +217,10 @@ int JackWinThread::AcquireRealTime(int priority) | |||
int JackWinThread::AcquireRealTimeImp(pthread_t thread, int priority) | |||
{ | |||
JackLog("JackWinThread::AcquireRealTime\n"); | |||
jack_log("JackWinThread::AcquireRealTime"); | |||
if (SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL)) { | |||
JackLog("JackWinThread::AcquireRealTime OK\n"); | |||
jack_log("JackWinThread::AcquireRealTime OK"); | |||
return 0; | |||
} else { | |||
jack_error("Cannot set thread priority = %d", GetLastError()); | |||