git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@4005 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.9.8
| @@ -29,11 +29,23 @@ Arnold Krille | |||
| --------------------------- | |||
| Jackdmp changes log | |||
| --------------------------- | |||
| 2010-04-016 Stephane Letz <letz@grame.fr> | |||
| * Make jack_connect/jack_disconnect wait for effective port connection/disconnection. | |||
| 2010-04-07 Stephane Letz <letz@grame.fr> | |||
| * Remove call to exit in library code. | |||
| 2010-03-26 Stephane Letz <letz@grame.fr> | |||
| * ffado-portname-sync.patch from ticket #163 applied. | |||
| 2010-03-24 Stephane Letz <letz@grame.fr> | |||
| * On Windows, now use TRE library for regexp (BSD license instead of GPL license). | |||
| 2010-03-19 Stephane Letz <letz@grame.fr> | |||
| * Fix some file header to have library side code use LGPL. | |||
| @@ -56,9 +56,9 @@ extern "C" | |||
| const char * | |||
| jack_get_version_string(); | |||
| EXPORT jack_client_t * jack_client_open_aux (const char *client_name, | |||
| jack_client_t * jack_client_new_aux (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status, va_list ap); | |||
| jack_status_t *status); | |||
| EXPORT jack_client_t * jack_client_open (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status, ...); | |||
| @@ -300,7 +300,7 @@ EXPORT jack_client_t* jack_client_new(const char* client_name) | |||
| int options = JackUseExactName; | |||
| if (getenv("JACK_START_SERVER") == NULL) | |||
| options |= JackNoStartServer; | |||
| jack_client_t* res = jack_client_open_aux(client_name, (jack_options_t)options, NULL, NULL); | |||
| jack_client_t* res = jack_client_new_aux(client_name, (jack_options_t)options, NULL); | |||
| JackGlobals::fOpenMutex->Unlock(); | |||
| return res; | |||
| } catch (std::bad_alloc& e) { | |||
| @@ -317,11 +317,7 @@ EXPORT void* jack_port_get_buffer(jack_port_t* port, jack_nframes_t frames) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_get_buffer"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_buffer called with an incorrect port %ld", myport); | |||
| @@ -337,11 +333,7 @@ EXPORT const char* jack_port_name(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_name"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_name called with an incorrect port %ld", myport); | |||
| @@ -357,11 +349,7 @@ EXPORT const char* jack_port_short_name(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_short_name"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_short_name called with an incorrect port %ld", myport); | |||
| @@ -377,11 +365,7 @@ EXPORT int jack_port_flags(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_flags"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_flags called with an incorrect port %ld", myport); | |||
| @@ -397,11 +381,7 @@ EXPORT const char* jack_port_type(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_type"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_flags called an incorrect port %ld", myport); | |||
| @@ -417,11 +397,7 @@ EXPORT jack_port_type_id_t jack_port_type_id(const jack_port_t *port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_type_id"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_type_id called an incorrect port %ld", myport); | |||
| @@ -437,11 +413,7 @@ EXPORT int jack_port_connected(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_connected"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_connected called with an incorrect port %ld", myport); | |||
| @@ -458,11 +430,7 @@ EXPORT int jack_port_connected_to(const jack_port_t* port, const char* port_name | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_connected_to"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t src = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(src)) { | |||
| jack_error("jack_port_connected_to called with an incorrect port %ld", src); | |||
| @@ -488,21 +456,13 @@ EXPORT int jack_port_tie(jack_port_t* src, jack_port_t* dst) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_tie"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t src_aux = (uint64_t)src; | |||
| #else | |||
| uint32_t src_aux = (uint32_t)src; | |||
| #endif | |||
| uintptr_t src_aux = (uintptr_t)src; | |||
| jack_port_id_t mysrc = (jack_port_id_t)src_aux; | |||
| if (!CheckPort(mysrc)) { | |||
| jack_error("jack_port_tie called with a NULL src port"); | |||
| return -1; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t dst_aux = (uint64_t)dst; | |||
| #else | |||
| uint32_t dst_aux = (uint32_t)dst; | |||
| #endif | |||
| uintptr_t dst_aux = (uintptr_t)dst; | |||
| jack_port_id_t mydst = (jack_port_id_t)dst_aux; | |||
| if (!CheckPort(mydst)) { | |||
| jack_error("jack_port_tie called with a NULL dst port"); | |||
| @@ -522,11 +482,7 @@ EXPORT int jack_port_untie(jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_untie"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_untie called with an incorrect port %ld", myport); | |||
| @@ -542,11 +498,7 @@ EXPORT jack_nframes_t jack_port_get_latency(jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_get_latency"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_latency called with an incorrect port %ld", myport); | |||
| @@ -563,11 +515,7 @@ EXPORT void jack_port_set_latency(jack_port_t* port, jack_nframes_t frames) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_set_latency"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_set_latency called with an incorrect port %ld", myport); | |||
| @@ -585,11 +533,7 @@ EXPORT int jack_recompute_total_latency(jack_client_t* ext_client, jack_port_t* | |||
| #endif | |||
| JackClient* client = (JackClient*)ext_client; | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (client == NULL) { | |||
| jack_error("jack_recompute_total_latencies called with a NULL client"); | |||
| @@ -630,11 +574,7 @@ EXPORT int jack_port_set_name(jack_port_t* port, const char* name) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_set_name"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_set_name called with an incorrect port %ld", myport); | |||
| @@ -660,11 +600,7 @@ EXPORT int jack_port_set_alias(jack_port_t* port, const char* name) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_set_alias"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_set_alias called with an incorrect port %ld", myport); | |||
| @@ -683,11 +619,7 @@ EXPORT int jack_port_unset_alias(jack_port_t* port, const char* name) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_unset_alias"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_unset_alias called with an incorrect port %ld", myport); | |||
| @@ -706,11 +638,7 @@ EXPORT int jack_port_get_aliases(const jack_port_t* port, char* const aliases[2] | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_get_aliases"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_aliases called with an incorrect port %ld", myport); | |||
| @@ -726,11 +654,7 @@ EXPORT int jack_port_request_monitor(jack_port_t* port, int onoff) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_request_monitor"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_request_monitor called with an incorrect port %ld", myport); | |||
| @@ -769,11 +693,7 @@ EXPORT int jack_port_ensure_monitor(jack_port_t* port, int onoff) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_ensure_monitor"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_ensure_monitor called with an incorrect port %ld", myport); | |||
| @@ -789,11 +709,7 @@ EXPORT int jack_port_monitoring_input(jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_monitoring_input"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_monitoring_input called with an incorrect port %ld", myport); | |||
| @@ -1128,11 +1044,7 @@ EXPORT jack_port_t* jack_port_register(jack_client_t* ext_client, const char* po | |||
| jack_error("jack_port_register called with a NULL port name or a NULL port_type"); | |||
| return NULL; | |||
| } else { | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| return (jack_port_t *)((uint64_t)client->PortRegister(port_name, port_type, flags, buffer_size)); | |||
| #else | |||
| return (jack_port_t *)client->PortRegister(port_name, port_type, flags, buffer_size); | |||
| #endif | |||
| return (jack_port_t *)((uintptr_t)client->PortRegister(port_name, port_type, flags, buffer_size)); | |||
| } | |||
| } | |||
| @@ -1146,11 +1058,7 @@ EXPORT int jack_port_unregister(jack_client_t* ext_client, jack_port_t* port) | |||
| jack_error("jack_port_unregister called with a NULL client"); | |||
| return -1; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_unregister called with an incorrect port %ld", myport); | |||
| @@ -1169,11 +1077,7 @@ EXPORT int jack_port_is_mine(const jack_client_t* ext_client, const jack_port_t* | |||
| jack_error("jack_port_is_mine called with a NULL client"); | |||
| return -1; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_is_mine called with an incorrect port %ld", myport); | |||
| @@ -1187,11 +1091,7 @@ EXPORT const char** jack_port_get_connections(const jack_port_t* port) | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_port_get_connections"); | |||
| #endif | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_connections called with an incorrect port %ld", myport); | |||
| @@ -1215,11 +1115,7 @@ EXPORT const char** jack_port_get_all_connections(const jack_client_t* ext_clien | |||
| return NULL; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_all_connections called with an incorrect port %ld", myport); | |||
| @@ -1242,11 +1138,7 @@ EXPORT jack_nframes_t jack_port_get_total_latency(jack_client_t* ext_client, jac | |||
| return 0; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)port; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)port; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)port; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_get_total_latency called with an incorrect port %ld", myport); | |||
| @@ -1307,11 +1199,7 @@ EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src) | |||
| jack_error("jack_port_disconnect called with a NULL client"); | |||
| return -1; | |||
| } | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| uint64_t port_aux = (uint64_t)src; | |||
| #else | |||
| uint32_t port_aux = (uint32_t)src; | |||
| #endif | |||
| uintptr_t port_aux = (uintptr_t)src; | |||
| jack_port_id_t myport = (jack_port_id_t)port_aux; | |||
| if (!CheckPort(myport)) { | |||
| jack_error("jack_port_disconnect called with an incorrect port %ld", myport); | |||
| @@ -1383,11 +1271,7 @@ EXPORT jack_port_t* jack_port_by_name(jack_client_t* ext_client, const char* por | |||
| if (!manager) | |||
| return NULL; | |||
| int res = manager->GetPort(portname); // returns a port index at least > 1 | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| return (res == NO_PORT) ? NULL : (jack_port_t*)((uint64_t)res); | |||
| #else | |||
| return (res == NO_PORT) ? NULL : (jack_port_t*)res; | |||
| #endif | |||
| return (res == NO_PORT) ? NULL : (jack_port_t*)((uintptr_t)res); | |||
| } | |||
| } | |||
| @@ -1397,11 +1281,7 @@ EXPORT jack_port_t* jack_port_by_id(jack_client_t* ext_client, jack_port_id_t id | |||
| JackGlobals::CheckContext("jack_port_by_id"); | |||
| #endif | |||
| /* jack_port_t* type is actually the port index */ | |||
| #if defined(__x86_64__) || defined(__ppc64__) | |||
| return (jack_port_t*)((uint64_t)id); | |||
| #else | |||
| return (jack_port_t*)id; | |||
| #endif | |||
| return (jack_port_t*)((uintptr_t)id); | |||
| } | |||
| EXPORT int jack_engine_takeover_timebase(jack_client_t* ext_client) | |||
| @@ -59,30 +59,6 @@ | |||
| #define JACK_DEFAULT_SERVER_NAME "default" | |||
| #ifdef WIN32 | |||
| #define jack_server_dir "server" | |||
| #define jack_client_dir "client" | |||
| #define ADDON_DIR "jack" | |||
| #endif | |||
| #ifdef __APPLE__ | |||
| #define jack_server_dir "/tmp" | |||
| #define jack_client_dir "/tmp" | |||
| #define JACK_DEFAULT_DRIVER "coreaudio" | |||
| #endif | |||
| #ifdef __linux__ | |||
| #define jack_server_dir "/dev/shm" | |||
| #define jack_client_dir "/dev/shm" | |||
| #define JACK_DEFAULT_DRIVER "alsa" | |||
| #endif | |||
| #if defined(__sun__) || defined(sun) | |||
| #define jack_server_dir "/tmp" | |||
| #define jack_client_dir "/tmp" | |||
| #define JACK_DEFAULT_DRIVER "oss" | |||
| #endif | |||
| #define jack_server_entry "jackdmp_entry" | |||
| #define jack_client_entry "jack_client" | |||
| @@ -152,7 +152,7 @@ jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSL | |||
| fprintf (stderr, "Options for driver '%s':\n", desc->name); | |||
| jack_print_driver_options (desc, stderr); | |||
| exit (1); | |||
| return 1; | |||
| } | |||
| for (param_index = 0; param_index < desc->nparams; param_index++) { | |||
| @@ -36,7 +36,10 @@ extern "C" | |||
| { | |||
| #endif | |||
| EXPORT jack_client_t * jack_client_open_aux (const char *client_name, | |||
| jack_client_t * jack_client_new_aux (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status); | |||
| jack_client_t * jack_client_open_aux (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status, va_list ap); | |||
| EXPORT jack_client_t * jack_client_open (const char *client_name, | |||
| @@ -52,18 +55,18 @@ extern "C" | |||
| JackLibGlobals* JackLibGlobals::fGlobals = NULL; | |||
| int JackLibGlobals::fClientCount = 0; | |||
| EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap) | |||
| jack_client_t* jack_client_new_aux(const char* client_name, jack_options_t options, jack_status_t* status) | |||
| { | |||
| jack_varargs_t va; /* variable arguments */ | |||
| jack_status_t my_status; | |||
| JackClient* client; | |||
| if (client_name == NULL) { | |||
| jack_error("jack_client_open called with a NULL client_name"); | |||
| jack_error("jack_client_new called with a NULL client_name"); | |||
| return NULL; | |||
| } | |||
| jack_log("jack_client_open %s", client_name); | |||
| jack_log("jack_client_new %s", client_name); | |||
| if (status == NULL) /* no status from caller? */ | |||
| status = &my_status; /* use local status word */ | |||
| @@ -77,11 +80,60 @@ EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options | |||
| } | |||
| /* parse variable arguments */ | |||
| if (ap) { | |||
| jack_varargs_parse(options, ap, &va); | |||
| jack_varargs_init(&va); | |||
| JackLibGlobals::Init(); // jack library initialisation | |||
| if (try_start_server(&va, options, status)) { | |||
| jack_error("jack server is not running or cannot be started"); | |||
| JackLibGlobals::Destroy(); // jack library destruction | |||
| return 0; | |||
| } | |||
| if (JACK_DEBUG) { | |||
| client = new JackDebugClient(new JackLibClient(GetSynchroTable())); // Debug mode | |||
| } else { | |||
| jack_varargs_init(&va); | |||
| client = new JackLibClient(GetSynchroTable()); | |||
| } | |||
| int res = client->Open(va.server_name, client_name, options, status); | |||
| if (res < 0) { | |||
| delete client; | |||
| JackLibGlobals::Destroy(); // jack library destruction | |||
| int my_status1 = (JackFailure | JackServerError); | |||
| *status = (jack_status_t)my_status1; | |||
| return NULL; | |||
| } else { | |||
| return (jack_client_t*)client; | |||
| } | |||
| } | |||
| jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap) | |||
| { | |||
| jack_varargs_t va; /* variable arguments */ | |||
| jack_status_t my_status; | |||
| JackClient* client; | |||
| if (client_name == NULL) { | |||
| jack_error("jack_client_open called with a NULL client_name"); | |||
| return NULL; | |||
| } | |||
| jack_log("jack_client_open %s", client_name); | |||
| if (status == NULL) /* no status from caller? */ | |||
| status = &my_status; /* use local status word */ | |||
| *status = (jack_status_t)0; | |||
| /* validate parameters */ | |||
| if ((options & ~JackOpenOptions)) { | |||
| int my_status1 = *status | (JackFailure | JackInvalidOption); | |||
| *status = (jack_status_t)my_status1; | |||
| return NULL; | |||
| } | |||
| /* parse variable arguments */ | |||
| jack_varargs_parse(options, ap, &va); | |||
| JackLibGlobals::Init(); // jack library initialisation | |||
| @@ -111,10 +163,10 @@ EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options | |||
| EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options_t options, jack_status_t* status, ...) | |||
| { | |||
| try { | |||
| #ifdef __CLIENTDEBUG__ | |||
| JackGlobals::CheckContext("jack_client_open"); | |||
| #endif | |||
| try { | |||
| assert(JackGlobals::fOpenMutex); | |||
| JackGlobals::fOpenMutex->Lock(); | |||
| va_list ap; | |||
| @@ -33,7 +33,10 @@ extern "C" | |||
| { | |||
| #endif | |||
| EXPORT jack_client_t * jack_client_open_aux (const char *client_name, | |||
| jack_client_t * jack_client_new_aux (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status); | |||
| jack_client_t * jack_client_open_aux (const char *client_name, | |||
| jack_options_t options, | |||
| jack_status_t *status, va_list ap); | |||
| EXPORT jack_client_t * jack_client_open (const char *client_name, | |||
| @@ -48,18 +51,18 @@ extern "C" | |||
| using namespace Jack; | |||
| EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap) | |||
| jack_client_t* jack_client_new_aux(const char* client_name, jack_options_t options, jack_status_t* status) | |||
| { | |||
| jack_varargs_t va; /* variable arguments */ | |||
| jack_status_t my_status; | |||
| JackClient* client; | |||
| if (client_name == NULL) { | |||
| jack_error("jack_client_open called with a NULL client_name"); | |||
| jack_error("jack_client_new called with a NULL client_name"); | |||
| return NULL; | |||
| } | |||
| jack_log("jack_client_open %s", client_name); | |||
| jack_log("jack_client_new %s", client_name); | |||
| if (status == NULL) /* no status from caller? */ | |||
| status = &my_status; /* use local status word */ | |||
| @@ -73,12 +76,59 @@ EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options | |||
| } | |||
| /* parse variable arguments */ | |||
| if (ap) { | |||
| jack_varargs_parse(options, ap, &va); | |||
| jack_varargs_init(&va); | |||
| if (!JackServerGlobals::Init()) { // jack server initialisation | |||
| int my_status1 = (JackFailure | JackServerError); | |||
| *status = (jack_status_t)my_status1; | |||
| return NULL; | |||
| } | |||
| if (JACK_DEBUG) { | |||
| client = new JackDebugClient(new JackInternalClient(JackServerGlobals::fInstance, GetSynchroTable())); // Debug mode | |||
| } else { | |||
| jack_varargs_init(&va); | |||
| client = new JackInternalClient(JackServerGlobals::fInstance, GetSynchroTable()); | |||
| } | |||
| int res = client->Open(va.server_name, client_name, options, status); | |||
| if (res < 0) { | |||
| delete client; | |||
| JackServerGlobals::Destroy(); // jack server destruction | |||
| int my_status1 = (JackFailure | JackServerError); | |||
| *status = (jack_status_t)my_status1; | |||
| return NULL; | |||
| } else { | |||
| return (jack_client_t*)client; | |||
| } | |||
| } | |||
| jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap) | |||
| { | |||
| jack_varargs_t va; /* variable arguments */ | |||
| jack_status_t my_status; | |||
| JackClient* client; | |||
| if (client_name == NULL) { | |||
| jack_error("jack_client_open called with a NULL client_name"); | |||
| return NULL; | |||
| } | |||
| jack_log("jack_client_open %s", client_name); | |||
| if (status == NULL) /* no status from caller? */ | |||
| status = &my_status; /* use local status word */ | |||
| *status = (jack_status_t)0; | |||
| /* validate parameters */ | |||
| if ((options & ~JackOpenOptions)) { | |||
| int my_status1 = *status | (JackFailure | JackInvalidOption); | |||
| *status = (jack_status_t)my_status1; | |||
| return NULL; | |||
| } | |||
| /* parse variable arguments */ | |||
| jack_varargs_parse(options, ap, &va); | |||
| if (!JackServerGlobals::Init()) { // jack server initialisation | |||
| int my_status1 = (JackFailure | JackServerError); | |||
| *status = (jack_status_t)my_status1; | |||
| @@ -732,7 +732,7 @@ int jack_port_connected_to (const jack_port_t *port, | |||
| * @return a null-terminated array of full port names to which the @a | |||
| * port is connected. If none, returns NULL. | |||
| * | |||
| * The caller is responsible for calling free(3) on any non-NULL | |||
| * The caller is responsible for calling jack_free(3) on any non-NULL | |||
| * returned value. | |||
| * | |||
| * @param port locally owned jack_port_t pointer. | |||
| @@ -745,7 +745,7 @@ const char ** jack_port_get_connections (const jack_port_t *port) JACK_OPTIONAL_ | |||
| * @return a null-terminated array of full port names to which the @a | |||
| * port is connected. If none, returns NULL. | |||
| * | |||
| * The caller is responsible for calling free(3) on any non-NULL | |||
| * The caller is responsible for calling jack_free(3) on any non-NULL | |||
| * returned value. | |||
| * | |||
| * This differs from jack_port_get_connections() in two important | |||
| @@ -996,7 +996,7 @@ int jack_port_type_size(void) JACK_OPTIONAL_WEAK_EXPORT; | |||
| * If zero, no selection based on flags will be carried out. | |||
| * | |||
| * @return a NULL-terminated array of ports that match the specified | |||
| * arguments. The caller is responsible for calling free(3) any | |||
| * arguments. The caller is responsible for calling jack_free(3) any | |||
| * non-NULL returned value. | |||
| * | |||
| * @see jack_port_name_size(), jack_port_type_size() | |||
| @@ -99,7 +99,13 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { | |||
| jack_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]); | |||
| jack_error("info.si_addr = %p", info->si_addr); | |||
| for(i = 0; i < NGREG; i++) | |||
| jack_error("reg[%02d] = 0x" REGFORMAT, i, ucontext->uc_mcontext.gregs[i]); | |||
| jack_error("reg[%02d] = 0x" REGFORMAT, i, | |||
| #if defined(__powerpc__) | |||
| ucontext->uc_mcontext.uc_regs[i] | |||
| #else | |||
| ucontext->uc_mcontext.gregs[i] | |||
| #endif | |||
| ); | |||
| #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64) | |||
| # if defined(SIGSEGV_STACK_IA64) | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| Copyright (C) 2002 Jeremy Hall | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| @@ -29,9 +29,16 @@ | |||
| jack_port_t *input_port; | |||
| jack_port_t *output_port; | |||
| int connecting, disconnecting; | |||
| int done = 0; | |||
| #define TRUE 1 | |||
| #define FALSE 0 | |||
| void port_connect_callback(jack_port_id_t a, jack_port_id_t b, int connect, void* arg) | |||
| { | |||
| done = 1; | |||
| } | |||
| int | |||
| main (int argc, char *argv[]) | |||
| { | |||
| @@ -43,7 +50,7 @@ main (int argc, char *argv[]) | |||
| } else { | |||
| my_name ++; | |||
| } | |||
| printf("name %s\n", my_name); | |||
| if (strstr(my_name, "jack_disconnect")) { | |||
| @@ -70,7 +77,9 @@ main (int argc, char *argv[]) | |||
| return 1; | |||
| } | |||
| /* display the current sample rate. once the client is activated | |||
| jack_set_port_connect_callback(client, port_connect_callback, NULL); | |||
| /* display the current sample rate. once the client is activated | |||
| (see below), you should rely on your own sample rate | |||
| callback (see above) for this value. | |||
| */ | |||
| @@ -85,7 +94,7 @@ main (int argc, char *argv[]) | |||
| fprintf (stderr, "ERROR %s not a valid port\n", argv[2]); | |||
| goto error; | |||
| } | |||
| /* tell the JACK server that we are ready to roll */ | |||
| if (jack_activate (client)) { | |||
| @@ -109,12 +118,22 @@ main (int argc, char *argv[]) | |||
| goto error; | |||
| } | |||
| } | |||
| // Wait for connection/disconnection to be effective | |||
| while(!done) { | |||
| #ifdef WIN32 | |||
| Sleep(10); | |||
| #else | |||
| usleep(10000); | |||
| #endif | |||
| } | |||
| jack_deactivate (client); | |||
| jack_client_close (client); | |||
| return 0; | |||
| error: | |||
| if (client) | |||
| if (client) | |||
| jack_client_close (client); | |||
| return 1; | |||
| } | |||
| @@ -503,11 +503,12 @@ init_sockaddr_in (struct sockaddr_in *name , const char *hostname , uint16_t por | |||
| if (hostinfo == NULL) { | |||
| fprintf (stderr, "init_sockaddr_in: unknown host: %s.\n", hostname); | |||
| fflush( stderr ); | |||
| return; | |||
| } | |||
| #ifdef WIN32 | |||
| name->sin_addr.s_addr = inet_addr( hostname ); | |||
| name->sin_addr.s_addr = inet_addr( hostname ); | |||
| #else | |||
| name->sin_addr = *(struct in_addr *) hostinfo->h_addr ; | |||
| name->sin_addr = *(struct in_addr *) hostinfo->h_addr ; | |||
| #endif | |||
| } | |||
| else | |||
| @@ -622,15 +623,15 @@ main (int argc, char *argv[]) | |||
| case 'b': | |||
| bitdepth = atoi (optarg); | |||
| break; | |||
| case 'c': | |||
| #if HAVE_CELT | |||
| bitdepth = 1000; | |||
| case 'c': | |||
| #if HAVE_CELT | |||
| bitdepth = 1000; | |||
| factor = atoi (optarg); | |||
| #else | |||
| #else | |||
| printf( "not built with celt supprt\n" ); | |||
| exit(10); | |||
| #endif | |||
| break; | |||
| #endif | |||
| break; | |||
| case 'm': | |||
| mtu = atoi (optarg); | |||
| break; | |||
| @@ -677,18 +678,17 @@ main (int argc, char *argv[]) | |||
| } | |||
| init_sockaddr_in ((struct sockaddr_in *) &destaddr, peer_ip, peer_port); | |||
| if(bind_port) { | |||
| if (bind_port) { | |||
| init_sockaddr_in ((struct sockaddr_in *) &bindaddr, NULL, bind_port); | |||
| if( bind (outsockfd, &bindaddr, sizeof (bindaddr)) ) { | |||
| fprintf (stderr, "bind failure\n" ); | |||
| } | |||
| fprintf (stderr, "bind failure\n" ); | |||
| } | |||
| } | |||
| if(reply_port) | |||
| { | |||
| if (reply_port) { | |||
| init_sockaddr_in ((struct sockaddr_in *) &bindaddr, NULL, reply_port); | |||
| if( bind (insockfd, &bindaddr, sizeof (bindaddr)) ) { | |||
| fprintf (stderr, "bind failure\n" ); | |||
| } | |||
| fprintf (stderr, "bind failure\n" ); | |||
| } | |||
| } | |||
| /* try to become a client of the JACK server */ | |||
| @@ -59,7 +59,7 @@ def configure(conf): | |||
| conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.is_defined('HAVE_SNDFILE') | |||
| conf.env['BUILD_EXAMPLE_ALSA_IO'] = conf.is_defined('HAVE_SAMPLERATE') | |||
| conf.env['BUILD_EXAMPLE_ALSA_IO'] = conf.is_defined('HAVE_SAMPLERATE') and conf.is_defined('HAVE_ALSA') | |||
| def build(bld): | |||
| if bld.env['IS_LINUX']: | |||
| @@ -42,9 +42,9 @@ static inline int CAS(register UInt32 value, register UInt32 newvalue, register | |||
| "1: \n" | |||
| " li %0, 0 \n" | |||
| "2: \n" | |||
| : "=r" (result) | |||
| : "r" (addr), "r" (value), "r" (newvalue), "r" (tmp) | |||
| ); | |||
| : "=r" (result) | |||
| : "r" (addr), "r" (value), "r" (newvalue), "r" (tmp) | |||
| ); | |||
| return result; | |||
| } | |||
| @@ -61,13 +61,23 @@ static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* ad | |||
| "# CAS \n\t" | |||
| LOCK "cmpxchg %2, (%1) \n\t" | |||
| "sete %0 \n\t" | |||
| : "=a" (ret) | |||
| : "c" (addr), "d" (newvalue), "a" (value) | |||
| ); | |||
| : "=a" (ret) | |||
| : "c" (addr), "d" (newvalue), "a" (value) | |||
| ); | |||
| return ret; | |||
| } | |||
| #endif | |||
| #if !defined(__i386__) && !defined(__x86_64__) && !defined(__PPC__) | |||
| #warning using builtin gcc (version > 4.1) atomic | |||
| static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr) | |||
| { | |||
| return __sync_bool_compare_and_swap (&addr, value, newvalue); | |||
| } | |||
| #endif | |||
| #endif | |||
| @@ -20,6 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| #ifndef __JackPlatformPlug_linux__ | |||
| #define __JackPlatformPlug_linux__ | |||
| #define jack_server_dir "/dev/shm" | |||
| #define jack_client_dir "/dev/shm" | |||
| #define JACK_DEFAULT_DRIVER "alsa" | |||
| namespace Jack | |||
| { | |||
| struct JackRequest; | |||
| @@ -260,7 +260,7 @@ JackAlsaDriver::alsa_driver_hw_specific (alsa_driver_t *driver, int hw_monitorin | |||
| return 0; | |||
| } | |||
| void | |||
| int | |||
| JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
| { | |||
| if (driver->playback_handle) { | |||
| @@ -340,7 +340,7 @@ JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
| default: | |||
| jack_error ("impossible sample width (%d) discovered!", | |||
| driver->playback_sample_bytes); | |||
| exit (1); | |||
| return -1; | |||
| } | |||
| } | |||
| } | |||
| @@ -364,6 +364,8 @@ JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) | |||
| break; | |||
| } | |||
| } | |||
| return 0; | |||
| } | |||
| int | |||
| @@ -779,7 +781,7 @@ JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver, | |||
| default: | |||
| jack_error ("programming error: unhandled format " | |||
| "type for playback"); | |||
| exit (1); | |||
| return -1; | |||
| } | |||
| } | |||
| @@ -797,7 +799,7 @@ JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver, | |||
| default: | |||
| jack_error ("programming error: unhandled format " | |||
| "type for capture"); | |||
| exit (1); | |||
| return -1; | |||
| } | |||
| } | |||
| @@ -836,7 +838,8 @@ JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver, | |||
| driver->user_nchannels = driver->playback_nchannels; | |||
| } | |||
| alsa_driver_setup_io_function_pointers (driver); | |||
| if (alsa_driver_setup_io_function_pointers (driver) != 0) | |||
| return -1; | |||
| /* Allocate and initialize structures that rely on the | |||
| channels counts. | |||
| @@ -53,7 +53,7 @@ class JackAlsaDriver : public JackAudioDriver | |||
| int alsa_driver_generic_hardware(alsa_driver_t *driver); | |||
| int alsa_driver_hw_specific(alsa_driver_t *driver, int hw_monitoring, | |||
| int hw_metering); | |||
| void alsa_driver_setup_io_function_pointers (alsa_driver_t *driver); | |||
| int alsa_driver_setup_io_function_pointers (alsa_driver_t *driver); | |||
| int alsa_driver_configure_stream(alsa_driver_t *driver, char *device_name, | |||
| const char *stream_name, | |||
| snd_pcm_t *handle, | |||
| @@ -103,6 +103,20 @@ static inline cycles_t get_cycles (void) | |||
| #endif | |||
| /* everything else but x86, amd64 or ppc */ | |||
| #if !defined (__PPC__) && !defined (__x86_64__) && !defined (__i386__) | |||
| #warning No suitable get_cycles() implementation. Returning 0 instead | |||
| typedef unsigned long long cycles_t; | |||
| static inline cycles_t get_cycles(void) | |||
| { | |||
| return 0; | |||
| } | |||
| #endif | |||
| #endif | |||
| #endif /* __jack_cycles_h__ */ | |||
| @@ -429,7 +429,7 @@ int JackFFADODriver::Attach() | |||
| driver->capture_channels[chn].stream_type = ffado_streaming_get_capture_stream_type(driver->dev, chn); | |||
| if (driver->capture_channels[chn].stream_type == ffado_stream_type_audio) { | |||
| snprintf(buf, sizeof(buf) - 1, "%s:%s", fClientControl.fName, portname); | |||
| snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_in", portname); | |||
| printMessage ("Registering audio capture port %s", buf); | |||
| if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, buf, | |||
| JACK_DEFAULT_AUDIO_TYPE, | |||
| @@ -455,7 +455,7 @@ int JackFFADODriver::Attach() | |||
| fCaptureChannels++; | |||
| } else if (driver->capture_channels[chn].stream_type == ffado_stream_type_midi) { | |||
| snprintf(buf, sizeof(buf) - 1, "%s:%s", fClientControl.fName, portname); | |||
| snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_in", portname); | |||
| printMessage ("Registering midi capture port %s", buf); | |||
| if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, buf, | |||
| JACK_DEFAULT_MIDI_TYPE, | |||
| @@ -502,7 +502,7 @@ int JackFFADODriver::Attach() | |||
| driver->playback_channels[chn].stream_type = ffado_streaming_get_playback_stream_type(driver->dev, chn); | |||
| if (driver->playback_channels[chn].stream_type == ffado_stream_type_audio) { | |||
| snprintf(buf, sizeof(buf) - 1, "%s:%s", fClientControl.fName, portname); | |||
| snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_out", portname); | |||
| printMessage ("Registering audio playback port %s", buf); | |||
| if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, buf, | |||
| JACK_DEFAULT_AUDIO_TYPE, | |||
| @@ -530,7 +530,7 @@ int JackFFADODriver::Attach() | |||
| 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:%s", fClientControl.fName, portname); | |||
| snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_out", portname); | |||
| printMessage ("Registering midi playback port %s", buf); | |||
| if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, buf, | |||
| JACK_DEFAULT_MIDI_TYPE, | |||
| @@ -41,10 +41,10 @@ static inline int CAS(register UInt32 value, register UInt32 newvalue, register | |||
| "1: \n" | |||
| " li %0, 0 \n" | |||
| "2: \n" | |||
| : "=r" (result) | |||
| : "r" (addr), "r" (value), "r" (newvalue) | |||
| : "r0" | |||
| ); | |||
| : "=r" (result) | |||
| : "r" (addr), "r" (value), "r" (newvalue) | |||
| : "r0" | |||
| ); | |||
| return result; | |||
| } | |||
| @@ -61,9 +61,9 @@ static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* ad | |||
| "# CAS \n\t" | |||
| LOCK "cmpxchg %2, (%1) \n\t" | |||
| "sete %0 \n\t" | |||
| : "=a" (ret) | |||
| : "c" (addr), "d" (newvalue), "a" (value) | |||
| ); | |||
| : "=a" (ret) | |||
| : "c" (addr), "d" (newvalue), "a" (value) | |||
| ); | |||
| return ret; | |||
| } | |||
| @@ -22,6 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| #include <TargetConditionals.h> | |||
| #define jack_server_dir "/tmp" | |||
| #define jack_client_dir "/tmp" | |||
| #define JACK_DEFAULT_DRIVER "coreaudio" | |||
| namespace Jack | |||
| { | |||
| class JackPosixMutex; | |||
| @@ -7950,16 +7950,17 @@ | |||
| LIBRARY_STYLE = DYNAMIC; | |||
| MACH_O_TYPE = mh_dylib; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA"; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT_API_0_7", | |||
| "-DHAVE_CELT", | |||
| "-DMACH_RPC_MACH_SEMA", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackservermp, | |||
| "-framework", | |||
| CoreAudio, | |||
| "-framework", | |||
| CoreServices, | |||
| "-framework", | |||
| AudioUnit, | |||
| ); | |||
| OTHER_REZFLAGS = ""; | |||
| PREBINDING = NO; | |||
| @@ -8000,8 +8001,13 @@ | |||
| MACH_O_TYPE = mh_dylib; | |||
| MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA"; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT_API_0_7", | |||
| "-DHAVE_CELT", | |||
| "-DMACH_RPC_MACH_SEMA", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackservermp, | |||
| "-framework", | |||
| @@ -8037,7 +8043,11 @@ | |||
| LIBRARY_STYLE = DYNAMIC; | |||
| MACH_O_TYPE = mh_dylib; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA"; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT_API_0_7", | |||
| "-DHAVE_CELT", | |||
| "-DMACH_RPC_MACH_SEMA", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| "-framework", | |||
| Jackdmp, | |||
| @@ -8087,17 +8097,19 @@ | |||
| INSTALL_PATH = /usr/local/lib; | |||
| LIBRARY_STYLE = DYNAMIC; | |||
| MACH_O_TYPE = mh_dylib; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA"; | |||
| OTHER_CFLAGS = "-DJACK_32_64"; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DJACK_32_64", | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "-DMACH_RPC_MACH_SEMA", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackservermp, | |||
| "-framework", | |||
| CoreAudio, | |||
| "-framework", | |||
| CoreServices, | |||
| "-framework", | |||
| AudioUnit, | |||
| ); | |||
| OTHER_REZFLAGS = ""; | |||
| PREBINDING = NO; | |||
| @@ -8137,10 +8149,13 @@ | |||
| MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
| OTHER_CFLAGS = "-DJACK_32_64"; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "-DMACH_RPC_MACH_SEMA", | |||
| "-DJACK_32_64", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackservermp, | |||
| "-framework", | |||
| @@ -8216,8 +8231,17 @@ | |||
| GCC_GENERATE_DEBUGGING_SYMBOLS = YES; | |||
| GCC_OPTIMIZATION_LEVEL = 0; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| ); | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "$(OTHER_CFLAGS)", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackmp, | |||
| "-framework", | |||
| @@ -8249,8 +8273,17 @@ | |||
| GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| ); | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "$(OTHER_CFLAGS)", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackmp, | |||
| "-framework", | |||
| @@ -8280,6 +8313,11 @@ | |||
| FRAMEWORK_SEARCH_PATHS = ""; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "$(OTHER_CFLAGS)", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| "-framework", | |||
| Jackmp, | |||
| @@ -8311,8 +8349,13 @@ | |||
| GCC_GENERATE_DEBUGGING_SYMBOLS = YES; | |||
| GCC_OPTIMIZATION_LEVEL = 0; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| ); | |||
| OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackmp, | |||
| "-framework", | |||
| @@ -8342,8 +8385,13 @@ | |||
| GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| ); | |||
| OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; | |||
| OTHER_LDFLAGS = ( | |||
| libcelt.a, | |||
| "-framework", | |||
| Jackmp, | |||
| "-framework", | |||
| @@ -8372,7 +8420,15 @@ | |||
| ); | |||
| FRAMEWORK_SEARCH_PATHS = ""; | |||
| HEADER_SEARCH_PATHS = ../common; | |||
| OTHER_CFLAGS = ""; | |||
| OTHER_CFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| ); | |||
| OTHER_CPLUSPLUSFLAGS = ( | |||
| "-DHAVE_CELT", | |||
| "-DHAVE_CELT_API_0_7", | |||
| "$(OTHER_CFLAGS)", | |||
| ); | |||
| OTHER_LDFLAGS = ( | |||
| "-framework", | |||
| Jackmp, | |||
| @@ -40,11 +40,13 @@ static MIDITimeStamp MIDIGetCurrentHostTime() | |||
| void JackCoreMidiDriver::ReadProcAux(const MIDIPacketList *pktlist, jack_ringbuffer_t* ringbuffer) | |||
| { | |||
| // Write the number of packets | |||
| size_t size = jack_ringbuffer_write(ringbuffer, (char*)&pktlist->numPackets, sizeof(UInt32)); | |||
| if (size != sizeof(UInt32)) { | |||
| size_t size = jack_ringbuffer_write_space(ringbuffer); | |||
| if (size < sizeof(UInt32)) { | |||
| jack_error("ReadProc : ring buffer is full, skip events..."); | |||
| return; | |||
| } | |||
| } | |||
| jack_ringbuffer_write(ringbuffer, (char*)&pktlist->numPackets, sizeof(UInt32)); | |||
| for (unsigned int i = 0; i < pktlist->numPackets; ++i) { | |||
| @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| #include "JackFifo.h" | |||
| #include "JackTools.h" | |||
| #include "JackError.h" | |||
| #include "JackConstants.h" | |||
| #include "JackPlatformPlug.h" | |||
| #include <sys/types.h> | |||
| #include <sys/stat.h> | |||
| #include <unistd.h> | |||
| @@ -20,6 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| #ifndef __JackPlatformPlug_sun__ | |||
| #define __JackPlatformPlug_sun__ | |||
| #define jack_server_dir "/tmp" | |||
| #define jack_client_dir "/tmp" | |||
| #define JACK_DEFAULT_DRIVER "oss" | |||
| namespace Jack | |||
| { | |||
| struct JackRequest; | |||
| @@ -21,6 +21,10 @@ | |||
| #ifndef __JackPlatformPlug_WIN32__ | |||
| #define __JackPlatformPlug_WIN32__ | |||
| #define jack_server_dir "server" | |||
| #define jack_client_dir "client" | |||
| #define ADDON_DIR "jack" | |||
| namespace Jack | |||
| { | |||
| struct JackRequest; | |||