summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/JackAPI.cpp1114
-rw-r--r--common/JackActivationCount.cpp43
-rw-r--r--common/JackActivationCount.h83
-rw-r--r--common/JackAtomic.h197
-rw-r--r--common/JackAtomicArrayState.h235
-rw-r--r--common/JackAtomicState.h240
-rw-r--r--common/JackAudioDriver.cpp229
-rw-r--r--common/JackAudioDriver.h88
-rw-r--r--common/JackChannel.h210
-rw-r--r--common/JackChannelTransaction.h48
-rw-r--r--common/JackClient.cpp767
-rw-r--r--common/JackClient.h162
-rw-r--r--common/JackClientControl.h76
-rw-r--r--common/JackClientInterface.h56
-rw-r--r--common/JackConnectionManager.cpp452
-rw-r--r--common/JackConnectionManager.h468
-rw-r--r--common/JackConstants.h64
-rw-r--r--common/JackDebugClient.cpp457
-rw-r--r--common/JackDebugClient.h127
-rw-r--r--common/JackDriver.cpp204
-rw-r--r--common/JackDriver.h215
-rw-r--r--common/JackDriverLoader.cpp498
-rw-r--r--common/JackDriverLoader.h66
-rw-r--r--common/JackDummyDriver.cpp224
-rw-r--r--common/JackDummyDriver.h68
-rw-r--r--common/JackEngine.cpp644
-rw-r--r--common/JackEngine.h119
-rw-r--r--common/JackEngineControl.h58
-rw-r--r--common/JackEngineTiming.cpp229
-rw-r--r--common/JackEngineTiming.h105
-rw-r--r--common/JackError.c48
-rw-r--r--common/JackError.h48
-rw-r--r--common/JackExports.h30
-rw-r--r--common/JackExternalClient.cpp83
-rw-r--r--common/JackExternalClient.h60
-rwxr-xr-xcommon/JackFifo.cpp209
-rwxr-xr-xcommon/JackFifo.h73
-rw-r--r--common/JackFrameTimer.cpp109
-rw-r--r--common/JackFrameTimer.h81
-rw-r--r--common/JackFreewheelDriver.cpp47
-rw-r--r--common/JackFreewheelDriver.h54
-rw-r--r--common/JackGlobals.cpp28
-rw-r--r--common/JackGlobals.h282
-rw-r--r--common/JackGlobalsClient.cpp460
-rw-r--r--common/JackGlobalsServer.cpp460
-rw-r--r--common/JackGraphManager.cpp777
-rw-r--r--common/JackGraphManager.h121
-rw-r--r--common/JackInternalClient.cpp105
-rw-r--r--common/JackInternalClient.h60
-rw-r--r--common/JackInternalClientChannel.h116
-rw-r--r--common/JackLibAPI.cpp133
-rw-r--r--common/JackLibClient.cpp162
-rw-r--r--common/JackLibClient.h60
-rw-r--r--common/JackLibGlobals.h97
-rw-r--r--common/JackLoopbackDriver.cpp209
-rw-r--r--common/JackLoopbackDriver.h63
-rw-r--r--common/JackPort.cpp229
-rw-r--r--common/JackPort.h98
-rw-r--r--common/JackPosixSemaphore.cpp205
-rw-r--r--common/JackPosixSemaphore.h71
-rw-r--r--common/JackPosixThread.cpp209
-rw-r--r--common/JackPosixThread.h73
-rw-r--r--common/JackProcessSync.h180
-rw-r--r--common/JackPthreadCond.cpp207
-rw-r--r--common/JackPthreadCond.h133
-rw-r--r--common/JackRequest.h612
-rw-r--r--common/JackServer.cpp339
-rw-r--r--common/JackServer.h96
-rw-r--r--common/JackServerAPI.cpp174
-rw-r--r--common/JackServerGlobals.cpp389
-rw-r--r--common/JackServerGlobals.h58
-rw-r--r--common/JackShmMem.cpp92
-rw-r--r--common/JackShmMem.h308
-rw-r--r--common/JackSocket.cpp312
-rw-r--r--common/JackSocket.h104
-rw-r--r--common/JackSocketClientChannel.cpp264
-rw-r--r--common/JackSocketClientChannel.h89
-rw-r--r--common/JackSocketNotifyChannel.cpp79
-rw-r--r--common/JackSocketNotifyChannel.h56
-rw-r--r--common/JackSocketServerChannel.cpp375
-rw-r--r--common/JackSocketServerChannel.h70
-rw-r--r--common/JackSocketServerNotifyChannel.cpp59
-rw-r--r--common/JackSocketServerNotifyChannel.h55
-rw-r--r--common/JackSyncInterface.h51
-rw-r--r--common/JackSynchro.h102
-rw-r--r--common/JackThread.h97
-rw-r--r--common/JackThreadedDriver.cpp89
-rw-r--r--common/JackThreadedDriver.h154
-rw-r--r--common/JackTime.c121
-rw-r--r--common/JackTime.h111
-rw-r--r--common/JackTransportEngine.cpp259
-rw-r--r--common/JackTransportEngine.h137
-rw-r--r--common/JackTypes.h36
-rw-r--r--common/Jackdmp.cpp569
-rw-r--r--common/cycles.h94
-rw-r--r--common/driver_interface.h97
-rw-r--r--common/driver_parse.h33
-rw-r--r--common/intclient.h132
-rw-r--r--common/jack.h805
-rw-r--r--common/jslist.h287
-rw-r--r--common/patest_sine.c151
-rw-r--r--common/ringbuffer.c359
-rw-r--r--common/ringbuffer.h235
-rw-r--r--common/shm.c1182
-rw-r--r--common/shm.h156
-rw-r--r--common/statistics.h59
-rw-r--r--common/thread.h92
-rw-r--r--common/transport.h430
-rw-r--r--common/transport_types.h223
-rw-r--r--common/types.h395
-rw-r--r--common/varargs.h71
-rw-r--r--example-clients/connect.c141
-rw-r--r--example-clients/echo.cpp527
-rw-r--r--example-clients/external_metro.cpp154
-rw-r--r--example-clients/external_metro.h69
-rw-r--r--example-clients/freeverb.cpp898
-rw-r--r--example-clients/freewheel.c86
-rw-r--r--example-clients/internal_metro.cpp123
-rw-r--r--example-clients/internal_metro.h69
-rw-r--r--example-clients/jdelay.cpp260
-rw-r--r--example-clients/lsp.c143
-rw-r--r--example-clients/metro.c296
-rw-r--r--example-clients/showtime.c101
-rw-r--r--example-clients/simple_client.c260
-rw-r--r--example-clients/transport.c460
-rw-r--r--example-clients/zombie.c89
-rw-r--r--linux/Makefile123
-rw-r--r--linux/alsa/JackAlsaDriver.cpp2675
-rw-r--r--linux/alsa/JackAlsaDriver.h161
-rw-r--r--linux/alsa/alsa_driver.h248
-rw-r--r--linux/alsa/bitset.h132
-rw-r--r--linux/alsa/driver.h311
-rw-r--r--linux/alsa/generic.h37
-rw-r--r--linux/alsa/generic_hw.c56
-rw-r--r--linux/alsa/hammerfall.c311
-rw-r--r--linux/alsa/hammerfall.h48
-rw-r--r--linux/alsa/hardware.h80
-rw-r--r--linux/alsa/hdsp.c232
-rw-r--r--linux/alsa/hdsp.h45
-rw-r--r--linux/alsa/ice1712.c161
-rw-r--r--linux/alsa/ice1712.h80
-rw-r--r--linux/alsa/jslist.h286
-rw-r--r--linux/alsa/memops.c651
-rw-r--r--linux/alsa/memops.h106
-rw-r--r--linux/alsa/usx2y.c708
-rw-r--r--linux/alsa/usx2y.h67
-rw-r--r--macosx/Jack-Info.plist24
-rw-r--r--macosx/JackCoreAudioDriver.cpp1187
-rw-r--r--macosx/JackCoreAudioDriver.h125
-rw-r--r--macosx/JackMacEngineRPC.cpp185
-rw-r--r--macosx/JackMacLibClientRPC.cpp47
-rw-r--r--macosx/JackMachClientChannel.cpp237
-rw-r--r--macosx/JackMachClientChannel.h85
-rw-r--r--macosx/JackMachNotifyChannel.cpp64
-rw-r--r--macosx/JackMachNotifyChannel.h56
-rw-r--r--macosx/JackMachPort.cpp279
-rw-r--r--macosx/JackMachPort.h88
-rw-r--r--macosx/JackMachSemaphore.cpp196
-rw-r--r--macosx/JackMachSemaphore.h75
-rw-r--r--macosx/JackMachServerChannel.cpp152
-rw-r--r--macosx/JackMachServerChannel.h73
-rw-r--r--macosx/JackMachServerNotifyChannel.cpp54
-rw-r--r--macosx/JackMachServerNotifyChannel.h56
-rw-r--r--macosx/JackMachThread.cpp193
-rw-r--r--macosx/JackMachThread.h121
-rw-r--r--macosx/Jackdmp.xcode/project.pbxproj5103
-rw-r--r--macosx/Jackdmp.xcodeproj/letz.mode11334
-rw-r--r--macosx/Jackdmp.xcodeproj/letz.pbxuser2032
-rw-r--r--macosx/Jackdmp.xcodeproj/project.pbxproj7420
-rw-r--r--macosx/RPC/JackRPCClient.defs43
-rw-r--r--macosx/RPC/JackRPCClient.h186
-rw-r--r--macosx/RPC/JackRPCClientServer.c1045
-rw-r--r--macosx/RPC/JackRPCClientUser.c448
-rw-r--r--macosx/RPC/JackRPCEngine.defs126
-rw-r--r--macosx/RPC/JackRPCEngine.h750
-rw-r--r--macosx/RPC/JackRPCEngineServer.c4418
-rw-r--r--macosx/RPC/JackRPCEngineUser.c4115
-rw-r--r--macosx/RPC/Jackdefs.h4
-rw-r--r--tests/jack_test.cpp1812
-rw-r--r--tests/testAtomic.cpp258
-rw-r--r--tests/testSem.cpp211
-rw-r--r--tests/testSynchroClient.cpp149
-rw-r--r--tests/testSynchroServer.cpp205
-rw-r--r--tests/testSynchroServerClient.cpp268
-rw-r--r--tests/testThread.cpp92
-rw-r--r--windows/JackASIODriver.cpp758
-rw-r--r--windows/JackASIODriver.h92
-rw-r--r--windows/JackPortAudioDriver.cpp696
-rw-r--r--windows/JackPortAudioDriver.h91
-rw-r--r--windows/JackWinEvent.cpp153
-rw-r--r--windows/JackWinEvent.h71
-rwxr-xr-xwindows/JackWinNamedPipe.cpp373
-rwxr-xr-xwindows/JackWinNamedPipe.h159
-rw-r--r--windows/JackWinNamedPipeClientChannel.cpp258
-rw-r--r--windows/JackWinNamedPipeClientChannel.h88
-rw-r--r--windows/JackWinNamedPipeNotifyChannel.cpp79
-rw-r--r--windows/JackWinNamedPipeNotifyChannel.h56
-rw-r--r--windows/JackWinNamedPipeServerChannel.cpp390
-rw-r--r--windows/JackWinNamedPipeServerChannel.h101
-rw-r--r--windows/JackWinNamedPipeServerNotifyChannel.cpp59
-rw-r--r--windows/JackWinNamedPipeServerNotifyChannel.h55
-rw-r--r--windows/JackWinProcessSync.h92
-rw-r--r--windows/JackWinThread.cpp223
-rw-r--r--windows/JackWinThread.h68
-rw-r--r--windows/JackdmpWIN32.cpp401
-rw-r--r--windows/getopt.c1047
-rw-r--r--windows/getopt.h177
-rw-r--r--windows/getopt1.c188
-rw-r--r--windows/jack_connect.dsp113
-rw-r--r--windows/jack_freeverb.dsp105
-rw-r--r--windows/jack_lsp.dsp113
-rw-r--r--windows/jack_metro.dsp113
-rw-r--r--windows/jack_portaudio.dsp137
-rw-r--r--windows/jack_simple_client.dsp105
-rw-r--r--windows/jack_test.dsp113
-rw-r--r--windows/jackdmp.dsp113
-rw-r--r--windows/jackdmp.dsw185
-rw-r--r--windows/jdelay.dsp105
-rw-r--r--windows/libjackdmp.dsp258
-rw-r--r--windows/libjackmp.dsp190
-rw-r--r--windows/libportaudio.abin0 -> 552908 bytes
-rw-r--r--windows/pa_asio.h123
-rw-r--r--windows/portaudio.h1127
-rw-r--r--windows/portaudio.libbin0 -> 682374 bytes
-rw-r--r--windows/regex.c4948
-rw-r--r--windows/regex.h506
-rw-r--r--windows/resource.h15
-rw-r--r--windows/resource.rc109
-rw-r--r--windows/testSynchoServerClient.dsp113
-rw-r--r--windows/testSynchroClient.dsp149
-rw-r--r--windows/testSynchroServer.dsp113
231 files changed, 81022 insertions, 0 deletions
diff --git a/common/JackAPI.cpp b/common/JackAPI.cpp
new file mode 100644
index 00000000..705a112b
--- /dev/null
+++ b/common/JackAPI.cpp
@@ -0,0 +1,1114 @@
+/*
+Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackClient.h"
+#include "JackError.h"
+#include "JackGraphManager.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackGlobals.h"
+#include "JackTime.h"
+#include "JackExports.h"
+#include <math.h>
+
+using namespace Jack;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ EXPORT int jack_client_name_size (void);
+ EXPORT char* jack_get_client_name (jack_client_t *client);
+ EXPORT int jack_internal_client_new (const char *client_name,
+ const char *load_name,
+ const char *load_init);
+ EXPORT jack_client_t* my_jack_internal_client_new(const char* client_name);
+ EXPORT void jack_internal_client_close (const char *client_name);
+ EXPORT void my_jack_internal_client_close (jack_client_t* client);
+ EXPORT int jack_is_realtime (jack_client_t *client);
+ EXPORT void jack_on_shutdown (jack_client_t *client,
+ void (*function)(void *arg), void *arg);
+ EXPORT int jack_set_process_callback (jack_client_t *client,
+ JackProcessCallback process_callback,
+ void *arg);
+ EXPORT int jack_set_thread_init_callback (jack_client_t *client,
+ JackThreadInitCallback thread_init_callback,
+ void *arg);
+ EXPORT int jack_set_freewheel_callback (jack_client_t *client,
+ JackFreewheelCallback freewheel_callback,
+ void *arg);
+ EXPORT int jack_set_freewheel(jack_client_t* client, int onoff);
+ EXPORT int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes);
+ EXPORT int jack_set_buffer_size_callback (jack_client_t *client,
+ JackBufferSizeCallback bufsize_callback,
+ void *arg);
+ EXPORT int jack_set_sample_rate_callback (jack_client_t *client,
+ JackSampleRateCallback srate_callback,
+ void *arg);
+ EXPORT int jack_set_port_registration_callback (jack_client_t *,
+ JackPortRegistrationCallback
+ registration_callback, void *arg);
+ EXPORT int jack_set_graph_order_callback (jack_client_t *,
+ JackGraphOrderCallback graph_callback,
+ void *);
+ EXPORT int jack_set_xrun_callback (jack_client_t *,
+ JackXRunCallback xrun_callback, void *arg);
+ EXPORT int jack_activate (jack_client_t *client);
+ EXPORT int jack_deactivate (jack_client_t *client);
+ EXPORT jack_port_t * jack_port_register (jack_client_t *client,
+ const char *port_name,
+ const char *port_type,
+ unsigned long flags,
+ unsigned long buffer_size);
+ EXPORT int jack_port_unregister (jack_client_t *, jack_port_t *);
+ EXPORT void * jack_port_get_buffer (jack_port_t *, jack_nframes_t);
+ EXPORT const char * jack_port_name (const jack_port_t *port);
+ EXPORT const char * jack_port_short_name (const jack_port_t *port);
+ EXPORT int jack_port_flags (const jack_port_t *port);
+ EXPORT const char * jack_port_type (const jack_port_t *port);
+ EXPORT int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
+ EXPORT int jack_port_connected (const jack_port_t *port);
+ EXPORT int jack_port_connected_to (const jack_port_t *port,
+ const char *port_name);
+ EXPORT const char ** jack_port_get_connections (const jack_port_t *port);
+ EXPORT const char ** jack_port_get_all_connections (const jack_client_t *client,
+ const jack_port_t *port);
+ EXPORT int jack_port_tie (jack_port_t *src, jack_port_t *dst);
+ EXPORT int jack_port_untie (jack_port_t *port);
+ EXPORT int jack_port_lock (jack_client_t *, jack_port_t *);
+ EXPORT int jack_port_unlock (jack_client_t *, jack_port_t *);
+ EXPORT jack_nframes_t jack_port_get_latency (jack_port_t *port);
+ EXPORT jack_nframes_t jack_port_get_total_latency (jack_client_t *,
+ jack_port_t *port);
+ EXPORT void jack_port_set_latency (jack_port_t *, jack_nframes_t);
+ EXPORT int jack_recompute_total_latencies (jack_client_t*);
+ EXPORT int jack_port_set_name (jack_port_t *port, const char *port_name);
+ EXPORT int jack_port_request_monitor (jack_port_t *port, int onoff);
+ EXPORT int jack_port_request_monitor_by_name (jack_client_t *client,
+ const char *port_name, int onoff);
+ EXPORT int jack_port_ensure_monitor (jack_port_t *port, int onoff);
+ EXPORT int jack_port_monitoring_input (jack_port_t *port);
+ EXPORT int jack_connect (jack_client_t *,
+ const char *source_port,
+ const char *destination_port);
+ EXPORT int jack_disconnect (jack_client_t *,
+ const char *source_port,
+ const char *destination_port);
+ EXPORT int jack_port_disconnect (jack_client_t *, jack_port_t *);
+ EXPORT int jack_port_name_size(void);
+ EXPORT int jack_port_type_size(void);
+ EXPORT jack_nframes_t jack_get_sample_rate (jack_client_t *);
+ EXPORT jack_nframes_t jack_get_buffer_size (jack_client_t *);
+ EXPORT const char ** jack_get_ports (jack_client_t *,
+ const char *port_name_pattern,
+ const char *type_name_pattern,
+ unsigned long flags);
+ EXPORT jack_port_t * jack_port_by_name (jack_client_t *, const char *port_name);
+ EXPORT jack_port_t * jack_port_by_id (jack_client_t *client,
+ jack_port_id_t port_id);
+ EXPORT int jack_engine_takeover_timebase (jack_client_t *);
+ EXPORT jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
+ EXPORT jack_nframes_t jack_frame_time (const jack_client_t *);
+ EXPORT jack_nframes_t jack_last_frame_time (const jack_client_t *client);
+ EXPORT float jack_cpu_load (jack_client_t *client);
+ EXPORT pthread_t jack_client_thread_id (jack_client_t *);
+ EXPORT void jack_set_error_function (void (*func)(const char *));
+
+ EXPORT float jack_get_max_delayed_usecs (jack_client_t *client);
+ EXPORT float jack_get_xrun_delayed_usecs (jack_client_t *client);
+ EXPORT void jack_reset_max_delayed_usecs (jack_client_t *client);
+
+ EXPORT int jack_release_timebase (jack_client_t *client);
+ EXPORT int jack_set_sync_callback (jack_client_t *client,
+ JackSyncCallback sync_callback,
+ void *arg);
+ EXPORT int jack_set_sync_timeout (jack_client_t *client,
+ jack_time_t timeout);
+ EXPORT int jack_set_timebase_callback (jack_client_t *client,
+ int conditional,
+ JackTimebaseCallback timebase_callback,
+ void *arg);
+ EXPORT int jack_transport_locate (jack_client_t *client,
+ jack_nframes_t frame);
+ EXPORT jack_transport_state_t jack_transport_query (const jack_client_t *client,
+ jack_position_t *pos);
+ EXPORT jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client);
+ EXPORT int jack_transport_reposition (jack_client_t *client,
+ jack_position_t *pos);
+ EXPORT void jack_transport_start (jack_client_t *client);
+ EXPORT void jack_transport_stop (jack_client_t *client);
+ EXPORT void jack_get_transport_info (jack_client_t *client,
+ jack_transport_info_t *tinfo);
+ EXPORT void jack_set_transport_info (jack_client_t *client,
+ jack_transport_info_t *tinfo);
+
+ EXPORT int jack_acquire_real_time_scheduling (pthread_t thread, int priority);
+ EXPORT int jack_client_create_thread (jack_client_t* client,
+ pthread_t *thread,
+ int priority,
+ int realtime, // boolean
+ void *(*start_routine)(void*),
+ void *arg);
+ EXPORT int jack_drop_real_time_scheduling (pthread_t thread);
+
+ EXPORT char * jack_get_internal_client_name (jack_client_t *client,
+ jack_intclient_t intclient);
+ EXPORT jack_intclient_t jack_internal_client_handle (jack_client_t *client,
+ const char *client_name,
+ jack_status_t *status);
+ EXPORT jack_intclient_t jack_internal_client_load (jack_client_t *client,
+ const char *client_name,
+ jack_options_t options,
+ jack_status_t *status, ...);
+ EXPORT jack_status_t jack_internal_client_unload (jack_client_t *client,
+ jack_intclient_t intclient);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef WIN32
+/* missing on Windows : see http://bugs.mysql.com/bug.php?id=15936 */
+inline double rint(double nr)
+{
+ double f = floor(nr);
+ double c = ceil(nr);
+ return (((c -nr) >= (nr - f)) ? f : c);
+}
+#endif
+
+static inline bool CheckPort(jack_port_id_t port_index)
+{
+ return (port_index < PORT_NUM);
+}
+
+static inline void WaitGraphChange()
+{
+ if (GetGraphManager()->IsPendingChange()) {
+ JackLog("WaitGraphChange...\n");
+ JackSleep(GetEngineControl()->fPeriodUsecs * 2);
+ }
+}
+
+static void default_jack_error_callback (const char *desc)
+{
+ fprintf(stderr, "%s\n", desc);
+}
+
+void (*jack_error_callback)(const char *desc) = &default_jack_error_callback;
+
+EXPORT void jack_set_error_function (void (*func)(const char *))
+{
+ jack_error_callback = func;
+}
+
+EXPORT void* jack_port_get_buffer(jack_port_t* port, jack_nframes_t frames)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_get_buffer called with an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ return GetGraphManager()->GetBuffer(myport, frames);
+ }
+}
+
+EXPORT const char* jack_port_name(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_name called with an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ return GetGraphManager()->GetPort(myport)->GetName();
+ }
+}
+
+EXPORT const char* jack_port_short_name(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_short_name called with an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ return GetGraphManager()->GetPort(myport)->GetShortName();
+ }
+}
+
+EXPORT int jack_port_flags(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_flags called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return GetGraphManager()->GetPort(myport)->Flags();
+ }
+}
+
+EXPORT const char* jack_port_type(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_flags called an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ return GetGraphManager()->GetPort(myport)->Type();
+ }
+}
+
+EXPORT int jack_port_connected(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_connected called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ WaitGraphChange();
+ return GetGraphManager()->GetConnectionsNum(myport);
+ }
+}
+
+EXPORT int jack_port_connected_to(const jack_port_t* port, const char* portname)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_connected_to called with an incorrect port %ld", myport);
+ return -1;
+ } else if (portname == NULL) {
+ jack_error("jack_port_connected_to called with a NULL port name");
+ return -1;
+ } else {
+ WaitGraphChange();
+ return GetGraphManager()->ConnectedTo(myport, portname);
+ }
+}
+
+EXPORT int jack_port_tie(jack_port_t* src, jack_port_t* dst)
+{
+ jack_port_id_t mysrc = (jack_port_id_t)src;
+ if (!CheckPort(mysrc)) {
+ jack_error("jack_port_tie called with a NULL src port");
+ return -1;
+ }
+ jack_port_id_t mydst = (jack_port_id_t)dst;
+ if (!CheckPort(mydst)) {
+ jack_error("jack_port_tie called with a NULL dst port");
+ return -1;
+ }
+ if (GetGraphManager()->GetPort(mysrc)->GetRefNum() != GetGraphManager()->GetPort(mydst)->GetRefNum()) {
+ jack_error("jack_port_tie called with ports not belonging to the same client");
+ return -1;
+ }
+ return GetGraphManager()->GetPort(mydst)->Tie(mysrc);
+}
+
+EXPORT int jack_port_untie(jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_untie called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return GetGraphManager()->GetPort(myport)->UnTie();
+ }
+}
+
+EXPORT jack_nframes_t jack_port_get_latency(jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_get_latency called with an incorrect port %ld", myport);
+ return 0;
+ } else {
+ WaitGraphChange();
+ return GetGraphManager()->GetPort(myport)->GetLatency();
+ }
+}
+
+EXPORT void jack_port_set_latency(jack_port_t* port, jack_nframes_t frames)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_set_latency called with an incorrect port %ld", myport);
+ } else {
+ GetGraphManager()->GetPort(myport)->SetLatency(frames);
+ }
+}
+
+EXPORT int jack_recompute_total_latencies(jack_client_t* ext_client)
+{
+ // The latency computation is done each time jack_port_get_total_latency is called
+ return 0;
+}
+
+EXPORT int jack_port_set_name(jack_port_t* port, const char* name)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_set_name called with an incorrect port %ld", myport);
+ return -1;
+ } else if (name == NULL) {
+ jack_error("jack_port_set_name called with a NULL port name");
+ return -1;
+ } else {
+ return GetGraphManager()->GetPort(myport)->SetName(name);
+ }
+}
+
+EXPORT int jack_port_request_monitor(jack_port_t* port, int onoff)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_request_monitor called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return GetGraphManager()->RequestMonitor(myport, onoff);
+ }
+}
+
+EXPORT int jack_port_request_monitor_by_name(jack_client_t* ext_client, const char* port_name, int onoff)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_request_monitor_by_name called with a NULL client");
+ return -1;
+ } else {
+ jack_port_id_t myport = GetGraphManager()->GetPort(port_name);
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_request_monitor_by_name called with an incorrect port %s", port_name);
+ return -1;
+ } else {
+ return GetGraphManager()->RequestMonitor(myport, onoff);
+ }
+ }
+}
+
+EXPORT int jack_port_ensure_monitor(jack_port_t* port, int onoff)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_ensure_monitor called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return GetGraphManager()->GetPort(myport)->EnsureMonitor(onoff);
+ }
+}
+
+EXPORT int jack_port_monitoring_input(jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_monitoring_input called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return GetGraphManager()->GetPort(myport)->MonitoringInput();
+ }
+}
+
+EXPORT int jack_is_realtime(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_is_realtime called with a NULL client");
+ return -1;
+ } else {
+ return GetEngineControl()->fRealTime;
+ }
+}
+
+EXPORT void jack_on_shutdown(jack_client_t* ext_client, void (*function)(void* arg), void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_on_shutdown called with a NULL client");
+ } else {
+ client->OnShutdown(function, arg);
+ }
+}
+
+EXPORT int jack_set_process_callback(jack_client_t* ext_client, JackProcessCallback callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_process_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetProcessCallback(callback, arg);
+ }
+}
+
+EXPORT int jack_set_freewheel_callback(jack_client_t* ext_client, JackFreewheelCallback freewheel_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_freewheel_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetFreewheelCallback(freewheel_callback, arg);
+ }
+}
+
+EXPORT int jack_set_freewheel(jack_client_t* ext_client, int onoff)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_freewheel called with a NULL client");
+ return -1;
+ } else {
+ return client->SetFreeWheel(onoff);
+ }
+}
+
+EXPORT int jack_set_buffer_size(jack_client_t* ext_client, jack_nframes_t nframes)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_buffer_size called with a NULL client");
+ return -1;
+ } else {
+ return client->SetBufferSize(nframes);
+ }
+}
+
+EXPORT int jack_set_buffer_size_callback(jack_client_t* ext_client, JackBufferSizeCallback bufsize_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_buffer_size_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetBufferSizeCallback(bufsize_callback, arg);
+ }
+}
+
+EXPORT int jack_set_sample_rate_callback(jack_client_t* ext_client, JackSampleRateCallback srate_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ JackLog("jack_set_sample_rate_callback ext_client %x client %x \n", ext_client, client);
+ if (client == NULL) {
+ jack_error("jack_set_sample_rate_callback called with a NULL client");
+ return -1;
+ } else {
+ JackLog("jack_set_sample_rate_callback: deprecated\n");
+ return -1;
+ }
+}
+
+EXPORT int jack_set_port_registration_callback(jack_client_t* ext_client, JackPortRegistrationCallback registration_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_port_registration_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetPortRegistrationCallback(registration_callback, arg);
+ }
+}
+
+EXPORT int jack_set_graph_order_callback(jack_client_t* ext_client, JackGraphOrderCallback graph_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ JackLog("jack_set_graph_order_callback ext_client %x client %x \n", ext_client, client);
+ if (client == NULL) {
+ jack_error("jack_set_graph_order_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetGraphOrderCallback(graph_callback, arg);
+ }
+}
+
+EXPORT int jack_set_xrun_callback(jack_client_t* ext_client, JackXRunCallback callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_xrun_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetXRunCallback(callback, arg);
+ }
+}
+
+EXPORT int jack_set_thread_init_callback(jack_client_t* ext_client, JackThreadInitCallback callback, void *arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ JackLog("jack_set_thread_init_callback ext_client %x client %x \n", ext_client, client);
+ if (client == NULL) {
+ jack_error("jack_set_thread_init_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetInitCallback(callback, arg);
+ }
+}
+
+EXPORT int jack_activate(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_activate called with a NULL client");
+ return -1;
+ } else {
+ return client->Activate();
+ }
+}
+
+EXPORT int jack_deactivate(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_deactivate called with a NULL client");
+ return -1;
+ } else {
+ return client->Deactivate();
+ }
+}
+
+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)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_register called with a NULL client");
+ return NULL;
+ } else if ((port_name == NULL) || (port_type == NULL)) {
+ jack_error("jack_port_register called with a NULL port name or a NULL port_type");
+ return NULL;
+ } else {
+ return (jack_port_t *)client->PortRegister(port_name, port_type, flags, buffer_size);
+ }
+}
+
+EXPORT int jack_port_unregister(jack_client_t* ext_client, jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_unregister called with a NULL client");
+ return -1;
+ }
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_unregister called with an incorrect port %ld", myport);
+ return -1;
+ }
+ return client->PortUnRegister(myport);
+}
+
+EXPORT int jack_port_is_mine(const jack_client_t* ext_client, const jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_is_mine called with a NULL client");
+ return -1;
+ }
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_is_mine called with an incorrect port %ld", myport);
+ return -1;
+ }
+ return client->PortIsMine(myport);
+}
+
+EXPORT const char** jack_port_get_connections(const jack_port_t* port)
+{
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_get_connections called with an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ WaitGraphChange();
+ return GetGraphManager()->GetConnections(myport);
+ }
+}
+
+// Calling client does not need to "own" the port
+EXPORT const char** jack_port_get_all_connections(const jack_client_t* ext_client, const jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_get_all_connections called with a NULL client");
+ return NULL;
+ }
+
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_get_all_connections called with an incorrect port %ld", myport);
+ return NULL;
+ } else {
+ WaitGraphChange();
+ return GetGraphManager()->GetConnections(myport);
+ }
+}
+
+// Does not use the client parameter
+EXPORT int jack_port_lock(jack_client_t* ext_client, jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_lock called with a NULL client");
+ return -1;
+ }
+
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_lock called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return (myport && client->PortIsMine(myport)) ? GetGraphManager()->GetPort(myport)->Lock() : -1;
+ }
+}
+
+// Does not use the client parameter
+EXPORT int jack_port_unlock(jack_client_t* ext_client, jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_unlock called with a NULL client");
+ return -1;
+ }
+
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_unlock called with an incorrect port %ld", myport);
+ return -1;
+ } else {
+ return (myport && client->PortIsMine(myport)) ? GetGraphManager()->GetPort(myport)->Unlock() : -1;
+ }
+}
+
+EXPORT jack_nframes_t jack_port_get_total_latency(jack_client_t* ext_client, jack_port_t* port)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_get_total_latency called with a NULL client");
+ return 0;
+ }
+
+ jack_port_id_t myport = (jack_port_id_t)port;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_get_total_latency called with an incorrect port %ld", myport);
+ return 0;
+ } else {
+ // The latency computation is done each time
+ WaitGraphChange();
+ return GetGraphManager()->GetTotalLatency(myport);
+ }
+}
+
+EXPORT int jack_connect(jack_client_t* ext_client, const char* src, const char* dst)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_connect called with a NULL client");
+ return -1;
+ } else if ((src == NULL) || (dst == NULL)) {
+ jack_error("jack_connect called with a NULL port name");
+ return -1;
+ } else {
+ return client->PortConnect(src, dst);
+ }
+}
+
+EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const char* dst)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_disconnect called with a NULL client");
+ return -1;
+ } else if ((src == NULL) || (dst == NULL)) {
+ jack_error("jack_connect called with a NULL port name");
+ return -1;
+ } else {
+ return client->PortDisconnect(src, dst);
+ }
+}
+
+EXPORT int jack_port_connect(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_connect called with a NULL client");
+ return -1;
+ }
+ jack_port_id_t mysrc = (jack_port_id_t)src;
+ if (!CheckPort(mysrc)) {
+ jack_error("jack_port_connect called with a NULL src port");
+ return -1;
+ }
+ jack_port_id_t mydst = (jack_port_id_t)dst;
+ if (!CheckPort(mydst)) {
+ jack_error("jack_port_connect called with a NULL dst port");
+ return -1;
+ }
+ return client->PortConnect(mysrc, mydst);
+}
+
+EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_port_disconnect called with a NULL client");
+ return -1;
+ }
+ jack_port_id_t myport = (jack_port_id_t)src;
+ if (!CheckPort(myport)) {
+ jack_error("jack_port_disconnect called with an incorrect port %ld", myport);
+ return -1;
+ }
+ return client->PortDisconnect(myport);
+}
+
+EXPORT jack_nframes_t jack_get_sample_rate(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_sample_rate called with a NULL client");
+ return 0;
+ } else {
+ return GetEngineControl()->fSampleRate;
+ }
+}
+
+EXPORT jack_nframes_t jack_get_buffer_size(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_buffer_size called with a NULL client");
+ return 0;
+ } else {
+ return GetEngineControl()->fBufferSize;
+ }
+}
+
+EXPORT const char** jack_get_ports(jack_client_t* ext_client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_ports called with a NULL client");
+ return NULL;
+ }
+ return GetGraphManager()->GetPorts(port_name_pattern, type_name_pattern, flags);
+}
+
+EXPORT jack_port_t* jack_port_by_name(jack_client_t* ext_client, const char* portname)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_ports called with a NULL client");
+ return 0;
+ }
+
+ if (portname == NULL) {
+ jack_error("jack_port_by_name called with a NULL port name");
+ return NULL;
+ } else {
+ int res = GetGraphManager()->GetPort(portname); // returns a port index at least > 1
+ return (res == NO_PORT) ? NULL : (jack_port_t*)res;
+ }
+}
+
+EXPORT jack_port_t* jack_port_by_id(const jack_client_t* ext_client, jack_port_id_t id)
+{
+ /* jack_port_t* type is actually the port index */
+ return (jack_port_t*)id;
+}
+
+EXPORT int jack_engine_takeover_timebase(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_engine_takeover_timebase called with a NULL client");
+ return -1;
+ } else {
+ jack_error("jack_engine_takeover_timebase : not yet implemented\n");
+ return 0;
+ }
+}
+
+EXPORT jack_nframes_t jack_frames_since_cycle_start(const jack_client_t* ext_client)
+{
+ JackTimer timer;
+ GetEngineControl()->fFrameTimer.ReadFrameTime(&timer);
+ return (jack_nframes_t) floor((((float)GetEngineControl()->fSampleRate) / 1000000.0f) * (GetMicroSeconds() - timer.fCurrentCallback));
+}
+
+EXPORT jack_nframes_t jack_frame_time(const jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_frame_time called with a NULL client");
+ return 0;
+ } else {
+ JackTimer timer;
+ GetEngineControl()->fFrameTimer.ReadFrameTime(&timer);
+ if (timer.fInitialized) {
+ return timer.fFrames +
+ (long) rint(((double) ((jack_time_t)(GetMicroSeconds() - timer.fCurrentWakeup)) /
+ ((jack_time_t)(timer.fNextWakeUp - timer.fCurrentWakeup))) * GetEngineControl()->fBufferSize);
+ } else {
+ return 0;
+ }
+ }
+}
+
+EXPORT jack_nframes_t jack_last_frame_time(const jack_client_t* ext_client)
+{
+ JackTimer timer;
+ GetEngineControl()->fFrameTimer.ReadFrameTime(&timer);
+ return timer.fFrames;
+}
+
+EXPORT float jack_cpu_load(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_cpu_load called with a NULL client");
+ return 0.0f;
+ } else {
+ return GetEngineControl()->fCPULoad;
+ }
+}
+
+pthread_t EXPORT jack_client_thread_id(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_client_thread_id called with a NULL client");
+ return (pthread_t)NULL;
+ } else {
+ return client->GetThreadID();
+ }
+}
+
+EXPORT char* jack_get_client_name (jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_client_name called with a NULL client");
+ return NULL;
+ } else {
+ return client->GetClientControl()->fName;
+ }
+}
+
+EXPORT int jack_client_name_size(void)
+{
+ return JACK_CLIENT_NAME_SIZE;
+}
+
+EXPORT int jack_port_name_size(void)
+{
+ return JACK_PORT_NAME_SIZE;
+}
+
+// transport.h
+
+EXPORT int jack_release_timebase(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_release_timebase called with a NULL client");
+ return -1;
+ } else {
+ return client->ReleaseTimebase();
+ }
+}
+
+EXPORT int jack_set_sync_callback(jack_client_t* ext_client, JackSyncCallback sync_callback, void *arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_sync_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetSyncCallback(sync_callback, arg);
+ }
+}
+
+EXPORT int jack_set_sync_timeout(jack_client_t* ext_client, jack_time_t timeout)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_sync_timeout called with a NULL client");
+ return -1;
+ } else {
+ return client->SetSyncTimeout(timeout);
+ }
+}
+
+EXPORT int jack_set_timebase_callback(jack_client_t* ext_client, int conditional, JackTimebaseCallback timebase_callback, void* arg)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_set_timebase_callback called with a NULL client");
+ return -1;
+ } else {
+ return client->SetTimebaseCallback(conditional, timebase_callback, arg);
+ }
+}
+
+EXPORT int jack_transport_locate(jack_client_t* ext_client, jack_nframes_t frame)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_transport_locate called with a NULL client");
+ return -1;
+ } else {
+ return client->TransportLocate(frame);
+ }
+}
+
+EXPORT jack_transport_state_t jack_transport_query(const jack_client_t* ext_client, jack_position_t* pos)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_transport_query called with a NULL client");
+ return JackTransportStopped;
+ } else {
+ return client->TransportQuery(pos);
+ }
+}
+
+EXPORT jack_nframes_t jack_get_current_transport_frame(const jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_get_current_transport_frame called with a NULL client");
+ return 0;
+ } else {
+ return client->GetCurrentTransportFrame();
+ }
+}
+
+EXPORT int jack_transport_reposition(jack_client_t* ext_client, jack_position_t* pos)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_transport_reposition called with a NULL client");
+ return -1;
+ } else {
+ return client->TransportReposition(pos);
+ }
+}
+
+EXPORT void jack_transport_start(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_transport_start called with a NULL client");
+ } else {
+ client->TransportStart();
+ }
+}
+
+EXPORT void jack_transport_stop(jack_client_t* ext_client)
+{
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_transport_stop called with a NULL client");
+ } else {
+ client->TransportStop();
+ }
+}
+
+// deprecated
+
+EXPORT void jack_get_transport_info(jack_client_t* ext_client, jack_transport_info_t* tinfo)
+{
+ JackLog("jack_get_transport_info : deprecated");
+ if (tinfo)
+ memset(tinfo, 0, sizeof(jack_transport_info_t));
+}
+
+EXPORT void jack_set_transport_info(jack_client_t* ext_client, jack_transport_info_t* tinfo)
+{
+ JackLog("jack_set_transport_info : deprecated");
+ if (tinfo)
+ memset(tinfo, 0, sizeof(jack_transport_info_t));
+}
+
+// statistics.h
+
+EXPORT float jack_get_max_delayed_usecs(jack_client_t* client)
+{
+ JackLog("jack_get_max_delayed_usecs: not yet implemented\n");
+ return 0.f;
+}
+
+EXPORT float jack_get_xrun_delayed_usecs(jack_client_t* client)
+{
+ JackLog("jack_get_xrun_delayed_usecs: not yet implemented\n");
+ return 0.f;
+}
+
+EXPORT void jack_reset_max_delayed_usecs(jack_client_t* client)
+{
+ JackLog("jack_reset_max_delayed_usecs: not yet implemented\n");
+}
+
+// thread.h
+
+EXPORT int jack_acquire_real_time_scheduling(pthread_t thread, int priority)
+{
+ JackLog("jack_acquire_real_time_scheduling: not yet implemented\n");
+ return -1;
+}
+
+EXPORT int jack_client_create_thread(jack_client_t* client,
+ pthread_t *thread,
+ int priority,
+ int realtime, /* boolean */
+ void *(*start_routine)(void*),
+ void *arg)
+{
+ JackLog("jack_client_create_thread: not yet implemented\n");
+ return -1;
+}
+
+EXPORT int jack_drop_real_time_scheduling(pthread_t thread)
+{
+ JackLog("jack_drop_real_time_scheduling: not yet implemented\n");
+ return -1;
+}
+
+// intclient.h
+
+EXPORT char* jack_get_internal_client_name(jack_client_t* client, jack_intclient_t intclient)
+{
+ JackLog("jack_get_internal_client_name: not yet implemented\n");
+ return "";
+}
+
+EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t* client, const char* client_name, jack_status_t* status)
+{
+ JackLog("jack_internal_client_handle: not yet implemented\n");
+ return 0;
+}
+
+EXPORT jack_intclient_t jack_internal_client_load(jack_client_t* client, const char* client_name, jack_options_t options, jack_status_t* status, ...)
+{
+ JackLog("jack_internal_client_load: not yet implemented\n");
+ return 0;
+}
+
+EXPORT jack_status_t jack_internal_client_unload(jack_client_t* client, jack_intclient_t intclient)
+{
+ JackLog("jack_internal_client_unload: not yet implemented\n");
+ return JackFailure;
+}
diff --git a/common/JackActivationCount.cpp b/common/JackActivationCount.cpp
new file mode 100644
index 00000000..6823fef5
--- /dev/null
+++ b/common/JackActivationCount.cpp
@@ -0,0 +1,43 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackAtomic.h"
+#include "JackActivationCount.h"
+#include "JackConstants.h"
+#include "JackClientControl.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+bool JackActivationCount::Signal(JackSynchro* synchro, JackClientControl* control)
+{
+ if (fValue == 0) {
+ // Transfer activation to next clients
+ jack_error("JackActivationCount::Signal value = 0 ref = %ld", control->fRefNum);
+ return synchro->Signal();
+ } else if (DEC_ATOMIC(&fValue) == 1) {
+ return synchro->Signal();
+ } else {
+ return true;
+ }
+}
+
+} // end of namespace
+
diff --git a/common/JackActivationCount.h b/common/JackActivationCount.h
new file mode 100644
index 00000000..6c72357c
--- /dev/null
+++ b/common/JackActivationCount.h
@@ -0,0 +1,83 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackActivationCount__
+#define __JackActivationCount__
+
+#include "JackSynchro.h"
+#include "JackTime.h"
+
+namespace Jack
+{
+
+struct JackClientControl;
+
+/*!
+\brief Client activation counter.
+*/
+
+class JackActivationCount
+{
+
+ private:
+
+ long fValue;
+ long fCount;
+
+ public:
+
+ JackActivationCount(): fValue(0), fCount(0)
+ {}
+ virtual ~JackActivationCount()
+ {}
+
+ bool Signal(JackSynchro* synchro, JackClientControl* control);
+
+ inline void Reset()
+ {
+ fValue = fCount;
+ }
+
+ inline void SetValue(int val)
+ {
+ fCount = val;
+ }
+
+ inline void IncValue()
+ {
+ fCount++;
+ }
+
+ inline void DecValue()
+ {
+ fCount--;
+ }
+
+ inline int GetValue() const
+ {
+ return fValue;
+ }
+
+};
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackAtomic.h b/common/JackAtomic.h
new file mode 100644
index 00000000..54ac8dc4
--- /dev/null
+++ b/common/JackAtomic.h
@@ -0,0 +1,197 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackAtomic__
+#define __JackAtomic__
+
+typedef unsigned short UInt16;
+typedef unsigned long UInt32;
+typedef long SInt32;
+#ifdef WIN32
+ #include <windows.h>
+
+typedef ULONGLONG UInt64;
+#else
+
+typedef unsigned long long UInt64;
+#endif
+
+#if defined(__APPLE__)
+
+#if defined(__ppc__)
+
+static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr)
+{
+ register int result;
+ asm volatile (
+ "# CAS \n"
+ " lwarx r0, 0, %1 \n" // creates a reservation on addr
+ " cmpw r0, %2 \n" // test value at addr
+ " bne- 1f \n"
+ " sync \n" // synchronize instructions
+ " stwcx. %3, 0, %1 \n" // if the reservation is not altered
+ // stores the new value at addr
+ " bne- 1f \n"
+ " li %0, 1 \n"
+ " b 2f \n"
+ "1: \n"
+ " li %0, 0 \n"
+ "2: \n"
+ : "=r" (result)
+ : "r" (addr), "r" (value), "r" (newvalue)
+ : "r0"
+ );
+ return result;
+}
+
+#endif
+
+#if defined(__i386__) || defined(__x86_64__)
+
+#ifdef __SMP__
+# define LOCK "lock ; "
+#else
+# define LOCK ""
+#endif
+
+static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr)
+{
+ register char ret;
+ __asm__ __volatile__ (
+ "# CAS \n\t"
+ LOCK "cmpxchg %2, (%1) \n\t"
+ "sete %0 \n\t"
+ : "=a" (ret)
+ : "c" (addr), "d" (newvalue), "a" (value)
+ );
+ return ret;
+}
+
+#endif
+
+#endif
+
+#ifdef __linux__
+
+#ifdef __PPC__
+
+static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr)
+{
+ register int result;
+ register UInt32 tmp;
+ asm volatile (
+ "# CAS \n"
+ " lwarx %4, 0, %1 \n" // creates a reservation on addr
+ " cmpw %4, %2 \n" // test value at addr
+ " bne- 1f \n"
+ " sync \n" // synchronize instructions
+ " stwcx. %3, 0, %1 \n" // if the reservation is not altered
+ // stores the new value at addr
+ " bne- 1f \n"
+ " li %0, 1 \n"
+ " b 2f \n"
+ "1: \n"
+ " li %0, 0 \n"
+ "2: \n"
+ : "=r" (result)
+ : "r" (addr), "r" (value), "r" (newvalue), "r" (tmp)
+ );
+ return result;
+}
+
+#endif
+
+#if defined(__i386__) || defined(__x86_64__)
+
+#ifdef __SMP__
+# define LOCK "lock ; "
+#else
+# define LOCK ""
+#endif
+
+static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr)
+{
+ register char ret;
+ __asm__ __volatile__ (
+ "# CAS \n\t"
+ LOCK "cmpxchg %2, (%1) \n\t"
+ "sete %0 \n\t"
+ : "=a" (ret)
+ : "c" (addr), "d" (newvalue), "a" (value)
+ );
+ return ret;
+}
+
+#endif
+
+#endif
+
+#ifdef WIN32
+
+#ifdef __SMP__
+# define LOCK lock
+#else
+# define LOCK
+#endif
+
+#define inline __inline
+
+//----------------------------------------------------------------
+// CAS functions
+//----------------------------------------------------------------
+inline char CAS (volatile UInt32 value, UInt32 newvalue, volatile void * addr)
+{
+ register char c;
+ __asm {
+ push ebx
+ push esi
+ mov esi, addr
+ mov eax, value
+ mov ebx, newvalue
+ LOCK cmpxchg dword ptr [esi], ebx
+ sete c
+ pop esi
+ pop ebx
+ }
+ return c;
+}
+
+#endif
+
+static inline long INC_ATOMIC(volatile SInt32* val)
+{
+ SInt32 actual;
+ do {
+ actual = *val;
+ } while (!CAS(actual, actual + 1, val));
+ return actual;
+}
+
+static inline long DEC_ATOMIC(volatile SInt32* val)
+{
+ SInt32 actual;
+ do {
+ actual = *val;
+ } while (!CAS(actual, actual - 1, val));
+ return actual;
+}
+
+#endif
+
+
diff --git a/common/JackAtomicArrayState.h b/common/JackAtomicArrayState.h
new file mode 100644
index 00000000..7ef69701
--- /dev/null
+++ b/common/JackAtomicArrayState.h
@@ -0,0 +1,235 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackAtomicArrayState__
+#define __JackAtomicArrayState__
+
+#include "JackAtomic.h"
+#include "JackError.h"
+#include <string.h> // for memcpy
+
+namespace Jack
+{
+
+/*!
+\brief Counter for CAS
+*/
+
+struct AtomicArrayCounter
+{
+ union {
+ struct {
+ unsigned char fByteVal[4];
+ }
+ scounter;
+ UInt32 fLongVal;
+ }info;
+
+ AtomicArrayCounter& operator=(volatile AtomicArrayCounter& obj)
+ {
+ info.fLongVal = obj.info.fLongVal;
+ return *this;
+ }
+};
+
+#define Counter1(e) (e).info.fLongVal
+#define GetIndex1(e, state) ((e).info.scounter.fByteVal[state])
+#define SetIndex1(e, state, val) ((e).info.scounter.fByteVal[state] = val)
+#define IncIndex1(e, state) ((e).info.scounter.fByteVal[state]++)
+#define SwapIndex1(e, state) (((e).info.scounter.fByteVal[0] == state) ? 0 : state)
+
+/*!
+\brief A class to handle serveral states in a lock-free manner
+
+Requirement:
+
+ - a "current" state
+ - several possible "pending" state
+ - an TrySwitchState(int state) operation to atomically switch a "pending" to the "current" state (the pending becomes the current).
+
+ The TrySwitchState operation returns a "current" state (either the same if switch fails or the new one; one can know if the switch has succeeded)
+
+ - a WriteStartState(int state) returns a "pending" state to be written into
+ - a WriteStartStop(int state) make the written "pending" state become "switchable"
+
+ Different pending states can be written independantly and concurently.
+
+ GetCurrentIndex() *must* return an increasing value to be able to check reading current state coherency
+
+ The fCounter is an array of indexes to access te 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
+
+ [switch counter][index state][index state][cur index]
+
+*/
+
+// CHECK livelock
+
+template <class T>
+class JackAtomicArrayState
+{
+
+ protected:
+
+ // fState[0] ==> current
+ // fState[1] ==> pending
+ // fState[2] ==> request
+
+ T fState[3];
+ volatile AtomicArrayCounter fCounter;
+
+ UInt32 WriteNextStateStartAux(int state, bool* result)
+ {
+ AtomicArrayCounter old_val;
+ AtomicArrayCounter new_val;
+ UInt32 cur_index;
+ UInt32 next_index;
+ bool need_copy;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ *result = GetIndex1(new_val, state);
+ cur_index = GetIndex1(new_val, 0);
+ next_index = SwapIndex1(fCounter, state);
+ need_copy = (GetIndex1(new_val, state) == 0); // Written = false, switch just occured
+ SetIndex1(new_val, state, 0); // Written = false, invalidate state
+ } while (!CAS(Counter1(old_val), Counter1(new_val), (UInt32*)&fCounter));
+ if (need_copy)
+ memcpy(&fState[next_index], &fState[cur_index], sizeof(T));
+ return next_index;
+ }
+
+ void WriteNextStateStopAux(int state)
+ {
+ AtomicArrayCounter old_val;
+ AtomicArrayCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ SetIndex1(new_val, state, 1); // Written = true, state becomes "switchable"
+ } while (!CAS(Counter1(old_val), Counter1(new_val), (UInt32*)&fCounter));
+ }
+
+ public:
+
+ JackAtomicArrayState()
+ {
+ JackLog("JackAtomicArrayState constructor\n");
+ Counter1(fCounter) = 0;
+ }
+
+ ~JackAtomicArrayState() // Not virtual ??
+ {}
+
+ /*!
+ \brief Returns the current state : only valid in the RT reader thread
+ */
+
+ T* ReadCurrentState()
+ {
+ return &fState[GetIndex1(fCounter, 0)];
+ }
+
+ /*!
+ \brief Returns the current switch counter
+ */
+
+ UInt16 GetCurrentIndex()
+ {
+ return GetIndex1(fCounter, 3);
+ }
+
+ /*!
+ \brief Tries to switch to the next state and returns the new current state (either the same as before if case of switch failure or the new one)
+ */
+
+ T* TrySwitchState(int state)
+ {
+ AtomicArrayCounter old_val;
+ AtomicArrayCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ if (GetIndex1(new_val, state)) { // If state has been written
+ SetIndex1(new_val, 0, SwapIndex1(new_val, state)); // Prepare switch
+ SetIndex1(new_val, state, 0); // Invalidate the state "state"
+ IncIndex1(new_val, 3); // Inc switch
+ }
+ } while (!CAS(Counter1(old_val), Counter1(new_val), (UInt32*)&fCounter));
+ return &fState[GetIndex1(fCounter, 0)]; // Read the counter again
+ }
+
+ /*!
+ \brief Tries to switch to the next state and returns the new current state (either the same as before if case of switch failure or the new one)
+ */
+
+ T* TrySwitchState(int state, bool* result)
+ {
+ AtomicArrayCounter old_val;
+ AtomicArrayCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ if ((*result = GetIndex1(new_val, state))) { // If state has been written
+ SetIndex1(new_val, 0, SwapIndex1(new_val, state)); // Prepare switch
+ SetIndex1(new_val, state, 0); // Invalidate the state "state"
+ IncIndex1(new_val, 3); // Inc switch
+ }
+ } while (!CAS(Counter1(old_val), Counter1(new_val), (UInt32*)&fCounter));
+ return &fState[GetIndex1(fCounter, 0)]; // Read the counter again
+ }
+
+ /*!
+ \brief Start write operation : setup and returns the next state to update, check for recursive write calls.
+ */
+
+ T* WriteNextStateStart(int state)
+ {
+ bool tmp;
+ UInt32 index = WriteNextStateStartAux(state, &tmp);
+ return &fState[index];
+ }
+
+ T* WriteNextStateStart(int state, bool* result)
+ {
+ UInt32 index = WriteNextStateStartAux(state, result);
+ return &fState[index];
+ }
+
+ /*!
+ \brief Stop write operation : make the next state ready to be used by the RT thread
+ */
+ void WriteNextStateStop(int state)
+ {
+ WriteNextStateStopAux(state);
+ }
+
+};
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackAtomicState.h b/common/JackAtomicState.h
new file mode 100644
index 00000000..9e140d3e
--- /dev/null
+++ b/common/JackAtomicState.h
@@ -0,0 +1,240 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackAtomicState__
+#define __JackAtomicState__
+
+#include "JackAtomic.h"
+#include <string.h> // for memcpy
+
+namespace Jack
+{
+
+/*!
+\brief Counter for CAS
+*/
+
+struct AtomicCounter
+{
+ union {
+ struct {
+ UInt16 fShortVal1; // Cur
+ UInt16 fShortVal2; // Next
+ }
+ scounter;
+ UInt32 fLongVal;
+ }info;
+
+ AtomicCounter& operator=(volatile AtomicCounter& obj)
+ {
+ info.fLongVal = obj.info.fLongVal;
+ return *this;
+ }
+
+};
+
+
+#define Counter(e) (e).info.fLongVal
+#define CurIndex(e) (e).info.scounter.fShortVal1
+#define NextIndex(e) (e).info.scounter.fShortVal2
+
+#define CurArrayIndex(e) (CurIndex(e) & 0x0001)
+#define NextArrayIndex(e) ((CurIndex(e) + 1) & 0x0001)
+
+/*!
+\brief A class to handle two states (switching from one to the other) in a lock-free manner
+*/
+
+// CHECK livelock
+
+template <class T>
+class JackAtomicState
+{
+
+ protected:
+
+ T fState[2];
+ volatile AtomicCounter fCounter;
+ SInt32 fCallWriteCounter;
+
+ UInt32 WriteNextStateStartAux()
+ {
+ AtomicCounter old_val;
+ AtomicCounter new_val;
+ UInt32 cur_index;
+ UInt32 next_index;
+ bool need_copy;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ cur_index = CurArrayIndex(new_val);
+ next_index = NextArrayIndex(new_val);
+ need_copy = (CurIndex(new_val) == NextIndex(new_val));
+ NextIndex(new_val) = CurIndex(new_val); // Invalidate next index
+ } while (!CAS(Counter(old_val), Counter(new_val), (UInt32*)&fCounter));
+ if (need_copy)
+ memcpy(&fState[next_index], &fState[cur_index], sizeof(T));
+ return next_index;
+ }
+
+ void WriteNextStateStopAux()
+ {
+ AtomicCounter old_val;
+ AtomicCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ NextIndex(new_val)++; // Set next index
+ } while (!CAS(Counter(old_val), Counter(new_val), (UInt32*)&fCounter));
+ }
+
+ public:
+
+ JackAtomicState()
+ {
+ Counter(fCounter) = 0;
+ fCallWriteCounter = 0;
+ }
+
+ ~JackAtomicState() // Not virtual ??
+ {}
+
+ /*!
+ \brief Returns the current state : only valid in the RT reader thread
+ */
+ T* ReadCurrentState()
+ {
+ return &fState[CurArrayIndex(fCounter)];
+ }
+
+ /*!
+ \brief Returns the current state index
+ */
+ UInt16 GetCurrentIndex()
+ {
+ return CurIndex(fCounter);
+ }
+
+ /*!
+ \brief Tries to switch to the next state and returns the new current state (either the same as before if case of switch failure or the new one)
+ */
+ T* TrySwitchState()
+ {
+ AtomicCounter old_val;
+ AtomicCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ CurIndex(new_val) = NextIndex(new_val); // Prepare switch
+ } while (!CAS(Counter(old_val), Counter(new_val), (UInt32*)&fCounter));
+ return &fState[CurArrayIndex(fCounter)]; // Read the counter again
+ }
+
+ /*!
+ \brief Tries to switch to the next state and returns the new current state (either the same as before if case of switch failure or the new one)
+ */
+ T* TrySwitchState(bool* result)
+ {
+ AtomicCounter old_val;
+ AtomicCounter new_val;
+ do {
+ old_val = fCounter;
+ new_val = old_val;
+ *result = (CurIndex(new_val) != NextIndex(new_val));
+ CurIndex(new_val) = NextIndex(new_val); // Prepare switch
+ } while (!CAS(Counter(old_val), Counter(new_val), (UInt32*)&fCounter));
+ return &fState[CurArrayIndex(fCounter)]; // Read the counter again
+ }
+
+ /*!
+ \brief Start write operation : setup and returns the next state to update, check for recursive write calls.
+ */
+ T* WriteNextStateStart()
+ {
+ UInt32 next_index = (fCallWriteCounter++ == 0)
+ ? WriteNextStateStartAux()
+ : NextArrayIndex(fCounter); // We are inside a wrapping WriteNextStateStart call, NextArrayIndex can be read safely
+ return &fState[next_index];
+ }
+
+ /*!
+ \brief Stop write operation : make the next state ready to be used by the RT thread
+ */
+ void WriteNextStateStop()
+ {
+ if (--fCallWriteCounter == 0)
+ WriteNextStateStopAux();
+ }
+
+ bool IsPendingChange()
+ {
+ return CurIndex(fCounter) != NextIndex(fCounter);
+ }
+
+ /*
+ // Single writer : write methods get the *next* state to be updated
+ void TestWriteMethod()
+ {
+ T* state = WriteNextStateStart();
+ ......
+ ......
+ WriteNextStateStop();
+ }
+
+ // First RT call possibly switch state
+ void TestReadRTMethod1()
+ {
+ T* state = TrySwitchState();
+ ......
+ ......
+ }
+
+ // Other RT methods can safely use the current state during the *same* RT cycle
+ void TestReadRTMethod2()
+ {
+ T* state = ReadCurrentState();
+ ......
+ ......
+ }
+
+ // Non RT read methods : must check state coherency
+ void TestReadMethod()
+ {
+ T* state;
+ UInt16 cur_index;
+ UInt16 next_index = GetCurrentIndex();
+ do {
+ cur_index = next_index;
+ state = ReadCurrentState();
+
+ ......
+ ......
+
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index);
+ }
+ */
+};
+
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackAudioDriver.cpp b/common/JackAudioDriver.cpp
new file mode 100644
index 00000000..1416a729
--- /dev/null
+++ b/common/JackAudioDriver.cpp
@@ -0,0 +1,229 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackAudioDriver.h"
+#include "JackTime.h"
+#include "JackError.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackPort.h"
+#include "JackGraphManager.h"
+#include "JackEngine.h"
+#include <assert.h>
+
+namespace Jack
+{
+
+
+JackAudioDriver::JackAudioDriver(const char* name, JackEngine* engine, JackSynchro** table)
+ : JackDriver(name, engine, table),
+ fCaptureChannels(0),
+ fPlaybackChannels(0),
+ fWithMonitorPorts(false)
+{}
+
+JackAudioDriver::~JackAudioDriver()
+{}
+
+int JackAudioDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ fCaptureChannels = inchannels;
+ fPlaybackChannels = outchannels;
+ fWithMonitorPorts = monitor;
+ return JackDriver::Open(nframes, samplerate, capturing, playing, inchannels, outchannels, monitor, capture_driver_name, playback_driver_name, capture_latency, playback_latency);
+}
+
+int JackAudioDriver::Attach()
+{
+ JackPort* port;
+ jack_port_id_t port_index;
+ char buf[JACK_PORT_NAME_SIZE];
+ unsigned long port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal;
+ int i;
+
+ JackLog("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
+
+ for (i = 0; i < fCaptureChannels; i++) {
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:out%d", fClientControl->fName, fCaptureDriverName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("driver: cannot register port for %s", buf);
+ return -1;
+ }
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize + fCaptureLatency);
+ fCapturePortList[i] = port_index;
+ JackLog("JackAudioDriver::Attach fCapturePortList[i] %ld \n", port_index);
+ }
+
+ port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal;
+
+ for (i = 0; i < fPlaybackChannels; i++) {
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:in%d", fClientControl->fName, fPlaybackDriverName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("driver: cannot register port for %s", buf);
+ return -1;
+ }
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize + fPlaybackLatency);
+ fPlaybackPortList[i] = port_index;
+ JackLog("JackAudioDriver::Attach fPlaybackPortList[i] %ld \n", port_index);
+
+ // Monitor ports
+ if (fWithMonitorPorts) {
+ JackLog("Create monitor port \n");
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:monitor_%u", fClientControl->fName, fPlaybackDriverName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, JackPortIsOutput)) == NO_PORT) {
+ jack_error("Cannot register monitor port for %s", buf);
+ return -1;
+ } else {
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize);
+ fMonitorPortList[i] = port_index;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int JackAudioDriver::Detach()
+{
+ int i;
+ JackLog("JackAudioDriver::Detach\n");
+
+ for (i = 0; i < fCaptureChannels; i++) {
+ fGraphManager->RemovePort(fClientControl->fRefNum, fCapturePortList[i]);
+ }
+
+ for (i = 0; i < fPlaybackChannels; i++) {
+ fGraphManager->RemovePort(fClientControl->fRefNum, fPlaybackPortList[i]);
+ if (fWithMonitorPorts)
+ fGraphManager->RemovePort(fClientControl->fRefNum, fMonitorPortList[i]);
+ }
+
+ return 0;
+}
+
+int JackAudioDriver::Write()
+{
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ if (fGraphManager->GetConnectionsNum(fPlaybackPortList[i]) > 0) {
+ float* buffer = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[i], fEngineControl->fBufferSize);
+ int size = sizeof(float) * fEngineControl->fBufferSize;
+ // Monitor ports
+ if (fWithMonitorPorts && fGraphManager->GetConnectionsNum(fMonitorPortList[i]) > 0)
+ memcpy((jack_default_audio_sample_t*)fGraphManager->GetBuffer(fMonitorPortList[i], fEngineControl->fBufferSize), buffer, size);
+ }
+ }
+ return 0;
+}
+
+int JackAudioDriver::Process()
+{
+ return (fEngineControl->fSyncMode) ? ProcessSync() : ProcessAsync();
+}
+
+/*
+The driver ASYNC mode: output buffers computed at the *previous cycle* are used, the server does not
+synchronize to the end of client graph execution.
+*/
+
+int JackAudioDriver::ProcessAsync()
+{
+ if (Read() < 0) { // Read input buffers for the current cycle
+ jack_error("ProcessAsync: read error");
+ return 0;
+ }
+
+ if (Write() < 0) { // Write output buffers from the previous cycle
+ jack_error("ProcessAsync: write error");
+ return 0;
+ }
+
+ if (fIsMaster) {
+ fEngine->Process(fLastWaitUst); // fLastWaitUst is set in the "low level" layer
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable);
+ ProcessSlaves();
+ } else {
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable);
+ }
+ return 0;
+}
+
+/*
+The driver SYNC mode: the server does synchronize to the end of client graph execution,
+output buffers computed at the *current cycle* are used.
+*/
+
+int JackAudioDriver::ProcessSync()
+{
+ if (Read() < 0) { // Read input buffers for the current cycle
+ jack_error("ProcessSync: read error");
+ return 0;
+ }
+
+ if (fIsMaster) {
+ fEngine->Process(fLastWaitUst); // fLastWaitUst is set in the "low level" layer
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable);
+ ProcessSlaves();
+ if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, fEngineControl->fTimeOutUsecs) < 0)
+ jack_error("JackAudioDriver::ProcessSync SuspendRefNum error");
+ if (Write() < 0) // Write output buffers for the current cycle
+ jack_error("Process: write error");
+ } else {
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable);
+ }
+ return 0;
+}
+
+void JackAudioDriver::NotifyXRun(jack_time_t callback_usecs)
+{
+ fEngine->NotifyXRun(callback_usecs);
+}
+
+jack_default_audio_sample_t* JackAudioDriver::GetInputBuffer(int port_index)
+{
+ assert(fCapturePortList[port_index]);
+ return (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fCapturePortList[port_index], fEngineControl->fBufferSize);
+}
+
+jack_default_audio_sample_t* JackAudioDriver::GetOutputBuffer(int port_index)
+{
+ assert(fPlaybackPortList[port_index]);
+ return (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[port_index], fEngineControl->fBufferSize);
+}
+
+jack_default_audio_sample_t* JackAudioDriver::GetMonitorBuffer(int port_index)
+{
+ assert(fPlaybackPortList[port_index]);
+ return (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fMonitorPortList[port_index], fEngineControl->fBufferSize);
+}
+
+} // end of namespace
diff --git a/common/JackAudioDriver.h b/common/JackAudioDriver.h
new file mode 100644
index 00000000..13de9096
--- /dev/null
+++ b/common/JackAudioDriver.h
@@ -0,0 +1,88 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackAudioDriver__
+#define __JackAudioDriver__
+
+#include "JackDriver.h"
+
+
+namespace Jack
+{
+
+/*!
+\brief The base class for audio drivers: drivers with audio ports.
+*/
+
+class EXPORT JackAudioDriver : public JackDriver
+{
+
+ protected:
+
+ int fCaptureChannels;
+ int fPlaybackChannels;
+
+ // static tables since the actual number of ports may be changed by the real driver
+ // thus dynamic allocation is more difficult to handle
+ jack_port_id_t fCapturePortList[PORT_NUM];
+ jack_port_id_t fPlaybackPortList[PORT_NUM];
+ jack_port_id_t fMonitorPortList[PORT_NUM];
+
+ bool fWithMonitorPorts;
+
+ jack_default_audio_sample_t* GetInputBuffer(int port_index);
+ jack_default_audio_sample_t* GetOutputBuffer(int port_index);
+ jack_default_audio_sample_t* GetMonitorBuffer(int port_index);
+
+ private:
+
+ int ProcessAsync();
+ int ProcessSync();
+
+ public:
+
+ JackAudioDriver(const char* name, JackEngine* engine, JackSynchro** table);
+ virtual ~JackAudioDriver();
+
+ virtual int Process();
+
+ virtual int Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ virtual int Attach();
+ virtual int Detach();
+ virtual int Write();
+
+ virtual void NotifyXRun(jack_time_t callback_usecs); // XRun notification sent by the driver
+
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackChannel.h b/common/JackChannel.h
new file mode 100644
index 00000000..4036aede
--- /dev/null
+++ b/common/JackChannel.h
@@ -0,0 +1,210 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackChannel__
+#define __JackChannel__
+
+#include "types.h"
+#include "JackError.h"
+#include "JackTransportEngine.h"
+
+namespace Jack
+{
+
+class JackClientInterface;
+class JackClient;
+class JackServer;
+struct JackEngineControl;
+class JackGraphManager;
+
+/*!
+\brief Inter process channel for server/client bidirectionnal communication : request and (receiving) notifications.
+*/
+
+class JackClientChannelInterface
+{
+
+ public:
+
+ JackClientChannelInterface()
+ {}
+ virtual ~JackClientChannelInterface()
+ {}
+
+ // Open the Server/Client connection
+ virtual int Open(const char* name, JackClient* obj)
+ {
+ return 0;
+ }
+
+ // Close the Server/Client connection
+ virtual void Close()
+ {}
+
+ // Start listening for messages from the server
+ virtual int Start()
+ {
+ return 0;
+ }
+
+ // Stop listening for messages from the server
+ virtual void Stop()
+ {}
+
+ virtual void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+ {}
+ virtual void ClientNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
+ {}
+ virtual void ClientClose(int refnum, int* result)
+ {}
+
+ virtual void ClientActivate(int refnum, int* result)
+ {}
+ virtual void ClientDeactivate(int refnum, int* result)
+ {}
+
+ virtual void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+ {}
+ virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
+ {}
+
+ virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
+ {}
+ virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
+ {}
+ virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+ {}
+ virtual void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+ {}
+
+ virtual void SetBufferSize(jack_nframes_t nframes, int* result)
+ {}
+ virtual void SetFreewheel(int onoff, int* result)
+ {}
+
+ virtual void ReleaseTimebase(int refnum, int* result)
+ {}
+
+ virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
+ {}
+
+};
+
+/*!
+\brief Inter process channel for server to client notifications.
+*/
+
+class JackNotifyChannelInterface
+{
+
+ public:
+
+ JackNotifyChannelInterface()
+ {}
+ virtual ~JackNotifyChannelInterface()
+ {}
+
+ // Open the Server/Client connection
+ virtual int Open(const char* name)
+ {
+ return 0;
+ }
+ // Close the Server/Client connection
+ virtual void Close()
+ {}
+
+ /*
+ The "sync" parameter allows to choose between "synchronous" and "asynchronous" notification
+ */
+ virtual void ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result)
+ {}
+
+ typedef enum {
+ kAddClient = 0,
+ kRemoveClient = 1,
+ kXRunCallback = 2,
+ kGraphOrderCallback = 3,
+ kBufferSizeCallback = 4,
+ kStartFreewheel = 5,
+ kStopFreewheel = 6,
+ kPortRegistrationOn = 7,
+ kPortRegistrationOff = 8,
+ kZombifyClient = 9,
+ kDeadClient = 10
+ } NotificationType;
+
+};
+
+/*!
+\brief Entry point channel for client/server communication.
+*/
+
+class JackServerChannelInterface
+{
+
+ public:
+
+ JackServerChannelInterface()
+ {}
+ virtual ~JackServerChannelInterface()
+ {}
+
+ // Open the Server/Client connection
+ virtual int Open(JackServer* server)
+ {
+ return 0;
+ }
+ // Close the Server/Client connection
+ virtual void Close()
+ {}
+};
+
+/*!
+\brief Channel for server RT thread to request server thread communication.
+*/
+
+class JackServerNotifyChannelInterface
+{
+
+ public:
+
+ JackServerNotifyChannelInterface()
+ {}
+ virtual ~JackServerNotifyChannelInterface()
+ {}
+
+ // Open the Server RT/Server connection
+ virtual int Open()
+ {
+ return 0;
+ }
+ // Close the Server RT/Server connection
+ virtual void Close()
+ {}
+
+ virtual void ClientNotify(int refnum, int notify, int value)
+ {}
+
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackChannelTransaction.h b/common/JackChannelTransaction.h
new file mode 100644
index 00000000..d83d4780
--- /dev/null
+++ b/common/JackChannelTransaction.h
@@ -0,0 +1,48 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackChannelTransaction__
+#define __JackChannelTransaction__
+
+
+namespace Jack
+{
+
+/*!
+\brief Channel input/output communication.
+*/
+
+class JackChannelTransaction
+{
+
+ public:
+
+ JackChannelTransaction()
+ {}
+ virtual ~JackChannelTransaction()
+ {}
+
+ virtual int Read(void* data, int len) = 0;
+ virtual int Write(void* data, int len) = 0;
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackClient.cpp b/common/JackClient.cpp
new file mode 100644
index 00000000..ec1e0468
--- /dev/null
+++ b/common/JackClient.cpp
@@ -0,0 +1,767 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+
+#include "JackClient.h"
+#include "JackGraphManager.h"
+#include "JackClientControl.h"
+#include "JackEngineControl.h"
+#include "JackGlobals.h"
+#include "JackChannel.h"
+#include "JackTransportEngine.h"
+#include <math.h>
+#include <string>
+
+int verbose = 0;
+
+using namespace std;
+
+namespace Jack
+{
+
+JackClient::JackClient()
+{}
+
+JackClient::JackClient(JackSynchro** table)
+{
+ fThread = JackGlobals::MakeThread(this);
+ fSynchroTable = table;
+ fProcess = NULL;
+ fGraphOrder = NULL;
+ fXrun = NULL;
+ fShutdown = NULL;
+ fInit = NULL;
+ fBufferSize = NULL;
+ fFreewheel = NULL;
+ fPortRegistration = NULL;
+ fSync = NULL;
+ fProcessArg = NULL;
+ fGraphOrderArg = NULL;
+ fXrunArg = NULL;
+ fShutdownArg = NULL;
+ fInitArg = NULL;
+ fBufferSizeArg = NULL;
+ fFreewheelArg = NULL;
+ fPortRegistrationArg = NULL;
+ fSyncArg = NULL;
+ fConditionnal = 0; // Temporary??
+}
+
+JackClient::~JackClient()
+{
+ delete fThread;
+}
+
+int JackClient::Close()
+{
+ JackLog("JackClient::Close ref = %ld\n", GetClientControl()->fRefNum);
+ Deactivate();
+ int result = -1;
+ fChannel->ClientClose(GetClientControl()->fRefNum, &result);
+ fChannel->Stop();
+ fChannel->Close();
+ fSynchroTable[GetClientControl()->fRefNum]->Disconnect();
+ return result;
+}
+
+bool JackClient::IsActive()
+{
+ return (GetClientControl()) ? GetClientControl()->fActive : false;
+}
+
+pthread_t JackClient::GetThreadID()
+{
+ return fThread->GetThreadID();
+}
+
+/*!
+\brief
+ In ASYNC mode, the server does not synchronize itself on the output drivers, thus it would never "consume" the activations.
+ The synchronization primitives for drivers are setup in "flush" mode that to not keep unneeded activations.
+ Drivers synchro are setup in "flush" mode if server is ASYNC and NOT freewheel.
+*/
+void JackClient::SetupDriverSync(bool freewheel)
+{
+ if (!freewheel && !GetEngineControl()->fSyncMode) {
+ JackLog("JackClient::SetupDriverSync driver sem in flush mode\n");
+ 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");
+ fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(false);
+ fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(false);
+ fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(false);
+ }
+}
+
+/*!
+\brief Notification received from the server.
+*/
+
+int JackClient::ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value)
+{
+ return 0;
+}
+
+int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value)
+{
+ int res = 0;
+
+ // Done all time: redirected on subclass implementation JackLibClient and JackInternalClient
+ switch (notify) {
+
+ case JackNotifyChannelInterface::kAddClient:
+ case JackNotifyChannelInterface::kRemoveClient:
+ res = ClientNotifyImp(refnum, name, notify, sync, value);
+ break;
+ }
+
+ /*
+ The current semantic is that notifications can only be received when the client has been activated,
+ although is this implementation, one could imagine calling notifications as soon as the client has be opened.
+ */
+ if (IsActive()) {
+
+ switch (notify) {
+
+ case JackNotifyChannelInterface::kBufferSizeCallback:
+ JackLog("JackClient::kBufferSizeCallback buffer_size = %ld\n", value);
+ if (fBufferSize)
+ res = fBufferSize(value, fBufferSizeArg);
+ break;
+
+ case JackNotifyChannelInterface::kGraphOrderCallback:
+ JackLog("JackClient::kGraphOrderCallback\n");
+ if (fGraphOrder)
+ res = fGraphOrder(fGraphOrderArg);
+ break;
+
+ case JackNotifyChannelInterface::kStartFreewheel:
+ JackLog("JackClient::kStartFreewheel\n");
+ SetupDriverSync(true);
+ fThread->DropRealTime();
+ if (fFreewheel)
+ fFreewheel(1, fFreewheelArg);
+ break;
+
+ case JackNotifyChannelInterface::kStopFreewheel:
+ JackLog("JackClient::kStopFreewheel\n");
+ SetupDriverSync(false);
+ if (fFreewheel)
+ fFreewheel(0, fFreewheelArg);
+ fThread->AcquireRealTime();
+ break;
+
+ case JackNotifyChannelInterface::kPortRegistrationOn:
+ JackLog("JackClient::kPortRegistrationOn port_index = %ld\n", value);
+ if (fPortRegistration)
+ fPortRegistration(value, 1, fPortRegistrationArg);
+ break;
+
+ case JackNotifyChannelInterface::kPortRegistrationOff:
+ JackLog("JackClient::kPortRegistrationOff port_index = %ld \n", value);
+ if (fPortRegistration)
+ fPortRegistration(value, 0, fPortRegistrationArg);
+ break;
+
+ case JackNotifyChannelInterface::kXRunCallback:
+ JackLog("JackClient::kXRunCallback\n");
+ if (fXrun)
+ res = fXrun(fXrunArg);
+ break;
+
+ case JackNotifyChannelInterface::kZombifyClient:
+ res = fThread->Kill();
+ JackLog("JackClient::kZombifyClient name = %s ref = %ld \n", name, refnum);
+ ShutDown();
+ break;
+ }
+ }
+
+ return res;
+}
+
+/*!
+\brief We need to start thread before activating in the server, otherwise the FW driver
+ connected to the client may not be activated.
+*/
+int JackClient::Activate()
+{
+ JackLog("JackClient::Activate \n");
+ if (IsActive())
+ return 0;
+
+ if (StartThread() < 0)
+ return -1;
+
+ int result = -1;
+ fChannel->ClientActivate(GetClientControl()->fRefNum, &result);
+ if (result < 0)
+ return result;
+
+ if (fSync != NULL) /* If a SyncCallback is pending... */
+ SetSyncCallback(fSync, fSyncArg);
+
+ if (fTimebase != NULL) /* If a TimebaseCallback is pending... */
+ SetTimebaseCallback(fConditionnal, fTimebase, fTimebaseArg);
+
+ GetClientControl()->fActive = true;
+ return 0;
+}
+
+/*!
+\brief Need to stop thread after deactivating in the server.
+*/
+int JackClient::Deactivate()
+{
+ JackLog("JackClient::Deactivate \n");
+ if (!IsActive())
+ return 0;
+
+ GetClientControl()->fActive = false;
+ int result = -1;
+ fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result);
+
+ JackLog("JackClient::Deactivate res = %ld \n", result);
+ // We need to wait for the new engine cycle before stopping the RT thread, but this is done by ClientDeactivate
+ fThread->Kill();
+ return result;
+}
+
+//----------------------
+// RT thread management
+//----------------------
+
+bool JackClient::CallProcessCallback()
+{
+ return (fProcess == NULL) ? true : (fProcess(GetEngineControl()->fBufferSize, fProcessArg) == 0);
+}
+
+/*!
+\brief Called once when the thread starts.
+*/
+bool JackClient::Init()
+{
+ if (fInit) {
+ JackLog("JackClient::Init calling client thread init callback\n");
+ fInit(fInitArg);
+ }
+ return true;
+}
+
+int JackClient::StartThread()
+{
+ JackLog("JackClient::StartThread : period = %ld computation = %ld constraint = %ld\n",
+ long(int64_t(GetEngineControl()->fPeriod) / 1000.0f),
+ long(int64_t(GetEngineControl()->fComputation) / 1000.0f),
+ long(int64_t(GetEngineControl()->fConstraint) / 1000.0f));
+
+ // Will do "something" on OSX only...
+ fThread->SetParams(GetEngineControl()->fPeriod, GetEngineControl()->fComputation, GetEngineControl()->fConstraint);
+
+ if (fThread->Start() < 0) {
+ jack_error("Start thread error");
+ return -1;
+ }
+
+ if (GetEngineControl()->fRealTime) {
+ if (fThread->AcquireRealTime(GetEngineControl()->fPriority - 1) < 0) {
+ jack_error("AcquireRealTime error");
+ }
+ }
+
+ return 0;
+}
+
+/*!
+\brief RT thread.
+*/
+bool JackClient::Execute()
+{
+ // Suspend itself: wait on the input synchro
+ if (GetGraphManager()->SuspendRefNum(GetClientControl(), fSynchroTable, 0x7FFFFFFF) < 0) {
+ jack_error("SuspendRefNum error");
+ goto error;
+ }
+
+ // Process call
+ if (IsActive()) {
+ CallSyncCallback();
+ bool res = CallProcessCallback();
+ CallTimebaseCallback();
+ if (!res)
+ goto end;
+ } else {
+ JackLog("Process called for an inactive client\n");
+ // Happens if client is still not activated (connected to the FW)
+ // or still runs while being desactivated by the server
+ }
+
+ // Resume: signal output clients connected to the running client
+ if (GetGraphManager()->ResumeRefNum(GetClientControl(), fSynchroTable) < 0) {
+ jack_error("ResumeRefNum error");
+ }
+
+ return true;
+
+end:
+ JackLog("JackClient::Execute end name = %s\n", GetClientControl()->fName);
+
+ // Continue graph execution for this cycle
+ if (GetGraphManager()->ResumeRefNum(GetClientControl(), fSynchroTable) < 0) {
+ jack_error("ResumeRefNum error");
+ }
+
+ // Hum... not sure about this, the following "close" code is called in the RT thread...
+ int result;
+ fThread->DropRealTime();
+ fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result);
+ Close(); // Not sure...
+ return false;
+
+error:
+ jack_error("JackClient::Execute error name = %s", GetClientControl()->fName);
+ // Hum... not sure about this, the following "close" code is called in the RT thread...
+ fThread->DropRealTime();
+ ShutDown();
+ return false;
+}
+
+//-----------------
+// Port management
+//-----------------
+
+int JackClient::PortRegister(const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size)
+{
+ // Check port name length
+ string port_name_str = string(port_name);
+ if (port_name_str.size() == 0) {
+ jack_error("port_name is empty.");
+ return 0; // Means failure here...
+ }
+
+ string name = string(GetClientControl()->fName) + string(":") + port_name_str;
+ if (name.size() >= JACK_PORT_NAME_SIZE) {
+ jack_error("\"%s:%s\" is too long to be used as a JACK port name.\n"
+ "Please use %lu characters or less.",
+ GetClientControl()->fName,
+ port_name,
+ JACK_PORT_NAME_SIZE - 1);
+ return 0; // Means failure here...
+ }
+
+ // Check if port name already exists
+ if (GetGraphManager()->GetPort(name.c_str()) != NO_PORT) {
+ jack_error("port_name \"%s\" already exists.", port_name);
+ return 0; // Means failure here...
+ }
+
+ JackLog("JackClient::PortRegister ref = %ld name = %s \n", GetClientControl()->fRefNum, name.c_str());
+
+ int result = -1;
+ jack_port_id_t port_index = NO_PORT;
+ fChannel->PortRegister(GetClientControl()->fRefNum, name.c_str(), flags, buffer_size, &port_index, &result);
+ JackLog("JackClient::PortRegister port_index = %ld \n", port_index);
+
+ if (result == 0) {
+ fPortList.push_back(port_index);
+ return port_index;
+ } else {
+ return 0;
+ }
+}
+
+int JackClient::PortUnRegister(jack_port_id_t port_index)
+{
+ JackLog("JackClient::PortUnRegister port_index = %ld\n", port_index);
+ list<jack_port_id_t>::iterator it;
+ for (it = fPortList.begin(); it != fPortList.end() && *it != port_index; it++)
+ ;
+
+ if (it != fPortList.end()) {
+ fPortList.erase(it);
+ int result = -1;
+ fChannel->PortUnRegister(GetClientControl()->fRefNum, port_index, &result);
+ return result;
+ } else {
+ jack_error("unregistering a port %ld that is not own by the client", port_index);
+ return -1;
+ }
+}
+
+int JackClient::PortConnect(const char* src, const char* dst)
+{
+ JackLog("JackClient::Connect src = %s dst = %s\n", src, dst);
+ int result = -1;
+ fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result);
+ return result;
+}
+
+int JackClient::PortDisconnect(const char* src, const char* dst)
+{
+ JackLog("JackClient::Disconnect src = %s dst = %s\n", src, dst);
+ int result = -1;
+ fChannel->PortDisconnect(GetClientControl()->fRefNum, src, dst, &result);
+ return result;
+}
+
+int JackClient::PortConnect(jack_port_id_t src, jack_port_id_t dst)
+{
+ JackLog("JackClient::PortConnect src = %ld dst = %ld\n", src, dst);
+ int result = -1;
+ fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result);
+ return result;
+}
+
+int JackClient::PortDisconnect(jack_port_id_t src)
+{
+ JackLog("JackClient::PortDisconnect src = %ld\n", src);
+ int result = -1;
+ fChannel->PortDisconnect(GetClientControl()->fRefNum, src, ALL_PORTS, &result);
+ return result;
+}
+
+int JackClient::PortIsMine(jack_port_id_t port_index)
+{
+ JackPort* port = GetGraphManager()->GetPort(port_index);
+ return GetClientControl()->fRefNum == port->GetRefNum();
+}
+
+//--------------------
+// Context management
+//--------------------
+
+int JackClient::SetBufferSize(jack_nframes_t nframes)
+{
+ int result = -1;
+ fChannel->SetBufferSize(nframes, &result);
+ return result;
+}
+
+int JackClient::SetFreeWheel(int onoff)
+{
+ int result = -1;
+ fChannel->SetFreewheel(onoff, &result);
+ return result;
+}
+
+/*
+ShutDown is called:
+- from the RT thread when Execute method fails
+- possibly from a "closed" notification channel
+(Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown))
+*/
+
+void JackClient::ShutDown()
+{
+ JackLog("ShutDown\n");
+ if (fShutdown) {
+ GetClientControl()->fActive = false;
+ fShutdown(fShutdownArg);
+ fShutdown = NULL;
+ }
+}
+
+//----------------------
+// Transport management
+//----------------------
+
+int JackClient::ReleaseTimebase()
+{
+ int result = -1;
+ fChannel->ReleaseTimebase(GetClientControl()->fRefNum, &result);
+ if (result == 0) {
+ fTimebase = NULL;
+ fTimebaseArg = NULL;
+ }
+ return result;
+}
+
+/* Call the server if the client is active, otherwise keeps the arguments */
+int JackClient::SetSyncCallback(JackSyncCallback sync_callback, void* arg)
+{
+ if (IsActive())
+ GetClientControl()->fTransportState = (sync_callback == NULL) ? JackTransportStopped : JackTransportSynching;
+ fSync = sync_callback;
+ fSyncArg = arg;
+ return 0;
+}
+
+int JackClient::SetSyncTimeout(jack_time_t timeout)
+{
+ GetEngineControl()->fTransport.SetSyncTimeout(timeout);
+ return 0;
+}
+
+/* Call the server if the client is active, otherwise keeps the arguments */
+int JackClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timebase_callback, void* arg)
+{
+ if (IsActive()) {
+ int result = -1;
+ fChannel->SetTimebaseCallback(GetClientControl()->fRefNum, conditional, &result);
+ JackLog("SetTimebaseCallback result = %ld\n", result);
+ if (result == 0) {
+ fTimebase = timebase_callback;
+ fTimebaseArg = arg;
+ } else {
+ fTimebase = NULL;
+ fTimebaseArg = NULL;
+ }
+ JackLog("SetTimebaseCallback OK result = %ld\n", result);
+ return result;
+ } else {
+ fTimebase = timebase_callback;
+ fTimebaseArg = arg;
+ fConditionnal = conditional;
+ return 0;
+ }
+}
+
+// Must be RT safe
+int JackClient::RequestNewPos(jack_position_t* pos)
+{
+ JackTransportEngine& transport = GetEngineControl()->fTransport;
+ 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);
+ transport.WriteNextStateStop(2);
+ return 0;
+}
+
+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);
+ return RequestNewPos(&pos);
+}
+
+int JackClient::TransportReposition(jack_position_t* pos)
+{
+ jack_position_t tmp = *pos;
+ JackLog("TransportReposition pos = %ld\n", pos->frame);
+ return (tmp.valid & ~JACK_POSITION_MASK) ? EINVAL : RequestNewPos(&tmp);
+}
+
+jack_transport_state_t JackClient::TransportQuery(jack_position_t* pos)
+{
+ if (pos)
+ GetEngineControl()->fTransport.ReadCurrentPos(pos);
+ return GetEngineControl()->fTransport.GetState();
+}
+
+jack_nframes_t JackClient::GetCurrentTransportFrame()
+{
+ jack_position_t pos;
+ jack_transport_state_t state = TransportQuery(&pos);
+
+ if (state == JackTransportRolling) {
+ float usecs = GetMicroSeconds() - pos.usecs;
+ jack_nframes_t elapsed = (jack_nframes_t)floor((((float) pos.frame_rate) / 1000000.0f) * usecs);
+ return pos.frame + elapsed;
+ } else {
+ return pos.frame;
+ }
+}
+
+// Must be RT safe: directly write in the transport shared mem
+void JackClient::TransportStart()
+{
+ GetEngineControl()->fTransport.SetCommand(TransportCommandStart);
+}
+
+// Must be RT safe: directly write in the transport shared mem
+void JackClient::TransportStop()
+{
+ GetEngineControl()->fTransport.SetCommand(TransportCommandStop);
+}
+
+// Never called concurently with the server
+// TODO check concurency with SetSyncCallback
+
+void JackClient::CallSyncCallback()
+{
+ JackTransportEngine& transport = GetEngineControl()->fTransport;
+ jack_position_t* cur_pos = transport.ReadCurrentState();
+ jack_transport_state_t transport_state = transport.GetState();
+
+ switch (transport_state) {
+
+ case JackTransportStarting: // Starting...
+ if (fSync == NULL) {
+ GetClientControl()->fTransportState = JackTransportRolling;
+ } else if (GetClientControl()->fTransportState == JackTransportStarting) {
+ if (fSync(transport_state, cur_pos, fSyncArg))
+ GetClientControl()->fTransportState = JackTransportRolling;
+ }
+ break;
+
+ case JackTransportRolling:
+ if (fSync != NULL && GetClientControl()->fTransportState == JackTransportStarting) { // Client still not ready
+ if (fSync(transport_state, cur_pos, fSyncArg))
+ GetClientControl()->fTransportState = JackTransportRolling;
+ }
+ break;
+
+ case JackTransportSynching:
+ // New pos when transport engine is stopped...
+ if (fSync != NULL) {
+ fSync(JackTransportStopped, cur_pos, fSyncArg);
+ GetClientControl()->fTransportState = JackTransportStopped;
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void JackClient::CallTimebaseCallback()
+{
+ JackTransportEngine& transport = GetEngineControl()->fTransport;
+
+ if (fTimebase != NULL && fTimebaseArg != NULL && GetClientControl()->fRefNum == transport.GetTimebaseMaster()) {
+
+ jack_transport_state_t transport_state = transport.GetState();
+ jack_position_t* cur_pos = transport.WriteNextStateStart(1);
+
+ switch (transport_state) {
+
+ case JackTransportRolling:
+ fTimebase(transport_state, GetEngineControl()->fBufferSize, cur_pos, false, fTimebaseArg);
+ break;
+
+ case JackTransportSynching:
+ fTimebase(JackTransportStopped, GetEngineControl()->fBufferSize, cur_pos, true, fTimebaseArg);
+ break;
+
+ default:
+ break;
+ }
+
+ transport.WriteNextStateStop(1);
+ }
+}
+
+//---------------------
+// Callback management
+//---------------------
+
+void JackClient::OnShutdown(JackShutdownCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ } else {
+ fShutdownArg = arg;
+ fShutdown = callback;
+ }
+}
+
+int JackClient::SetProcessCallback(JackProcessCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fProcessArg = arg;
+ fProcess = callback;
+ return 0;
+ }
+}
+
+int JackClient::SetXRunCallback(JackXRunCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fXrunArg = arg;
+ fXrun = callback;
+ return 0;
+ }
+}
+
+int JackClient::SetInitCallback(JackThreadInitCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fInitArg = arg;
+ fInit = callback;
+ return 0;
+ }
+}
+
+int JackClient::SetGraphOrderCallback(JackGraphOrderCallback callback, void *arg)
+{
+ JackLog("SetGraphOrderCallback \n");
+
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fGraphOrder = callback;
+ fGraphOrderArg = arg;
+ return 0;
+ }
+}
+
+int JackClient::SetBufferSizeCallback(JackBufferSizeCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fBufferSizeArg = arg;
+ fBufferSize = callback;
+ return 0;
+ }
+}
+
+int JackClient::SetFreewheelCallback(JackFreewheelCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fFreewheelArg = arg;
+ fFreewheel = callback;
+ return 0;
+ }
+}
+
+int JackClient::SetPortRegistrationCallback(JackPortRegistrationCallback callback, void *arg)
+{
+ if (IsActive()) {
+ jack_error("You cannot set callbacks on an active client");
+ return -1;
+ } else {
+ fPortRegistrationArg = arg;
+ fPortRegistration = callback;
+ return 0;
+ }
+}
+
+} // end of namespace
+
diff --git a/common/JackClient.h b/common/JackClient.h
new file mode 100644
index 00000000..b1b5eee0
--- /dev/null
+++ b/common/JackClient.h
@@ -0,0 +1,162 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackClient__
+#define __JackClient__
+
+#include "JackClientInterface.h"
+#include "JackThread.h"
+#include "JackConstants.h"
+#include "JackSynchro.h"
+#include "types.h"
+#include "transport_types.h"
+#include <list>
+
+namespace Jack
+{
+
+class JackClientChannelInterface;
+class JackGraphManager;
+class JackServer;
+class JackEngine;
+class JackSynchro;
+struct JackClientControl;
+struct JackEngineControl;
+class JackSyncInterface;
+
+typedef void (*JackShutdownCallback)(void *arg);
+
+/*!
+\brief The base class for clients: share part of the implementation for JackInternalClient and JackLibClient.
+*/
+
+class JackClient : public JackClientInterface, public JackRunnableInterface
+{
+
+ protected:
+
+ JackProcessCallback fProcess;
+ JackGraphOrderCallback fGraphOrder;
+ JackXRunCallback fXrun;
+ JackShutdownCallback fShutdown;
+ JackThreadInitCallback fInit;
+ JackBufferSizeCallback fBufferSize;
+ JackFreewheelCallback fFreewheel;
+ JackPortRegistrationCallback fPortRegistration;
+ JackTimebaseCallback fTimebase;
+ JackSyncCallback fSync;
+ void* fProcessArg;
+ void* fGraphOrderArg;
+ void* fXrunArg;
+ void* fShutdownArg;
+ void* fInitArg;
+ void* fBufferSizeArg;
+ void* fFreewheelArg;
+ void* fPortRegistrationArg;
+ void* fTimebaseArg;
+ void* fSyncArg;
+ int fConditionnal;
+
+ JackThread* fThread; /*! Thread to execute the Process function */
+ JackClientChannelInterface* fChannel;
+ JackSynchro** fSynchroTable;
+ std::list<jack_port_id_t> fPortList;
+
+ int StartThread();
+ void SetupDriverSync(bool freewheel);
+ bool IsActive();
+
+ bool CallProcessCallback();
+ void CallSyncCallback();
+ void CallTimebaseCallback();
+ int RequestNewPos(jack_position_t* pos);
+
+ virtual int ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value);
+
+ public:
+
+ JackClient();
+ JackClient(JackSynchro** table);
+ virtual ~JackClient();
+
+ virtual int Open(const char* name) = 0;
+ virtual int Close();
+
+ virtual JackGraphManager* GetGraphManager() const = 0;
+ virtual JackEngineControl* GetEngineControl() const = 0;
+
+ // Notifications
+ virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value);
+
+ virtual int Activate();
+ virtual int Deactivate();
+
+ // Context
+ virtual int SetBufferSize(jack_nframes_t nframes);
+ virtual int SetFreeWheel(int onoff);
+ virtual void ShutDown();
+ virtual pthread_t GetThreadID();
+
+ // Port management
+ virtual int PortRegister(const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size);
+ virtual int PortUnRegister(jack_port_id_t port);
+
+ virtual int PortConnect(const char* src, const char* dst);
+ virtual int PortDisconnect(const char* src, const char* dst);
+ virtual int PortConnect(jack_port_id_t src, jack_port_id_t dst);
+ virtual int PortDisconnect(jack_port_id_t src);
+
+ int PortIsMine(jack_port_id_t port_index);
+
+ // Transport
+ virtual int ReleaseTimebase();
+ virtual int SetSyncCallback(JackSyncCallback sync_callback, void* arg);
+ virtual int SetSyncTimeout(jack_time_t timeout);
+ virtual int SetTimebaseCallback(int conditional, JackTimebaseCallback timebase_callback, void* arg);
+ virtual int TransportLocate(jack_nframes_t frame);
+ virtual jack_transport_state_t TransportQuery(jack_position_t* pos);
+ virtual jack_nframes_t GetCurrentTransportFrame();
+ virtual int TransportReposition(jack_position_t* pos);
+ virtual void TransportStart();
+ virtual void TransportStop();
+
+ // Callbacks
+ virtual void OnShutdown(JackShutdownCallback callback, void *arg);
+ virtual int SetProcessCallback(JackProcessCallback callback, void* arg);
+ virtual int SetXRunCallback(JackXRunCallback callback, void* arg);
+ virtual int SetInitCallback(JackThreadInitCallback callback, void* arg);
+ virtual int SetGraphOrderCallback(JackGraphOrderCallback callback, void* arg);
+ virtual int SetBufferSizeCallback(JackBufferSizeCallback callback, void* arg);
+ virtual int SetFreewheelCallback(JackFreewheelCallback callback, void* arg);
+ virtual int SetPortRegistrationCallback(JackPortRegistrationCallback callback, void* arg);
+
+ // JackRunnableInterface interface
+ bool Init();
+ bool Execute();
+};
+
+// Each "side" server and client will implement this to get the shared graph manager, engine control and inter-process synchro table.
+extern JackGraphManager* GetGraphManager();
+extern JackEngineControl* GetEngineControl();
+extern JackSynchro** GetSynchroTable();
+
+} // end of namespace
+
+#endif
diff --git a/common/JackClientControl.h b/common/JackClientControl.h
new file mode 100644
index 00000000..e9e9ce5a
--- /dev/null
+++ b/common/JackClientControl.h
@@ -0,0 +1,76 @@
+/*
+Copyright (C) 2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackClientControl__
+#define __JackClientControl__
+
+#include "JackShmMem.h"
+#include "JackPort.h"
+#include "JackSynchro.h"
+#include "transport_types.h"
+
+namespace Jack
+{
+
+/*!
+\brief Client control in shared memory.
+*/
+
+struct JackClientControl : public JackShmMem
+{
+ char fName[JACK_CLIENT_NAME_SIZE + 1];
+ volatile jack_transport_state_t fTransportState;
+ int fRefNum;
+ bool fZombie;
+ bool fActive;
+
+ JackClientControl(const char* name, int refnum)
+ {
+ Init(name, refnum);
+ }
+
+ JackClientControl(const char* name)
+ {
+ Init(name, -1);
+ }
+
+ JackClientControl()
+ {
+ Init("", -1);
+ }
+
+ virtual ~JackClientControl()
+ {}
+
+ void Init(const char* name, int refnum)
+ {
+ strcpy(fName, name);
+ fRefNum = refnum;
+ fTransportState = JackTransportStopped;
+ fZombie = false;
+ fActive = false;
+ }
+
+};
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackClientInterface.h b/common/JackClientInterface.h
new file mode 100644
index 00000000..b329794b
--- /dev/null
+++ b/common/JackClientInterface.h
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackClientInterface__
+#define __JackClientInterface__
+
+#include "JackExports.h"
+
+
+namespace Jack
+{
+
+struct JackClientControl;
+
+/*!
+\brief Client interface.
+*/
+
+class EXPORT JackClientInterface
+{
+
+ public:
+
+ JackClientInterface()
+ {}
+ virtual ~JackClientInterface()
+ {}
+
+ virtual int Close() = 0;
+
+ virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value) = 0;
+
+ virtual JackClientControl* GetClientControl() const = 0;
+};
+
+
+} // end of namespace
+
+#endif
diff --git a/common/JackConnectionManager.cpp b/common/JackConnectionManager.cpp
new file mode 100644
index 00000000..5a1de3f7
--- /dev/null
+++ b/common/JackConnectionManager.cpp
@@ -0,0 +1,452 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <assert.h>
+#include "JackConnectionManager.h"
+#include "JackClientControl.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+JackConnectionManager::JackConnectionManager()
+{
+ int i;
+ JackLog("JackConnectionManager::InitConnections size = %ld \n", sizeof(JackConnectionManager));
+
+ for (i = 0; i < PORT_NUM; i++) {
+ fConnection[i].Init();
+ }
+
+ fLoopFeedback.Init();
+
+ JackLog("JackConnectionManager::InitClients\n");
+ for (i = 0; i < CLIENT_NUM; i++) {
+ InitClient(i);
+ }
+}
+
+JackConnectionManager::~JackConnectionManager()
+{}
+
+//--------------
+// Internal API
+//--------------
+
+bool JackConnectionManager::IsLoopPathAux(int ref1, int ref2) const
+{
+ JackLog("JackConnectionManager::IsLoopPathAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
+
+ if (ref1 == AUDIO_DRIVER_REFNUM // Driver is reached
+ || ref2 == AUDIO_DRIVER_REFNUM
+ || ref1 == FREEWHEEL_DRIVER_REFNUM
+ || ref2 == FREEWHEEL_DRIVER_REFNUM
+ || ref1 == LOOPBACK_DRIVER_REFNUM
+ || ref2 == LOOPBACK_DRIVER_REFNUM) {
+ return false;
+ } else if (ref1 == ref2) { // Same refnum
+ return true;
+ } else {
+ jack_int_t output[CLIENT_NUM];
+ fConnectionRef.GetOutputTable(ref1, output);
+
+ if (fConnectionRef.IsInsideTable(ref2, output)) { // If ref2 is contained in the outputs of ref1
+ return true;
+ } else {
+ for (int i = 0; i < CLIENT_NUM && output[i] != EMPTY; i++) { // Otherwise recurse for all ref1 outputs
+ if (IsLoopPathAux(output[i], ref2))
+ return true; // Stop when a path is found
+ }
+ return false;
+ }
+ }
+}
+
+void JackConnectionManager::InitClient(int refnum)
+{
+ fInputPort[refnum].Init();
+ fOutputPort[refnum].Init();
+ fConnectionRef.Init(refnum);
+ fInputCounter[refnum].SetValue(0);
+}
+
+//--------------
+// External API
+//--------------
+
+int JackConnectionManager::GetActivation(int refnum) const
+{
+ return fInputCounter[refnum].GetValue();
+}
+
+/*!
+\brief Connect port_src to port_dst.
+*/
+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);
+
+ if (fConnection[port_src].AddItem(port_dst)) {
+ return 0;
+ } else {
+ jack_error("Connection table is full !!");
+ return -1;
+ }
+}
+
+/*!
+\brief Disconnect port_src from port_dst.
+*/
+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);
+
+ if (fConnection[port_src].RemoveItem(port_dst)) {
+ return 0;
+ } else {
+ jack_error("Connection not found !!");
+ return -1;
+ }
+}
+
+/*!
+\brief Check if port_src and port_dst are connected.
+*/
+bool JackConnectionManager::IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst) const
+{
+ return fConnection[port_src].CheckItem(port_dst);
+}
+
+/*!
+\brief Get the connection number of a given port.
+*/
+jack_int_t JackConnectionManager::Connections(jack_port_id_t port_index) const
+{
+ return fConnection[port_index].GetItemCount();
+}
+
+jack_port_id_t JackConnectionManager::GetPort(jack_port_id_t port_index, int connection) const
+{
+ assert(connection < CONNECTION_NUM);
+ return (jack_port_id_t)fConnection[port_index].GetItem(connection);
+}
+
+/*!
+\brief Get the connection port array.
+*/
+const jack_int_t* JackConnectionManager::GetConnections(jack_port_id_t port_index) const
+{
+ return fConnection[port_index].GetItems();
+}
+
+//------------------------
+// Client port management
+//------------------------
+
+/*!
+\brief Add an input port to a client.
+*/
+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);
+ return 0;
+ } else {
+ jack_error("Maximum number of input ports is reached for application ref = %ld", refnum);
+ return -1;
+ }
+}
+
+/*!
+\brief Add an output port to a client.
+*/
+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);
+ return 0;
+ } else {
+ jack_error("Maximum number of output ports is reached for application ref = %ld", refnum);
+ return -1;
+ }
+}
+
+/*!
+\brief Remove an input port from a client.
+*/
+int JackConnectionManager::RemoveInputPort(int refnum, jack_port_id_t port_index)
+{
+ JackLog("JackConnectionManager::RemoveInputPort ref = %ld port_index = %ld \n", refnum, port_index);
+
+ if (fInputPort[refnum].RemoveItem(port_index)) {
+ return 0;
+ } else {
+ jack_error("Input port index = %ld not found for application ref = %ld", port_index, refnum);
+ return -1;
+ }
+}
+
+/*!
+\brief Remove an output port from a client.
+*/
+int JackConnectionManager::RemoveOutputPort(int refnum, jack_port_id_t port_index)
+{
+ JackLog("JackConnectionManager::RemoveOutputPort ref = %ld port_index = %ld \n", refnum, port_index);
+
+ if (fOutputPort[refnum].RemoveItem(port_index)) {
+ return 0;
+ } else {
+ jack_error("Output port index = %ld not found for application ref = %ld", port_index, refnum);
+ return -1;
+ }
+}
+
+/*!
+\brief Get the input port array of a given refnum.
+*/
+const jack_int_t* JackConnectionManager::GetInputPorts(int refnum)
+{
+ return fInputPort[refnum].GetItems();
+}
+
+/*!
+\brief Get the output port array of a given refnum.
+*/
+const jack_int_t* JackConnectionManager::GetOutputPorts(int refnum)
+{
+ return fOutputPort[refnum].GetItems();
+}
+
+/*!
+\brief Return the first available refnum.
+*/
+int JackConnectionManager::AllocateRefNum()
+{
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ if (fInputPort[i].IsAvailable()) {
+ JackLog("JackConnectionManager::AllocateRefNum ref = %ld\n", i);
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+/*!
+\brief Release the refnum.
+*/
+void JackConnectionManager::ReleaseRefNum(int refnum)
+{
+ JackLog("JackConnectionManager::ReleaseRefNum ref = %ld\n", refnum);
+ InitClient(refnum);
+}
+
+/*!
+\brief Reset all clients activation.
+*/
+void JackConnectionManager::ResetGraph(JackClientTiming* timing)
+{
+ // Reset activation counter : must be done *before* starting to resume clients
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ fInputCounter[i].Reset();
+ timing[i].fStatus = NotTriggered;
+ }
+}
+
+/*!
+\brief Wait on the input synchro.
+*/
+int JackConnectionManager::SuspendRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing, long time_out_usec)
+{
+ int res;
+ if ((res = table[control->fRefNum]->TimedWait(time_out_usec))) {
+ timing[control->fRefNum].fStatus = Running;
+ timing[control->fRefNum].fAwakeAt = GetMicroSeconds();
+ }
+ return (res) ? 0 : -1;
+}
+
+/*!
+\brief Signal clients connected to the given client.
+*/
+int JackConnectionManager::ResumeRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing)
+{
+ jack_time_t current_date = GetMicroSeconds();
+ const jack_int_t* outputRef = fConnectionRef.GetItems(control->fRefNum);
+ int res = 0;
+
+ // Update state and timestamp of current client
+ timing[control->fRefNum].fStatus = Finished;
+ timing[control->fRefNum].fFinishedAt = current_date;
+
+ for (int i = 0; i < CLIENT_NUM; i++) {
+
+ // Signal connected clients or drivers
+ if (outputRef[i] > 0) {
+
+ // Update state and timestamp of destination clients
+ timing[i].fStatus = Triggered;
+ timing[i].fSignaledAt = current_date;
+
+ if (!fInputCounter[i].Signal(table[i], control)) {
+ JackLog("JackConnectionManager::ResumeRefNum error: ref = %ld output = %ld \n", control->fRefNum, i);
+ res = -1;
+ }
+ }
+ }
+
+ return res;
+}
+
+/*!
+\brief Increment the number of ports between 2 clients, if the 2 clients become connected, then the Activation counter is updated.
+*/
+void JackConnectionManager::IncDirectConnection(jack_port_id_t port_src, jack_port_id_t port_dst)
+{
+ int ref1 = GetOutputRefNum(port_src);
+ int ref2 = GetInputRefNum(port_dst);
+
+ assert(ref1 >= 0 && ref2 >= 0);
+
+ DirectConnect(ref1, ref2);
+ JackLog("JackConnectionManager::IncConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2);
+}
+
+/*!
+\brief Decrement the number of ports between 2 clients, if the 2 clients become disconnected, then the Activation counter is updated.
+*/
+void JackConnectionManager::DecDirectConnection(jack_port_id_t port_src, jack_port_id_t port_dst)
+{
+ int ref1 = GetOutputRefNum(port_src);
+ int ref2 = GetInputRefNum(port_dst);
+
+ assert(ref1 >= 0 && ref2 >= 0);
+
+ DirectDisconnect(ref1, ref2);
+ JackLog("JackConnectionManager::DecConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2);
+}
+
+/*!
+\brief Directly connect 2 reference numbers.
+*/
+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);
+ fInputCounter[ref2].IncValue();
+ }
+}
+
+/*!
+\brief Directly disconnect 2 reference numbers.
+*/
+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);
+ fInputCounter[ref2].DecValue();
+ }
+}
+
+/*!
+\brief Returns the connections state between 2 refnum.
+*/
+bool JackConnectionManager::IsDirectConnection(int ref1, int ref2) const
+{
+ assert(ref1 >= 0 && ref2 >= 0);
+ return fConnectionRef.GetItemCount(ref1, ref2);
+}
+
+/*!
+\brief Get the client refnum of a given input port.
+*/
+int JackConnectionManager::GetInputRefNum(jack_port_id_t port_index) const
+{
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ if (fInputPort[i].CheckItem(port_index))
+ return i;
+ }
+
+ return -1;
+}
+
+/*!
+\brief Get the client refnum of a given ouput port.
+*/
+int JackConnectionManager::GetOutputRefNum(jack_port_id_t port_index) const
+{
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ if (fOutputPort[i].CheckItem(port_index))
+ return i;
+ }
+
+ return -1;
+}
+
+/*!
+\brief Test is a connection path exists between port_src and port_dst.
+*/
+bool JackConnectionManager::IsLoopPath(jack_port_id_t port_src, jack_port_id_t port_dst) const
+{
+ return IsLoopPathAux(GetInputRefNum(port_dst), GetOutputRefNum(port_src));
+}
+
+bool JackConnectionManager::IsFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst) const
+{
+ return (fLoopFeedback.GetConnectionIndex(GetOutputRefNum(port_src), GetInputRefNum(port_dst)) >= 0);
+}
+
+bool JackConnectionManager::IncFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst)
+{
+ int ref1 = GetOutputRefNum(port_src);
+ int ref2 = GetInputRefNum(port_dst);
+
+ // Add an activation connection in the other direction
+ JackLog("JackConnectionManager::IncFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2);
+ assert(ref1 >= 0 && ref2 >= 0);
+
+ if (ref1 != ref2)
+ DirectConnect(ref2, ref1);
+
+ return fLoopFeedback.IncConnection(ref1, ref2); // Add the feedback connection
+}
+
+bool JackConnectionManager::DecFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst)
+{
+ int ref1 = GetOutputRefNum(port_src);
+ int ref2 = GetInputRefNum(port_dst);
+
+ // Remove an activation connection in the other direction
+ JackLog("JackConnectionManager::DecFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2);
+ assert(ref1 >= 0 && ref2 >= 0);
+
+ if (ref1 != ref2)
+ DirectDisconnect(ref2, ref1);
+
+ return fLoopFeedback.DecConnection(ref1, ref2); // Remove the feedback connection
+}
+
+} // end of namespace
+
+
diff --git a/common/JackConnectionManager.h b/common/JackConnectionManager.h
new file mode 100644
index 00000000..652cefc5
--- /dev/null
+++ b/common/JackConnectionManager.h
@@ -0,0 +1,468 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackConnectionManager__
+#define __JackConnectionManager__
+
+#include "JackConstants.h"
+#include "JackActivationCount.h"
+#include <assert.h>
+
+namespace Jack
+{
+
+#define NO_PORT 0xFFFE
+
+#define EMPTY 0xFFFD
+#define FREE 0xFFFC
+
+typedef uint16_t jack_int_t; // Internal type for ports and refnum
+
+struct JackClientControl;
+
+typedef enum {
+ NotTriggered,
+ Triggered,
+ Running,
+ Finished,
+} jack_client_state_t;
+
+/*!
+\brief Utility class.
+*/
+
+template <int SIZE>
+class JackFixedArray
+{
+
+ private:
+
+ jack_int_t fTable[SIZE];
+ uint32_t fCounter;
+
+ public:
+
+ JackFixedArray()
+ {
+ Init();
+ }
+
+ virtual ~JackFixedArray()
+ {}
+
+ void Init()
+ {
+ for (int i = 0; i < SIZE; i++)
+ fTable[i] = EMPTY;
+ fCounter = 0;
+ }
+
+ bool AddItem(jack_int_t index)
+ {
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i] == EMPTY) {
+ fTable[i] = index;
+ fCounter++;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool RemoveItem(jack_int_t index)
+ {
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i] == index) {
+ fCounter--;
+ // Shift all indexes
+ if (i == SIZE - 1) {
+ fTable[i] = EMPTY;
+ } else {
+ int j;
+ for (j = i; j <= SIZE - 2 && fTable[j] != EMPTY; j++) {
+ fTable[j] = fTable[j + 1];
+ }
+ fTable[j] = EMPTY;
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ jack_int_t GetItem(jack_int_t index) const
+ {
+ return (index < SIZE) ? fTable[index] : EMPTY;
+ }
+
+ const jack_int_t* GetItems() const
+ {
+ return fTable;
+ }
+
+ bool CheckItem(jack_int_t index) const
+ {
+ for (int i = 0; i < SIZE && fTable[i] != EMPTY; i++) {
+ if (fTable[i] == index)
+ return true;
+ }
+ return false;
+ }
+
+ uint32_t GetItemCount() const
+ {
+ return fCounter;
+ }
+
+};
+
+/*!
+\brief Utility class.
+*/
+
+template <int SIZE>
+class JackFixedArray1 : public JackFixedArray<SIZE>
+{
+ private:
+
+ bool fUsed;
+
+ public:
+
+ JackFixedArray1()
+ {
+ Init();
+ }
+
+ virtual ~JackFixedArray1()
+ {}
+
+ void Init()
+ {
+ JackFixedArray<SIZE>::Init();
+ fUsed = false;
+ }
+
+ bool IsAvailable()
+ {
+ if (fUsed) {
+ return false;
+ } else {
+ fUsed = true;
+ return true;
+ }
+ }
+};
+
+/*!
+\brief Utility class.
+*/
+
+template <int SIZE>
+class JackFixedMatrix
+{
+ private:
+
+ jack_int_t fTable[SIZE][SIZE];
+
+ public:
+
+ JackFixedMatrix()
+ {}
+
+ virtual ~JackFixedMatrix()
+ {}
+
+ void Init(jack_int_t index)
+ {
+ for (int i = 0; i < SIZE; i++) {
+ fTable[index][i] = 0;
+ fTable[i][index] = 0;
+ }
+ }
+
+ const jack_int_t* GetItems(jack_int_t index) const
+ {
+ return fTable[index];
+ }
+
+ jack_int_t IncItem(jack_int_t index1, jack_int_t index2)
+ {
+ fTable[index1][index2]++;
+ return fTable[index1][index2];
+ }
+
+ jack_int_t DecItem(jack_int_t index1, jack_int_t index2)
+ {
+ fTable[index1][index2]--;
+ return fTable[index1][index2];
+ }
+
+ jack_int_t GetItemCount(jack_int_t index1, jack_int_t index2) const
+ {
+ return fTable[index1][index2];
+ }
+
+ /*!
+ \brief Get the output indexes of a given index.
+ */
+ void GetOutputTable(jack_int_t index, jack_int_t* output) const
+ {
+ int i, j;
+
+ for (i = 0; i < SIZE; i++)
+ output[i] = EMPTY;
+
+ for (i = 0, j = 0; i < SIZE; i++) {
+ if (fTable[index][i] > 0) {
+ output[j] = i;
+ j++;
+ }
+ }
+ }
+
+ bool IsInsideTable(jack_int_t index, jack_int_t* output) const
+ {
+ for (int i = 0; i < SIZE && output[i] != EMPTY; i++) {
+ if (output[i] == index)
+ return true;
+ }
+ return false;
+ }
+
+};
+
+/*!
+\brief Utility class.
+*/
+
+template <int SIZE>
+class JackLoopFeedback
+{
+ private:
+
+ int fTable[SIZE][3];
+
+ /*!
+ \brief Add a feedback connection between 2 refnum.
+ */
+ bool AddConnectionAux(int ref1, int ref2)
+ {
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i][0] == EMPTY) {
+ fTable[i][0] = ref1;
+ fTable[i][1] = ref2;
+ fTable[i][2] = 1;
+ JackLog("JackLoopFeedback::AddConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
+ return true;
+ }
+ }
+ jack_error("Feedback table is full !!\n");
+ return false;
+ }
+
+ /*!
+ \brief Remove a feedback connection between 2 refnum.
+ */
+ bool RemoveConnectionAux(int ref1, int ref2)
+ {
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i][0] == ref1 && fTable[i][1] == ref2) {
+ fTable[i][0] = EMPTY;
+ fTable[i][1] = EMPTY;
+ fTable[i][2] = 0;
+ JackLog("JackLoopFeedback::RemoveConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
+ return true;
+ }
+ }
+ jack_error("Feedback connection not found\n");
+ return false;
+ }
+
+ int IncConnection(int index)
+ {
+ fTable[index][2]++;
+ return fTable[index][2];
+ }
+
+ int DecConnection(int index)
+ {
+ fTable[index][2]--;
+ return fTable[index][2];
+ }
+
+ public:
+
+ JackLoopFeedback()
+ {
+ Init();
+ }
+ virtual ~JackLoopFeedback()
+ {}
+
+ void Init()
+ {
+ for (int i = 0; i < SIZE; i++) {
+ fTable[i][0] = EMPTY;
+ fTable[i][1] = EMPTY;
+ fTable[i][2] = 0;
+ }
+ }
+
+ bool IncConnection(int ref1, int ref2)
+ {
+ int index = GetConnectionIndex(ref1, ref2);
+
+ if (index >= 0) { // Feedback connection is already added, increment counter
+ IncConnection(index);
+ return true;
+ } else {
+ return AddConnectionAux(ref1, ref2); // Add the feedback connection
+ }
+ }
+
+ bool DecConnection(int ref1, int ref2)
+ {
+ int index = GetConnectionIndex(ref1, ref2);
+
+ if (index >= 0) {
+ JackLog("JackLoopFeedback::DecConnection ref1 = %ld ref2 = %ld index = %ld\n", ref1, ref2, index);
+ return (DecConnection(index) == 0) ? RemoveConnectionAux(ref1, ref2) : true;
+ } else {
+ return false;
+ }
+ }
+
+ /*!
+ \brief Test if a connection between 2 refnum is a feedback connection.
+ */
+ int GetConnectionIndex(int ref1, int ref2) const
+ {
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i][0] == ref1 && fTable[i][1] == ref2)
+ return i;
+ }
+ return -1;
+ }
+
+};
+
+/*!
+\brief For client timing measurements.
+*/
+
+struct JackClientTiming
+{
+ jack_time_t fSignaledAt;
+ jack_time_t fAwakeAt;
+ jack_time_t fFinishedAt;
+ jack_client_state_t fStatus;
+
+ JackClientTiming():fSignaledAt(0), fAwakeAt(0), fFinishedAt(0), fStatus(NotTriggered)
+ {}
+ ~JackClientTiming()
+ {}
+};
+
+/*!
+\brief Connection manager.
+
+<UL>
+<LI>The <B>fConnection</B> array contains the list (array line) of connected ports for a given port.
+<LI>The <B>fConnectionCount</B> array contains the number of connected ports to a given port.
+<LI>The <B>fInputPort</B> array contains the list (array line) of input connected ports for a given client.
+<LI>The <B>fOutputPort</B> array contains the list (array line) of ouput connected ports for a given client.
+<LI>The <B>fConnectionRef</B> array contains the number of ports connected between two clients.
+<LI>The <B>fInputRef</B> array contains the number of input clients connected to a given client.
+<LI>The <B>fInputCounter</B> array contains the number of input clients connected to a given for activation purpose.
+</UL>
+*/
+
+class JackConnectionManager
+{
+
+ private:
+
+ JackFixedArray<CONNECTION_NUM> fConnection[PORT_NUM]; /*! Connection matrix: list of connected ports for a given port: needed to compute Mix buffer */
+ JackFixedArray1<PORT_NUM_FOR_CLIENT> fInputPort[CLIENT_NUM]; /*! Table of input port per refnum : to find a refnum for a given port */
+ JackFixedArray<PORT_NUM_FOR_CLIENT> fOutputPort[CLIENT_NUM]; /*! Table of output port per refnum : to find a refnum for a given port */
+ JackFixedMatrix<CLIENT_NUM> fConnectionRef; /*! Table of port connections by (refnum , refnum) */
+ JackActivationCount fInputCounter[CLIENT_NUM]; /*! Activation counter per refnum */
+ JackLoopFeedback<CONNECTION_NUM> fLoopFeedback; /*! Loop feedback connections */
+
+ bool IsLoopPathAux(int ref1, int ref2) const;
+ void InitClient(int refnum);
+
+ public:
+
+ JackConnectionManager();
+ virtual ~JackConnectionManager();
+
+ // Connections management
+ int Connect(jack_port_id_t port_src, jack_port_id_t port_dst);
+ int Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst);
+ bool IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst) const;
+
+ jack_int_t Connections(jack_port_id_t port_index) const;
+ jack_port_id_t GetPort(jack_port_id_t port_index, int connection) const;
+ const jack_int_t* GetConnections(jack_port_id_t port_index) const;
+
+ bool IncFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst);
+ bool DecFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst);
+ bool IsFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst) const;
+
+ bool IsLoopPath(jack_port_id_t port_src, jack_port_id_t port_dst) const;
+ void IncDirectConnection(jack_port_id_t port_src, jack_port_id_t port_dst);
+ void DecDirectConnection(jack_port_id_t port_src, jack_port_id_t port_dst);
+
+ // Ports management
+ int AddInputPort(int refnum, jack_port_id_t port_index);
+ int AddOutputPort(int refnum, jack_port_id_t port_index);
+
+ int RemoveInputPort(int refnum, jack_port_id_t port_index);
+ int RemoveOutputPort(int refnum, jack_port_id_t port_index);
+
+ const jack_int_t* GetInputPorts(int refnum);
+ const jack_int_t* GetOutputPorts(int refnum);
+
+ // Client management
+ int AllocateRefNum();
+ void ReleaseRefNum(int refnum);
+
+ int GetInputRefNum(jack_port_id_t port_index) const;
+ int GetOutputRefNum(jack_port_id_t port_index) const;
+
+ // Connect/Disconnect 2 refnum "directly"
+ bool IsDirectConnection(int ref1, int ref2) const;
+ void DirectConnect(int ref1, int ref2);
+ void DirectDisconnect(int ref1, int ref2);
+
+ int GetActivation(int refnum) const;
+
+ // Graph
+ void ResetGraph(JackClientTiming* timing);
+ int ResumeRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing);
+ int SuspendRefNum(JackClientControl* control, JackSynchro** table, JackClientTiming* timing, long time_out_usec);
+
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackConstants.h b/common/JackConstants.h
new file mode 100644
index 00000000..917f692b
--- /dev/null
+++ b/common/JackConstants.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#define PRINTDEBUG
+
+#define VERSION "0.58"
+
+#define FORK_SERVER 1
+
+#define BUFFER_SIZE_MAX 8192
+#define SAMPLE_RATE 44100
+
+#define JACK_PORT_NAME_SIZE 256
+#define JACK_PORT_TYPE_SIZE 32
+
+#define JACK_CLIENT_NAME_SIZE 64
+
+#define PORT_NUM 512
+#define PORT_NUM_FOR_CLIENT 256
+
+#define CONNECTION_NUM 256
+
+#define CLIENT_NUM 64
+
+#define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0
+#define FREEWHEEL_DRIVER_REFNUM 1 // Freewheel driver is initialized second, it will get the refnum 1
+#define LOOPBACK_DRIVER_REFNUM 2 // Loopback driver is initialized third, it will get the refnum 2
+#define REAL_REFNUM LOOPBACK_DRIVER_REFNUM + 1 // Real clients start at LOOPBACK_DRIVER_REFNUM + 1
+
+#define SOCKET_TIME_OUT 5
+
+#ifdef WIN32
+ #define jack_server_dir "server"
+ #define jack_client_dir "client"
+#else
+ #define jack_server_dir "/dev/shm"
+ #define jack_client_dir "/dev/shm"
+#endif
+
+/*
+#define jack_server_dir "/mnt/ramfs"
+#define jack_client_dir "/mnt/ramfs"
+*/
+
+#define jack_server_entry "jackdmp_entry"
+#define jack_client_entry "jack_client"
+
+#define ALL_CLIENTS -1 // for notification
diff --git a/common/JackDebugClient.cpp b/common/JackDebugClient.cpp
new file mode 100644
index 00000000..be066e40
--- /dev/null
+++ b/common/JackDebugClient.cpp
@@ -0,0 +1,457 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackDebugClient.h"
+#include "JackError.h"
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <fstream>
+#include <string>
+#include <time.h>
+
+using namespace std;
+
+namespace Jack
+{
+
+JackDebugClient::JackDebugClient(JackClient * client)
+{
+ fTotalPortNumber = 1; // The total number of port opened and maybe closed. Historical view.
+ fOpenPortNumber = 0; // The current number of opened port.
+ fIsActivated = 0;
+ fIsDeactivated = 0;
+ fIsClosed = 0;
+ fClient = client;
+}
+
+JackDebugClient::~JackDebugClient()
+{
+ fTotalPortNumber--; // fTotalPortNumber start at 1
+ *fStream << endl << endl << "----------------------------------- JackDebugClient summary ------------------------------- " << endl << endl;
+ *fStream << "Client flags ( 1:yes / 0:no ) :" << endl;
+ *fStream << setw(5) << "- Client call activated : " << fIsActivated << endl;
+ *fStream << setw(5) << "- Client call deactivated : " << fIsDeactivated << endl;
+ *fStream << setw(5) << "- Client call closed : " << fIsClosed << endl;
+ *fStream << setw(5) << "- Total number of instantiated port : " << fTotalPortNumber << endl;
+ *fStream << setw(5) << "- Number of port remaining open when exiting client : " << fOpenPortNumber << endl;
+ if (fOpenPortNumber != 0)
+ *fStream << "!!! WARNING !!! Some ports have not been unregistrated ! Incorrect exiting !" << endl;
+ if (fIsDeactivated != fIsActivated)
+ *fStream << "!!! ERROR !!! Client seem do not perform symetric activation-deactivation ! (not the same number of activate and deactivate)" << endl;
+ if (fIsClosed == 0)
+ *fStream << "!!! ERROR !!! Client have not been closed with jack_client_close() !" << endl;
+
+ *fStream << endl << endl << "---------------------------- JackDebugClient detailed port summary ------------------------ " << endl << endl;
+ //for (int i = 0; i < fTotalPortNumber ; i++) {
+ for (int i = 1; i <= fTotalPortNumber ; i++) {
+ *fStream << endl << "Port index (internal debug test value) : " << i << endl;
+ *fStream << setw(5) << "- Name : " << fPortList[i].name << endl;
+ *fStream << setw(5) << "- idport : " << fPortList[i].idport << endl;
+ *fStream << setw(5) << "- IsConnected : " << fPortList[i].IsConnected << endl;
+ *fStream << setw(5) << "- IsUnregistrated : " << fPortList[i].IsUnregistrated << endl;
+ if (fPortList[i].IsUnregistrated == 0)
+ *fStream << "!!! WARNING !!! Port have not been unregistrated ! Incorrect exiting !" << endl;
+ }
+ *fStream << "delete object JackDebugClient : end of tracing" << endl;
+ delete fStream;
+ delete fClient;
+}
+
+int JackDebugClient::Open(const char* name)
+{
+ int Tidport;
+ Tidport = fClient->Open(name);
+ char provstr[256];
+ char buffer[256];
+ time_t curtime;
+ struct tm *loctime;
+ /* Get the current time. */
+ curtime = time (NULL);
+ /* Convert it to local time representation. */
+ loctime = localtime (&curtime);
+ strftime (buffer, 256, "%I-%M", loctime);
+ sprintf(provstr, "JackClientDebug-%s-%s.log", name, buffer);
+ fStream = new ofstream(provstr, ios_base::ate);
+ if (fStream->is_open()) {
+ if (Tidport == -1) {
+ *fStream << "Trying to Open Client with name '" << name << "' with bad result (client not opened)." << Tidport << endl;
+ } else {
+ *fStream << "Open Client with name '" << name << "'." << endl;
+ }
+ } else {
+ JackLog("JackDebugClient::Open : cannot open log file\n");
+ }
+ strcpy(fClientName, name);
+ return Tidport;
+}
+
+int JackDebugClient::Close()
+{
+ fIsClosed++;
+ *fStream << "Client '" << fClientName << "' was Closed" << endl;
+ return fClient->Close();
+}
+
+pthread_t JackDebugClient::GetThreadID()
+{
+ return fClient->GetThreadID();
+}
+
+JackGraphManager* JackDebugClient::GetGraphManager() const
+{
+ return fClient->GetGraphManager();
+}
+JackEngineControl* JackDebugClient::GetEngineControl() const
+{
+ return fClient->GetEngineControl();
+}
+/*!
+\brief Notification received from the server.
+*/
+
+int JackDebugClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value)
+{
+ return fClient->ClientNotify( refnum, name, notify, sync, value);
+}
+
+int JackDebugClient::Activate()
+{
+ int Tidport;
+ Tidport = fClient->Activate();
+ fIsActivated++;
+ if (fIsDeactivated)
+ *fStream << "Client '" << fClientName << "' call activate a new time (it already call 'activate' previously)." << endl;
+ *fStream << "Client '" << fClientName << "' Activated" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to activate but server return " << Tidport << " ." << endl;
+ return Tidport;
+}
+
+int JackDebugClient::Deactivate()
+{
+ int Tidport;
+ Tidport = fClient->Deactivate();
+ fIsDeactivated++;
+ if (fIsActivated == 0)
+ *fStream << "Client '" << fClientName << "' deactivate while it hasn't been previoulsy activated !" << endl;
+ *fStream << "Client '" << fClientName << "' Deactivated" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to deactivate but server return " << Tidport << " ." << endl;
+ return Tidport;
+}
+
+//-----------------
+// Port management
+//-----------------
+
+int JackDebugClient::PortRegister(const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size)
+{
+ int Tidport;
+ Tidport = fClient->PortRegister(port_name, port_type, flags, buffer_size);
+ if (Tidport <= 0) {
+ *fStream << "Client '" << fClientName << "' try port Register ('" << port_name << "') and server return error " << Tidport << " ." << endl;
+ } else {
+ if (fTotalPortNumber < MAX_PORT_HISTORY) {
+ fPortList[fTotalPortNumber].idport = Tidport;
+ strcpy(fPortList[fTotalPortNumber].name, port_name);
+ fPortList[fTotalPortNumber].IsConnected = 0;
+ fPortList[fTotalPortNumber].IsUnregistrated = 0;
+ } else {
+ *fStream << "!!! WARNING !!! History is full : no more port history will be recorded." << endl;
+ }
+ fTotalPortNumber++;
+ fOpenPortNumber++;
+ *fStream << "Client '" << fClientName << "' port Register with portname '" << port_name << " port " << Tidport << "' ." << endl;
+ }
+ return Tidport;
+}
+
+int JackDebugClient::PortUnRegister(jack_port_id_t port_index)
+{
+ int Tidport;
+ Tidport = fClient->PortUnRegister(port_index);
+ fOpenPortNumber--;
+ int i;
+ for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
+ if (fPortList[i].idport == port_index) { // We found the last record
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : '" << fClientName << "' id deregistering port '" << fPortList[i].name << "' that have already been unregistered !" << endl;
+ fPortList[i].IsUnregistrated++;
+ break;
+ }
+ }
+ if (i == 0) // Port is not found
+ *fStream << "JackClientDebug : PortUnregister : port " << port_index << " was not previously registered !" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to do PortUnregister and server return " << Tidport << " )." << endl;
+ *fStream << "Client '" << fClientName << "' unregister port '" << port_index << "'." << endl;
+ return Tidport;
+}
+
+int JackDebugClient::PortConnect(const char* src, const char* dst)
+{
+ if (!(fIsActivated))
+ *fStream << "!!! ERROR !!! Trying to connect a port ( " << src << " to " << dst << ") while the client has not been activated !" << endl;
+ int Tidport;
+ int i;
+ Tidport = fClient->PortConnect( src, dst);
+ for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
+ if (strcmp(fPortList[i].name, src) == 0) { // We found the last record in sources
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! Connecting port " << src << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected++;
+ *fStream << "Connecting port " << src << " to " << dst << ". ";
+ break;
+ } else if (strcmp(fPortList[i].name, dst) == 0 ) { // We found the record in dest
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! Connecting port " << dst << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected++;
+ *fStream << "Connecting port " << src << " to " << dst << ". ";
+ break;
+ }
+ }
+ if (i == 0) // Port is not found
+ *fStream << "JackClientDebug : PortConnect : port was not found in debug database !" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to do PortConnect but server return " << Tidport << " ." << endl;
+ //*fStream << "Client Port Connect done with names" << endl;
+ return Tidport;
+}
+
+int JackDebugClient::PortDisconnect(const char* src, const char* dst)
+{
+ if (!(fIsActivated))
+ *fStream << "!!! ERROR !!! Trying to disconnect a port ( " << src << " to " << dst << ") while the client has not been activated !" << endl;
+ int Tidport;
+ Tidport = fClient->PortDisconnect( src, dst);
+ int i;
+ for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
+ if (strcmp(fPortList[i].name, src) == 0) { // We found the record in sources
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : Disconnecting port " << src << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected--;
+ *fStream << "disconnecting port " << src << ". ";
+ break;
+ } else if (strcmp(fPortList[i].name, dst) == 0 ) { // We found the record in dest
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : Disonnecting port " << dst << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected--;
+ *fStream << "disconnecting port " << dst << ". ";
+ break;
+ }
+ }
+ if (i == 0) // Port is not found
+ *fStream << "JackClientDebug : PortDisConnect : port was not found in debug database !" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to do PortDisconnect but server return " << Tidport << " ." << endl;
+ //*fStream << "Client Port Disconnect done." << endl;
+ return Tidport;
+}
+
+int JackDebugClient::PortConnect(jack_port_id_t src, jack_port_id_t dst)
+{
+ if (!(fIsActivated))
+ *fStream << "!!! ERROR !!! : Trying to connect port " << src << " to " << dst << " while the client has not been activated !" << endl;
+ int Tidport;
+ Tidport = fClient->PortConnect(src, dst);
+ int i;
+ for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
+ if (fPortList[i].idport == src) { // We found the record in sources
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : Connecting port " << src << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected++;
+ *fStream << "Connecting port " << src << ". ";
+ break;
+ } else if (fPortList[i].idport == dst) { // We found the record in dest
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : Connecting port " << dst << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected++;
+ *fStream << "Connecting port " << dst << ". ";
+ break;
+ }
+ }
+ if (i == 0) // Port is not found
+ *fStream << "JackClientDebug : PortConnect : port was not found in debug database !" << endl;
+ if (Tidport == -1)
+ *fStream << "Client '" << fClientName << "' try to do Portconnect but server return " << Tidport << " ." << endl;
+ //*fStream << "Client Port Connect with ID done." << endl;
+ return Tidport;
+}
+
+int JackDebugClient::PortDisconnect(jack_port_id_t src)
+{
+ if (!(fIsActivated))
+ *fStream << "!!! ERROR !!! : Trying to disconnect port " << src << " while that client has not been activated !" << endl;
+ int Tidport;
+ Tidport = fClient->PortDisconnect(src);
+ int i;
+ for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
+ if (fPortList[i].idport == src) { // We found the record in sources
+ if (fPortList[i].IsUnregistrated != 0)
+ *fStream << "!!! ERROR !!! : Disconnecting port " << src << " previoulsy unregistered !" << endl;
+ fPortList[i].IsConnected--;
+ *fStream << "Disconnecting port " << src << ". " << endl;
+ break;
+ }
+ }
+ if (i == 0) // Port is not found
+ *fStream << "JackClientDebug : PortDisconnect : port was not found in debug database !" << endl;
+ if (Tidport != 0)
+ *fStream << "Client '" << fClientName << "' try to do PortDisconnect but server return " << Tidport << " ." << endl;
+ //*fStream << "Client Port Disconnect with ID done." << endl;
+ return Tidport;
+}
+
+int JackDebugClient::PortIsMine(jack_port_id_t port_index)
+{
+ return fClient->PortIsMine(port_index);
+}
+
+//--------------------
+// Context management
+//--------------------
+
+int JackDebugClient::SetBufferSize(jack_nframes_t nframes)
+{
+ return fClient->SetBufferSize(nframes);
+}
+
+int JackDebugClient::SetFreeWheel(int onoff)
+{
+ return fClient->SetFreeWheel(onoff);
+}
+
+/*
+ShutDown is called:
+- from the RT thread when Execute method fails
+- possibly from a "closed" notification channel
+(Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown))
+*/
+
+void JackDebugClient::ShutDown()
+{
+ fClient->ShutDown();
+}
+
+//---------------------
+// Transport management
+//---------------------
+
+int JackDebugClient::ReleaseTimebase()
+{
+ return fClient->ReleaseTimebase();
+}
+
+int JackDebugClient::SetSyncCallback(JackSyncCallback sync_callback, void* arg)
+{
+ return fClient->SetSyncCallback(sync_callback, arg);
+}
+
+int JackDebugClient::SetSyncTimeout(jack_time_t timeout)
+{
+ return fClient->SetSyncTimeout(timeout);
+}
+
+int JackDebugClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timebase_callback, void* arg)
+{
+ return fClient->SetTimebaseCallback( conditional, timebase_callback, arg);
+}
+
+int JackDebugClient::TransportLocate(jack_nframes_t frame)
+{
+ return fClient->TransportLocate(frame);
+}
+
+jack_transport_state_t JackDebugClient::TransportQuery(jack_position_t* pos)
+{
+ return fClient->TransportQuery(pos);
+}
+
+jack_nframes_t JackDebugClient::GetCurrentTransportFrame()
+{
+ return fClient->GetCurrentTransportFrame();
+}
+
+int JackDebugClient::TransportReposition(jack_position_t* pos)
+{
+ return fClient->TransportReposition(pos);
+}
+
+void JackDebugClient::TransportStart()
+{
+ fClient->TransportStart();
+}
+
+void JackDebugClient::TransportStop()
+{
+ fClient->TransportStop();
+}
+
+//---------------------
+// Callback management
+//---------------------
+
+void JackDebugClient::OnShutdown(JackShutdownCallback callback, void *arg)
+{
+ fClient->OnShutdown(callback, arg);
+}
+
+int JackDebugClient::SetProcessCallback(JackProcessCallback callback, void *arg)
+{
+ return fClient->SetProcessCallback( callback, arg);
+}
+
+int JackDebugClient::SetXRunCallback(JackXRunCallback callback, void *arg)
+{
+ return fClient->SetXRunCallback(callback, arg);
+}
+
+int JackDebugClient::SetInitCallback(JackThreadInitCallback callback, void *arg)
+{
+ return fClient->SetInitCallback(callback, arg);
+}
+
+int JackDebugClient::SetGraphOrderCallback(JackGraphOrderCallback callback, void *arg)
+{
+ return fClient->SetGraphOrderCallback(callback, arg);
+}
+
+int JackDebugClient::SetBufferSizeCallback(JackBufferSizeCallback callback, void *arg)
+{
+ return fClient->SetBufferSizeCallback(callback, arg);
+}
+
+int JackDebugClient::SetFreewheelCallback(JackFreewheelCallback callback, void *arg)
+{
+ return fClient->SetFreewheelCallback(callback, arg);
+}
+
+int JackDebugClient::SetPortRegistrationCallback(JackPortRegistrationCallback callback, void *arg)
+{
+ return fClient->SetPortRegistrationCallback(callback, arg);
+}
+
+JackClientControl* JackDebugClient::GetClientControl() const
+{
+ return fClient->GetClientControl();
+}
+
+} // end of namespace
+
diff --git a/common/JackDebugClient.h b/common/JackDebugClient.h
new file mode 100644
index 00000000..9a2c1094
--- /dev/null
+++ b/common/JackDebugClient.h
@@ -0,0 +1,127 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackDebugClient__
+#define __JackDebugClient__
+
+#define MAX_PORT_HISTORY 2048
+
+#include "JackClient.h"
+#include <list>
+
+namespace Jack
+{
+
+/*!
+\brief Follow a single port.
+*/
+
+typedef struct
+{
+ jack_port_id_t idport;
+ char name[JACK_PORT_NAME_SIZE]; //portname
+ int IsConnected;
+ int IsUnregistrated;
+}
+PortFollower;
+
+/*!
+\brief A "decorator" debug client to validate API use.
+*/
+
+class JackDebugClient : public JackClient
+{
+ private:
+
+ JackClient* fClient;
+ std::ofstream* fStream;
+
+ protected:
+ PortFollower fPortList[MAX_PORT_HISTORY]; // Arbitrary value... To be tuned...
+ int fTotalPortNumber; // The total number of port opened and maybe closed. Historical view.
+ int fOpenPortNumber; // The current number of opened port.
+ int fIsActivated;
+ int fIsDeactivated;
+ int fIsClosed;
+ char fClientName[JACK_CLIENT_NAME_SIZE];
+
+ public:
+
+ JackDebugClient(JackClient *fTheClient);
+
+ virtual ~JackDebugClient();
+
+ virtual int Open(const char* name);
+ int Close();
+
+ virtual JackGraphManager* GetGraphManager() const;
+ virtual JackEngineControl* GetEngineControl() const;
+
+ // Notifications
+ int ClientNotify(int refnum, const char* name, int notify, int sync, int value);
+
+ int Activate();
+ int Deactivate();
+
+ // Context
+ int SetBufferSize(jack_nframes_t nframes);
+ int SetFreeWheel(int onoff);
+ void ShutDown();
+ pthread_t GetThreadID();
+
+ // Port management
+ int PortRegister(const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size);
+ int PortUnRegister(jack_port_id_t port);
+
+ int PortConnect(const char* src, const char* dst);
+ int PortDisconnect(const char* src, const char* dst);
+ int PortConnect(jack_port_id_t src, jack_port_id_t dst);
+ int PortDisconnect(jack_port_id_t src);
+
+ int PortIsMine(jack_port_id_t port_index);
+
+ // Transport
+ int ReleaseTimebase();
+ int SetSyncCallback(JackSyncCallback sync_callback, void* arg);
+ int SetSyncTimeout(jack_time_t timeout);
+ int SetTimebaseCallback(int conditional, JackTimebaseCallback timebase_callback, void* arg);
+ int TransportLocate(jack_nframes_t frame);
+ jack_transport_state_t TransportQuery(jack_position_t* pos);
+ jack_nframes_t GetCurrentTransportFrame();
+ int TransportReposition(jack_position_t* pos);
+ void TransportStart();
+ void TransportStop();
+
+ // Callbacks
+ void OnShutdown(JackShutdownCallback callback, void *arg);
+ int SetProcessCallback(JackProcessCallback callback, void* arg);
+ int SetXRunCallback(JackXRunCallback callback, void* arg);
+ int SetInitCallback(JackThreadInitCallback callback, void* arg);
+ int SetGraphOrderCallback(JackGraphOrderCallback callback, void* arg);
+ int SetBufferSizeCallback(JackBufferSizeCallback callback, void* arg);
+ int SetFreewheelCallback(JackFreewheelCallback callback, void* arg);
+ int SetPortRegistrationCallback(JackPortRegistrationCallback callback, void* arg);
+ JackClientControl* GetClientControl() const;
+
+};
+
+
+} // end of namespace
+
+#endif
diff --git a/common/JackDriver.cpp b/common/JackDriver.cpp
new file mode 100644
index 00000000..6e3a67c3
--- /dev/null
+++ b/common/JackDriver.cpp
@@ -0,0 +1,204 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackDriver.h"
+#include "JackTime.h"
+#include "JackError.h"
+#include "JackPort.h"
+#include "JackGraphManager.h"
+#include "JackGlobals.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackEngine.h"
+#include <math.h>
+#include <assert.h>
+
+using namespace std;
+
+namespace Jack
+{
+
+JackDriver::JackDriver(const char* name, JackEngine* engine, JackSynchro** table)
+{
+ assert(strlen(name) < JACK_CLIENT_NAME_SIZE);
+ fSynchroTable = table;
+ fClientControl = new JackClientControl(name);
+ fEngine = engine;
+ fGraphManager = NULL;
+ fLastWaitUst = 0;
+ fIsMaster = true;
+}
+
+JackDriver::JackDriver()
+{
+ fSynchroTable = NULL;
+ fClientControl = NULL;
+ fEngine = NULL;
+ fGraphManager = NULL;
+ fLastWaitUst = 0;
+ fIsMaster = true;
+}
+
+JackDriver::~JackDriver()
+{
+ JackLog("~JackDriver\n");
+ delete fClientControl;
+}
+
+int JackDriver::Open()
+{
+ int refnum = -1;
+
+ if (fEngine->ClientCheckName(fClientControl->fName)) {
+ jack_error("client %s already registered", fClientControl->fName);
+ return -1;
+ }
+
+ if (fEngine->ClientInternalNew(fClientControl->fName, &refnum, &fEngineControl, &fGraphManager, this) != 0) {
+ jack_error("Cannot allocate internal client for audio driver");
+ return -1;
+ }
+
+ fClientControl->fRefNum = refnum;
+ fClientControl->fActive = true;
+ fGraphManager->DirectConnect(fClientControl->fRefNum, fClientControl->fRefNum); // Connect driver to itself for sync
+
+ /*
+ In ASYNC mode, the server does not synchronize itself on the output drivers, thus it would never "consume" the activations.
+ The synchronization primitives for drivers are setup in "flush" mode that to not keep unneeded activations.
+ */
+ if (!fEngineControl->fSyncMode) {
+ fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(true);
+ fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(true);
+ fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(true);
+ }
+ return 0;
+}
+
+int JackDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ 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);
+ int refnum = -1;
+
+ if (fEngine->ClientCheckName(fClientControl->fName)) {
+ jack_error("client %s already registered", fClientControl->fName);
+ return -1;
+ }
+
+ if (fEngine->ClientInternalNew(fClientControl->fName, &refnum, &fEngineControl, &fGraphManager, this) != 0) {
+ jack_error("Cannot allocate internal client for audio driver");
+ return -1;
+ }
+
+ fClientControl->fRefNum = refnum;
+ fClientControl->fActive = true;
+ fEngineControl->fBufferSize = nframes;
+ fEngineControl->fSampleRate = samplerate;
+ fCaptureLatency = capture_latency;
+ fPlaybackLatency = playback_latency;
+
+ assert(strlen(capture_driver_name) < JACK_CLIENT_NAME_SIZE);
+ assert(strlen(playback_driver_name) < JACK_CLIENT_NAME_SIZE);
+
+ strcpy(fCaptureDriverName, capture_driver_name);
+ strcpy(fPlaybackDriverName, playback_driver_name);
+
+ fEngineControl->fPeriodUsecs = (jack_time_t)floor((((float)nframes) / (float)samplerate) * 1000000.0f);
+ if (fEngineControl->fTimeOutUsecs == 0) /* usecs; if zero, use 2 period size. */
+ fEngineControl->fTimeOutUsecs = (jack_time_t)(2.f * fEngineControl->fPeriodUsecs);
+
+ fGraphManager->DirectConnect(fClientControl->fRefNum, fClientControl->fRefNum); // Connect driver to itself for sync
+
+ /*
+ In ASYNC mode, the server does not synchronize itself on the output drivers, thus it would never "consume" the activations.
+ The synchronization primitives for drivers are setup in "flush" mode that to not keep unneeded activations.
+ */
+ if (!fEngineControl->fSyncMode) {
+ fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(true);
+ fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(true);
+ fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(true);
+ }
+ return 0;
+}
+
+int JackDriver::Close()
+{
+ JackLog("JackDriver::Close\n");
+ fGraphManager->DirectDisconnect(fClientControl->fRefNum, fClientControl->fRefNum); // Disconnect driver from itself for sync
+ fClientControl->fActive = false;
+ return fEngine->ClientInternalCloseIm(fClientControl->fRefNum);
+}
+
+bool JackDriver::IsRealTime()
+{
+ return fEngineControl->fRealTime;
+}
+
+JackClientControl* JackDriver::GetClientControl() const
+{
+ return fClientControl;
+}
+
+void JackDriver::NotifyXRun(jack_time_t callback_usecs)
+{
+ fEngine->NotifyXRun(callback_usecs);
+}
+
+void JackDriverClient::SetMaster(bool onoff)
+{
+ fIsMaster = onoff;
+}
+
+bool JackDriverClient::GetMaster()
+{
+ return fIsMaster;
+}
+
+void JackDriverClient::AddSlave(JackDriverInterface* slave)
+{
+ fSlaveList.push_back(slave);
+}
+
+void JackDriverClient::RemoveSlave(JackDriverInterface* slave)
+{
+ fSlaveList.remove(slave);
+}
+
+void JackDriverClient::ProcessSlaves()
+{
+ list<JackDriverInterface*>::const_iterator it;
+ for (it = fSlaveList.begin(); it != fSlaveList.end(); it++) {
+ JackDriverInterface* slave = *it;
+ slave->Process();
+ }
+}
+
+} // end of namespace
diff --git a/common/JackDriver.h b/common/JackDriver.h
new file mode 100644
index 00000000..89427697
--- /dev/null
+++ b/common/JackDriver.h
@@ -0,0 +1,215 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackDriver__
+#define __JackDriver__
+
+#include "types.h"
+#include "JackClientInterface.h"
+#include "JackConstants.h"
+#include <list>
+
+namespace Jack
+{
+
+class JackEngine;
+class JackGraphManager;
+class JackSynchro;
+struct JackEngineControl;
+struct JackClientControl;
+
+/*!
+\brief The base interface for drivers.
+*/
+
+class EXPORT JackDriverInterface
+{
+
+ public:
+
+ JackDriverInterface()
+ {}
+ virtual ~JackDriverInterface()
+ {}
+
+ virtual int Open() = 0;
+
+ virtual int Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency) = 0;
+
+ virtual int Attach() = 0;
+ virtual int Detach() = 0;
+
+ virtual int Read() = 0;
+ virtual int Write() = 0;
+ virtual int Start() = 0;
+ virtual int Stop() = 0;
+ virtual int SetBufferSize(jack_nframes_t nframes) = 0;
+
+ virtual int Process() = 0;
+
+ virtual void SetMaster(bool onoff) = 0;
+ virtual bool GetMaster() = 0;
+ virtual void AddSlave(JackDriverInterface* slave) = 0;
+ virtual void RemoveSlave(JackDriverInterface* slave) = 0;
+ virtual void ProcessSlaves() = 0;
+
+ virtual bool IsRealTime() = 0;
+
+ virtual void PrintState() = 0;
+};
+
+/*!
+\brief The base interface for drivers clients.
+*/
+
+class EXPORT JackDriverClientInterface : public JackDriverInterface, public JackClientInterface
+{};
+
+/*!
+\brief The base class for drivers clients.
+*/
+
+class EXPORT JackDriverClient : public JackDriverClientInterface
+{
+ private:
+
+ std::list<JackDriverInterface*> fSlaveList;
+
+ protected:
+
+ bool fIsMaster;
+
+ public:
+
+ virtual void SetMaster(bool onoff);
+ virtual bool GetMaster();
+ virtual void AddSlave(JackDriverInterface* slave);
+ virtual void RemoveSlave(JackDriverInterface* slave);
+ virtual void ProcessSlaves();
+};
+
+/*!
+\brief The base class for drivers.
+*/
+
+class EXPORT JackDriver : public JackDriverClient
+{
+
+ protected:
+
+ char fCaptureDriverName[JACK_CLIENT_NAME_SIZE];
+ char fPlaybackDriverName[JACK_CLIENT_NAME_SIZE];
+ jack_nframes_t fCaptureLatency;
+ jack_nframes_t fPlaybackLatency;
+ jack_time_t fLastWaitUst;
+ JackEngine* fEngine;
+ JackGraphManager* fGraphManager;
+ JackSynchro** fSynchroTable;
+ JackEngineControl* fEngineControl;
+ JackClientControl* fClientControl;
+
+ JackClientControl* GetClientControl() const;
+
+ public:
+
+ JackDriver(const char* name, JackEngine* engine, JackSynchro** table);
+ JackDriver();
+ virtual ~JackDriver();
+
+ virtual int Open();
+
+ virtual int Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ virtual int Close();
+
+ virtual int Process()
+ {
+ return 0;
+ }
+
+ virtual int Attach()
+ {
+ return 0;
+ }
+ virtual int Detach()
+ {
+ return 0;
+ }
+
+ virtual int Read()
+ {
+ return 0;
+ }
+ virtual int Write()
+ {
+ return 0;
+ }
+
+ virtual int Start()
+ {
+ return 0;
+ }
+ virtual int Stop()
+ {
+ return 0;
+ }
+
+ virtual int SetBufferSize(jack_nframes_t nframes)
+ {
+ return 0;
+ }
+
+ void NotifyXRun(jack_time_t callback_usecs); // XRun notification sent by the driver
+
+ virtual bool IsRealTime();
+
+ virtual void PrintState()
+ {}
+
+ int ClientNotify(int refnum, const char* name, int notify, int sync, int value)
+ {
+ return 0;
+ }
+
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackDriverLoader.cpp b/common/JackDriverLoader.cpp
new file mode 100644
index 00000000..359abe79
--- /dev/null
+++ b/common/JackDriverLoader.cpp
@@ -0,0 +1,498 @@
+/*
+Copyright (C) 2001-2005 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackDriverLoader.h"
+#include "JackError.h"
+#include <getopt.h>
+
+#ifdef WIN32
+#define ADDON_DIR "jackmp" // TO IMPROVE
+#else
+#include <dirent.h>
+#define ADDON_DIR "/usr/local/lib/jackmp" // TO IMPROVE
+#endif
+
+static void
+jack_print_driver_options (jack_driver_desc_t * desc, FILE *file)
+{
+ unsigned long i;
+ char arg_default[JACK_DRIVER_PARAM_STRING_MAX + 1];
+
+ for (i = 0; i < desc->nparams; i++) {
+ switch (desc->params[i].type) {
+ case JackDriverParamInt:
+ //sprintf (arg_default, "%" PRIi32, desc->params[i].value.i);
+ sprintf (arg_default, "%" "i", desc->params[i].value.i);
+ break;
+ case JackDriverParamUInt:
+ //sprintf (arg_default, "%" PRIu32, desc->params[i].value.ui);
+ sprintf (arg_default, "%" "u", desc->params[i].value.ui);
+ break;
+ case JackDriverParamChar:
+ sprintf (arg_default, "%c", desc->params[i].value.c);
+ break;
+ case JackDriverParamString:
+ if (desc->params[i].value.str &&
+ strcmp (desc->params[i].value.str, "") != 0)
+ sprintf (arg_default, "%s", desc->params[i].value.str);
+ else
+ sprintf (arg_default, "none");
+ break;
+ case JackDriverParamBool:
+ sprintf (arg_default, "%s", desc->params[i].value.i ? "true" : "false");
+ break;
+ }
+
+ fprintf (file, "\t-%c, --%s \t%s (default: %s)\n",
+ desc->params[i].character,
+ desc->params[i].name,
+ desc->params[i].short_desc,
+ arg_default);
+ }
+}
+
+static void
+jack_print_driver_param_usage (jack_driver_desc_t * desc, unsigned long param, FILE *file)
+{
+ fprintf (file, "Usage information for the '%s' parameter for driver '%s':\n",
+ desc->params[param].name, desc->name);
+
+ fprintf (file, "%s\n", desc->params[param].long_desc);
+}
+
+EXPORT int
+jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr)
+{
+ struct option * long_options;
+ char * options, * options_ptr;
+ unsigned long i;
+ int opt;
+ unsigned int param_index;
+ JSList * params = NULL;
+ jack_driver_param_t * driver_param;
+
+ if (argc <= 1) {
+ *param_ptr = NULL;
+ return 0;
+ }
+
+ /* check for help */
+ if (strcmp (argv[1], "-h") == 0 || strcmp (argv[1], "--help") == 0) {
+ if (argc > 2) {
+ for (i = 0; i < desc->nparams; i++) {
+ if (strcmp (desc->params[i].name, argv[2]) == 0) {
+ jack_print_driver_param_usage (desc, i, stdout);
+ return 1;
+ }
+ }
+
+ fprintf (stderr, "jackd: unknown option '%s' "
+ "for driver '%s'\n", argv[2],
+ desc->name);
+ }
+
+ printf ("Parameters for driver '%s' (all parameters are optional):\n", desc->name);
+ jack_print_driver_options (desc, stdout);
+ return 1;
+ }
+
+ /* set up the stuff for getopt */
+ options = (char*)calloc (desc->nparams * 3 + 1, sizeof (char));
+ long_options = (option*)calloc (desc->nparams + 1, sizeof (struct option));
+
+ options_ptr = options;
+ for (i = 0; i < desc->nparams; i++) {
+ sprintf (options_ptr, "%c::", desc->params[i].character);
+ options_ptr += 3;
+
+ long_options[i].name = desc->params[i].name;
+ long_options[i].flag = NULL;
+ long_options[i].val = desc->params[i].character;
+ long_options[i].has_arg = optional_argument;
+ }
+
+ /* create the params */
+ optind = 0;
+ opterr = 0;
+ while ((opt = getopt_long(argc, argv, options, long_options, NULL)) != -1) {
+
+ if (opt == ':' || opt == '?') {
+ if (opt == ':') {
+ fprintf (stderr, "Missing option to argument '%c'\n", optopt);
+ } else {
+ fprintf (stderr, "Unknownage with option '%c'\n", optopt);
+ }
+
+ fprintf (stderr, "Options for driver '%s':\n", desc->name);
+ jack_print_driver_options (desc, stderr);
+ exit (1);
+ }
+
+ for (param_index = 0; param_index < desc->nparams; param_index++) {
+ if (opt == desc->params[param_index].character) {
+ break;
+ }
+ }
+
+ driver_param = (jack_driver_param_t*)calloc (1, sizeof (jack_driver_param_t));
+ driver_param->character = desc->params[param_index].character;
+
+ if (!optarg && optind < argc &&
+ strlen(argv[optind]) &&
+ argv[optind][0] != '-') {
+ optarg = argv[optind];
+ }
+
+ if (optarg) {
+ switch (desc->params[param_index].type) {
+ case JackDriverParamInt:
+ driver_param->value.i = atoi (optarg);
+ break;
+ case JackDriverParamUInt:
+ driver_param->value.ui = strtoul (optarg, NULL, 10);
+ break;
+ case JackDriverParamChar:
+ driver_param->value.c = optarg[0];
+ break;
+ case JackDriverParamString:
+ strncpy (driver_param->value.str, optarg, JACK_DRIVER_PARAM_STRING_MAX);
+ break;
+ case JackDriverParamBool:
+
+ /*
+ if (strcasecmp ("false", optarg) == 0 ||
+ strcasecmp ("off", optarg) == 0 ||
+ strcasecmp ("no", optarg) == 0 ||
+ strcasecmp ("0", optarg) == 0 ||
+ strcasecmp ("(null)", optarg) == 0 ) {
+ */
+ // steph
+ if (strcmp ("false", optarg) == 0 ||
+ strcmp ("off", optarg) == 0 ||
+ strcmp ("no", optarg) == 0 ||
+ strcmp ("0", optarg) == 0 ||
+ strcmp ("(null)", optarg) == 0 ) {
+ driver_param->value.i = false;
+
+ } else {
+
+ driver_param->value.i = true;
+
+ }
+ break;
+ }
+ } else {
+ if (desc->params[param_index].type == JackDriverParamBool) {
+ driver_param->value.i = true;
+ } else {
+ driver_param->value = desc->params[param_index].value;
+ }
+ }
+
+ params = jack_slist_append (params, driver_param);
+ }
+
+ free (options);
+ free (long_options);
+
+ if (param_ptr)
+ *param_ptr = params;
+
+ return 0;
+}
+
+EXPORT jack_driver_desc_t *
+jack_find_driver_descriptor (JSList * drivers, const char * name)
+{
+ jack_driver_desc_t * desc = 0;
+ JSList * node;
+
+ for (node = drivers; node; node = jack_slist_next (node)) {
+ desc = (jack_driver_desc_t *) node->data;
+
+ if (strcmp (desc->name, name) != 0) {
+ desc = NULL;
+ } else {
+ break;
+ }
+ }
+
+ return desc;
+}
+
+jack_driver_desc_t *
+jack_drivers_get_descriptor (JSList * drivers, const char * sofile)
+{
+ jack_driver_desc_t * descriptor, * other_descriptor;
+ JackDriverDescFunction so_get_descriptor = NULL;
+ JSList * node;
+ void * dlhandle;
+ char * filename;
+#ifdef WIN32
+ int dlerr;
+#else
+ const char * dlerr;
+#endif
+
+ int err;
+ char* driver_dir;
+
+ if ((driver_dir = getenv("JACK_DRIVER_DIR")) == 0) {
+ driver_dir = ADDON_DIR;
+ }
+
+#ifdef WIN32
+ if (strcmp(ADDON_DIR, "") == 0) {
+ char temp_driver_dir1[512];
+ char temp_driver_dir2[512];
+ GetCurrentDirectory(512, temp_driver_dir1);
+ sprintf (temp_driver_dir2, "%s/%s", temp_driver_dir1, ADDON_DIR);
+ driver_dir = temp_driver_dir2;
+ }
+#endif
+
+ filename = (char *)malloc (strlen (driver_dir) + 1 + strlen (sofile) + 1);
+ sprintf (filename, "%s/%s", driver_dir, sofile);
+
+ if ((dlhandle = LoadDriverModule (filename)) == NULL) {
+#ifdef WIN32
+ jack_error ("could not open driver .dll '%s': %ld\n", filename, GetLastError());
+#else
+ jack_error ("could not open driver .so '%s': %s\n", filename, dlerror ());
+#endif
+
+ free (filename);
+ return NULL;
+ }
+
+ so_get_descriptor = (JackDriverDescFunction)
+ GetProc (dlhandle, "driver_get_descriptor");
+
+#ifdef WIN32
+ if ((so_get_descriptor == NULL) && (dlerr = GetLastError()) != 0) {
+ fprintf(stderr, "%ld\n", dlerr);
+#else
+ if ((so_get_descriptor == NULL) && (dlerr = dlerror ()) != NULL) {
+ fprintf(stderr, "%s\n", dlerr);
+#endif
+
+ UnloadDriverModule (dlhandle);
+ free (filename);
+ return NULL;
+ }
+
+ if ((descriptor = so_get_descriptor ()) == NULL) {
+ jack_error ("driver from '%s' returned NULL descriptor\n", filename);
+ UnloadDriverModule (dlhandle);
+ free (filename);
+ return NULL;
+ }
+
+#ifdef WIN32
+ if ((err = UnloadDriverModule (dlhandle)) == 0) {
+ jack_error ("error closing driver .so '%s': %ld\n", filename, GetLastError ());
+ }
+#else
+ if ((err = UnloadDriverModule (dlhandle)) != 0) {
+ jack_error ("error closing driver .so '%s': %s\n", filename, dlerror ());
+ }
+#endif
+
+ /* check it doesn't exist already */
+ for (node = drivers; node; node = jack_slist_next (node)) {
+ other_descriptor = (jack_driver_desc_t *) node->data;
+
+ if (strcmp (descriptor->name, other_descriptor->name) == 0) {
+ jack_error ("the drivers in '%s' and '%s' both have the name '%s'; using the first\n",
+ other_descriptor->file, filename, other_descriptor->name);
+ /* FIXME: delete the descriptor */
+ free (filename);
+ return NULL;
+ }
+ }
+
+ strncpy (descriptor->file, filename, PATH_MAX);
+ free (filename);
+ return descriptor;
+}
+
+#ifdef WIN32
+
+EXPORT JSList *
+jack_drivers_load (JSList * drivers) {
+ char driver_dir[512];
+ char dll_filename[512];
+ WIN32_FIND_DATA filedata;
+ HANDLE file;
+ const char * ptr = NULL;
+ JSList * driver_list = NULL;
+ jack_driver_desc_t * desc;
+
+ GetCurrentDirectory(512, driver_dir);
+
+ sprintf (dll_filename, "%s/%s", ADDON_DIR, "*.dll");
+ file = (HANDLE )FindFirstFile(dll_filename, &filedata);
+
+ if (file == INVALID_HANDLE_VALUE) {
+ printf("error\n");
+ return NULL;
+ }
+
+ do {
+ ptr = strrchr (filedata.cFileName, '.');
+ if (!ptr) {
+ continue;
+ }
+ ptr++;
+ if (strncmp ("dll", ptr, 3) != 0) {
+ continue;
+ }
+
+ desc = jack_drivers_get_descriptor (drivers, filedata.cFileName);
+ if (desc) {
+ driver_list = jack_slist_append (driver_list, desc);
+ }
+
+ } while ((file = (HANDLE )FindNextFile(file, &filedata)) != 0);
+
+ if (!driver_list) {
+ jack_error ("could not find any drivers in %s!\n", driver_dir);
+ return NULL;
+ }
+
+ return driver_list;
+}
+
+#else
+
+JSList *
+jack_drivers_load (JSList * drivers) {
+ struct dirent * dir_entry;
+ DIR * dir_stream;
+ const char * ptr;
+ int err;
+ JSList * driver_list = NULL;
+ jack_driver_desc_t * desc;
+ char* driver_dir;
+
+ if ((driver_dir = getenv("JACK_DRIVER_DIR")) == 0) {
+ driver_dir = ADDON_DIR;
+ }
+
+ /* search through the driver_dir and add get descriptors
+ from the .so files in it */
+ dir_stream = opendir (driver_dir);
+ if (!dir_stream) {
+ jack_error ("could not open driver directory %s: %s\n",
+ driver_dir, strerror (errno));
+ return NULL;
+ }
+
+ while ((dir_entry = readdir(dir_stream))) {
+
+ /* check the filename is of the right format */
+ if (strncmp ("jack_", dir_entry->d_name, 5) != 0) {
+ continue;
+ }
+
+ ptr = strrchr (dir_entry->d_name, '.');
+ if (!ptr) {
+ continue;
+ }
+ ptr++;
+ if (strncmp ("so", ptr, 2) != 0) {
+ continue;
+ }
+
+ desc = jack_drivers_get_descriptor (drivers, dir_entry->d_name);
+ if (desc) {
+ driver_list = jack_slist_append (driver_list, desc);
+ }
+ }
+
+ err = closedir (dir_stream);
+ if (err) {
+ jack_error ("error closing driver directory %s: %s\n",
+ driver_dir, strerror (errno));
+ }
+
+ if (!driver_list) {
+ jack_error ("could not find any drivers in %s!\n", driver_dir);
+ return NULL;
+ }
+
+ return driver_list;
+}
+
+#endif
+
+jack_driver_info_t *
+jack_load_driver (jack_driver_desc_t * driver_desc) {
+#ifdef WIN32
+ int errstr;
+#else
+ const char * errstr;
+#endif
+
+ jack_driver_info_t *info;
+
+ info = (jack_driver_info_t *) calloc (1, sizeof (*info));
+ info->handle = LoadDriverModule (driver_desc->file);
+
+ if (info->handle == NULL) {
+#ifdef WIN32
+ if ((errstr = GetLastError ()) != 0) {
+ jack_error ("can't load \"%s\": %ld", driver_desc->file,
+ errstr);
+#else
+ if ((errstr = dlerror ()) != 0) {
+ jack_error ("can't load \"%s\": %s", driver_desc->file,
+ errstr);
+#endif
+
+ } else {
+ jack_error ("bizarre error loading driver shared "
+ "object %s", driver_desc->file);
+ }
+ goto fail;
+ }
+
+ info->initialize = (initialize)GetProc(info->handle, "driver_initialize");
+
+#ifdef WIN32
+ if ((info->initialize == NULL) && (errstr = GetLastError ()) != 0) {
+#else
+ if ((info->initialize == NULL) && (errstr = dlerror ()) != 0) {
+#endif
+ jack_error ("no initialize function in shared object %s\n",
+ driver_desc->file);
+ goto fail;
+ }
+
+ return info;
+
+fail:
+ if (info->handle) {
+ UnloadDriverModule(info->handle);
+ }
+ free (info);
+ return NULL;
+}
+
diff --git a/common/JackDriverLoader.h b/common/JackDriverLoader.h
new file mode 100644
index 00000000..9205d773
--- /dev/null
+++ b/common/JackDriverLoader.h
@@ -0,0 +1,66 @@
+/*
+Copyright (C) 2001-2005 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackDriverLoader__
+#define __JackDriverLoader__
+
+#include "jslist.h"
+#include "driver_interface.h"
+#include "JackDriver.h"
+
+
+#ifdef WIN32
+
+#include <windows.h>
+#define DRIVER_HANDLE HINSTANCE
+#define LoadDriverModule(name) LoadLibrary((name))
+#define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
+#define GetProc(handle, name) GetProcAddress(((HMODULE)handle),(name))
+
+#else
+
+#include <dlfcn.h>
+#define DRIVER_HANDLE void*
+#define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
+#define UnloadDriverModule(handle) dlclose((handle))
+#define GetProc(handle, name) dlsym((handle), (name))
+
+#endif
+
+typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
+typedef Jack::JackDriverClientInterface* (*initialize) (Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
+
+typedef struct _jack_driver_info
+{
+ Jack::JackDriverClientInterface* (*initialize)(Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
+ DRIVER_HANDLE handle;
+}
+jack_driver_info_t;
+
+EXPORT jack_driver_desc_t * jack_find_driver_descriptor (JSList * drivers, const char * name);
+
+jack_driver_desc_t * jack_drivers_get_descriptor (JSList * drivers, const char * sofile);
+
+EXPORT JSList * jack_drivers_load (JSList * drivers);
+
+jack_driver_info_t * jack_load_driver (jack_driver_desc_t * driver_desc);
+
+#endif
+
diff --git a/common/JackDummyDriver.cpp b/common/JackDummyDriver.cpp
new file mode 100644
index 00000000..da74cc55
--- /dev/null
+++ b/common/JackDummyDriver.cpp
@@ -0,0 +1,224 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackDummyDriver.h"
+#include "JackEngineControl.h"
+#include "JackGraphManager.h"
+#include "driver_interface.h"
+#include "JackDriverLoader.h"
+#include <iostream>
+#include <unistd.h>
+
+namespace Jack
+{
+
+int JackDummyDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ int res = JackAudioDriver::Open(nframes,
+ samplerate,
+ capturing,
+ playing,
+ inchannels,
+ outchannels,
+ monitor,
+ capture_driver_name,
+ playback_driver_name,
+ capture_latency,
+ playback_latency);
+ fEngineControl->fPeriod = 0;
+ fEngineControl->fComputation = 500 * 1000;
+ fEngineControl->fConstraint = 500 * 1000;
+ return res;
+}
+
+int JackDummyDriver::Process()
+{
+ fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ JackAudioDriver::Process();
+ usleep(std::max(0L, long(fWaitTime - (GetMicroSeconds() - fLastWaitUst))));
+ return 0;
+}
+
+int JackDummyDriver::SetBufferSize(jack_nframes_t nframes)
+{
+ fEngineControl->fBufferSize = nframes;
+ fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // In microsec
+ return 0;
+}
+
+void JackDummyDriver::PrintState()
+{
+ std::cout << "JackDummyDriver state" << std::endl;
+
+ jack_port_id_t port_index;
+
+ std::cout << "Input ports" << std::endl;
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (int i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+}
+
+} // end of namespace
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_driver_desc_t * driver_get_descriptor () {
+ jack_driver_desc_t * desc;
+ unsigned int i;
+
+ desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
+ strcpy(desc->name, "dummy");
+ desc->nparams = 6;
+ desc->params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy(desc->params[i].name, "capture");
+ desc->params[i].character = 'C';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 2U;
+ strcpy(desc->params[i].short_desc, "Number of capture ports");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "playback");
+ desc->params[i].character = 'P';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[1].value.ui = 2U;
+ strcpy(desc->params[i].short_desc, "Number of playback ports");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "rate");
+ desc->params[i].character = 'r';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 48000U;
+ strcpy(desc->params[i].short_desc, "Sample rate");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "monitor");
+ desc->params[i].character = 'm';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Provide monitor ports for the output");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "period");
+ desc->params[i].character = 'p';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 1024U;
+ strcpy(desc->params[i].short_desc, "Frames per period");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "wait");
+ desc->params[i].character = 'w';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 21333U;
+ strcpy(desc->params[i].short_desc,
+ "Number of usecs to wait between engine processes");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ return desc;
+ }
+
+ Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params) {
+ jack_nframes_t sample_rate = 48000;
+ jack_nframes_t period_size = 1024;
+ unsigned int capture_ports = 2;
+ unsigned int playback_ports = 2;
+ unsigned long wait_time = 0;
+ const JSList * node;
+ const jack_driver_param_t * param;
+ bool monitor = false;
+
+ for (node = params; node; node = jack_slist_next (node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'C':
+ capture_ports = param->value.ui;
+ break;
+
+ case 'P':
+ playback_ports = param->value.ui;
+ break;
+
+ case 'r':
+ sample_rate = param->value.ui;
+ break;
+
+ case 'p':
+ period_size = param->value.ui;
+ break;
+
+ case 'w':
+ wait_time = param->value.ui;
+ break;
+
+ case 'm':
+ monitor = param->value.i;
+ break;
+ }
+ }
+
+ if (wait_time == 0) // Not set
+ wait_time = (unsigned long)((((float)period_size) / ((float)sample_rate)) * 1000000.0f);
+
+ Jack::JackDriverClientInterface* driver = new Jack::JackThreadedDriver(new Jack::JackDummyDriver("dummy_pcm", engine, table, wait_time));
+ if (driver->Open(period_size, sample_rate, 1, 1, capture_ports, playback_ports, monitor, "dummy", "dummy", 0, 0) == 0) {
+ return driver;
+ } else {
+ delete driver;
+ return NULL;
+ }
+ }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/common/JackDummyDriver.h b/common/JackDummyDriver.h
new file mode 100644
index 00000000..ee5436b9
--- /dev/null
+++ b/common/JackDummyDriver.h
@@ -0,0 +1,68 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackDummyDriver__
+#define __JackDummyDriver__
+
+#include "JackAudioDriver.h"
+#include "JackThreadedDriver.h"
+#include "JackTime.h"
+
+namespace Jack
+{
+
+/*!
+\brief The dummy driver.
+*/
+
+class JackDummyDriver : public JackAudioDriver
+{
+ private:
+
+ long fWaitTime;
+
+ public:
+
+ JackDummyDriver(const char* name, JackEngine* engine, JackSynchro** table, unsigned long wait_time)
+ : JackAudioDriver(name, engine, table), fWaitTime(wait_time)
+ {}
+ virtual ~JackDummyDriver()
+ {}
+
+ int Open(jack_nframes_t frames_per_cycle,
+ jack_nframes_t rate,
+ int capturing,
+ int playing,
+ int chan_in,
+ int chan_out,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Process();
+ int SetBufferSize(jack_nframes_t nframe);
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackEngine.cpp b/common/JackEngine.cpp
new file mode 100644
index 00000000..1f2345ec
--- /dev/null
+++ b/common/JackEngine.cpp
@@ -0,0 +1,644 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <fstream>
+#include <assert.h>
+
+#include "JackEngine.h"
+#include "JackExternalClient.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackEngineTiming.h"
+#include "JackGlobals.h"
+#include "JackChannel.h"
+#include "JackSyncInterface.h"
+
+namespace Jack
+{
+
+JackEngine::JackEngine(JackGraphManager* manager, JackSynchro** table, JackEngineControl* control, JackSyncInterface* signal, bool sync, long time_out_ms, bool rt, long priority, bool ve)
+{
+ fGraphManager = manager;
+ fSynchroTable = table;
+ fEngineControl = control;
+ fEngineControl->fSyncMode = sync;
+ fEngineControl->fTimeOutUsecs = time_out_ms * 1000;
+ fEngineControl->fRealTime = rt;
+ fEngineControl->fPriority = priority;
+ fEngineControl->fVerbose = ve;
+ verbose = ve;
+ fChannel = JackGlobals::MakeServerNotifyChannel();
+ fTiming = new JackEngineTiming(fClientTable, fGraphManager, fEngineControl);
+ fSignal = signal;
+ for (int i = 0; i < CLIENT_NUM; i++)
+ fClientTable[i] = 0;
+ fTiming->ClearTimeMeasures();
+ fTiming->ResetRollingUsecs();
+}
+
+JackEngine::~JackEngine()
+{
+ delete fChannel;
+ delete fTiming;
+}
+
+//-------------------
+// Client management
+//-------------------
+
+int JackEngine::Open()
+{
+ JackLog("JackEngine::Open\n");
+
+ // Open audio thread => request thread communication channel
+ if (fChannel->Open() < 0) {
+ jack_error("Cannot connect to server");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackEngine::Close()
+{
+ JackLog("JackEngine::Close\n");
+ 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);
+ ClientCloseAux(i, client, false);
+ client->Close();
+ delete client;
+ }
+ }
+
+ return 0;
+}
+
+//------------------
+// Graph management
+//------------------
+
+void JackEngine::Process(jack_time_t callback_usecs)
+{
+ // Transport
+ fEngineControl->fTransport.CycleBegin(fEngineControl->fSampleRate, callback_usecs);
+
+ //JackLog("Process: callback_usecs %lld\n",callback_usecs/1000);
+
+ // Timing
+ fEngineControl->fFrameTimer.IncFrameTime(fEngineControl->fBufferSize, callback_usecs, fEngineControl->fPeriodUsecs);
+ fTiming->UpdateTiming(callback_usecs);
+
+ // Graph
+ if (fGraphManager->IsFinishedGraph()) {
+ fLastSwitchUsecs = callback_usecs;
+ if (fGraphManager->RunNextGraph()) // True if the graph actually switched to a new state
+ fChannel->ClientNotify(ALL_CLIENTS, JackNotifyChannelInterface::kGraphOrderCallback, 0);
+ fSignal->SignalAll(); // Signal for threads waiting for next cycle
+ } else {
+ JackLog("Process: graph not finished!\n");
+ if (callback_usecs > fLastSwitchUsecs + fEngineControl->fTimeOutUsecs) {
+ JackLog("Process: switch to next state %ld\n", long(callback_usecs - fLastSwitchUsecs));
+ //RemoveZombifiedClients(callback_usecs); TODO
+ fLastSwitchUsecs = callback_usecs;
+ if (fGraphManager->RunNextGraph())
+ fChannel->ClientNotify(ALL_CLIENTS, JackNotifyChannelInterface::kGraphOrderCallback, 0);
+ fSignal->SignalAll(); // Signal for threads waiting for next cycle
+ } else {
+ JackLog("Process: waiting to switch %ld\n", long(callback_usecs - fLastSwitchUsecs));
+ if (callback_usecs < fLastSwitchUsecs + 2 * fEngineControl->fPeriodUsecs) // Signal XRun only for the first failling cycle
+ CheckXRun(callback_usecs);
+ fGraphManager->RunCurrentGraph();
+ }
+ }
+
+ // Transport
+ fEngineControl->fTransport.CycleEnd(fClientTable, fEngineControl->fSampleRate, fEngineControl->fBufferSize);
+}
+
+/*
+Client that finish *after* the callback date are considered late even if their output buffers may have been
+correctly mixed in the time window: callbackUsecs <==> Read <==> Write.
+*/
+
+void JackEngine::CheckXRun(jack_time_t callback_usecs) // REVOIR les conditions de fin
+{
+ for (int i = REAL_REFNUM; i < CLIENT_NUM; i++)
+ {
+ JackClientInterface* client = fClientTable[i];
+ if (client && client->GetClientControl()->fActive) {
+ JackClientTiming* timing = fGraphManager->GetClientTiming(i);
+ jack_client_state_t status = timing->fStatus;
+ jack_time_t finished_date = timing->fFinishedAt;
+
+ if (status != NotTriggered && status != Finished) {
+ jack_error("JackEngine::XRun: client = %s was not runned: state = %ld", client->GetClientControl()->fName, status);
+ //fChannel->ClientNotify(i, kXRunCallback, 0); // Notify the failing client
+ fChannel->ClientNotify(ALL_CLIENTS, JackNotifyChannelInterface::kXRunCallback, 0); // Notify all clients
+ }
+ if (status == Finished && (long)(finished_date - callback_usecs) > 0) {
+ jack_error("JackEngine::XRun: client %s finished after current callback", client->GetClientControl()->fName);
+ //fChannel->ClientNotify(i, kXRunCallback, 0); // Notify the failing client
+ fChannel->ClientNotify(ALL_CLIENTS, JackNotifyChannelInterface::kXRunCallback, 0); // Notify all clients
+ }
+ }
+ }
+}
+
+//---------------
+// Zombification
+//---------------
+
+bool JackEngine::IsZombie(JackClientInterface* client, jack_time_t current_time)
+{
+ return ((current_time - fGraphManager->GetClientTiming(client->GetClientControl()->fRefNum)->fFinishedAt) > 2 * fEngineControl->fTimeOutUsecs); // A VERIFIER
+}
+
+// TODO : check what happens with looped sub-graph....
+void JackEngine::GetZombifiedClients(bool zombi_clients[CLIENT_NUM], jack_time_t current_time)
+{
+ for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) {
+ JackClientInterface* client1 = fClientTable[i];
+ if (client1 && IsZombie(client1, current_time)) {
+ JackLog("JackEngine::GetZombifiedClients: %s\n", client1->GetClientControl()->fName);
+ zombi_clients[i] = true; // Assume client is dead
+ // If another dead client is connected to the scanned one, then the scanned one is not the first of the dead subgraph
+ for (int j = REAL_REFNUM; j < CLIENT_NUM; j++) {
+ JackClientInterface* client2 = fClientTable[j];
+ if (client2 && IsZombie(client2, current_time) && fGraphManager->IsDirectConnection(j, i)) {
+ zombi_clients[i] = false;
+ break;
+ }
+ }
+ } else {
+ zombi_clients[i] = false;
+ }
+ }
+}
+
+void JackEngine::RemoveZombifiedClients(jack_time_t current_time)
+{
+ bool zombi_clients[CLIENT_NUM];
+ GetZombifiedClients(zombi_clients, current_time);
+
+ for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) {
+ if (zombi_clients[i] && !fClientTable[i]->GetClientControl()->fZombie) {
+ fClientTable[i]->GetClientControl()->fZombie = true;
+ JackLog("RemoveZombifiedCients: name = %s\n", fClientTable[i]->GetClientControl()->fName);
+ fGraphManager->DirectDisconnect(FREEWHEEL_DRIVER_REFNUM, i);
+ fGraphManager->DirectDisconnect(i, FREEWHEEL_DRIVER_REFNUM);
+ fGraphManager->DisconnectAllPorts(i);
+ fChannel->ClientNotify(i, JackNotifyChannelInterface::kZombifyClient, 0); // Signal engine
+ }
+ }
+}
+
+void JackEngine::ZombifyClient(int refnum)
+{
+ NotifyClient(refnum, JackNotifyChannelInterface::kZombifyClient, false, 0);
+}
+
+//---------------
+// Notifications
+//---------------
+
+void JackEngine::NotifyClient(int refnum, int event, int sync, int value)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ // The client may be notified by the RT thread while closing
+ if (client && (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, value) < 0)) {
+ jack_error("NotifyClient fails name = %s event = %ld = val = %ld", client->GetClientControl()->fName, event, value);
+ } else {
+ JackLog("JackEngine::NotifyClient: client not available anymore\n");
+ }
+}
+
+void JackEngine::NotifyClients(int event, int sync, int value)
+{
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ if (client && (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, value) < 0)) {
+ jack_error("NotifyClient fails name = %s event = %ld = val = %ld", client->GetClientControl()->fName, event, value);
+ }
+ }
+}
+
+int JackEngine::NotifyAddClient(JackClientInterface* new_client, const char* name, int refnum)
+{
+ // Notify existing clients of the new client and new client of existing clients.
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* old_client = fClientTable[i];
+ if (old_client) {
+ if (old_client->ClientNotify(refnum, name, JackNotifyChannelInterface::kAddClient, true, 0) < 0)
+ return -1;
+ if (new_client->ClientNotify(i, old_client->GetClientControl()->fName, JackNotifyChannelInterface::kAddClient, true, 0) < 0)
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+void JackEngine::NotifyRemoveClient(const char* name, int refnum)
+{
+ // Notify existing clients (including the one beeing suppressed) of the removed client
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ if (client) {
+ client->ClientNotify(refnum, name, JackNotifyChannelInterface::kRemoveClient, true, 0);
+ }
+ }
+}
+
+// Coming from the driver
+void JackEngine::NotifyXRun(jack_time_t callback_usecs)
+{
+ // Use the audio thread => request thread communication channel
+ fEngineControl->fFrameTimer.ResetFrameTime(fEngineControl->fSampleRate, callback_usecs, fEngineControl->fPeriodUsecs);
+ fChannel->ClientNotify(ALL_CLIENTS, JackNotifyChannelInterface::kXRunCallback, 0);
+}
+
+void JackEngine::NotifyXRun(int refnum)
+{
+ if (refnum == ALL_CLIENTS) {
+ NotifyClients(JackNotifyChannelInterface::kXRunCallback, false, 0);
+ } else {
+ NotifyClient(refnum, JackNotifyChannelInterface::kXRunCallback, false, 0);
+ }
+}
+
+void JackEngine::NotifyGraphReorder()
+{
+ NotifyClients(JackNotifyChannelInterface::kGraphOrderCallback, false, 0);
+}
+
+void JackEngine::NotifyBufferSize(jack_nframes_t nframes)
+{
+ NotifyClients(JackNotifyChannelInterface::kBufferSizeCallback, true, nframes);
+}
+
+void JackEngine::NotifyFreewheel(bool onoff)
+{
+ fEngineControl->fRealTime = !onoff;
+ NotifyClients((onoff ? JackNotifyChannelInterface::kStartFreewheel : JackNotifyChannelInterface::kStopFreewheel), true, 0);
+}
+
+void JackEngine::NotifyPortRegistation(jack_port_id_t port_index, bool onoff)
+{
+ NotifyClients((onoff ? JackNotifyChannelInterface::kPortRegistrationOn : JackNotifyChannelInterface::kPortRegistrationOff), false, port_index);
+}
+
+//-------------------
+// Client management
+//-------------------
+
+bool JackEngine::ClientCheckName(const char* name)
+{
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ if (client && (strcmp(client->GetClientControl()->fName, name) == 0))
+ return true;
+ }
+
+ return false;
+}
+
+// Used for external clients
+int JackEngine::ClientNew(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager)
+{
+ if (ClientCheckName(name)) {
+ jack_error("client %s already registered", name);
+ return -1;
+ }
+
+ JackExternalClient* client = new JackExternalClient();
+ if (ClientExternalNew(name, ref, shared_engine, shared_client, shared_graph_manager, client) < 0) {
+ delete client;
+ return -1;
+ }
+
+ return 0;
+}
+
+// Used for external clients
+int JackEngine::ClientExternalNew(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager, JackExternalClient* client)
+{
+ JackLog("JackEngine::ClientNew: name %s \n", name);
+ int refnum = fGraphManager->AllocateRefNum();
+
+ if (refnum < 0) {
+ jack_error("No more refnum available");
+ return -1;
+ }
+
+ if (!fSynchroTable[refnum]->Allocate(name, 0)) {
+ jack_error("Cannot allocate synchro");
+ goto error;
+ }
+
+ if (client->Open(name, refnum, shared_client) < 0) {
+ jack_error("Cannot open client");
+ goto error;
+ }
+
+ if (!fSignal->TimedWait(5 * 1000000)) {
+ // Failure if RT thread is not running (problem with the driver...)
+ jack_error("Driver is not running");
+ goto error;
+ }
+
+ if (NotifyAddClient(client, name, refnum) < 0) {
+ jack_error("Cannot notify add client");
+ goto error;
+ }
+
+ fClientTable[refnum] = client;
+ fTiming->ResetRollingUsecs();
+ *shared_engine = fEngineControl->GetShmIndex();
+ *shared_graph_manager = fGraphManager->GetShmIndex();
+ *ref = refnum;
+ return 0;
+
+error:
+ fGraphManager->ReleaseRefNum(refnum);
+ ClientCloseAux(refnum, client, false);
+ client->Close();
+ return -1;
+}
+
+// Used for server driver clients
+int JackEngine::ClientInternalNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client)
+{
+ JackLog("JackEngine::ClientInternalNew: name %s\n", name);
+ int refnum = fGraphManager->AllocateRefNum();
+
+ if (refnum < 0) {
+ jack_error("No more refnum available");
+ return -1;
+ }
+
+ if (!fSynchroTable[refnum]->Allocate(name, 0)) {
+ jack_error("Cannot allocate synchro");
+ goto error;
+ }
+
+ if (NotifyAddClient(client, name, refnum) < 0) {
+ jack_error("Cannot notify add client");
+ goto error;
+ }
+
+ fClientTable[refnum] = client;
+ fTiming->ResetRollingUsecs();
+ *shared_engine = fEngineControl;
+ *shared_manager = fGraphManager;
+ *ref = refnum;
+ return 0;
+
+error:
+ fGraphManager->ReleaseRefNum(refnum);
+ return -1;
+}
+
+// Used for externall clients
+int JackEngine::ClientClose(int refnum)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ if (client) {
+ fEngineControl->fTransport.ResetTimebase(refnum);
+ int res = ClientCloseAux(refnum, client, true);
+ client->Close();
+ delete client;
+ return res;
+ } else {
+ return -1;
+ }
+}
+
+// Used for server internal clients
+int JackEngine::ClientInternalClose(int refnum)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ return (client) ? ClientCloseAux(refnum, client, true) : -1;
+}
+
+// Used for drivers that close when the RT thread is stopped
+int JackEngine::ClientInternalCloseIm(int refnum)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ return (client) ? ClientCloseAux(refnum, client, false) : -1;
+}
+
+int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wait)
+{
+ JackLog("JackEngine::ClientCloseAux ref = %ld name = %s\n", refnum, client->GetClientControl()->fName);
+
+ // Remove the client from the table
+ fClientTable[refnum] = NULL;
+
+ // Remove ports
+ fGraphManager->RemoveAllPorts(refnum);
+
+ // Wait until next cycle to be sure client is not used anymore
+ if (wait) {
+ if (!fSignal->TimedWait(fEngineControl->fTimeOutUsecs * 2)) { // Must wait at least until a switch occurs in Process, even in case of graph end failure
+ JackLog("JackEngine::ClientCloseAux wait error ref = %ld \n", refnum);
+ }
+ }
+
+ // Notify running clients
+ NotifyRemoveClient(client->GetClientControl()->fName, client->GetClientControl()->fRefNum);
+
+ // Cleanup...
+ fSynchroTable[refnum]->Destroy();
+ fGraphManager->ReleaseRefNum(refnum);
+ fTiming->ResetRollingUsecs();
+ return 0;
+}
+
+int JackEngine::ClientActivate(int refnum)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ assert(fClientTable[refnum]);
+
+ JackLog("JackEngine::ClientActivate ref = %ld name = %s\n", refnum, client->GetClientControl()->fName);
+ // Wait for graph state change to be effective
+ if (!fSignal->TimedWait(fEngineControl->fPeriodUsecs * 10)) {
+ JackLog("JackEngine::ClientActivate wait error ref = %ld name = %s\n", refnum, client->GetClientControl()->fName);
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+// May be called without client
+int JackEngine::ClientDeactivate(int refnum)
+{
+ JackClientInterface* client = fClientTable[refnum];
+ if (client == NULL)
+ return -1;
+
+ JackLog("JackEngine::ClientDeactivate ref = %ld name = %s\n", refnum, client->GetClientControl()->fName);
+ fGraphManager->DisconnectAllPorts(refnum);
+ // Wait for graph state change to be effective
+ if (!fSignal->TimedWait(fEngineControl->fPeriodUsecs * 10)) {
+ JackLog("JackEngine::ClientDeactivate wait error ref = %ld name = %s\n", refnum, client->GetClientControl()->fName);
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+//-----------------
+// Port management
+//-----------------
+
+int JackEngine::PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index)
+{
+ JackLog("JackEngine::PortRegister ref = %ld name = %s flags = %d buffer_size = %d\n", refnum, name, flags, buffer_size);
+ assert(fClientTable[refnum]);
+
+ *port_index = fGraphManager->AllocatePort(refnum, name, (JackPortFlags)flags);
+ if (*port_index != NO_PORT) {
+ NotifyPortRegistation(*port_index, true);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index)
+{
+ JackLog("JackEngine::PortUnRegister ref = %ld port_index = %ld\n", refnum, port_index);
+ assert(fClientTable[refnum]);
+
+ if (fGraphManager->RemovePort(refnum, port_index) == 0) {
+ fGraphManager->ReleasePort(port_index);
+ NotifyPortRegistation(port_index, false);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackEngine::PortConnect(int refnum, const char* src, const char* dst)
+{
+ JackLog("JackEngine::PortConnect src = %s dst = %s\n", src, dst);
+ jack_port_id_t port_src, port_dst;
+
+ return (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0)
+ ? -1
+ : PortConnect(refnum, port_src, port_dst);
+}
+
+int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst)
+{
+ JackLog("JackEngine::PortDisconnect src = %s dst = %s\n", src, dst);
+ jack_port_id_t port_src, port_dst;
+
+ return (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0)
+ ? -1
+ : fGraphManager->Disconnect(port_src, port_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);
+ JackClientInterface* client;
+ int ref;
+
+ if (fGraphManager->CheckPorts(src, dst) < 0)
+ return -1;
+
+ ref = fGraphManager->GetOutputRefNum(src);
+ assert(ref >= 0);
+ client = fClientTable[ref];
+ assert(client);
+ if (!client->GetClientControl()->fActive) {
+ jack_error("Cannot connect ports owned by inactive clients:"
+ " \"%s\" is not active", client->GetClientControl()->fName);
+ return -1;
+ }
+
+ ref = fGraphManager->GetInputRefNum(dst);
+ assert(ref >= 0);
+ client = fClientTable[ref];
+ assert(client);
+ if (!client->GetClientControl()->fActive) {
+ jack_error("Cannot connect ports owned by inactive clients:"
+ " \"%s\" is not active", client->GetClientControl()->fName);
+ return -1;
+ }
+
+ return fGraphManager->Connect(src, 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);
+
+ if (dst == ALL_PORTS) {
+ return (fGraphManager->CheckPort(src) < 0)
+ ? -1
+ : fGraphManager->DisconnectAll(src);
+ } else {
+ return (fGraphManager->CheckPorts(src, dst) < 0)
+ ? -1
+ : fGraphManager->Disconnect(src, dst);
+ }
+}
+
+//----------------------
+// Transport management
+//----------------------
+
+int JackEngine::ReleaseTimebase(int refnum)
+{
+ return fEngineControl->fTransport.ResetTimebase(refnum);
+}
+
+int JackEngine::SetTimebaseCallback(int refnum, int conditional)
+{
+ return fEngineControl->fTransport.SetTimebase(refnum, conditional);
+}
+
+//-----------
+// Debugging
+//-----------
+
+void JackEngine::PrintState()
+{
+ std::cout << "Engine State" << std::endl;
+
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ if (client)
+ std::cout << "Client : " << client->GetClientControl()->fName << " : " << i << std::endl;
+ }
+
+ //fGraphManager->PrintState();
+ fTiming->PrintState();
+}
+
+} // end of namespace
+
diff --git a/common/JackEngine.h b/common/JackEngine.h
new file mode 100644
index 00000000..63f2947b
--- /dev/null
+++ b/common/JackEngine.h
@@ -0,0 +1,119 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackEngine__
+#define __JackEngine__
+
+#include "JackConstants.h"
+#include "JackGraphManager.h"
+#include "JackSynchro.h"
+#include "JackTransportEngine.h"
+
+namespace Jack
+{
+
+class JackClientInterface;
+struct JackEngineControl;
+class JackServerNotifyChannelInterface;
+class JackEngineTiming;
+class JackExternalClient;
+class JackSyncInterface;
+
+/*!
+\brief Engine description.
+*/
+
+class JackEngine
+{
+ private:
+
+ JackGraphManager* fGraphManager;
+ JackEngineControl* fEngineControl;
+ JackClientInterface* fClientTable[CLIENT_NUM];
+ JackSynchro** fSynchroTable;
+ JackServerNotifyChannelInterface* fChannel; /*! To communicate between the RT thread and server */
+ JackEngineTiming* fTiming;
+ JackSyncInterface* fSignal;
+ jack_time_t fLastSwitchUsecs;
+
+ int ClientCloseAux(int refnum, JackClientInterface* client, bool wait);
+ void CheckXRun(jack_time_t callback_usecs);
+ int NotifyAddClient(JackClientInterface* new_client, const char* name, int refnum);
+ void NotifyRemoveClient(const char* name, int refnum);
+ bool IsZombie(JackClientInterface* client, jack_time_t current_time);
+ void RemoveZombifiedClients(jack_time_t current_time);
+ void GetZombifiedClients(bool clients[CLIENT_NUM], jack_time_t current_time);
+
+ public:
+
+ JackEngine(JackGraphManager* manager, JackSynchro** table, JackEngineControl* control, JackSyncInterface* signal, bool sync, long time_out_ms, bool rt, long priority, bool verbose);
+ virtual ~JackEngine();
+
+ int Open();
+ int Close();
+
+ // Client management
+ bool ClientCheckName(const char* name);
+ int ClientNew(const char* name, int* refnum, int* shared_engine, int* shared_client, int* shared_graph_manager);
+ int ClientExternalNew(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager, JackExternalClient* client);
+ int ClientInternalNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client);
+
+ int ClientClose(int refnum);
+ int ClientInternalClose(int refnum);
+ int ClientInternalCloseIm(int refnum);
+
+ int ClientActivate(int refnum);
+ int ClientDeactivate(int refnum);
+
+ // Port management
+ int PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index);
+ int PortUnRegister(int refnum, jack_port_id_t port);
+
+ int PortConnect(int refnum, const char* src, const char* dst);
+ int PortDisconnect(int refnum, const char* src, const char* dst);
+
+ int PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst);
+ int PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst);
+
+ // Transport management
+ int ReleaseTimebase(int refnum);
+ int SetTimebaseCallback(int refnum, int conditional);
+
+ // Graph
+ void Process(jack_time_t callback_usecs);
+ void ZombifyClient(int refnum);
+
+ // Notifications
+ void NotifyClient(int refnum, int event, int sync, int value);
+ void NotifyClients(int event, int sync, int value);
+ void NotifyXRun(jack_time_t callback_usecs);
+ void NotifyXRun(int refnum);
+ void NotifyGraphReorder();
+ void NotifyBufferSize(jack_nframes_t nframes);
+ void NotifyFreewheel(bool onoff);
+ void NotifyPortRegistation(jack_port_id_t port_index, bool onoff);
+
+ void PrintState();
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackEngineControl.h b/common/JackEngineControl.h
new file mode 100644
index 00000000..975a888a
--- /dev/null
+++ b/common/JackEngineControl.h
@@ -0,0 +1,58 @@
+/*
+Copyright (C) 2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackEngineControl__
+#define __JackEngineControl__
+
+#include "JackShmMem.h"
+#include "JackFrameTimer.h"
+#include "JackTransportEngine.h"
+#include "types.h"
+
+namespace Jack
+{
+
+/*!
+\brief Engine control in shared memory.
+*/
+
+struct JackEngineControl : public JackShmMem
+{
+ jack_nframes_t fBufferSize;
+ jack_nframes_t fSampleRate;
+ bool fRealTime;
+ int32_t fPriority;
+ float fCPULoad;
+ jack_time_t fPeriodUsecs;
+ jack_time_t fTimeOutUsecs;
+ UInt64 fPeriod;
+ UInt64 fComputation;
+ UInt64 fConstraint;
+ JackFrameTimer fFrameTimer;
+ JackTransportEngine fTransport;
+ bool fSyncMode;
+ bool fVerbose;
+};
+
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackEngineTiming.cpp b/common/JackEngineTiming.cpp
new file mode 100644
index 00000000..521dcbd1
--- /dev/null
+++ b/common/JackEngineTiming.cpp
@@ -0,0 +1,229 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackEngineTiming.h"
+#include "JackClientInterface.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include <math.h>
+#include <algorithm>
+#include <iostream>
+//#include <fstream>
+#include <assert.h>
+
+namespace Jack
+{
+
+inline jack_time_t MAX(jack_time_t a, jack_time_t b)
+{
+ return (a < b) ? b : a;
+}
+
+JackEngineTiming::JackEngineTiming(JackClientInterface** table, JackGraphManager* manager, JackEngineControl* control)
+{
+ fClientTable = table;
+ fGraphManager = manager;
+ fEngineControl = control;
+ fLastTime = 0;
+ fCurTime = 0;
+ fProcessTime = 0;
+ fLastProcessTime = 0;
+ fSpareUsecs = 0;
+ fMaxUsecs = 0;
+ fAudioCycle = 0;
+}
+
+void JackEngineTiming::UpdateTiming(jack_time_t callback_usecs)
+{
+ GetTimeMeasure(callback_usecs);
+ CalcCPULoad();
+}
+
+void JackEngineTiming::CalcCPULoad()
+{
+ jack_time_t lastCycleEnd = fLastProcessTime;
+
+ for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ JackClientTiming* timing = fGraphManager->GetClientTiming(i);
+ if (client && client->GetClientControl()->fActive && timing->fStatus == Finished) {
+ lastCycleEnd = MAX(lastCycleEnd, timing->fFinishedAt);
+ }
+ }
+
+ /* store the execution time for later averaging */
+ fRollingClientUsecs[fRollingClientUsecsIndex++] = lastCycleEnd - fLastTime;
+
+ if (fRollingClientUsecsIndex >= JACK_ENGINE_ROLLING_COUNT) {
+ fRollingClientUsecsIndex = 0;
+ }
+
+ /* every so often, recompute the current maximum use over the
+ last JACK_ENGINE_ROLLING_COUNT client iterations.
+ */
+
+ if (++fRollingClientUsecsCnt % fRollingInterval == 0) {
+
+ jack_time_t maxUsecs = 0;
+ for (int i = 0; i < JACK_ENGINE_ROLLING_COUNT; i++) {
+ maxUsecs = MAX(fRollingClientUsecs[i], maxUsecs);
+ }
+
+ fMaxUsecs = MAX(fMaxUsecs, maxUsecs);
+ fSpareUsecs = jack_time_t((maxUsecs < fEngineControl->fPeriodUsecs) ? fEngineControl->fPeriodUsecs - maxUsecs : 0);
+ fEngineControl->fCPULoad
+ = ((1.0f - (float(fSpareUsecs) / float(fEngineControl->fPeriodUsecs))) * 50.0f + (fEngineControl->fCPULoad * 0.5f));
+ }
+}
+
+void JackEngineTiming::ResetRollingUsecs()
+{
+ memset(fRollingClientUsecs, 0, sizeof(fRollingClientUsecs));
+ fRollingClientUsecsIndex = 0;
+ fRollingClientUsecsCnt = 0;
+ fSpareUsecs = 0;
+ fRollingInterval = (int)floor((JACK_ENGINE_ROLLING_INTERVAL * 1000.0f) / fEngineControl->fPeriodUsecs);
+}
+
+void JackEngineTiming::GetTimeMeasure(jack_time_t callbackUsecs)
+{
+ int pos = (++fAudioCycle) % TIME_POINTS;
+
+ fLastTime = fCurTime;
+ fCurTime = callbackUsecs;
+
+ fLastProcessTime = fProcessTime;
+ fProcessTime = GetMicroSeconds();
+
+ if (fLastTime > 0) {
+ fMeasure[pos].fEngineTime = fLastTime;
+ fMeasure[pos].fAudioCycle = fAudioCycle;
+
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = fClientTable[i];
+ JackClientTiming* timing = fGraphManager->GetClientTiming(i);
+ if (client && client->GetClientControl()->fActive) {
+ fMeasure[pos].fClientTable[i].fRefNum = i;
+ fMeasure[pos].fClientTable[i].fSignaledAt = timing->fSignaledAt;
+ fMeasure[pos].fClientTable[i].fAwakeAt = timing->fAwakeAt;
+ fMeasure[pos].fClientTable[i].fFinishedAt = timing->fFinishedAt;
+ fMeasure[pos].fClientTable[i].fStatus = timing->fStatus;
+ }
+ }
+ }
+}
+
+void JackEngineTiming::PrintState()
+{
+ jack_time_t prevtime, time;
+ prevtime = time = fMeasure[0].fEngineTime;
+ int cycle, prevcycle = fMeasure[0].fAudioCycle;
+ /*
+
+ std::ofstream f("measure.txt");
+
+ if (f.is_open()) {
+
+ //std::cout << "---------------------------------------------" << std::endl;
+
+ for (int i = 0; i < CLIENT_NUM; i++) { // client
+ JackClientInterface* client = fClientTable[i];
+ if (client && client->GetClientControl()->fActive) {
+ // f << "Client : " << i << std::endl;
+ long maxsignalledat = 0;
+ long maxawakedat = 0;
+ long maxfinisheddat = 0;
+ bool max = false;
+ prevtime = fMeasure[0].fEngineTime;
+ prevcycle = fMeasure[0].fAudioCycle;
+
+ // TODO
+
+ for (int j = 0; j < TIME_POINTS; j++) { // measure
+ time = fMeasure[j].fEngineTime;
+ cycle = fMeasure[j].fAudioCycle;
+
+ if (fMeasure[j].fClientTable[i].fRefNum > 0) {
+
+ if (fMeasure[j].fClientTable[i].fStatus != Finished) {
+ f << "error status " << '\t'
+ << prevtime << '\t'
+ << time << '\t'
+ << fMeasure[j + 1].fEngineTime << '\t'
+ << prevcycle << '\t'
+ << cycle << '\t'
+ << fMeasure[j].fClientTable[i].fSignaledAt << '\t'
+ << fMeasure[j].fClientTable[i].fAwakeAt << '\t'
+ << fMeasure[j].fClientTable[i].fFinishedAt
+ << std::endl;
+ }
+
+ if (long(time - prevtime) > 0) {
+
+ f << long(time - prevtime) << '\t'
+ << fMeasure[j].fClientTable[i].fSignaledAt - time << '\t'
+ << fMeasure[j].fClientTable[i].fAwakeAt - time << '\t'
+ << fMeasure[j].fClientTable[i].fFinishedAt - time << '\t'
+ << fMeasure[j].fClientTable[i].fStatus
+ << std::endl;
+ } else {
+ f << "error time : " << j << " " << long(time - prevtime) << std::endl;
+ }
+
+ maxsignalledat = MAX(maxsignalledat, long(fMeasure[j].fClientTable[i].fSignaledAt - time));
+ maxawakedat = MAX(maxawakedat, long(fMeasure[j].fClientTable[i].fAwakeAt - time));
+ maxfinisheddat = MAX(maxfinisheddat, long(fMeasure[j].fClientTable[i].fFinishedAt - time));
+ max = true;
+ }
+ prevtime = time;
+ prevcycle = cycle;
+ }
+
+
+ f << std::endl;
+ if (max) {
+ f << "maxsignalledat: " << maxsignalledat
+ << '\t' << "maxawakedat: " << maxawakedat
+ << '\t' << "maxfinisheddat: " << maxfinisheddat
+ << '\t' << std::endl;
+ }
+ }
+ }
+
+ f.close();
+ }
+ */
+}
+
+void JackEngineTiming::ClearTimeMeasures()
+{
+ for (int i = 0; i < TIME_POINTS; i++) {
+ for (int j = 0; j < CLIENT_NUM; j++) {
+ fMeasure[i].fClientTable[j].fRefNum = 0;
+ fMeasure[i].fClientTable[j].fSignaledAt = 0;
+ fMeasure[i].fClientTable[j].fAwakeAt = 0;
+ fMeasure[i].fClientTable[j].fFinishedAt = 0;
+ }
+ }
+ fLastTime = fCurTime = 0;
+}
+
+
+} // end of namespace
+
diff --git a/common/JackEngineTiming.h b/common/JackEngineTiming.h
new file mode 100644
index 00000000..986e548d
--- /dev/null
+++ b/common/JackEngineTiming.h
@@ -0,0 +1,105 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackEngineTiming__
+#define __JackEngineTiming__
+
+#include "types.h"
+#include "JackGraphManager.h"
+
+namespace Jack
+{
+
+#define TIME_POINTS 1000
+#define JACK_ENGINE_ROLLING_COUNT 32
+#define JACK_ENGINE_ROLLING_INTERVAL 1024
+
+class JackClientInterface;
+struct JackEngineControl;
+
+/*!
+\brief Timing stucture for a client.
+*/
+
+struct JackTimingMeasureClient
+{
+ int fRefNum;
+ jack_time_t fSignaledAt;
+ jack_time_t fAwakeAt;
+ jack_time_t fFinishedAt;
+ jack_client_state_t fStatus;
+};
+
+/*!
+\brief Timing stucture for a table of clients.
+*/
+
+struct JackTimingMeasure
+{
+ long fAudioCycle;
+ jack_time_t fEngineTime;
+ JackTimingMeasureClient fClientTable[CLIENT_NUM];
+};
+
+/*!
+\brief Engine timing management.
+*/
+
+class JackEngineTiming
+{
+ private:
+
+ JackClientInterface** fClientTable;
+ JackGraphManager* fGraphManager;
+ JackEngineControl* fEngineControl;
+
+ JackTimingMeasure fMeasure[TIME_POINTS];
+ jack_time_t fLastTime;
+ jack_time_t fCurTime;
+ jack_time_t fProcessTime;
+ jack_time_t fLastProcessTime;
+ jack_time_t fSpareUsecs;
+ jack_time_t fMaxUsecs;
+ uint32_t fAudioCycle;
+
+ jack_time_t fRollingClientUsecs[JACK_ENGINE_ROLLING_COUNT];
+ int fRollingClientUsecsCnt;
+ int fRollingClientUsecsIndex;
+ int fRollingInterval;
+
+ void CalcCPULoad();
+ void GetTimeMeasure(jack_time_t callback_usecs);
+
+ public:
+
+ JackEngineTiming(JackClientInterface** table, JackGraphManager* manager, JackEngineControl* control);
+ virtual ~JackEngineTiming()
+ {}
+
+ void UpdateTiming(jack_time_t callback_usecs);
+ void ResetRollingUsecs();
+
+ void ClearTimeMeasures();
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackError.c b/common/JackError.c
new file mode 100644
index 00000000..ed463e5f
--- /dev/null
+++ b/common/JackError.c
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <stdarg.h>
+#include <stdio.h>
+#include "JackError.h"
+
+EXPORT void jack_error (const char *fmt, ...)
+{
+ va_list ap;
+ char buffer[300];
+ va_start(ap, fmt);
+ vsnprintf(buffer, sizeof(buffer), fmt, ap);
+ //jack_error_callback(buffer);
+ fprintf(stderr, "%s\n", buffer);
+ va_end(ap);
+}
+
+EXPORT void JackLog(char *fmt,...)
+{
+#ifdef PRINTDEBUG
+ if (verbose) {
+ va_list ap;
+ va_start(ap, fmt);
+ fprintf(stderr,"Jack: ");
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
+#endif
+}
+
diff --git a/common/JackError.h b/common/JackError.h
new file mode 100644
index 00000000..42baefb4
--- /dev/null
+++ b/common/JackError.h
@@ -0,0 +1,48 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+*/
+
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include "JackConstants.h"
+#include "JackExports.h"
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifdef WIN32
+ #define vsnprintf _vsnprintf
+ #define snprintf _snprintf
+#endif
+
+ EXPORT void jack_error(const char *fmt, ...);
+
+ EXPORT void JackLog(char *fmt, ...);
+
+ extern int verbose;
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/common/JackExports.h b/common/JackExports.h
new file mode 100644
index 00000000..3e3edf6d
--- /dev/null
+++ b/common/JackExports.h
@@ -0,0 +1,30 @@
+/*
+Copyright (C) 2004-2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackExports__
+#define __JackExports__
+
+#ifdef WIN32
+ #define EXPORT __declspec(dllexport)
+#else
+ #define EXPORT
+#endif
+
+#endif
+
diff --git a/common/JackExternalClient.cpp b/common/JackExternalClient.cpp
new file mode 100644
index 00000000..a637e6c7
--- /dev/null
+++ b/common/JackExternalClient.cpp
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackExternalClient.h"
+#include "JackClientControl.h"
+#include "JackGlobals.h"
+#include "JackChannel.h"
+
+namespace Jack
+{
+
+JackExternalClient::JackExternalClient(): fClientControl(NULL)
+{
+ fChannel = JackGlobals::MakeNotifyChannel();
+}
+
+JackExternalClient::~JackExternalClient()
+{
+ delete fChannel;
+}
+
+int JackExternalClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value)
+{
+ int result = -1;
+ JackLog("JackExternalClient::ClientNotify ref = %ld name = %s notify = %ld\n", refnum, name, notify);
+ fChannel->ClientNotify(refnum, name, notify, sync, value, &result);
+ return result;
+}
+
+int JackExternalClient::Open(const char* name, int refnum, int* shared_client)
+{
+ try {
+
+ if (fChannel->Open(name) < 0) {
+ jack_error("Cannot connect to client name = %s port\n", name);
+ return -1;
+ }
+
+ fClientControl = new JackClientControl(name, refnum);
+ if (!fClientControl) {
+ jack_error("Cannot allocate client shared memory segment");
+ return -1;
+ }
+
+ *shared_client = fClientControl->GetShmIndex();
+ JackLog("JackExternalClient::Open name = %s index = %ld base = %x\n", name, fClientControl->GetShmIndex(), fClientControl->GetShmAddress());
+ return 0;
+
+ } catch (std::exception e) {
+ return -1;
+ }
+}
+
+int JackExternalClient::Close()
+{
+ fChannel->Close();
+ delete fClientControl;
+ return 0;
+}
+
+JackClientControl* JackExternalClient::GetClientControl() const
+{
+ return fClientControl;
+}
+
+} // end of namespace
diff --git a/common/JackExternalClient.h b/common/JackExternalClient.h
new file mode 100644
index 00000000..0b895140
--- /dev/null
+++ b/common/JackExternalClient.h
@@ -0,0 +1,60 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackExternalClient__
+#define __JackExternalClient__
+
+#include "JackClientInterface.h"
+
+namespace Jack
+{
+
+class JackNotifyChannelInterface;
+struct JackClientControl;
+
+/*!
+\brief Server side implementation of library clients.
+*/
+
+class JackExternalClient : public JackClientInterface
+{
+
+ private:
+
+ JackNotifyChannelInterface* fChannel; /*! Server/client communication channel */
+ JackClientControl* fClientControl; /*! Client control in shared memory */
+
+ public:
+
+ JackExternalClient();
+ virtual ~JackExternalClient();
+
+ int Open(const char* name, int refnum, int* shared_client);
+ int Close();
+
+ int ClientNotify(int refnum, const char* name, int notify, int sync, int value);
+
+ JackClientControl* GetClientControl() const;
+};
+
+
+} // end of namespace
+
+#endif
diff --git a/common/JackFifo.cpp b/common/JackFifo.cpp
new file mode 100755
index 00000000..3a072ef3
--- /dev/null
+++ b/common/JackFifo.cpp
@@ -0,0 +1,209 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackFifo.h"
+#include "JackError.h"
+#include "JackChannel.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <assert.h>
+
+namespace Jack
+{
+
+void JackFifo::BuildName(const char* name, char* res)
+{
+ sprintf(res, "%s/jack_fifo.%s", jack_client_dir, name);
+}
+
+bool JackFifo::Signal()
+{
+ bool res;
+ char c = 0;
+ assert(fFifo >= 0);
+
+ if (fFlush)
+ return true;
+
+ if ((res = (write(fFifo, &c, sizeof(c)) != sizeof(c)))) {
+ jack_error("JackFifo::Signal name = %s err = %s", fName, strerror(errno));
+ }
+ return !res;
+}
+
+bool JackFifo::SignalAll()
+{
+ bool res;
+ char c = 0;
+ assert(fFifo >= 0);
+
+ if (fFlush)
+ return true;
+
+ if ((res = (write(fFifo, &c, sizeof(c)) != sizeof(c)))) {
+ jack_error("JackFifo::SignalAll name = %s err = %s", fName, strerror(errno));
+ }
+ return !res;
+}
+
+bool JackFifo::Wait()
+{
+ bool res;
+ char c;
+ assert(fFifo >= 0);
+
+ if ((res = (read(fFifo, &c, sizeof(c)) != sizeof(c)))) {
+ jack_error("JackFifo::Wait name = %s err = %s", fName, strerror(errno));
+ }
+ return !res;
+}
+
+#ifdef __APPLE__
+#warning JackFifo::TimedWait not available : synchronous mode may not work correctly if FIFO are used
+bool JackFifo::TimedWait(long usec)
+{
+ return Wait();
+}
+#else
+// Does not work on OSX ??
+bool JackFifo::TimedWait(long usec)
+{
+ assert(fFifo >= 0);
+
+ if ((poll(&fPoll, 1, usec / 1000) < 0) && (errno != EINTR)) {
+ jack_error("JackFifo::TimedWait name = %s err = %s", fName, strerror(errno));
+ return false;
+ }
+
+ if (fPoll.revents & POLLIN) {
+ return Wait();
+ } else {
+ jack_error("JackFifo::TimedWait fails name = %s revents %ld ", fName, fPoll.revents);
+ return false;
+ }
+}
+#endif
+
+// Server side
+bool JackFifo::Allocate(const char* name, int value)
+{
+ struct stat statbuf;
+ BuildName(name, fName);
+
+ JackLog("JackFifo::Allocate name = %s\n", fName);
+
+ if (stat(fName, &statbuf)) {
+ if (errno == ENOENT) {
+ if (mkfifo(fName, 0666) < 0) {
+ jack_error("Cannot create inter-client FIFO [%s] (%s)\n", name, strerror(errno));
+ return false;
+ }
+ } else {
+ jack_error("Cannot check on FIFO %s\n", name);
+ return false;
+ }
+ } else {
+ if (!S_ISFIFO(statbuf.st_mode)) {
+ jack_error("FIFO (%s) already exists, but is not a FIFO!\n", name);
+ return false;
+ }
+ }
+
+ if ((fFifo = open(fName, O_RDWR | O_CREAT, 0666)) < 0) {
+ jack_error("Cannot open fifo [%s] (%s)", name, strerror(errno));
+ return false;
+ } else {
+ fPoll.fd = fFifo;
+ fPoll.events = POLLERR | POLLIN | POLLHUP | POLLNVAL;
+ return true;
+ }
+}
+
+// Client side
+bool JackFifo::ConnectAux(const char* name, int access)
+{
+ BuildName(name, fName);
+ JackLog("JackFifo::ConnectAux name = %s\n", fName);
+
+ // Temporary...
+ if (fFifo >= 0) {
+ JackLog("Already connected name = %s\n", name);
+ return true;
+ }
+
+ if ((fFifo = open(fName, access)) < 0) {
+ jack_error("Connect: can't connect named fifo name = %s err = %s", fName, strerror(errno));
+ return false;
+ } else {
+ fPoll.fd = fFifo;
+ fPoll.events = POLLERR | POLLIN | POLLHUP | POLLNVAL;
+ return true;
+ }
+}
+
+bool JackFifo::Connect(const char* name)
+{
+ return ConnectAux(name, O_RDWR);
+}
+
+bool JackFifo::ConnectOutput(const char* name)
+{
+ return ConnectAux(name, O_WRONLY | O_NONBLOCK);
+}
+
+bool JackFifo::ConnectInput(const char* name)
+{
+ return ConnectAux(name, O_RDONLY);
+}
+
+bool JackFifo::Disconnect()
+{
+ if (fFifo >= 0) {
+ JackLog("JackFifo::Disconnect %s\n", fName);
+ if (close(fFifo) != 0) {
+ jack_error("Disconnect: can't disconnect named fifo name = %s err = %s", fName, strerror(errno));
+ return false;
+ } else {
+ fFifo = -1;
+ return true;
+ }
+ } else {
+ return true;
+ }
+}
+
+// Server side : destroy the fifo
+void JackFifo::Destroy()
+{
+ if (fFifo > 0) {
+ JackLog("JackFifo::Destroy name = %s\n", fName);
+ unlink(fName);
+ if (close(fFifo) != 0) {
+ jack_error("Destroy: can't destroy fifo name = %s err = %s", fName, strerror(errno));
+ }
+ fFifo = -1;
+ } else {
+ jack_error("JackFifo::Destroy fifo < 0");
+ }
+}
+
+} // end of namespace
+
diff --git a/common/JackFifo.h b/common/JackFifo.h
new file mode 100755
index 00000000..e91d212a
--- /dev/null
+++ b/common/JackFifo.h
@@ -0,0 +1,73 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackFifo__
+#define __JackFifo__
+
+#include "JackSynchro.h"
+#include <assert.h>
+#include <stdio.h>
+#include <poll.h>
+
+namespace Jack
+{
+
+/*!
+\brief Inter process synchronization using Fifo.
+*/
+
+class JackFifo : public JackSynchro
+{
+
+ private:
+
+ int fFifo;
+ pollfd fPoll;
+
+ bool ConnectAux(const char* name, int access);
+
+ protected:
+
+ void BuildName(const char* name, char* res);
+
+ public:
+
+ JackFifo(): JackSynchro(), fFifo( -1)
+ {}
+ virtual ~JackFifo()
+ {}
+
+ bool Signal();
+ bool SignalAll();
+ bool Wait();
+ bool TimedWait(long usec);
+
+ bool Allocate(const char* name, int value);
+ bool Connect(const char* name);
+ bool ConnectInput(const char* name);
+ bool ConnectOutput(const char* name);
+ bool Disconnect();
+ void Destroy();
+};
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackFrameTimer.cpp b/common/JackFrameTimer.cpp
new file mode 100644
index 00000000..b0f4db2f
--- /dev/null
+++ b/common/JackFrameTimer.cpp
@@ -0,0 +1,109 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackFrameTimer.h"
+#include "JackError.h"
+#include <math.h>
+
+namespace Jack
+{
+
+JackTimer::JackTimer()
+{
+ fInitialized = false;
+ fFrames = 0;
+ fCurrentWakeup = 0;
+ fCurrentCallback = 0;
+ fNextWakeUp = 0;
+ fFilterCoefficient = 0.01f;
+ fSecondOrderIntegrator = 0.0f;
+}
+
+void JackFrameTimer::Init()
+{
+ fFirstWakeUp = true;
+}
+
+void JackFrameTimer::IncFrameTime(jack_nframes_t nframes, jack_time_t callback_usecs, jack_time_t period_usecs)
+{
+ if (fFirstWakeUp) {
+ InitFrameTime(callback_usecs, period_usecs);
+ fFirstWakeUp = false;
+ } else {
+ IncFrameTimeAux(nframes, callback_usecs, period_usecs);
+ }
+}
+
+void JackFrameTimer::InitFrameTime(jack_time_t callback_usecs, jack_time_t period_usecs)
+{
+ JackTimer* timer = WriteNextStateStart();
+ timer->fSecondOrderIntegrator = 0.0f;
+ timer->fCurrentCallback = callback_usecs;
+ timer->fNextWakeUp = callback_usecs + period_usecs;
+ WriteNextStateStop();
+ TrySwitchState();
+}
+
+void JackFrameTimer::ResetFrameTime(jack_nframes_t frames_rate, jack_time_t callback_usecs, jack_time_t period_usecs)
+{
+ if (!fFirstWakeUp) { // ResetFrameTime may be called by a xrun/delayed wakeup on the first cycle
+ JackTimer* timer = WriteNextStateStart();
+ jack_nframes_t period_size_guess = (jack_nframes_t)(frames_rate * ((timer->fNextWakeUp - timer->fCurrentWakeup) / 1000000.0));
+ timer->fFrames += ((callback_usecs - timer->fNextWakeUp) / period_size_guess) * period_size_guess;
+ timer->fCurrentWakeup = callback_usecs;
+ timer->fCurrentCallback = callback_usecs;
+ timer->fNextWakeUp = callback_usecs + period_usecs;
+ WriteNextStateStop();
+ TrySwitchState();
+ }
+}
+
+void JackFrameTimer::IncFrameTimeAux(jack_nframes_t nframes, jack_time_t callback_usecs, jack_time_t period_usecs)
+{
+ JackTimer* timer = WriteNextStateStart();
+ float delta = (int64_t)callback_usecs - (int64_t)timer->fNextWakeUp;
+ timer->fCurrentWakeup = timer->fNextWakeUp;
+ timer->fCurrentCallback = callback_usecs;
+ timer->fFrames += nframes;
+ timer->fSecondOrderIntegrator += 0.5f * timer->fFilterCoefficient * delta;
+ timer->fNextWakeUp = timer->fCurrentWakeup + period_usecs + (int64_t) floorf((timer->fFilterCoefficient * (delta + timer->fSecondOrderIntegrator)));
+ timer->fInitialized = true;
+ WriteNextStateStop();
+ TrySwitchState();
+}
+
+/*
+ Use the state returned by ReadCurrentState and check that the state was not changed during the read operation.
+ The operation is lock-free since there is no intermediate state in the write operation that could cause the
+ read to loop forever.
+*/
+void JackFrameTimer::ReadFrameTime(JackTimer* timer)
+{
+ UInt16 next_index = GetCurrentIndex();
+ UInt16 cur_index;
+ do {
+ cur_index = next_index;
+ memcpy(timer, ReadCurrentState(), sizeof(JackTimer));
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index); // Until a coherent state has been read
+}
+
+} // end of namespace
+
diff --git a/common/JackFrameTimer.h b/common/JackFrameTimer.h
new file mode 100644
index 00000000..552bc11e
--- /dev/null
+++ b/common/JackFrameTimer.h
@@ -0,0 +1,81 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackFrameTimer__
+#define __JackFrameTimer__
+
+#include "JackAtomicState.h"
+#include "types.h"
+
+namespace Jack
+{
+
+/*!
+\brief A structure used for time management.
+*/
+
+struct JackTimer
+{
+ jack_nframes_t fFrames;
+ jack_time_t fCurrentWakeup;
+ jack_time_t fCurrentCallback;
+ jack_time_t fNextWakeUp;
+ float fSecondOrderIntegrator;
+ bool fInitialized;
+
+ /* not accessed by clients */
+
+ float fFilterCoefficient; /* set once, never altered */
+
+ JackTimer();
+ ~JackTimer()
+ {}
+
+};
+
+/*!
+\brief A class using the JackAtomicState to manage jack time.
+*/
+
+class JackFrameTimer : public JackAtomicState<JackTimer>
+{
+ private:
+
+ bool fFirstWakeUp;
+ void IncFrameTimeAux(jack_nframes_t nframes, jack_time_t callback_usecs, jack_time_t period_usecs);
+
+ public:
+
+ JackFrameTimer(): fFirstWakeUp(true)
+ {}
+ ~JackFrameTimer()
+ {}
+
+ void Init();
+ void InitFrameTime(jack_time_t callback_usecs, jack_time_t period_usecs);
+ void ResetFrameTime(jack_nframes_t frames_rate, jack_time_t callback_usecs, jack_time_t period_usecs);
+ void IncFrameTime(jack_nframes_t nframes, jack_time_t callback_usecs, jack_time_t period_usecs);
+ void ReadFrameTime(JackTimer* timer);
+};
+
+
+} // end of namespace
+
+#endif
diff --git a/common/JackFreewheelDriver.cpp b/common/JackFreewheelDriver.cpp
new file mode 100644
index 00000000..2fbe4233
--- /dev/null
+++ b/common/JackFreewheelDriver.cpp
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackFreewheelDriver.h"
+#include "JackEngineControl.h"
+#include "JackEngine.h"
+
+namespace Jack
+{
+
+int JackFreewheelDriver::Process()
+{
+ if (fIsMaster) {
+ JackLog("JackFreewheelDriver::Process master %lld\n", fEngineControl->fTimeOutUsecs);
+ fLastWaitUst = GetMicroSeconds();
+ fEngine->Process(fLastWaitUst);
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable); // Signal all clients
+ if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, fEngineControl->fTimeOutUsecs * 20) < 0) // Wait for all clients to finish
+ jack_error("JackFreewheelDriver::ProcessSync SuspendRefNum error");
+ } else {
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable); // Signal all clients
+ if (fEngineControl->fSyncMode) {
+ if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, fEngineControl->fTimeOutUsecs) < 0)
+ jack_error("JackFreewheelDriver::ProcessSync SuspendRefNum error");
+ }
+ }
+ return 0;
+}
+
+} // end of namespace
diff --git a/common/JackFreewheelDriver.h b/common/JackFreewheelDriver.h
new file mode 100644
index 00000000..f2f54d5a
--- /dev/null
+++ b/common/JackFreewheelDriver.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackFreewheelDriver__
+#define __JackFreewheelDriver__
+
+#include "JackDriver.h"
+
+namespace Jack
+{
+
+/*!
+\brief The FreeWheel driver : run Jack engine at full speed.
+*/
+
+class JackFreewheelDriver : public JackDriver
+{
+
+ public:
+
+ JackFreewheelDriver(const char* name, JackEngine* engine, JackSynchro** table): JackDriver(name, engine, table)
+ {}
+ virtual ~JackFreewheelDriver()
+ {}
+
+ bool IsRealTime() const
+ {
+ return false;
+ }
+
+ int Process();
+};
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackGlobals.cpp b/common/JackGlobals.cpp
new file mode 100644
index 00000000..8b72a9fd
--- /dev/null
+++ b/common/JackGlobals.cpp
@@ -0,0 +1,28 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+
+#include "JackGlobals.h"
+
+namespace Jack
+{
+
+JackFactoryImpl* JackGlobals::fInstance;
+
+} // end of namespace
diff --git a/common/JackGlobals.h b/common/JackGlobals.h
new file mode 100644
index 00000000..af4a8809
--- /dev/null
+++ b/common/JackGlobals.h
@@ -0,0 +1,282 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackGlobals__
+#define __JackGlobals__
+
+#include "JackError.h"
+
+namespace Jack
+{
+
+class JackSynchro;
+class JackServerNotifyChannelInterface;
+class JackClientChannelInterface;
+class JackNotifyChannelInterface;
+class JackServerChannelInterface;
+class JackSyncInterface;
+class JackThread;
+class JackDriverClientInterface;
+class JackRunnableInterface;
+class JackEngine;
+
+/*!
+\brief Factory description
+
+\totdo possibly use in a dynamic way to test different communication/synchro implementations.
+*/
+
+class JackFactoryImpl
+{
+ public:
+
+ JackFactoryImpl()
+ {}
+ virtual ~JackFactoryImpl()
+ {}
+
+ virtual JackSynchro* MakeSynchro() = 0;
+ virtual JackServerNotifyChannelInterface* MakeServerNotifyChannel() = 0;
+ virtual JackClientChannelInterface* MakeClientChannel() = 0;
+ virtual JackNotifyChannelInterface* MakeNotifyChannel() = 0;
+ virtual JackServerChannelInterface* MakeServerChannel() = 0;
+ virtual JackSyncInterface* MakeInterProcessSync() = 0;
+ virtual JackThread* MakeThread(JackRunnableInterface* runnable) = 0;
+};
+
+#ifdef __linux__
+
+class JackFactoryLinuxServer : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryLinuxServer()
+ {}
+ virtual ~JackFactoryLinuxServer()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+class JackFactoryLinuxClient : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryLinuxClient()
+ {}
+ virtual ~JackFactoryLinuxClient()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+#endif
+
+#ifdef WIN32
+
+class JackFactoryWindowsServer : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryWindowsServer()
+ {}
+ virtual ~JackFactoryWindowsServer()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+class JackFactoryWindowsClient : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryWindowsClient()
+ {}
+ virtual ~JackFactoryWindowsClient()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+#endif
+
+#if defined(__APPLE__)
+
+class JackFactoryOSXServer : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryOSXServer()
+ {}
+ virtual ~JackFactoryOSXServer()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+class JackFactoryOSXClient : public JackFactoryImpl
+{
+ public:
+
+ JackFactoryOSXClient()
+ {}
+ virtual ~JackFactoryOSXClient()
+ {}
+
+ JackSynchro* MakeSynchro();
+ JackServerNotifyChannelInterface* MakeServerNotifyChannel();
+ JackClientChannelInterface* MakeClientChannel();
+ JackNotifyChannelInterface* MakeNotifyChannel();
+ JackServerChannelInterface* MakeServerChannel();
+ JackSyncInterface* MakeInterProcessSync();
+ JackThread* MakeThread(JackRunnableInterface* runnable);
+};
+
+#endif
+
+/*!
+\brief Factory for OS specific ressources.
+*/
+
+class JackGlobals
+{
+ private:
+
+ static JackFactoryImpl* fInstance;
+
+ public:
+
+ JackGlobals()
+ {}
+ virtual ~JackGlobals()
+ {}
+
+ static JackSynchro* MakeSynchro()
+ {
+ return fInstance->MakeSynchro();
+ }
+ static JackServerNotifyChannelInterface* MakeServerNotifyChannel()
+ {
+ return fInstance->MakeServerNotifyChannel();
+ }
+ static JackClientChannelInterface* MakeClientChannel()
+ {
+ return fInstance->MakeClientChannel();
+ }
+ static JackNotifyChannelInterface* MakeNotifyChannel()
+ {
+ return fInstance->MakeNotifyChannel();
+ }
+ static JackServerChannelInterface* MakeServerChannel()
+ {
+ return fInstance->MakeServerChannel();
+ }
+ static JackSyncInterface* MakeInterProcessSync()
+ {
+ return fInstance->MakeInterProcessSync();
+ }
+ static JackThread* MakeThread(JackRunnableInterface* runnable)
+ {
+ return fInstance->MakeThread(runnable);
+ }
+
+ static void InitServer()
+ {
+ JackLog("JackGlobals InitServer\n");
+ if (!fInstance) {
+
+#ifdef __APPLE__
+ fInstance = new JackFactoryOSXServer();
+#endif
+
+#ifdef WIN32
+ fInstance = new JackFactoryWindowsServer();
+#endif
+
+#ifdef __linux__
+ fInstance = new JackFactoryLinuxServer();
+#endif
+
+ }
+ }
+
+ static void InitClient()
+ {
+ JackLog("JackGlobals InitClient\n");
+ if (!fInstance) {
+
+#ifdef __APPLE__
+ fInstance = new JackFactoryOSXClient();
+#endif
+
+#ifdef WIN32
+ fInstance = new JackFactoryWindowsClient();
+#endif
+
+#ifdef __linux__
+ fInstance = new JackFactoryLinuxClient();
+#endif
+
+ }
+ }
+
+ static void Destroy()
+ {
+ JackLog("JackGlobals Destroy\n");
+ if (fInstance) {
+ delete fInstance;
+ fInstance = NULL;
+ }
+ }
+
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackGlobalsClient.cpp b/common/JackGlobalsClient.cpp
new file mode 100644
index 00000000..4f168917
--- /dev/null
+++ b/common/JackGlobalsClient.cpp
@@ -0,0 +1,460 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackGlobals.h"
+
+// OSX
+#if defined(__APPLE__)
+#include "JackCoreAudioDriver.h"
+#include "JackMachServerNotifyChannel.h"
+#include "JackMachNotifyChannel.h"
+#include "JackMachServerChannel.h"
+#include "JackMachClientChannel.h"
+#include "JackMachThread.h"
+#include "JackMachSemaphore.h"
+#include "JackProcessSync.h"
+#include "JackSocketServerNotifyChannel.h"
+#include "JackSocketNotifyChannel.h"
+#include "JackSocketServerChannel.h"
+#include "JackSocketClientChannel.h"
+#include "JackPosixThread.h"
+#include "JackPosixSemaphore.h"
+#include "JackFifo.h"
+#endif
+
+// WINDOWS
+#ifdef WIN32
+#include "JackWinProcessSync.h"
+#include "JackWinNamedPipeClientChannel.h"
+#include "JackWinEvent.h"
+#include "JackWinThread.h"
+#endif
+
+// LINUX
+#ifdef __linux__
+#include "JackAlsaDriver.h"
+#include "JackProcessSync.h"
+#include "JackSocketServerNotifyChannel.h"
+#include "JackSocketNotifyChannel.h"
+#include "JackSocketServerChannel.h"
+#include "JackSocketClientChannel.h"
+#include "JackPosixThread.h"
+#include "JackPosixSemaphore.h"
+#include "JackFifo.h"
+#endif
+
+
+using namespace std;
+
+namespace Jack
+{
+
+#ifdef WIN32
+
+JackSynchro* JackFactoryWindowsClient::MakeSynchro()
+{
+ return new JackWinEvent();
+}
+
+JackServerNotifyChannelInterface* JackFactoryWindowsClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryWindowsClient::MakeClientChannel()
+{
+ return new JackWinNamedPipeClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryWindowsClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryWindowsClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryWindowsClient::MakeInterProcessSync()
+{
+ return new JackWinProcessSync();
+}
+
+JackThread* JackFactoryWindowsClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackWinThread(runnable);
+}
+#endif
+
+#ifdef __linux__
+
+#if defined(SOCKET_RPC_POSIX_SEMA)
+JackSynchro* JackFactoryLinuxClient::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryLinuxClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryLinuxClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryLinuxClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryLinuxClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA)
+JackSynchro* JackFactoryLinuxClient::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryLinuxClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryLinuxClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryLinuxClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryLinuxClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA_DUMMY)
+JackSynchro* JackFactoryLinuxClient::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryLinuxClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryLinuxClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryLinuxClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryLinuxClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#endif
+
+#if defined(__APPLE__)
+
+#if defined(MACH_RPC_MACH_SEMA)
+// Mach RPC + Mach Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackMachSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackMachClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+} // Not used
+
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_POSIX_SEMA)
+// Socket RPC + Posix Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA)
+// Socket RPC + Fifo Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable, int priority)
+{
+ return new JackMachThread(runnable, false, priority, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(MACH_RPC_FIFO_SEMA)
+// Mach RPC + Fifo Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackMachClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(MACH_RPC_POSIX_SEMA)
+// Mach RPC + Posix Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackMachClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined SOCKET_RPC_MACH_SEMA
+// Socket RPC + Mach Semaphore
+JackSynchro* JackFactoryOSXClient::MakeSynchro()
+{
+ return new JackMachSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXClient::MakeServerNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackClientChannelInterface* JackFactoryOSXClient::MakeClientChannel()
+{
+ return new JackSocketClientChannel();
+}
+
+JackNotifyChannelInterface* JackFactoryOSXClient::MakeNotifyChannel()
+{
+ return NULL;
+}
+// Not used
+JackServerChannelInterface* JackFactoryOSXClient::MakeServerChannel()
+{
+ return NULL;
+}
+// Not used
+JackSyncInterface* JackFactoryOSXClient::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXClient::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#endif
+
+} // end of namespace
+
+
diff --git a/common/JackGlobalsServer.cpp b/common/JackGlobalsServer.cpp
new file mode 100644
index 00000000..79f9ef64
--- /dev/null
+++ b/common/JackGlobalsServer.cpp
@@ -0,0 +1,460 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackGlobals.h"
+
+// OSX
+#if defined(__APPLE__)
+#include "JackCoreAudioDriver.h"
+#include "JackMachServerNotifyChannel.h"
+#include "JackMachNotifyChannel.h"
+#include "JackMachServerChannel.h"
+#include "JackMachClientChannel.h"
+#include "JackMachThread.h"
+#include "JackMachSemaphore.h"
+#include "JackProcessSync.h"
+
+#include "JackSocketServerNotifyChannel.h"
+#include "JackSocketNotifyChannel.h"
+#include "JackSocketServerChannel.h"
+#include "JackSocketClientChannel.h"
+#include "JackPosixThread.h"
+#include "JackPosixSemaphore.h"
+#include "JackFifo.h"
+#endif
+
+// WINDOWS
+#ifdef WIN32
+#include "JackWinProcessSync.h"
+#include "JackWinNamedPipeServerNotifyChannel.h"
+#include "JackWinNamedPipeNotifyChannel.h"
+#include "JackWinNamedPipeServerChannel.h"
+#include "JackWinNamedPipeClientChannel.h"
+#include "JackWinEvent.h"
+#include "JackWinThread.h"
+#endif
+
+// LINUX
+#ifdef __linux__
+#include "JackAlsaDriver.h"
+#include "JackProcessSync.h"
+#include "JackSocketServerNotifyChannel.h"
+#include "JackSocketNotifyChannel.h"
+#include "JackSocketServerChannel.h"
+#include "JackSocketClientChannel.h"
+#include "JackPosixThread.h"
+#include "JackPosixSemaphore.h"
+#include "JackFifo.h"
+#endif
+
+// COMMON
+#include "JackDummyDriver.h"
+#include "JackAudioDriver.h"
+
+
+using namespace std;
+
+namespace Jack
+{
+
+#ifdef WIN32
+JackSynchro* JackFactoryWindowsServer::MakeSynchro()
+{
+ return new JackWinEvent();
+}
+
+JackServerNotifyChannelInterface* JackFactoryWindowsServer::MakeServerNotifyChannel()
+{
+ return new JackWinNamedPipeServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryWindowsServer::MakeClientChannel()
+{
+ return NULL;
+} // Not used
+
+JackNotifyChannelInterface* JackFactoryWindowsServer::MakeNotifyChannel()
+{
+ return new JackWinNamedPipeNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryWindowsServer::MakeServerChannel()
+{
+ return new JackWinNamedPipeServerChannel();
+}
+
+JackSyncInterface* JackFactoryWindowsServer::MakeInterProcessSync()
+{
+ return new JackWinProcessSync();
+}
+
+JackThread* JackFactoryWindowsServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackWinThread(runnable);
+}
+#endif
+
+#ifdef __linux__
+
+#if defined(SOCKET_RPC_POSIX_SEMA)
+JackSynchro* JackFactoryLinuxServer::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryLinuxServer::MakeClientChannel()
+{
+ return NULL;
+} // Not used
+
+JackNotifyChannelInterface* JackFactoryLinuxServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryLinuxServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryLinuxServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA)
+JackSynchro* JackFactoryLinuxServer::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryLinuxServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryLinuxServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryLinuxServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryLinuxServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA_DUMMY)
+JackSynchro* JackFactoryLinuxServer::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryLinuxServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryLinuxServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryLinuxServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryLinuxServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryLinuxServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryLinuxServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackPosixThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#endif
+
+#if defined(__APPLE__)
+
+#if defined(MACH_RPC_MACH_SEMA)
+// Mach RPC + Mach Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackMachSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackMachServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+} // Not used
+
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackMachNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackMachServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_POSIX_SEMA)
+// Socket RPC + Posix Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_FIFO_SEMA)
+// Socket RPC + Fifo Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(MACH_RPC_FIFO_SEMA)
+// Mach RPC + Fifo Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackFifo();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackMachServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackMachNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackMachServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(MACH_RPC_POSIX_SEMA)
+// Mach RPC + Posix Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackPosixSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackMachServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackMachNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackMachServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#if defined(SOCKET_RPC_MACH_SEMA)
+// Socket RPC + Mac Semaphore
+JackSynchro* JackFactoryOSXServer::MakeSynchro()
+{
+ return new JackMachSemaphore();
+}
+
+JackServerNotifyChannelInterface* JackFactoryOSXServer::MakeServerNotifyChannel()
+{
+ return new JackSocketServerNotifyChannel();
+}
+
+JackClientChannelInterface* JackFactoryOSXServer::MakeClientChannel()
+{
+ return NULL;
+}
+// Not used
+JackNotifyChannelInterface* JackFactoryOSXServer::MakeNotifyChannel()
+{
+ return new JackSocketNotifyChannel();
+}
+
+JackServerChannelInterface* JackFactoryOSXServer::MakeServerChannel()
+{
+ return new JackSocketServerChannel();
+}
+
+JackSyncInterface* JackFactoryOSXServer::MakeInterProcessSync()
+{
+ return new JackProcessSync();
+}
+
+JackThread* JackFactoryOSXServer::MakeThread(JackRunnableInterface* runnable)
+{
+ return new JackMachThread(runnable, PTHREAD_CANCEL_ASYNCHRONOUS);
+}
+#endif
+
+#endif
+
+} // end of namespace
diff --git a/common/JackGraphManager.cpp b/common/JackGraphManager.cpp
new file mode 100644
index 00000000..ee32d8b5
--- /dev/null
+++ b/common/JackGraphManager.cpp
@@ -0,0 +1,777 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "JackGraphManager.h"
+#include "JackConstants.h"
+#include <assert.h>
+#include <stdlib.h>
+#include <algorithm>
+#include <regex.h>
+
+namespace Jack
+{
+
+static inline jack_nframes_t MAX(jack_nframes_t a, jack_nframes_t b)
+{
+ return (a < b) ? b : a;
+}
+
+static void AssertPort(jack_port_id_t port_index)
+{
+ if (port_index >= PORT_NUM) {
+ JackLog("JackGraphManager::AssertPort port_index = %ld\n", port_index);
+ assert(port_index < PORT_NUM);
+ }
+}
+
+static void AssertBufferSize(jack_nframes_t frames)
+{
+ if (frames > BUFFER_SIZE_MAX) {
+ JackLog("JackGraphManager::AssertBufferSize frames = %ld\n", frames);
+ assert(frames <= BUFFER_SIZE_MAX);
+ }
+}
+
+JackPort* JackGraphManager::GetPort(jack_port_id_t port_index)
+{
+ AssertPort(port_index);
+ return &fPortArray[port_index];
+}
+
+float* JackGraphManager::GetBuffer(jack_port_id_t port_index)
+{
+ return fPortArray[port_index].GetBuffer();
+}
+
+// RT, client
+int JackGraphManager::GetConnectionsNum(jack_port_id_t port_index)
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ return manager->Connections(port_index);
+}
+
+// Server
+int JackGraphManager::AllocateRefNum()
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ int res = manager->AllocateRefNum();
+ WriteNextStateStop();
+ return res;
+}
+
+// Server
+void JackGraphManager::ReleaseRefNum(int refnum)
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ manager->ReleaseRefNum(refnum);
+ WriteNextStateStop();
+}
+
+// RT
+void JackGraphManager::RunCurrentGraph()
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ manager->ResetGraph(fClientTiming);
+}
+
+// RT
+bool JackGraphManager::RunNextGraph()
+{
+ bool res;
+ JackConnectionManager* manager = TrySwitchState(&res);
+ manager->ResetGraph(fClientTiming);
+ return res;
+}
+
+// RT
+bool JackGraphManager::IsFinishedGraph()
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ return (manager->GetActivation(FREEWHEEL_DRIVER_REFNUM) == 0);
+}
+
+// RT
+int JackGraphManager::ResumeRefNum(JackClientControl* control, JackSynchro** table)
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ return manager->ResumeRefNum(control, table, fClientTiming);
+}
+
+// RT
+int JackGraphManager::SuspendRefNum(JackClientControl* control, JackSynchro** table, long usec)
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ return manager->SuspendRefNum(control, table, fClientTiming, usec);
+}
+
+JackClientTiming* JackGraphManager::GetClientTiming(int ref)
+{
+ return &fClientTiming[ref];
+}
+
+// Server
+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);
+ WriteNextStateStop();
+}
+
+// Server
+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);
+ WriteNextStateStop();
+}
+
+// Server
+bool JackGraphManager::IsDirectConnection(int ref1, int ref2)
+{
+ JackConnectionManager* manager = ReadCurrentState();
+ return manager->IsDirectConnection(ref1, ref2);
+}
+
+// RT
+void* JackGraphManager::GetBuffer(jack_port_id_t port_index, jack_nframes_t frames)
+{
+ AssertPort(port_index);
+ AssertBufferSize(frames);
+
+ JackConnectionManager* manager = ReadCurrentState();
+ JackPort* port = GetPort(port_index);
+
+ 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);
+ return GetBuffer(0); // port_index 0 is not used
+ }
+
+ // Output port
+ if (port->fFlags & JackPortIsOutput) {
+ return (port->fTied != NO_PORT) ? GetBuffer(port->fTied, frames) : GetBuffer(port_index);
+ }
+
+ // Input port
+ jack_int_t len = manager->Connections(port_index);
+
+ if (len == 0) { // No connections: return a zero-filled buffer
+ float* buffer = GetBuffer(port_index);
+ memset(buffer, 0, frames * sizeof(float)); // Clear buffer
+ return buffer;
+ } else if (len == 1) { // One connection: use zero-copy mode - just pass the buffer of the connected (output) port.
+ assert(manager->GetPort(port_index, 0) != port_index); // Check recursion
+ return GetBuffer(manager->GetPort(port_index, 0), frames);
+ } else { // Multiple connections
+ const jack_int_t* connections = manager->GetConnections(port_index);
+ float* mixbuffer = GetBuffer(port_index);
+ jack_port_id_t src_index;
+ float* buffer;
+
+ // Copy first buffer
+ src_index = connections[0];
+ AssertPort(src_index);
+ buffer = (float*)GetBuffer(src_index, frames);
+ memcpy(mixbuffer, buffer, frames * sizeof(float));
+
+ // Mix remaining buffers
+ for (int i = 1; (i < CONNECTION_NUM) && ((src_index = connections[i]) != EMPTY); i++) {
+ AssertPort(src_index);
+ buffer = (float*)GetBuffer(src_index, frames);
+ JackPort::MixBuffer(mixbuffer, buffer, frames);
+ }
+ return mixbuffer;
+ }
+}
+
+int JackGraphManager::RequestMonitor(jack_port_id_t port_index, bool onoff) // Client
+{
+ AssertPort(port_index);
+ JackPort* port = GetPort(port_index);
+
+ /**
+ jackd.h
+ * If @ref JackPortCanMonitor is set for this @a port, turn input
+ * monitoring on or off. Otherwise, do nothing.
+
+ if (!(fFlags & JackPortCanMonitor))
+ return -1;
+ */
+
+ port->RequestMonitor(onoff);
+
+ const jack_int_t* connections = ReadCurrentState()->GetConnections(port_index);
+ if ((port->fFlags & JackPortIsOutput) == 0) { // ?? Taken from jack, why not (port->fFlags & JackPortIsInput) ?
+ jack_port_id_t src_index;
+ for (int i = 0; (i < CONNECTION_NUM) && ((src_index = connections[i]) != EMPTY); i++) {
+ // XXX much worse things will happen if there is a feedback loop !!!
+ RequestMonitor(src_index, onoff);
+ }
+ }
+
+ return 0;
+}
+
+jack_nframes_t JackGraphManager::GetTotalLatencyAux(jack_port_id_t port_index, jack_port_id_t src_port_index, JackConnectionManager* manager, int hop_count)
+{
+ const jack_int_t* connections = manager->GetConnections(port_index);
+ jack_nframes_t latency = GetPort(port_index)->GetLatency();
+ jack_nframes_t max_latency = 0;
+ jack_port_id_t dst_index;
+
+ if (hop_count > 8)
+ return latency;
+
+ for (int i = 0; (i < CONNECTION_NUM) && ((dst_index = connections[i]) != EMPTY); i++) {
+ if (src_port_index != dst_index) {
+ AssertPort(dst_index);
+ JackPort* dst_port = GetPort(dst_index);
+ jack_nframes_t this_latency = (dst_port->fFlags & JackPortIsTerminal)
+ ? dst_port->GetLatency()
+ : GetTotalLatencyAux(dst_index, port_index, manager, hop_count + 1);
+ max_latency = MAX(max_latency, this_latency);
+ }
+ }
+
+ return max_latency + latency;
+}
+
+jack_nframes_t JackGraphManager::GetTotalLatency(jack_port_id_t port_index)
+{
+ UInt16 cur_index;
+ UInt16 next_index;
+ jack_nframes_t total_latency;
+ AssertPort(port_index);
+ JackLog("JackGraphManager::GetTotalLatency port_index = %ld\n", port_index);
+
+ do {
+ cur_index = GetCurrentIndex();
+ total_latency = GetTotalLatencyAux(port_index, port_index, ReadCurrentState(), 0);
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index); // Until a coherent state has been read
+
+ return total_latency;
+}
+
+// Server
+jack_port_id_t JackGraphManager::AllocatePortAux(int refnum, const char* port_name, JackPortFlags flags)
+{
+ jack_port_id_t port_index;
+
+ // Look for first available port Port index start at 1, otherwise a port_index of 0 is "seen" as a NULL port by the external API...
+ for (port_index = 1; port_index < PORT_NUM; port_index++) {
+ JackPort* port = GetPort(port_index);
+ if (!port->IsUsed()) {
+ JackLog("JackGraphManager::AllocatePortAux port_index = %ld name = %s\n", port_index, port_name);
+ port->Allocate(refnum, port_name, flags);
+ break;
+ }
+ }
+
+ return (port_index < PORT_NUM) ? port_index : NO_PORT;
+}
+
+// Server
+jack_port_id_t JackGraphManager::AllocatePort(int refnum, const char* port_name, JackPortFlags flags)
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ jack_port_id_t port_index = AllocatePortAux(refnum, port_name, flags);
+
+ if (port_index != NO_PORT) {
+ int res;
+ if (flags & JackPortIsOutput) {
+ res = manager->AddOutputPort(refnum, port_index);
+ } else {
+ res = manager->AddInputPort(refnum, port_index);
+ }
+ if (res < 0) {
+ JackPort* port = GetPort(port_index);
+ assert(port);
+ port->Release();
+ port_index = NO_PORT;
+ }
+ }
+
+ WriteNextStateStop();
+ return port_index;
+}
+
+// Server
+void JackGraphManager::ReleasePort(jack_port_id_t port_index)
+{
+ JackPort* port = GetPort(port_index);
+ port->Release();
+}
+
+// Server
+int JackGraphManager::RemovePort(int refnum, jack_port_id_t port_index)
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ JackPort* port = GetPort(port_index);
+ int res;
+
+ if (port->fFlags & JackPortIsOutput) {
+ DisconnectAllOutput(port_index);
+ res = manager->RemoveOutputPort(refnum, port_index);
+ } else {
+ DisconnectAllInput(port_index);
+ res = manager->RemoveInputPort(refnum, port_index);
+ }
+
+ WriteNextStateStop();
+ return res;
+}
+
+// Server
+void JackGraphManager::RemoveAllPorts(int refnum)
+{
+ JackLog("JackGraphManager::RemoveAllPorts ref = %ld\n", refnum);
+ JackConnectionManager* manager = WriteNextStateStart();
+ jack_port_id_t port_index;
+
+ // Warning : RemovePort shift port to left, thus we always remove the first port until the "input" table is empty
+ const jack_int_t* input = manager->GetInputPorts(refnum);
+ while ((port_index = input[0]) != EMPTY) {
+ RemovePort(refnum, port_index);
+ ReleasePort(port_index);
+ }
+
+ // Warning : RemovePort shift port to left, thus we always remove the first port until the "output" table is empty
+ const jack_int_t* output = manager->GetOutputPorts(refnum);
+ while ((port_index = output[0]) != EMPTY) {
+ RemovePort(refnum, port_index);
+ ReleasePort(port_index);
+ }
+
+ WriteNextStateStop();
+}
+
+// Server
+void JackGraphManager::DisconnectAllPorts(int refnum)
+{
+ int i;
+ JackLog("JackGraphManager::DisconnectAllPorts ref = %ld\n", refnum);
+ JackConnectionManager* manager = WriteNextStateStart();
+
+ const jack_int_t* input = manager->GetInputPorts(refnum);
+ for (i = 0; i < PORT_NUM_FOR_CLIENT && input[i] != EMPTY ; i++) {
+ DisconnectAllInput(input[i]);
+ }
+
+ const jack_int_t* output = manager->GetOutputPorts(refnum);
+ for (i = 0; i < PORT_NUM_FOR_CLIENT && output[i] != EMPTY; i++) {
+ DisconnectAllOutput(output[i]);
+ }
+
+ WriteNextStateStop();
+}
+
+// Server
+void JackGraphManager::DisconnectAllInput(jack_port_id_t port_index)
+{
+ JackLog("JackGraphManager::DisconnectAllInput port_index = %ld \n", 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);
+ Disconnect(i, port_index);
+ }
+ }
+ WriteNextStateStop();
+}
+
+// Server
+void JackGraphManager::DisconnectAllOutput(jack_port_id_t port_index)
+{
+ JackLog("JackGraphManager::DisconnectAllOutput port_index = %ld \n", port_index);
+ JackConnectionManager* manager = WriteNextStateStart();
+
+ const jack_int_t* connections = manager->GetConnections(port_index);
+ while (connections[0] != EMPTY) {
+ Disconnect(port_index, connections[0]); // Warning : Disconnect shift port to left
+ }
+ WriteNextStateStop();
+}
+
+// Server
+int JackGraphManager::DisconnectAll(jack_port_id_t port_index)
+{
+ AssertPort(port_index);
+
+ JackPort* port = GetPort(port_index);
+ if (port->fFlags & JackPortIsOutput) {
+ DisconnectAllOutput(port_index);
+ } else {
+ DisconnectAllInput(port_index);
+ }
+ return 0;
+}
+
+// Server
+int JackGraphManager::GetInputRefNum(jack_port_id_t port_index)
+{
+ AssertPort(port_index);
+ JackConnectionManager* manager = WriteNextStateStart();
+ int res = manager->GetInputRefNum(port_index);
+ WriteNextStateStop();
+ return res;
+}
+
+// Server
+int JackGraphManager::GetOutputRefNum(jack_port_id_t port_index)
+{
+ AssertPort(port_index);
+ JackConnectionManager* manager = WriteNextStateStart();
+ int res = manager->GetOutputRefNum(port_index);
+ WriteNextStateStop();
+ return res;
+}
+
+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);
+ bool in_use_src = GetPort(port_src)->fInUse;
+ bool in_use_dst = GetPort(port_src)->fInUse;
+ int res = 0;
+
+ if (!in_use_src || !in_use_dst) {
+ if (!in_use_src)
+ jack_error("JackGraphManager::Connect: port_src not %ld used name = %s", port_src, GetPort(port_src)->fName);
+ if (!in_use_dst)
+ jack_error("JackGraphManager::Connect: port_dst not %ld used name = %s", port_dst, GetPort(port_dst)->fName);
+ res = -1;
+ goto end;
+ }
+ if (manager->IsConnected(port_src, port_dst)) {
+ jack_error("JackGraphManager::Connect already connected port_src = %ld port_dst = %ld", port_src, port_dst);
+ res = EEXIST;
+ goto end;
+ }
+
+ res = manager->Connect(port_src, port_dst);
+ if (res < 0) {
+ jack_error("JackGraphManager::Connect failed port_src = %ld port_dst = %ld", port_src, port_dst);
+ goto end;
+ }
+ manager->Connect(port_dst, port_src);
+ if (res < 0) {
+ jack_error("JackGraphManager::Connect failed port_src = %ld port_dst = %ld", port_dst, port_src);
+ goto end;
+ }
+
+ if (manager->IsLoopPath(port_src, port_dst)) {
+ JackLog("JackGraphManager::Connect: LOOP detected\n");
+ manager->IncFeedbackConnection(port_src, port_dst);
+ } else {
+ manager->IncDirectConnection(port_src, port_dst);
+ }
+
+end:
+ WriteNextStateStop();
+ if (res < 0)
+ jack_error("JackGraphManager::Connect failed port_src = %ld port_dst = %ld", port_dst, port_src);
+ return res;
+}
+
+// Server
+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);
+ bool in_use_src = GetPort(port_src)->fInUse;
+ bool in_use_dst = GetPort(port_src)->fInUse;
+ int res = 0;
+
+ if (!in_use_src || !in_use_dst) {
+ if (!in_use_src)
+ jack_error("JackGraphManager::Disconnect: port_src not %ld used name = %s", port_src, GetPort(port_src)->fName);
+ if (!in_use_dst)
+ jack_error("JackGraphManager::Disconnect: port_src not %ld used name = %s", port_dst, GetPort(port_dst)->fName);
+ res = -1;
+ goto end;
+ }
+ if (!manager->IsConnected(port_src, port_dst)) {
+ jack_error("JackGraphManager::Disconnect not connected port_src = %ld port_dst = %ld", port_src, port_dst);
+ res = -1;
+ goto end;
+ }
+
+ manager->Disconnect(port_src, port_dst);
+ if (res < 0) {
+ jack_error("JackGraphManager::Disconnect failed port_src = %ld port_dst = %ld", port_src, port_dst);
+ goto end;
+ }
+ manager->Disconnect(port_dst, port_src);
+ if (res < 0) {
+ jack_error("JackGraphManager::Disconnect failed port_src = %ld port_dst = %ld", port_dst, port_src);
+ goto end;
+ }
+
+ if (manager->IsFeedbackConnection(port_src, port_dst)) {
+ JackLog("JackGraphManager::Disconnect: FEEDBACK removed\n");
+ manager->DecFeedbackConnection(port_src, port_dst);
+ } else {
+ manager->DecDirectConnection(port_src, port_dst);
+ }
+
+end:
+ WriteNextStateStop();
+ return res;
+}
+
+// Client
+int JackGraphManager::ConnectedTo(jack_port_id_t port_src, const char* port_name)
+{
+ JackLog("JackGraphManager::ConnectedTo port_src = %ld port_name = %s\n", port_src, port_name);
+ JackConnectionManager* manager = ReadCurrentState();
+ jack_port_id_t port_dst;
+
+ if ((port_dst = GetPort(port_name)) == NO_PORT) {
+ jack_error("Unknown destination port port_name = %s", port_name);
+ return 0;
+ } else {
+ return manager->IsConnected(port_src, port_dst);
+ }
+}
+
+// Server
+int JackGraphManager::CheckPort(jack_port_id_t port_index)
+{
+ JackPort* port = GetPort(port_index);
+
+ if (port->fLocked) {
+ jack_error("Port %s is locked against connection changes", port->fName);
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackGraphManager::CheckPorts(jack_port_id_t port_src, jack_port_id_t port_dst)
+{
+ JackPort* src = GetPort(port_src);
+ JackPort* dst = GetPort(port_dst);
+
+ if ((dst->Flags() & JackPortIsInput) == 0) {
+ jack_error("Destination port in attempted (dis)connection of %s and %s is not an input port", src->fName, dst->fName);
+ return -1;
+ }
+
+ if ((src->Flags() & JackPortIsOutput) == 0) {
+ jack_error("Source port in attempted (dis)connection of %s and %s is not an output port", src->fName, dst->fName);
+ return -1;
+ }
+
+ if (src->fLocked) {
+ jack_error("Source port %s is locked against connection changes", src->fName);
+ return -1;
+ }
+
+ if (dst->fLocked) {
+ jack_error("Destination port %s is locked against connection changes", dst->fName);
+ return -1;
+ }
+
+ return 0;
+}
+
+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);
+
+ 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);
+ return -1;
+ }
+
+ if ((*port_dst = GetPort(dst_name)) == NO_PORT) {
+ jack_error("Unknown destination port in attempted (dis)connection src_name [%s] dst_name [%s]", src_name, dst_name);
+ return -1;
+ }
+
+ return CheckPorts(*port_src, *port_dst);
+}
+
+// Client : port array
+jack_port_id_t JackGraphManager::GetPort(const char* name)
+{
+ for (int i = 0; i < PORT_NUM; i++) {
+ JackPort* port = GetPort(i);
+ if (port->IsUsed() && strcmp(port->fName, name) == 0)
+ return i;
+ }
+ return NO_PORT;
+}
+
+/*!
+\brief Get the connection port name array.
+*/
+
+// Client
+void JackGraphManager::GetConnectionsAux(JackConnectionManager* manager, const char** res, jack_port_id_t port_index)
+{
+ const jack_int_t* connections = manager->GetConnections(port_index);
+ jack_int_t index;
+ int i;
+
+ for (i = 0; (i < CONNECTION_NUM) && ((index = connections[i]) != EMPTY) ; i++) {
+ JackPort* port = GetPort(index);
+ res[i] = port->fName;
+ }
+
+ res[i] = NULL;
+}
+
+// Client
+/*
+ Use the state returned by ReadCurrentState and check that the state was not changed during the read operation.
+ The operation is lock-free since there is no intermediate state in the write operation that could cause the
+ read to loop forever.
+*/
+const char** JackGraphManager::GetConnections(jack_port_id_t port_index)
+{
+ const char** res = (const char**)malloc(sizeof(char*) * (CONNECTION_NUM + 1));
+ UInt16 cur_index;
+ UInt16 next_index;
+ AssertPort(port_index);
+
+ do {
+ cur_index = GetCurrentIndex();
+ GetConnectionsAux(ReadCurrentState(), res, port_index);
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index); // Until a coherent state has been read
+
+ return res;
+}
+
+// Client
+const char** JackGraphManager::GetPortsAux(const char* port_name_pattern, const char* type_name_pattern, unsigned long flags)
+{
+ const char** matching_ports;
+ unsigned long match_cnt = 0;
+ regex_t port_regex;
+ regex_t type_regex;
+ bool matching;
+
+ if (port_name_pattern && port_name_pattern[0]) {
+ regcomp(&port_regex, port_name_pattern, REG_EXTENDED | REG_NOSUB);
+ }
+ if (type_name_pattern && type_name_pattern[0]) {
+ regcomp(&type_regex, type_name_pattern, REG_EXTENDED | REG_NOSUB);
+ }
+
+ matching_ports = (const char**)malloc(sizeof(char*) * PORT_NUM);
+
+ for (int i = 0; i < PORT_NUM; i++) {
+ matching = true;
+
+ JackPort* port = GetPort(i);
+
+ if (port->IsUsed()) {
+
+ if (flags) {
+ if ((port->fFlags & flags) != flags) {
+ matching = false;
+ }
+ }
+
+ if (matching && port_name_pattern && port_name_pattern[0]) {
+ if (regexec(&port_regex, port->fName, 0, NULL, 0)) {
+ matching = false;
+ }
+ }
+
+ /*
+ if (matching && type_name_pattern && type_name_pattern[0]) {
+ jack_port_type_id_t ptid = psp[i].ptype_id;
+ if (regexec (&type_regex,engine->port_types[ptid].type_name,0, NULL, 0)) {
+ matching = false;
+ }
+ }
+ */
+
+ // TO BE IMPROVED
+ if (matching && type_name_pattern && type_name_pattern[0]) {
+ if (regexec(&type_regex, JACK_DEFAULT_AUDIO_TYPE, 0, NULL, 0)) {
+ matching = false;
+ }
+ }
+
+ if (matching) {
+ matching_ports[match_cnt++] = port->fName;
+ }
+ }
+ }
+
+ matching_ports[match_cnt] = 0;
+
+ if (match_cnt == 0) {
+ free(matching_ports);
+ matching_ports = NULL;
+ }
+
+ return matching_ports;
+}
+
+// Client
+/*
+ Check that the state was not changed during the read operation.
+ The operation is lock-free since there is no intermediate state in the write operation that could cause the
+ read to loop forever.
+*/
+const char** JackGraphManager::GetPorts(const char* port_name_pattern, const char* type_name_pattern, unsigned long flags)
+{
+ const char** matching_ports = NULL;
+ UInt16 cur_index;
+ UInt16 next_index;
+
+ do {
+ cur_index = GetCurrentIndex();
+ if (matching_ports)
+ free(matching_ports);
+ matching_ports = GetPortsAux(port_name_pattern, type_name_pattern, flags);
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index); // Until a coherent state has been read
+
+ return matching_ports;
+}
+
+// Server
+void JackGraphManager::Save(JackConnectionManager* dst)
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ memcpy(dst, manager, sizeof(JackConnectionManager));
+ WriteNextStateStop();
+}
+
+// Server
+void JackGraphManager::Restore(JackConnectionManager* src)
+{
+ JackConnectionManager* manager = WriteNextStateStart();
+ memcpy(manager, src, sizeof(JackConnectionManager));
+ WriteNextStateStop();
+}
+
+} // end of namespace
+
+
diff --git a/common/JackGraphManager.h b/common/JackGraphManager.h
new file mode 100644
index 00000000..1c2a1d5d
--- /dev/null
+++ b/common/JackGraphManager.h
@@ -0,0 +1,121 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackGraphManager__
+#define __JackGraphManager__
+
+#include "JackShmMem.h"
+#include "JackPort.h"
+#include "JackConstants.h"
+#include "JackConnectionManager.h"
+#include "JackAtomicState.h"
+
+namespace Jack
+{
+
+/*!
+\brief Graph manager: contains the connection manager and the port array.
+*/
+
+class JackGraphManager : public JackShmMem, public JackAtomicState<JackConnectionManager>
+{
+
+ private:
+
+ JackPort fPortArray[PORT_NUM];
+ JackClientTiming fClientTiming[CLIENT_NUM];
+
+ jack_port_id_t AllocatePortAux(int refnum, const char* port_name, JackPortFlags flags);
+ void GetConnectionsAux(JackConnectionManager* manager, const char** res, jack_port_id_t port_index);
+ const char** GetPortsAux(const char* port_name_pattern, const char* type_name_pattern, unsigned long flags);
+ float* GetBuffer(jack_port_id_t port_index);
+ void* GetBufferAux(JackConnectionManager* manager, jack_port_id_t port_index, jack_nframes_t frames);
+ jack_nframes_t GetTotalLatencyAux(jack_port_id_t port_index, jack_port_id_t src_port_index, JackConnectionManager* manager, int hop_count);
+
+ public:
+
+ JackGraphManager()
+ {}
+ virtual ~JackGraphManager()
+ {}
+
+ // Ports management
+ jack_port_id_t AllocatePort(int refnum, const char* port_name, JackPortFlags flags);
+ void ReleasePort(jack_port_id_t port_index);
+ JackPort* GetPort(jack_port_id_t index);
+ jack_port_id_t GetPort(const char* name);
+ jack_nframes_t GetTotalLatency(jack_port_id_t port_index);
+ int RequestMonitor(jack_port_id_t port_index, bool onoff);
+
+ // Connections management
+ int Connect(jack_port_id_t src_index, jack_port_id_t dst_index);
+ int Disconnect(jack_port_id_t src_index, jack_port_id_t dst_index);
+ int GetConnectionsNum(jack_port_id_t port_index);
+
+ int ConnectedTo(jack_port_id_t port_src, const char* port_name);
+ const char** GetConnections(jack_port_id_t port_index);
+ const char** GetPorts(const char* port_name_pattern, const char* type_name_pattern, unsigned long flags);
+
+ int CheckPorts(const char* src, const char* dst, jack_port_id_t* src_index, jack_port_id_t* dst_index);
+ int CheckPorts(jack_port_id_t port_src, jack_port_id_t port_dst);
+ int CheckPort(jack_port_id_t port_index);
+
+ void DisconnectAllInput(jack_port_id_t port_index);
+ void DisconnectAllOutput(jack_port_id_t port_index);
+ int DisconnectAll(jack_port_id_t port_index);
+
+ // Client management
+ int AllocateRefNum();
+ void ReleaseRefNum(int refnum);
+
+ bool IsDirectConnection(int ref1, int ref2);
+ void DirectConnect(int ref1, int ref2);
+ void DirectDisconnect(int ref1, int ref2);
+
+ int RemovePort(int refnum, jack_port_id_t port_index);
+ void RemoveAllPorts(int refnum);
+ void DisconnectAllPorts(int refnum);
+
+ int GetInputRefNum(jack_port_id_t port_index);
+ int GetOutputRefNum(jack_port_id_t port_index);
+
+ // Buffer management
+ void* GetBuffer(jack_port_id_t port_index, jack_nframes_t frames);
+
+ // Activation management
+ void RunCurrentGraph();
+ bool RunNextGraph();
+ bool IsFinishedGraph();
+
+ int ResumeRefNum(JackClientControl* control, JackSynchro** table);
+ int SuspendRefNum(JackClientControl* control, JackSynchro** table, long usecs);
+
+ JackClientTiming* GetClientTiming(int ref);
+
+ void Save(JackConnectionManager* dst);
+ void Restore(JackConnectionManager* src);
+
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackInternalClient.cpp b/common/JackInternalClient.cpp
new file mode 100644
index 00000000..d9a0a80b
--- /dev/null
+++ b/common/JackInternalClient.cpp
@@ -0,0 +1,105 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackInternalClient.h"
+#include "JackEngine.h"
+#include "JackServer.h"
+#include "JackGraphManager.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackInternalClientChannel.h"
+#include <assert.h>
+
+
+namespace Jack
+{
+
+JackGraphManager* JackInternalClient::fGraphManager = NULL;
+JackEngineControl* JackInternalClient::fEngineControl = NULL;
+
+// Used for external C API (JackAPI.cpp)
+JackGraphManager* GetGraphManager()
+{
+ return JackServer::fInstance->GetGraphManager();
+}
+
+JackEngineControl* GetEngineControl()
+{
+ return JackServer::fInstance->GetEngineControl();
+}
+
+JackSynchro** GetSynchroTable()
+{
+ return JackServer::fInstance->GetSynchroTable();
+}
+
+JackInternalClient::JackInternalClient(JackServer* server, JackSynchro** table): JackClient(table)
+{
+ fClientControl = new JackClientControl();
+ fChannel = new JackInternalClientChannel(server);
+}
+
+JackInternalClient::~JackInternalClient()
+{
+ delete fClientControl;
+ delete fChannel;
+}
+
+int JackInternalClient::Open(const char* name)
+{
+ int result;
+ JackLog("JackInternalClient::Open name = %s\n", name);
+ strcpy(fClientControl->fName, name);
+
+ // Require new client
+ fChannel->ClientNew(name, &fClientControl->fRefNum, &fEngineControl, &fGraphManager, this, &result);
+ if (result < 0) {
+ jack_error("Cannot open client name = %s", name);
+ goto error;
+ }
+
+ SetupDriverSync(false);
+ return 0;
+
+error:
+ fChannel->Stop();
+ fChannel->Close();
+ return -1;
+}
+
+JackGraphManager* JackInternalClient::GetGraphManager() const
+{
+ assert(fGraphManager);
+ return fGraphManager;
+}
+
+JackEngineControl* JackInternalClient::GetEngineControl() const
+{
+ assert(fEngineControl);
+ return fEngineControl;
+}
+
+JackClientControl* JackInternalClient::GetClientControl() const
+{
+ return fClientControl;
+}
+
+} // end of namespace
+
diff --git a/common/JackInternalClient.h b/common/JackInternalClient.h
new file mode 100644
index 00000000..fc9ed5b4
--- /dev/null
+++ b/common/JackInternalClient.h
@@ -0,0 +1,60 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackInternalClient__
+#define __JackInternalClient__
+
+#include "JackClient.h"
+
+namespace Jack
+{
+
+struct JackEngineControl;
+class JackClientChannelInterface;
+
+/*!
+\brief Internal clients in the server.
+*/
+
+class JackInternalClient : public JackClient
+{
+
+ private:
+
+ JackClientControl* fClientControl; /*! Client control */
+
+ public:
+
+ JackInternalClient(JackServer* server, JackSynchro** table);
+ virtual ~JackInternalClient();
+
+ int Open(const char* name);
+
+ JackGraphManager* GetGraphManager() const;
+ JackEngineControl* GetEngineControl() const;
+ JackClientControl* GetClientControl() const;
+
+ static JackGraphManager* fGraphManager; /*! Shared memory Port manager */
+ static JackEngineControl* fEngineControl; /*! Shared engine cotrol */
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackInternalClientChannel.h b/common/JackInternalClientChannel.h
new file mode 100644
index 00000000..516b0c2f
--- /dev/null
+++ b/common/JackInternalClientChannel.h
@@ -0,0 +1,116 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackInternalClientChannel__
+#define __JackInternalClientChannel__
+
+#include "JackChannel.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackClientChannel for server internal clients.
+*/
+
+class JackInternalClientChannel : public JackClientChannelInterface
+{
+
+ private:
+
+ JackServer* fServer;
+ JackEngine* fEngine;
+
+ public:
+
+ JackInternalClientChannel(JackServer* server): fServer(server), fEngine(server->GetEngine())
+ {}
+ virtual ~JackInternalClientChannel()
+ {}
+
+ void ClientNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
+ {
+ *result = fEngine->ClientInternalNew(name, ref, shared_engine, shared_manager, client);
+ }
+ void ClientClose(int refnum, int* result)
+ {
+ *result = fEngine->ClientInternalClose(refnum);
+ }
+ void ClientActivate(int refnum, int* result)
+ {
+ *result = fServer->Activate(refnum);
+ }
+ void ClientDeactivate(int refnum, int* result)
+ {
+ *result = fServer->Deactivate(refnum);
+ }
+
+ void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+ {
+ *result = fEngine->PortRegister(refnum, name, flags, buffer_size, port_index);
+ }
+ void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
+ {
+ *result = fEngine->PortUnRegister(refnum, port_index);
+ }
+
+ void PortConnect(int refnum, const char* src, const char* dst, int* result)
+ {
+ *result = fEngine->PortConnect(refnum, src, dst);
+ }
+ void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
+ {
+ *result = fEngine->PortDisconnect(refnum, src, dst);
+ }
+
+ void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+ {
+ *result = fEngine->PortConnect(refnum, src, dst);
+ }
+ void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+ {
+ *result = fEngine->PortDisconnect(refnum, src, dst);
+ }
+
+ void SetBufferSize(jack_nframes_t nframes, int* result)
+ {
+ *result = fServer->SetBufferSize(nframes);
+ }
+ void SetFreewheel(int onoff, int* result)
+ {
+ *result = fServer->SetFreewheel(onoff);
+ }
+
+ // A FINIR
+ virtual void ReleaseTimebase(int refnum, int* result)
+ {
+ *result = fEngine->ReleaseTimebase(refnum);
+ }
+
+ virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
+ {
+ *result = fEngine->SetTimebaseCallback(refnum, conditional);
+ }
+
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackLibAPI.cpp b/common/JackLibAPI.cpp
new file mode 100644
index 00000000..87730d53
--- /dev/null
+++ b/common/JackLibAPI.cpp
@@ -0,0 +1,133 @@
+/*
+Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackDebugClient.h"
+#include "JackLibClient.h"
+#include "JackChannel.h"
+#include "JackGraphManager.h"
+#include "JackLibGlobals.h"
+#include "JackGlobals.h"
+#include "varargs.h"
+
+using namespace Jack;
+
+#ifdef WIN32
+ #define EXPORT __declspec(dllexport)
+#else
+ #define EXPORT
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ EXPORT jack_client_t * jack_client_open (const char *client_name,
+ jack_options_t options,
+ jack_status_t *status, ...);
+ EXPORT jack_client_t * jack_client_new (const char *client_name);
+ EXPORT int jack_client_close (jack_client_t *client);
+
+#ifdef __cplusplus
+}
+#endif
+
+JackLibGlobals* JackLibGlobals::fGlobals = NULL;
+long JackLibGlobals::fClientCount = 0;
+
+static inline bool CheckPort(jack_port_id_t port_index)
+{
+ return (port_index < PORT_NUM);
+}
+
+EXPORT jack_client_t* jack_client_new(const char* client_name)
+{
+ int options = JackUseExactName;
+ if (getenv("JACK_START_SERVER") == NULL)
+ options |= JackNoStartServer;
+
+ return jack_client_open(client_name, (jack_options_t)options, NULL);
+}
+
+// TO BE IMPLEMENTED PROPERLY
+EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...)
+{
+ va_list ap; /* variable argument pointer */
+ jack_varargs_t va; /* variable arguments */
+ jack_status_t my_status;
+
+ 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 */
+ va_start(ap, status);
+ jack_varargs_parse(options, ap, &va);
+ va_end(ap);
+
+ JackLog("jack_client_open %s\n", client_name);
+ if (client_name == NULL) {
+ jack_error("jack_client_new called with a NULL client_name");
+ return NULL;
+ }
+
+ JackLibGlobals::Init(); // jack library initialisation
+
+#ifdef __CLIENTDEBUG__
+ JackClient* client = new JackDebugClient(new JackLibClient(GetSynchroTable())); // Debug mode
+#else
+ JackClient* client = new JackLibClient(GetSynchroTable());
+#endif
+
+ int res = client->Open(client_name);
+ if (res < 0) {
+ delete client;
+ JackLibGlobals::Destroy(); // jack library destruction
+ return NULL;
+ } else {
+ *status = (jack_status_t)0;
+ return (jack_client_t*)client;
+ }
+ return NULL;
+}
+
+EXPORT int jack_client_close(jack_client_t* ext_client)
+{
+ JackLog("jack_client_close\n");
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_client_close called with a NULL client");
+ return -1;
+ }
+ int res = client->Close();
+ delete client;
+ JackLog("jack_client_close OK\n");
+ JackLibGlobals::Destroy(); // jack library destruction
+ return res;
+}
+
+
diff --git a/common/JackLibClient.cpp b/common/JackLibClient.cpp
new file mode 100644
index 00000000..45b49e09
--- /dev/null
+++ b/common/JackLibClient.cpp
@@ -0,0 +1,162 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackLibClient.h"
+#include "JackTime.h"
+#include "JackLibGlobals.h"
+#include "JackGlobals.h"
+#include "JackChannel.h"
+
+namespace Jack
+{
+
+// Used for external C API (JackAPI.cpp)
+JackGraphManager* GetGraphManager()
+{
+ assert(JackLibGlobals::fGlobals->fGraphManager);
+ return JackLibGlobals::fGlobals->fGraphManager;
+}
+
+JackEngineControl* GetEngineControl()
+{
+ assert(JackLibGlobals::fGlobals->fEngineControl);
+ return JackLibGlobals::fGlobals->fEngineControl;
+}
+
+JackSynchro** GetSynchroTable()
+{
+ assert(JackLibGlobals::fGlobals);
+ return JackLibGlobals::fGlobals->fSynchroTable;
+}
+
+//-------------------
+// Client management
+//-------------------
+
+JackLibClient::JackLibClient(JackSynchro** table): JackClient(table)
+{
+ JackLog("JackLibClient::JackLibClient table = %x\n", table);
+ fChannel = JackGlobals::MakeClientChannel();
+}
+
+JackLibClient::~JackLibClient()
+{
+ JackLog("JackLibClient::~JackLibClient\n");
+ delete fChannel;
+}
+
+int JackLibClient::Open(const char* name)
+{
+ int shared_engine, shared_client, shared_ports, result;
+ JackLog("JackLibClient::Open %s\n", name);
+
+ // Open server/client channel
+ if (fChannel->Open(name, this) < 0) {
+ jack_error("Cannot connect to the server");
+ goto error;
+ }
+
+ // Start receiving notifications
+ if (fChannel->Start() < 0) {
+ jack_error("Cannot start channel");
+ goto error;
+ }
+
+ // Require new client
+ fChannel->ClientNew(name, &shared_engine, &shared_client, &shared_ports, &result);
+ if (result < 0) {
+ jack_error("Cannot open %s client", name);
+ goto error;
+ }
+
+ try {
+ // Map shared memory segments
+ JackLibGlobals::fGlobals->fEngineControl = shared_engine;
+ JackLibGlobals::fGlobals->fGraphManager = shared_ports;
+ fClientControl = shared_client;
+ verbose = GetEngineControl()->fVerbose;
+ } catch (int n) {
+ jack_error("Map shared memory segments exception %d", n);
+ goto error;
+ }
+
+ SetupDriverSync(false);
+
+ // Connect shared synchro : the synchro must be usable in I/O mode when several clients live in the same process
+ if (!fSynchroTable[fClientControl->fRefNum]->Connect(name)) {
+ jack_error("Cannot ConnectSemaphore %s client", name);
+ goto error;
+ }
+
+ JackLog("JackLibClient::Open: name, refnum %s %ld\n", name, fClientControl->fRefNum);
+ return 0;
+
+error:
+ fChannel->Stop();
+ fChannel->Close();
+ return -1;
+}
+
+// Notifications received from the server
+// TODO this should be done once for all clients in the process, when a shared notification channel
+// will be shared by all clients...
+int JackLibClient::ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value)
+{
+ int res = 0;
+
+ // Done all time
+ switch (notify) {
+
+ case JackNotifyChannelInterface::kAddClient:
+ JackLog("JackClient::AddClient name = %s, ref = %ld \n", name, refnum);
+ // the synchro must be usable in I/O mode when several clients live in the same process
+ res = fSynchroTable[refnum]->Connect(name) ? 0 : -1;
+ break;
+
+ case JackNotifyChannelInterface::kRemoveClient:
+ JackLog("JackClient::RemoveClient name = %s, ref = %ld \n", name, refnum);
+ if (strcmp(GetClientControl()->fName, name) != 0)
+ res = fSynchroTable[refnum]->Disconnect() ? 0 : -1;
+ break;
+ }
+
+ return res;
+}
+
+JackGraphManager* JackLibClient::GetGraphManager() const
+{
+ assert(JackLibGlobals::fGlobals->fGraphManager);
+ return JackLibGlobals::fGlobals->fGraphManager;
+}
+
+JackEngineControl* JackLibClient::GetEngineControl() const
+{
+ assert(JackLibGlobals::fGlobals->fEngineControl);
+ return JackLibGlobals::fGlobals->fEngineControl;
+}
+
+JackClientControl* JackLibClient::GetClientControl() const
+{
+ return fClientControl;
+}
+
+} // end of namespace
+
+
+
diff --git a/common/JackLibClient.h b/common/JackLibClient.h
new file mode 100644
index 00000000..75e30837
--- /dev/null
+++ b/common/JackLibClient.h
@@ -0,0 +1,60 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackLibClient__
+#define __JackLibClient__
+
+#include "JackClient.h"
+#include "JackShmMem.h"
+#include "JackClientControl.h"
+#include "JackEngineControl.h"
+
+namespace Jack
+{
+
+/*!
+\brief Client on the library side.
+*/
+
+class JackLibClient : public JackClient
+{
+
+ private:
+
+ JackShmReadWritePtr1<JackClientControl> fClientControl; /*! Shared client control */
+
+ public:
+
+ JackLibClient(JackSynchro** table);
+ virtual ~JackLibClient();
+
+ int Open(const char* name);
+
+ int ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value);
+
+ JackGraphManager* GetGraphManager() const;
+ JackEngineControl* GetEngineControl() const;
+ JackClientControl* GetClientControl() const;
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackLibGlobals.h b/common/JackLibGlobals.h
new file mode 100644
index 00000000..5f857625
--- /dev/null
+++ b/common/JackLibGlobals.h
@@ -0,0 +1,97 @@
+/*
+Copyright (C) 2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackLibGlobals__
+#define __JackLibGlobals__
+
+#include "JackShmMem.h"
+#include "JackEngineControl.h"
+#ifdef __APPLE__
+#include "JackMachPort.h"
+#include <map>
+#endif
+#include "JackGlobals.h"
+#include "JackTime.h"
+#include <assert.h>
+
+namespace Jack
+{
+
+class JackClient;
+
+/*!
+\brief Global library static structure: singleton kind of pattern.
+*/
+
+struct JackLibGlobals
+{
+ JackShmReadWritePtr<JackGraphManager> fGraphManager; /*! Shared memory Port manager */
+ JackShmReadWritePtr<JackEngineControl> fEngineControl; /*! Shared engine control */ // transport engine has to be writable
+ JackSynchro* fSynchroTable[CLIENT_NUM]; /*! Shared synchro table */
+#ifdef __APPLE__
+ std::map<mach_port_t, JackClient*> fClientTable; /*! Client table */
+#endif
+
+ static long fClientCount;
+ static JackLibGlobals* fGlobals;
+
+ JackLibGlobals()
+ {
+ JackLog("JackLibGlobals\n");
+ for (int i = 0; i < CLIENT_NUM; i++)
+ fSynchroTable[i] = JackGlobals::MakeSynchro();
+ fGraphManager = -1;
+ fEngineControl = -1;
+ }
+
+ virtual ~JackLibGlobals()
+ {
+ JackLog("~JackLibGlobals\n");
+ for (int i = 0; i < CLIENT_NUM; i++) {
+ fSynchroTable[i]->Disconnect();
+ delete fSynchroTable[i];
+ }
+ }
+
+ static void Init()
+ {
+ if (fClientCount++ == 0 && !fGlobals) {
+ JackLog("JackLibGlobals Init %x\n", fGlobals);
+ JackGlobals::InitClient();
+ InitTime();
+ fGlobals = new JackLibGlobals();
+ }
+ }
+
+ static void Destroy()
+ {
+ if (--fClientCount == 0 && fGlobals) {
+ JackLog("JackLibGlobals Destroy %x\n", fGlobals);
+ delete fGlobals;
+ fGlobals = NULL;
+ JackGlobals::Destroy();
+ }
+ }
+
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackLoopbackDriver.cpp b/common/JackLoopbackDriver.cpp
new file mode 100644
index 00000000..79550c5e
--- /dev/null
+++ b/common/JackLoopbackDriver.cpp
@@ -0,0 +1,209 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackLoopbackDriver.h"
+#include "JackEngineControl.h"
+#include "JackGraphManager.h"
+#include <iostream>
+#include <assert.h>
+
+namespace Jack
+{
+
+int JackLoopbackDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ return JackAudioDriver::Open(nframes,
+ samplerate,
+ capturing,
+ playing,
+ inchannels,
+ outchannels,
+ monitor,
+ capture_driver_name,
+ playback_driver_name,
+ capture_latency,
+ playback_latency);
+}
+
+int JackLoopbackDriver::Process()
+{
+ assert(fCaptureChannels == fPlaybackChannels);
+
+ // Loopback copy
+ for (int i = 0; i < fCaptureChannels; i++) {
+ memcpy(fGraphManager->GetBuffer(fCapturePortList[i], fEngineControl->fBufferSize),
+ fGraphManager->GetBuffer(fPlaybackPortList[i], fEngineControl->fBufferSize),
+ sizeof(float) * fEngineControl->fBufferSize);
+ }
+
+ fGraphManager->ResumeRefNum(fClientControl, fSynchroTable); // Signal all clients
+ if (fEngineControl->fSyncMode) {
+ if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, fEngineControl->fTimeOutUsecs) < 0)
+ jack_error("JackLoopbackDriver::ProcessSync SuspendRefNum error");
+ }
+ return 0;
+}
+
+void JackLoopbackDriver::PrintState()
+{
+ int i;
+ jack_port_id_t port_index;
+
+ std::cout << "JackLoopbackDriver state" << std::endl;
+ std::cout << "Input ports" << std::endl;
+
+ for (i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+}
+
+} // end of namespace
+
+/*
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+jack_driver_desc_t * driver_get_descriptor ()
+{
+ jack_driver_desc_t * desc;
+ jack_driver_param_desc_t * params;
+ unsigned int i;
+
+ desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
+ strcpy (desc->name, "dummy");
+ desc->nparams = 5;
+
+ params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy (params[i].name, "capture");
+ params[i].character = 'C';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 2U;
+ strcpy (params[i].short_desc, "Number of capture ports");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "playback");
+ params[i].character = 'P';
+ params[i].type = JackDriverParamUInt;
+ params[1].value.ui = 2U;
+ strcpy (params[i].short_desc, "Number of playback ports");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "rate");
+ params[i].character = 'r';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 48000U;
+ strcpy (params[i].short_desc, "Sample rate");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "period");
+ params[i].character = 'p';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 1024U;
+ strcpy (params[i].short_desc, "Frames per period");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "wait");
+ params[i].character = 'w';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 21333U;
+ strcpy (params[i].short_desc,
+ "Number of usecs to wait between engine processes");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ desc->params = params;
+
+ return desc;
+}
+
+Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params)
+{
+ jack_nframes_t sample_rate = 48000;
+ jack_nframes_t period_size = 1024;
+ unsigned int capture_ports = 2;
+ unsigned int playback_ports = 2;
+ const JSList * node;
+ const jack_driver_param_t * param;
+
+ for (node = params; node; node = jack_slist_next (node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'C':
+ capture_ports = param->value.ui;
+ break;
+
+ case 'P':
+ playback_ports = param->value.ui;
+ break;
+
+ case 'r':
+ sample_rate = param->value.ui;
+ break;
+
+ case 'p':
+ period_size = param->value.ui;
+ break;
+
+ }
+ }
+ Jack::JackDriverClientInterface* driver = new Jack::JackLoopbackDriver("loopback", engine, table);
+ if (driver->Open(period_size, sample_rate, 1, 1, capture_ports, playback_ports, "loopback") == 0) {
+ return driver;
+ } else {
+ delete driver;
+ return NULL;
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+*/
+
diff --git a/common/JackLoopbackDriver.h b/common/JackLoopbackDriver.h
new file mode 100644
index 00000000..4610822e
--- /dev/null
+++ b/common/JackLoopbackDriver.h
@@ -0,0 +1,63 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackLoopbackDriver__
+#define __JackLoopbackDriver__
+
+#include "JackAudioDriver.h"
+#include "JackTime.h"
+
+namespace Jack
+{
+
+/*!
+\brief The loopback driver : to be used to "pipeline" applications connected in sequence.
+*/
+
+class JackLoopbackDriver : public JackAudioDriver
+{
+
+ public:
+
+ JackLoopbackDriver(const char* name, JackEngine* engine, JackSynchro** table)
+ : JackAudioDriver(name, engine, table)
+ {}
+ virtual ~JackLoopbackDriver()
+ {}
+
+ int Open(jack_nframes_t frames_per_cycle,
+ jack_nframes_t rate,
+ int capturing,
+ int playing,
+ int chan_in,
+ int chan_out,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Process();
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackPort.cpp b/common/JackPort.cpp
new file mode 100644
index 00000000..c3898e2d
--- /dev/null
+++ b/common/JackPort.cpp
@@ -0,0 +1,229 @@
+/*
+Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackPort.h"
+#include "JackError.h"
+#include <stdio.h>
+
+namespace Jack
+{
+
+JackPort::JackPort()
+ : fFlags(JackPortIsInput), fRefNum( -1), fLatency(0), fMonitorRequests(0), fInUse(false), fLocked(false), fTied(NO_PORT)
+{}
+
+JackPort::~JackPort()
+{}
+
+void JackPort::Allocate(int refnum, const char* port_name, JackPortFlags flags)
+{
+ fFlags = flags;
+ fRefNum = refnum;
+ strcpy(fName, port_name);
+ memset(fBuffer, 0, BUFFER_SIZE_MAX * sizeof(float));
+ fInUse = true;
+ fLocked = false;
+ fLatency = 0;
+ fTied = NO_PORT;
+}
+
+void JackPort::Release()
+{
+ fFlags = JackPortIsInput;
+ fRefNum = -1;
+ fInUse = false;
+ fLocked = false;
+ fLatency = 0;
+ fTied = NO_PORT;
+}
+
+bool JackPort::IsUsed() const
+{
+ return fInUse;
+}
+
+float* JackPort::GetBuffer()
+{
+ return fBuffer;
+}
+
+int JackPort::GetRefNum() const
+{
+ return fRefNum;
+}
+
+int JackPort::Lock()
+{
+ fLocked = true;
+ return 0;
+}
+
+int JackPort::Unlock()
+{
+ fLocked = false;
+ return 0;
+}
+
+jack_nframes_t JackPort::GetLatency() const
+{
+ return fLatency;
+}
+
+void JackPort::SetLatency(jack_nframes_t nframes)
+{
+ fLatency = nframes;
+}
+
+int JackPort::Tie(jack_port_id_t port_index)
+{
+ fTied = port_index;
+ return 0;
+}
+
+int JackPort::UnTie()
+{
+ fTied = NO_PORT;
+ return 0;
+}
+
+int JackPort::RequestMonitor(bool onoff)
+{
+ /**
+ jackd.h
+ * If @ref JackPortCanMonitor is set for this @a port, turn input
+ * monitoring on or off. Otherwise, do nothing.
+
+ if (!(fFlags & JackPortCanMonitor))
+ return -1;
+ */
+
+ if (onoff) {
+ fMonitorRequests++;
+ } else if (fMonitorRequests) {
+ fMonitorRequests--;
+ }
+
+ return 0;
+}
+
+int JackPort::EnsureMonitor(bool onoff)
+{
+ /**
+ jackd.h
+ * If @ref JackPortCanMonitor is set for this @a port, turn input
+ * monitoring on or off. Otherwise, do nothing.
+
+ if (!(fFlags & JackPortCanMonitor))
+ return -1;
+ */
+
+ if (onoff) {
+ if (fMonitorRequests == 0) {
+ fMonitorRequests++;
+ }
+ } else {
+ if (fMonitorRequests > 0) {
+ fMonitorRequests = 0;
+ }
+ }
+
+ return 0;
+}
+
+bool JackPort::MonitoringInput()
+{
+ return (fMonitorRequests > 0);
+}
+
+const char* JackPort::GetName() const
+{
+ return fName;
+}
+
+const char* JackPort::GetShortName() const
+{
+ /* we know there is always a colon, because we put
+ it there ...
+ */
+ return strchr(fName, ':') + 1;
+}
+
+int JackPort::Flags() const
+{
+ return fFlags;
+}
+
+const char* JackPort::Type() const
+{
+ // TO IMPROVE
+ return "Audio";
+}
+
+int JackPort::SetName(const char* new_name)
+{
+ char* colon = strchr(fName, ':');
+ int len = sizeof(fName) - ((int) (colon - fName)) - 2;
+ snprintf(colon + 1, len, "%s", new_name);
+ return 0;
+}
+
+void JackPort::MixBuffer(float* mixbuffer, float* buffer, jack_nframes_t frames)
+{
+ jack_nframes_t frames_group = frames / 4;
+ frames = frames % 4;
+
+ while (frames_group > 0) {
+ register float mixFloat1 = *mixbuffer;
+ register float sourceFloat1 = *buffer;
+ register float mixFloat2 = *(mixbuffer + 1);
+ register float sourceFloat2 = *(buffer + 1);
+ register float mixFloat3 = *(mixbuffer + 2);
+ register float sourceFloat3 = *(buffer + 2);
+ register float mixFloat4 = *(mixbuffer + 3);
+ register float sourceFloat4 = *(buffer + 3);
+
+ buffer += 4;
+ frames_group--;
+
+ mixFloat1 += sourceFloat1;
+ mixFloat2 += sourceFloat2;
+ mixFloat3 += sourceFloat3;
+ mixFloat4 += sourceFloat4;
+
+ *mixbuffer = mixFloat1;
+ *(mixbuffer + 1) = mixFloat2;
+ *(mixbuffer + 2) = mixFloat3;
+ *(mixbuffer + 3) = mixFloat4;
+
+ mixbuffer += 4;
+ }
+
+ while (frames > 0) {
+ register float mixFloat1 = *mixbuffer;
+ register float sourceFloat1 = *buffer;
+ buffer++;
+ frames--;
+ mixFloat1 += sourceFloat1;
+ *mixbuffer = mixFloat1;
+ mixbuffer++;
+ }
+}
+
+} // end of namespace
diff --git a/common/JackPort.h b/common/JackPort.h
new file mode 100644
index 00000000..84823842
--- /dev/null
+++ b/common/JackPort.h
@@ -0,0 +1,98 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackPort__
+#define __JackPort__
+
+#include "types.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+#define ALL_PORTS 0xFFFF
+#define NO_PORT 0xFFFE
+
+/*!
+\brief Base class for port.
+*/
+
+class JackPort
+{
+
+ friend class JackGraphManager;
+
+ private:
+
+ enum JackPortFlags fFlags;
+ char fName[JACK_PORT_NAME_SIZE + 2];
+ int fRefNum;
+
+ jack_nframes_t fLatency;
+ uint8_t fMonitorRequests;
+
+ bool fInUse;
+ bool fLocked;
+ jack_port_id_t fTied; // Locally tied source port
+
+ float fBuffer[BUFFER_SIZE_MAX];
+
+ bool IsUsed() const;
+
+ static void MixBuffer(float* mixbuffer, float* buffer, jack_nframes_t frames);
+
+ public:
+
+ JackPort();
+ virtual ~JackPort();
+
+ void Allocate(int refnum, const char* port_name, JackPortFlags flags);
+ void Release();
+ const char* GetName() const;
+ const char* GetShortName() const;
+ int SetName(const char * name);
+
+ int Flags() const;
+ const char* Type() const;
+
+ int Lock();
+ int Unlock();
+
+ int Tie(jack_port_id_t port_index);
+ int UnTie();
+
+ jack_nframes_t GetLatency() const;
+ void SetLatency(jack_nframes_t latency);
+
+ int RequestMonitor(bool onoff);
+ int EnsureMonitor(bool onoff);
+ bool MonitoringInput();
+
+ float* GetBuffer();
+ int GetRefNum() const;
+
+};
+
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackPosixSemaphore.cpp b/common/JackPosixSemaphore.cpp
new file mode 100644
index 00000000..18e7a0f5
--- /dev/null
+++ b/common/JackPosixSemaphore.cpp
@@ -0,0 +1,205 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackPosixSemaphore.h"
+#include "JackChannel.h"
+#include "JackError.h"
+#include <fcntl.h>
+#include <sys/time.h>
+
+namespace Jack
+{
+
+void JackPosixSemaphore::BuildName(const char* name, char* res)
+{
+ sprintf(res, "%s/jack_sem.%s", jack_client_dir, name);
+}
+
+bool JackPosixSemaphore::Signal()
+{
+ int res;
+ assert(fSemaphore);
+
+ if (fFlush)
+ return true;
+
+ if ((res = sem_post(fSemaphore)) != 0) {
+ jack_error("JackPosixSemaphore::Signal name = %s err = %s", fName, strerror(errno));
+ }
+ return (res == 0);
+}
+
+bool JackPosixSemaphore::SignalAll()
+{
+ int res;
+ assert(fSemaphore);
+
+ if (fFlush)
+ return true;
+
+ if ((res = sem_post(fSemaphore)) != 0) {
+ jack_error("JackPosixSemaphore::SignalAll name = %s err = %s", fName, strerror(errno));
+ }
+ return (res == 0);
+}
+
+/*
+bool JackPosixSemaphore::Wait()
+{
+ int res;
+ assert(fSemaphore);
+ if ((res = sem_wait(fSemaphore)) != 0) {
+ jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
+ }
+ return (res == 0);
+}
+*/
+
+bool JackPosixSemaphore::Wait()
+{
+ int res;
+
+ while ((res = sem_wait(fSemaphore) < 0)) {
+ jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
+ if (errno != EINTR)
+ break;
+ }
+ return (res == 0);
+}
+
+
+/*
+#ifdef __linux__
+
+bool JackPosixSemaphore::TimedWait(long usec) // unusable semantic !!
+{
+ int res;
+ struct timeval now;
+ timespec time;
+ assert(fSemaphore);
+ gettimeofday(&now, 0);
+ time.tv_sec = now.tv_sec + usec / 1000000;
+ time.tv_nsec = (now.tv_usec + (usec % 1000000)) * 1000;
+
+ 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);
+ }
+ return (res == 0);
+}
+
+#else
+#warning "JackPosixSemaphore::TimedWait is not supported: Jack in SYNC mode with JackPosixSemaphore will not run properly !!"
+
+bool JackPosixSemaphore::TimedWait(long usec)
+{
+ return Wait();
+}
+#endif
+*/
+
+#warning JackPosixSemaphore::TimedWait not available : synchronous mode may not work correctly if POSIX semaphore are used
+
+bool JackPosixSemaphore::TimedWait(long usec)
+{
+ return Wait();
+}
+
+// Server side : publish the semaphore in the global namespace
+bool JackPosixSemaphore::Allocate(const char* name, int value)
+{
+ BuildName(name, fName);
+ JackLog("JackPosixSemaphore::Allocate name = %s val = %ld\n", 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));
+ return false;
+ } else {
+ return true;
+ }
+}
+
+// Client side : get the published semaphore from server
+bool JackPosixSemaphore::ConnectInput(const char* name)
+{
+ BuildName(name, fName);
+ JackLog("JackPosixSemaphore::Connect %s\n", fName);
+
+ // Temporary...
+ if (fSemaphore) {
+ JackLog("Already connected name = %s\n", name);
+ return true;
+ }
+
+ if ((fSemaphore = sem_open(fName, O_CREAT)) == (sem_t*)SEM_FAILED) {
+ jack_error("Connect: can't connect named semaphore name = %s err = %s", fName, strerror(errno));
+ return false;
+ } else {
+ int val = 0;
+ sem_getvalue(fSemaphore, &val);
+ JackLog("JackPosixSemaphore::Connect sem_getvalue %ld\n", val);
+ return true;
+ }
+}
+
+bool JackPosixSemaphore::Connect(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackPosixSemaphore::ConnectOutput(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackPosixSemaphore::Disconnect()
+{
+ JackLog("JackPosixSemaphore::Disconnect %s\n", fName);
+
+ if (fSemaphore) {
+ if (sem_close(fSemaphore) != 0) {
+ jack_error("Disconnect: can't disconnect named semaphore name = %s err = %s", fName, strerror(errno));
+ return false;
+ } else {
+ fSemaphore = NULL;
+ return true;
+ }
+ } else {
+ return true;
+ }
+}
+
+// Server side : destroy the semaphore
+void JackPosixSemaphore::Destroy()
+{
+ if (fSemaphore != NULL) {
+ JackLog("JackPosixSemaphore::Destroy\n");
+ sem_unlink(fName);
+ if (sem_close(fSemaphore) != 0) {
+ jack_error("Destroy: can't destroy semaphore name = %s err = %s", fName, strerror(errno));
+ }
+ fSemaphore = NULL;
+ } else {
+ jack_error("JackPosixSemaphore::Destroy semaphore == NULL");
+ }
+}
+
+} // end of namespace
+
diff --git a/common/JackPosixSemaphore.h b/common/JackPosixSemaphore.h
new file mode 100644
index 00000000..dadfcc91
--- /dev/null
+++ b/common/JackPosixSemaphore.h
@@ -0,0 +1,71 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackPosixSemaphore__
+#define __JackPosixSemaphore__
+
+#include "JackSynchro.h"
+#include <semaphore.h>
+#include <time.h>
+#include <stdio.h>
+#include <assert.h>
+
+namespace Jack
+{
+
+/*!
+\brief Inter process synchronization using POSIX semaphore.
+*/
+
+class JackPosixSemaphore : public JackSynchro
+{
+
+ private:
+
+ sem_t* fSemaphore;
+
+ protected:
+
+ void BuildName(const char* name, char* res);
+
+ public:
+
+ JackPosixSemaphore(): JackSynchro(), fSemaphore(NULL)
+ {}
+ virtual ~JackPosixSemaphore()
+ {}
+
+ bool Signal();
+ bool SignalAll();
+ bool Wait();
+ bool TimedWait(long usec);
+
+ bool Allocate(const char* name, int value);
+ bool Connect(const char* name);
+ bool ConnectInput(const char* name);
+ bool ConnectOutput(const char* name);
+ bool Disconnect();
+ void Destroy();
+};
+
+} // end of namespace
+
+
+#endif
+
diff --git a/common/JackPosixThread.cpp b/common/JackPosixThread.cpp
new file mode 100644
index 00000000..32b3b686
--- /dev/null
+++ b/common/JackPosixThread.cpp
@@ -0,0 +1,209 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackPosixThread.h"
+#include "JackError.h"
+#include <string.h> // for memset
+
+namespace Jack
+{
+
+void* JackPosixThread::ThreadHandler(void* arg)
+{
+ JackPosixThread* obj = (JackPosixThread*)arg;
+ JackRunnableInterface* runnable = obj->fRunnable;
+ int err;
+
+ if ((err = pthread_setcanceltype(obj->fCancellation, NULL)) != 0) {
+ jack_error("pthread_setcanceltype err = %s", strerror(err));
+ }
+
+ // Call Init method
+ if (!runnable->Init()) {
+ jack_error("Thread init fails: thread quits");
+ return 0;
+ }
+
+ JackLog("ThreadHandler: start\n");
+
+ // If Init succeed start the thread loop
+ bool res = true;
+ while (obj->fRunning && res) {
+ res = runnable->Execute();
+ //pthread_testcancel();
+ }
+
+ JackLog("ThreadHandler: exit\n");
+ return 0;
+}
+
+int JackPosixThread::Start()
+{
+ int res;
+ fRunning = true;
+
+ if (fRealTime) {
+
+ JackLog("Create RT thread\n");
+
+ /* Get the client thread to run as an RT-FIFO
+ scheduled thread of appropriate priority.
+ */
+ pthread_attr_t attributes;
+ struct sched_param rt_param;
+ pthread_attr_init(&attributes);
+
+ if ((res = pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED))) {
+ jack_error("Cannot request explicit scheduling for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ if ((res = pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE))) {
+ jack_error("Cannot request joinable thread creation for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ if ((res = pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM))) {
+ jack_error("Cannot set scheduling scope for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ //if ((res = pthread_attr_setschedpolicy(&attributes, SCHED_FIFO))) {
+
+ if ((res = pthread_attr_setschedpolicy(&attributes, SCHED_RR))) {
+ jack_error("Cannot set FIFO scheduling class for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ if ((res = pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM))) {
+ jack_error("Cannot set scheduling scope for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ memset(&rt_param, 0, sizeof(rt_param));
+ rt_param.sched_priority = fPriority;
+
+ if ((res = pthread_attr_setschedparam(&attributes, &rt_param))) {
+ jack_error("Cannot set scheduling priority for RT thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ if ((res = pthread_create(&fThread, &attributes, ThreadHandler, this))) {
+ jack_error("Cannot set create thread %d %s", res, strerror(errno));
+ return -1;
+ }
+
+ return 0;
+ } else {
+ JackLog("Create non RT thread\n");
+
+ if ((res = pthread_create(&fThread, 0, ThreadHandler, this))) {
+ jack_error("Cannot set create thread %d %s", res, strerror(errno));
+ return -1;
+ }
+ return 0;
+ }
+}
+
+int JackPosixThread::StartSync()
+{
+ jack_error("Not implemented yet");
+ return -1;
+}
+
+int JackPosixThread::Kill()
+{
+ if (fThread) { // If thread has been started
+ JackLog("JackPosixThread::Kill\n");
+ void* status;
+ pthread_cancel(fThread);
+ pthread_join(fThread, &status);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackPosixThread::Stop()
+{
+ if (fThread) { // If thread has been started
+ JackLog("JackPosixThread::Stop\n");
+ void* status;
+ fRunning = false; // Request for the thread to stop
+ pthread_join(fThread, &status);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackPosixThread::AcquireRealTime()
+{
+ struct sched_param rtparam;
+ int res;
+
+ if (!fThread)
+ return -1;
+
+ memset(&rtparam, 0, sizeof(rtparam));
+ rtparam.sched_priority = fPriority;
+
+ //if ((res = pthread_setschedparam(fThread, SCHED_FIFO, &rtparam)) != 0) {
+
+ if ((res = pthread_setschedparam(fThread, SCHED_RR, &rtparam)) != 0) {
+ jack_error("Cannot use real-time scheduling (FIFO/%d) "
+ "(%d: %s)", rtparam.sched_priority, res,
+ strerror(res));
+ return -1;
+ }
+ return 0;
+}
+
+int JackPosixThread::AcquireRealTime(int priority)
+{
+ fPriority = priority;
+ return AcquireRealTime();
+}
+
+int JackPosixThread::DropRealTime()
+{
+ struct sched_param rtparam;
+ int res;
+
+ if (!fThread)
+ return -1;
+
+ memset(&rtparam, 0, sizeof(rtparam));
+ rtparam.sched_priority = 0;
+
+ if ((res = pthread_setschedparam(fThread, SCHED_OTHER, &rtparam)) != 0) {
+ jack_error("Cannot switch to normal scheduling priority(%s)\n", strerror(errno));
+ return -1;
+ }
+ return 0;
+}
+
+pthread_t JackPosixThread::GetThreadID()
+{
+ return fThread;
+}
+
+} // end of namespace
+
diff --git a/common/JackPosixThread.h b/common/JackPosixThread.h
new file mode 100644
index 00000000..34927984
--- /dev/null
+++ b/common/JackPosixThread.h
@@ -0,0 +1,73 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackPosixThread__
+#define __JackPosixThread__
+
+#include "JackThread.h"
+#include <pthread.h>
+
+namespace Jack
+{
+
+/*!
+\brief The POSIX thread base class.
+*/
+
+class JackPosixThread : public JackThread
+{
+
+ protected:
+
+ pthread_t fThread;
+
+ static void* ThreadHandler(void* arg);
+
+ public:
+
+ JackPosixThread(JackRunnableInterface* runnable, bool real_time, int priority, int cancellation)
+ : JackThread(runnable, priority, real_time, cancellation), fThread((pthread_t)NULL)
+ {}
+ JackPosixThread(JackRunnableInterface* runnable)
+ : JackThread(runnable, 0, false, PTHREAD_CANCEL_DEFERRED), fThread((pthread_t)NULL)
+ {}
+ JackPosixThread(JackRunnableInterface* runnable, int cancellation)
+ : JackThread(runnable, 0, false, cancellation), fThread((pthread_t)NULL)
+ {}
+
+ virtual ~JackPosixThread()
+ {}
+
+ virtual int Start();
+ virtual int StartSync();
+ virtual int Kill();
+ virtual int Stop();
+
+ virtual int AcquireRealTime();
+ virtual int AcquireRealTime(int priority);
+ virtual int DropRealTime();
+
+ pthread_t GetThreadID();
+};
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackProcessSync.h b/common/JackProcessSync.h
new file mode 100644
index 00000000..c8ddd99e
--- /dev/null
+++ b/common/JackProcessSync.h
@@ -0,0 +1,180 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackProcessSync__
+#define __JackProcessSync__
+
+#include "JackSyncInterface.h"
+#include "JackSynchro.h"
+#include <pthread.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+namespace Jack
+{
+
+/*!
+\brief A synchronization primitive built using a condition variable.
+*/
+
+class JackProcessSync : public JackSyncInterface
+{
+
+ private:
+
+ pthread_mutex_t fLock; // Mutex
+ pthread_cond_t fCond; // Condition variable
+
+ public:
+
+ JackProcessSync(): JackSyncInterface()
+ {
+ pthread_mutex_init(&fLock, NULL);
+ pthread_cond_init(&fCond, NULL);
+ }
+ virtual ~JackProcessSync()
+ {
+ pthread_mutex_destroy(&fLock);
+ pthread_cond_destroy(&fCond);
+ }
+
+ bool Allocate(const char* name)
+ {
+ return true;
+ }
+
+ bool Connect(const char* name)
+ {
+ return true;
+ }
+
+ void Destroy()
+ {}
+
+ bool TimedWait(long usec)
+ {
+ struct timeval T0, T1;
+ timespec time;
+ struct timeval now;
+ int res;
+
+ pthread_mutex_lock(&fLock);
+ JackLog("JackProcessSync::Wait time out = %ld\n", usec);
+ gettimeofday(&T0, 0);
+
+ static const UInt64 kNanosPerSec = 1000000000ULL;
+ static const UInt64 kNanosPerUsec = 1000ULL;
+ gettimeofday(&now, 0);
+ UInt64 nextDateNanos = now.tv_sec * kNanosPerSec + (now.tv_usec + usec) * kNanosPerUsec;
+ time.tv_sec = nextDateNanos / kNanosPerSec;
+ time.tv_nsec = nextDateNanos % kNanosPerSec;
+ res = pthread_cond_timedwait(&fCond, &fLock, &time);
+ if (res != 0)
+ jack_error("pthread_cond_timedwait error usec = %ld err = %s", usec, strerror(res));
+
+ gettimeofday(&T1, 0);
+ pthread_mutex_unlock(&fLock);
+ JackLog("JackProcessSync::Wait finished delta = %5.1lf\n",
+ (1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec));
+ return (res == 0);
+ }
+
+ void Wait()
+ {
+ int res;
+ pthread_mutex_lock(&fLock);
+ JackLog("JackProcessSync::Wait...\n");
+ 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");
+ }
+
+ void SignalAll()
+ {
+ //pthread_mutex_lock(&fLock);
+ pthread_cond_broadcast(&fCond);
+ //pthread_mutex_unlock(&fLock);
+ }
+
+};
+
+/*!
+\brief A synchronization primitive built using an inter-process synchronization object.
+*/
+
+class JackInterProcessSync : public JackSyncInterface
+{
+
+ private:
+
+ JackSynchro* fSynchro;
+
+ public:
+
+ JackInterProcessSync(JackSynchro* synchro): fSynchro(synchro)
+ {}
+ virtual ~JackInterProcessSync()
+ {
+ delete fSynchro;
+ }
+
+ bool Allocate(const char* name)
+ {
+ return fSynchro->Allocate(name, 0);
+ }
+
+ void Destroy()
+ {
+ fSynchro->Destroy();
+ }
+
+ bool Connect(const char* name)
+ {
+ return fSynchro->Connect(name);
+ }
+
+ bool TimedWait(long usec)
+ {
+ struct timeval T0, T1;
+ JackLog("JackInterProcessSync::Wait...\n");
+ gettimeofday(&T0, 0);
+ bool res = fSynchro->TimedWait(usec);
+ gettimeofday(&T1, 0);
+ JackLog("JackInterProcessSync::Wait finished delta = %5.1lf\n",
+ (1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec));
+ return res;
+ }
+
+ void Wait()
+ {
+ fSynchro->Wait();
+ }
+
+ void SignalAll()
+ {
+ fSynchro->SignalAll();
+ }
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackPthreadCond.cpp b/common/JackPthreadCond.cpp
new file mode 100644
index 00000000..eb72a21a
--- /dev/null
+++ b/common/JackPthreadCond.cpp
@@ -0,0 +1,207 @@
+/*
+Copyright (C) 2004-2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackPthreadCond.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+JackPthreadCondArray* JackPthreadCondServer::fTable = NULL;
+long JackPthreadCondServer::fCount = 0;
+
+JackShmReadWritePtr1<JackPthreadCondArray> JackPthreadCondClient::fTable;
+long JackPthreadCondClient::fCount = 0;
+
+JackPthreadCondArray::JackPthreadCondArray()
+{
+ for (int i = 0; i < MAX_ITEM; i++) {
+ strcpy(fTable[i].fName, "");
+ }
+}
+
+void JackPthreadCond::BuildName(const char* name, char* res)
+{
+ sprintf(res, "%s/jack_sem.%s", jack_client_dir, name);
+}
+
+bool JackPthreadCond::Signal()
+{
+ //pthread_mutex_lock(&fSynchro->fLock);
+ //JackLog("JackPthreadCond::Signal...\n");
+ pthread_cond_signal(&fSynchro->fCond);
+ //pthread_mutex_unlock(&fSynchro->fLock);
+ return true;
+}
+
+bool JackPthreadCond::SignalAll()
+{
+ pthread_cond_broadcast(&fSynchro->fCond);
+ return true;
+}
+
+bool JackPthreadCond::Wait()
+{
+ pthread_mutex_lock(&fSynchro->fLock);
+ //JackLog("JackPthreadCond::Wait...\n");
+ pthread_cond_wait(&fSynchro->fCond, &fSynchro->fLock);
+ pthread_mutex_unlock(&fSynchro->fLock);
+ //JackLog("JackProcessSync::Wait finished\n");
+ return true;
+}
+
+bool JackPthreadCond::TimedWait(long usec)
+{
+ timespec time;
+ struct timeval now;
+ gettimeofday(&now, 0);
+ time.tv_sec = now.tv_sec + usec / 1000000;
+ time.tv_nsec = (now.tv_usec + (usec % 1000000)) * 1000;
+ pthread_mutex_lock(&fSynchro->fLock);
+ JackLog("JackProcessSync::Wait...\n");
+ pthread_cond_timedwait(&fSynchro->fCond, &fSynchro->fLock, &time);
+ pthread_mutex_unlock(&fSynchro->fLock);
+ JackLog("JackProcessSync::Wait finished\n");
+ return true;
+}
+
+// Client side : get the published semaphore from server
+bool JackPthreadCond::ConnectInput(const char* name)
+{
+ BuildName(name, fName);
+ JackLog("JackPthreadCond::Connect %s\n", fName);
+
+ // Temporary...
+ if (fSynchro) {
+ JackLog("Already connected name = %s\n", name);
+ return true;
+ }
+
+ for (int i = 0; i < MAX_ITEM; i++) {
+ JackPthreadCondItem* synchro = &(GetTable()->fTable[i]);
+ if (strcmp(fName, synchro->fName) == 0) {
+ fSynchro = synchro;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool JackPthreadCond::Connect(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackPthreadCond::ConnectOutput(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackPthreadCond::Disconnect()
+{
+ JackLog("JackPthreadCond::Disconnect %s\n", fName);
+
+ if (fSynchro) {
+ strcpy(fSynchro->fName, "");
+ fSynchro = NULL;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+JackPthreadCondServer::JackPthreadCondServer(): JackPthreadCond()
+{
+ if (fCount++ == 0 && !fTable) {
+ fTable = new JackPthreadCondArray();
+ }
+ if (fCount == MAX_ITEM)
+ throw new std::bad_alloc;
+}
+
+JackPthreadCondServer::~JackPthreadCondServer()
+{
+ if (--fCount == 0 && fTable) {
+ delete fTable;
+ fTable = NULL;
+ }
+}
+
+bool JackPthreadCondServer::Allocate(const char* name, int value)
+{
+ BuildName(name, fName);
+ JackLog("JackPthreadCond::Allocate name = %s val = %ld\n", fName, value);
+
+ pthread_mutexattr_t mutex_attr;
+ pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_NORMAL);
+
+ pthread_condattr_t cond_attr;
+ pthread_condattr_init(&cond_attr);
+ pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED);
+
+ for (int i = 0; i < MAX_ITEM; i++) {
+ if (strcmp(fTable->fTable[i].fName, "") == 0) { // first empty place
+ fSynchro = &fTable->fTable[i];
+ if (pthread_mutex_init(&fSynchro->fLock, &mutex_attr) != 0) {
+ jack_error("Allocate: can't check in named semaphore name = %s err = %s", fName, strerror(errno));
+ return false;
+ }
+ if (pthread_cond_init(&fSynchro->fCond, &cond_attr) != 0) {
+ jack_error("Allocate: can't check in named semaphore name = %s err = %s", fName, strerror(errno));
+ return false;
+ }
+ strcpy(fSynchro->fName, fName);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void JackPthreadCondServer::Destroy()
+{
+ if (fSynchro != NULL) {
+ pthread_mutex_destroy(&fSynchro->fLock);
+ pthread_cond_destroy(&fSynchro->fCond);
+ strcpy(fSynchro->fName, "");
+ fSynchro = NULL;
+ } else {
+ jack_error("JackPthreadCond::Destroy semaphore == NULL");
+ }
+}
+
+JackPthreadCondClient::JackPthreadCondClient(int shared_index): JackPthreadCond()
+{
+ if (fCount++ == 0 && !fTable) {
+ fTable = shared_index;
+ }
+ if (fCount == MAX_ITEM)
+ throw new std::bad_alloc;
+}
+
+JackPthreadCondClient::~JackPthreadCondClient()
+{
+ if (--fCount == 0 && fTable)
+ delete fTable;
+}
+
+} // end of namespace
+
diff --git a/common/JackPthreadCond.h b/common/JackPthreadCond.h
new file mode 100644
index 00000000..de1c818b
--- /dev/null
+++ b/common/JackPthreadCond.h
@@ -0,0 +1,133 @@
+/*
+Copyright (C) 2004-2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackPthreadCond__
+#define __JackPthreadCond__
+
+#include "JackSynchro.h"
+#include "JackShmMem.h"
+#include <pthread.h>
+#include <sys/time.h>
+#include <time.h>
+#include <stdio.h>
+#include <assert.h>
+
+#define MAX_ITEM 8
+
+namespace Jack
+{
+
+struct JackPthreadCondItem
+{
+ char fName[SYNC_MAX_NAME_SIZE];
+ pthread_mutex_t fLock;
+ pthread_cond_t fCond;
+};
+
+struct JackPthreadCondArray : public JackShmMem
+{
+ JackPthreadCondItem fTable[MAX_ITEM];
+
+ JackPthreadCondArray();
+ virtual ~JackPthreadCondArray()
+ {}
+}
+;
+
+/*!
+\brief Inter process synchronization using pthread condition variables.
+*/
+
+class JackPthreadCond : public JackSynchro
+{
+
+ protected:
+
+ JackPthreadCondItem* fSynchro;
+ void BuildName(const char* name, char* res);
+ virtual JackPthreadCondArray* GetTable() = 0;
+
+ public:
+
+ JackPthreadCond(): fSynchro(NULL)
+ {}
+ virtual ~JackPthreadCond()
+ {}
+
+ bool Signal();
+ bool SignalAll();
+ bool Wait();
+ bool TimedWait(long usec);
+
+ bool Connect(const char* name);
+ bool ConnectInput(const char* name);
+ bool ConnectOutput(const char* name);
+ bool Disconnect();
+
+};
+
+class JackPthreadCondServer : public JackPthreadCond
+{
+
+ private:
+
+ static JackPthreadCondArray* fTable;
+ static long fCount;
+
+ protected:
+
+ JackPthreadCondArray* GetTable()
+ {
+ return fTable;
+ }
+
+ public:
+
+ JackPthreadCondServer();
+ virtual ~JackPthreadCondServer();
+
+ bool Allocate(const char* name, int value);
+ void Destroy();
+};
+
+class JackPthreadCondClient : public JackPthreadCond
+{
+
+ private:
+
+ static JackShmReadWritePtr1<JackPthreadCondArray> fTable;
+ static long fCount;
+
+ protected:
+
+ JackPthreadCondArray* GetTable()
+ {
+ return fTable;
+ }
+
+ public:
+
+ JackPthreadCondClient(int shared_index);
+ virtual ~JackPthreadCondClient();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackRequest.h b/common/JackRequest.h
new file mode 100644
index 00000000..e096ed8f
--- /dev/null
+++ b/common/JackRequest.h
@@ -0,0 +1,612 @@
+
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackRequest__
+#define __JackRequest__
+
+#include "JackPort.h"
+#include "JackChannelTransaction.h"
+#include "JackError.h"
+#include <stdio.h>
+
+namespace Jack
+{
+
+/*!
+\brief Request from client to server.
+*/
+
+struct JackRequest
+{
+
+public:
+
+ typedef enum {
+ kRegisterPort = 1,
+ kUnRegisterPort = 2,
+ kConnectPorts = 3,
+ kDisconnectPorts = 4,
+ kSetTimeBaseClient = 5,
+ kActivateClient = 6,
+ kDeactivateClient = 7,
+ kDisconnectPort = 8,
+ kSetClientCapabilities = 9,
+ kGetPortConnections = 10,
+ kGetPortNConnections = 11,
+
+ kReleaseTimebase = 12,
+ kSetTimebaseCallback = 13,
+
+ kSetBufferSize = 20,
+ kSetFreeWheel = 21,
+ kClientNew = 22,
+ kClientClose = 23,
+ kConnectNamePorts = 24,
+ kDisconnectNamePorts = 25,
+
+ kNotification = 26
+ } RequestType;
+
+ RequestType fType;
+
+ JackRequest()
+ {}
+
+ JackRequest(RequestType type): fType(type)
+ {}
+
+ virtual ~JackRequest()
+ {}
+
+ virtual int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(this, sizeof(JackRequest));
+ }
+
+ virtual int Write(JackChannelTransaction* trans)
+ {
+ return -1;
+ }
+
+};
+
+/*!
+\brief Result from the server.
+*/
+
+struct JackResult
+{
+
+ int fResult;
+
+ JackResult(): fResult( -1)
+ {}
+ JackResult(int status): fResult(status)
+ {}
+ virtual ~JackResult()
+ {}
+
+ virtual int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(this, sizeof(JackResult));
+ }
+
+ virtual int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackResult));
+ }
+};
+
+/*!
+\brief NewClient request.
+*/
+
+struct JackClientNewRequest : public JackRequest
+{
+
+ char fName[JACK_CLIENT_NAME_SIZE + 1];
+
+ JackClientNewRequest()
+ {}
+ JackClientNewRequest(const char* name): JackRequest(kClientNew)
+ {
+ snprintf(fName, sizeof(fName), "%s", name);
+ }
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fName, sizeof(JackClientNewRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackClientNewRequest));
+ }
+};
+
+/*!
+\brief NewClient result.
+*/
+
+struct JackClientNewResult : public JackResult
+{
+
+ int fSharedEngine;
+ int fSharedClient;
+ int fSharedPorts;
+ uint32_t fProtocolVersion;
+
+ JackClientNewResult()
+ {}
+ JackClientNewResult(int32_t status, int index1, int index2, int index3)
+ : JackResult(status), fSharedEngine(index1), fSharedClient(index2), fSharedPorts(index3), fProtocolVersion(0)
+ {}
+
+ virtual int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(this, sizeof(JackClientNewResult));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackClientNewResult));
+ }
+};
+
+/*!
+\brief CloseClient request.
+*/
+
+struct JackClientCloseRequest : public JackRequest
+{
+
+ int fRefNum;
+
+ JackClientCloseRequest()
+ {}
+ JackClientCloseRequest(int refnum): JackRequest(kClientClose), fRefNum(refnum)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackClientCloseRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackClientCloseRequest));
+ }
+};
+
+/*!
+\brief Activate request.
+*/
+
+struct JackActivateRequest : public JackRequest
+{
+
+ int fRefNum;
+
+ JackActivateRequest()
+ {}
+ JackActivateRequest(int refnum): JackRequest(kActivateClient), fRefNum(refnum)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackActivateRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackActivateRequest));
+ }
+
+};
+
+/*!
+\brief Deactivate request.
+*/
+
+struct JackDeactivateRequest : public JackRequest
+{
+
+ int fRefNum;
+
+ JackDeactivateRequest()
+ {}
+ JackDeactivateRequest(int refnum): JackRequest(kDeactivateClient), fRefNum(refnum)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackDeactivateRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackDeactivateRequest));
+ }
+
+};
+
+/*!
+\brief PortRegister request.
+*/
+
+struct JackPortRegisterRequest : public JackRequest
+{
+
+ int fRefNum;
+ char fName[JACK_PORT_NAME_SIZE + 1];
+ char fPortType[JACK_PORT_TYPE_SIZE + 1];
+ unsigned int fFlags;
+ unsigned int fBufferSize;
+
+ JackPortRegisterRequest()
+ {}
+ JackPortRegisterRequest(int refnum, const char* name, const char* port_type, unsigned int flags, unsigned int buffer_size)
+ : JackRequest(kRegisterPort), fRefNum(refnum), fFlags(flags), fBufferSize(buffer_size)
+ {
+ strcpy(fName, name);
+ strcpy(fPortType, port_type);
+ }
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortRegisterRequest) - sizeof(JackRequest)) ;
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortRegisterRequest));
+ }
+};
+
+/*!
+\brief PortRegister result.
+*/
+
+struct JackPortRegisterResult : public JackResult
+{
+
+ jack_port_id_t fPortIndex;
+
+ JackPortRegisterResult(): fPortIndex(NO_PORT)
+ {}
+
+ virtual int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(this, sizeof(JackPortRegisterResult));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortRegisterResult));
+ }
+};
+
+/*!
+\brief PortUnregister request.
+*/
+
+struct JackPortUnRegisterRequest : public JackRequest
+{
+
+ int fRefNum;
+ int fPortIndex;
+
+ JackPortUnRegisterRequest()
+ {}
+ JackPortUnRegisterRequest(int refnum, int index): JackRequest(kUnRegisterPort), fRefNum(refnum), fPortIndex(index)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortUnRegisterRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortUnRegisterRequest));
+ }
+};
+
+/*!
+\brief PortConnectName request.
+*/
+
+struct JackPortConnectNameRequest : public JackRequest
+{
+
+ int fRefNum;
+ char fSrc[JACK_PORT_NAME_SIZE + 1];
+ char fDst[JACK_PORT_NAME_SIZE + 1];
+
+ JackPortConnectNameRequest()
+ {}
+ JackPortConnectNameRequest(int refnum, const char* src_name, const char* dst_name): JackRequest(kConnectNamePorts), fRefNum(refnum)
+ {
+ strcpy(fSrc, src_name);
+ strcpy(fDst, dst_name);
+ }
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortConnectNameRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortConnectNameRequest));
+ }
+};
+
+/*!
+\brief PortDisconnectName request.
+*/
+
+struct JackPortDisconnectNameRequest : public JackRequest
+{
+
+ int fRefNum;
+ char fSrc[JACK_PORT_NAME_SIZE + 1];
+ char fDst[JACK_PORT_NAME_SIZE + 1];
+
+ JackPortDisconnectNameRequest()
+ {}
+ JackPortDisconnectNameRequest(int refnum, const char* src_name, const char* dst_name): JackRequest(kDisconnectNamePorts), fRefNum(refnum)
+ {
+ strcpy(fSrc, src_name);
+ strcpy(fDst, dst_name);
+ }
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortDisconnectNameRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortDisconnectNameRequest));
+ }
+};
+
+/*!
+\brief PortConnect request.
+*/
+
+struct JackPortConnectRequest : public JackRequest
+{
+
+ int fRefNum;
+ jack_port_id_t fSrc;
+ jack_port_id_t fDst;
+
+ JackPortConnectRequest()
+ {}
+ JackPortConnectRequest(int refnum, jack_port_id_t src, jack_port_id_t dst): JackRequest(kConnectPorts), fRefNum(refnum), fSrc(src), fDst(dst)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortConnectRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortConnectRequest));
+ }
+};
+
+
+/*!
+\brief PortDisconnect request.
+*/
+
+struct JackPortDisconnectRequest : public JackRequest
+{
+
+ int fRefNum;
+ jack_port_id_t fSrc;
+ jack_port_id_t fDst;
+
+ JackPortDisconnectRequest()
+ {}
+ JackPortDisconnectRequest(int refnum, jack_port_id_t src, jack_port_id_t dst): JackRequest(kDisconnectPorts), fRefNum(refnum), fSrc(src), fDst(dst)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackPortDisconnectRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackPortDisconnectRequest));
+ }
+};
+
+/*!
+\brief SetBufferSize request.
+*/
+
+struct JackSetBufferSizeRequest : public JackRequest
+{
+
+ jack_nframes_t fBufferSize;
+
+ JackSetBufferSizeRequest()
+ {}
+ JackSetBufferSizeRequest(jack_nframes_t buffer_size): JackRequest(kSetBufferSize), fBufferSize(buffer_size)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fBufferSize, sizeof(JackSetBufferSizeRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackSetBufferSizeRequest));
+ }
+};
+
+/*!
+\brief SetFreeWheel request.
+*/
+
+struct JackSetFreeWheelRequest : public JackRequest
+{
+
+ int fOnOff;
+
+ JackSetFreeWheelRequest()
+ {}
+ JackSetFreeWheelRequest(int onoff): JackRequest(kSetFreeWheel), fOnOff(onoff)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fOnOff, sizeof(JackSetFreeWheelRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackSetFreeWheelRequest));
+ }
+};
+
+/*!
+\brief ReleaseTimebase request.
+*/
+
+struct JackReleaseTimebaseRequest : public JackRequest
+{
+
+ int fRefNum;
+
+ JackReleaseTimebaseRequest()
+ {}
+ JackReleaseTimebaseRequest(int refnum): JackRequest(kReleaseTimebase), fRefNum(refnum)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackReleaseTimebaseRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackReleaseTimebaseRequest));
+ }
+
+};
+
+/*!
+\brief SetTimebaseCallback request.
+*/
+
+struct JackSetTimebaseCallbackRequest : public JackRequest
+{
+
+ int fRefNum;
+ int fConditionnal;
+
+ JackSetTimebaseCallbackRequest()
+ {}
+ JackSetTimebaseCallbackRequest(int refnum, int conditional): JackRequest(kSetTimebaseCallback), fRefNum(refnum), fConditionnal(conditional)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackSetTimebaseCallbackRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackSetTimebaseCallbackRequest));
+ }
+};
+
+/*!
+\brief ClientNotification request.
+*/
+
+struct JackClientNotificationRequest : public JackRequest
+{
+
+ int fRefNum;
+ int fNotify;
+ int fValue;
+
+ JackClientNotificationRequest()
+ {}
+ JackClientNotificationRequest(int refnum, int notify, int value)
+ : JackRequest(kNotification), fRefNum(refnum), fNotify(notify), fValue(value)
+ {}
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(&fRefNum, sizeof(JackClientNotificationRequest) - sizeof(JackRequest));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackClientNotificationRequest));
+ }
+
+};
+
+/*!
+\brief ClientNotification.
+*/
+
+struct JackClientNotification
+{
+ char fName[JACK_CLIENT_NAME_SIZE + 1];
+ int fRefNum;
+ int fNotify;
+ int fValue;
+ int fSync;
+
+ JackClientNotification(): fNotify( -1), fValue( -1)
+ {}
+ JackClientNotification(const char* name, int refnum, int notify, int sync, int value)
+ : fRefNum(refnum), fNotify(notify), fValue(value), fSync(sync)
+ {
+ snprintf(fName, sizeof(fName), "%s", name);
+ }
+
+ int Read(JackChannelTransaction* trans)
+ {
+ return trans->Read(this, sizeof(JackClientNotification));
+ }
+
+ int Write(JackChannelTransaction* trans)
+ {
+ return trans->Write(this, sizeof(JackClientNotification));
+ }
+
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackServer.cpp b/common/JackServer.cpp
new file mode 100644
index 00000000..269b41fd
--- /dev/null
+++ b/common/JackServer.cpp
@@ -0,0 +1,339 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackServer.h"
+#include "JackTime.h"
+#include "JackFreewheelDriver.h"
+#include "JackLoopbackDriver.h"
+#include "JackThreadedDriver.h"
+#include "JackGlobals.h"
+#include "JackEngine.h"
+#include "JackAudioDriver.h"
+#include "JackChannel.h"
+#include "JackClientControl.h"
+#include "JackEngineControl.h"
+#include "JackSyncInterface.h"
+#include "JackGraphManager.h"
+
+#ifdef __APPLE_
+#include <CoreFoundation/CFNotificationCenter.h>
+#endif
+
+namespace Jack
+{
+
+JackServer* JackServer::fInstance = NULL;
+
+JackServer::JackServer(bool sync, long timeout, bool rt, long priority, long loopback, bool verbose)
+{
+ JackGlobals::InitServer();
+ for (int i = 0; i < CLIENT_NUM; i++)
+ fSynchroTable[i] = JackGlobals::MakeSynchro();
+ fGraphManager = new JackGraphManager();
+ fEngineControl = new JackEngineControl();
+ fSignal = JackGlobals::MakeInterProcessSync();
+ fEngine = new JackEngine(fGraphManager, fSynchroTable, fEngineControl, fSignal, sync, timeout, rt, priority, verbose);
+ fFreewheelDriver = new JackThreadedDriver(new JackFreewheelDriver("freewheel", fEngine, fSynchroTable));
+ fLoopbackDriver = new JackLoopbackDriver("loopback", fEngine, fSynchroTable);
+ fChannel = JackGlobals::MakeServerChannel();
+ fState = new JackConnectionManager();
+ fFreewheel = false;
+ fSyncMode = sync;
+ fLoopback = loopback;
+ fDriverInfo = NULL;
+ fAudioDriver = NULL;
+ fInstance = this; // Unique instance
+}
+
+JackServer::~JackServer()
+{
+ for (int i = 0; i < CLIENT_NUM; i++)
+ delete fSynchroTable[i];
+ delete fGraphManager;
+ delete fAudioDriver;
+ delete fFreewheelDriver;
+ delete fLoopbackDriver;
+ delete fEngine;
+ delete fChannel;
+ delete fEngineControl;
+ delete fSignal;
+ delete fState;
+ if (fDriverInfo) {
+ UnloadDriverModule(fDriverInfo->handle);
+ free(fDriverInfo);
+ }
+ JackGlobals::Destroy();
+}
+
+// TODO : better handling of intermediate failing cases...
+
+int JackServer::Open(jack_driver_desc_t* driver_desc, JSList* driver_params)
+{
+ if (fChannel->Open(this) < 0) {
+ jack_error("Server channel open error");
+ return -1;
+ }
+
+ if (fEngine->Open() != 0) {
+ jack_error("Cannot open engine");
+ return -1;
+ }
+
+ if ((fDriverInfo = jack_load_driver(driver_desc)) == NULL) {
+ return -1;
+ }
+
+ if ((fAudioDriver = fDriverInfo->initialize(fEngine, fSynchroTable, driver_params)) == NULL) {
+ jack_error("Cannot initialize driver");
+ return -1;
+ }
+
+ if (fFreewheelDriver->Open() != 0) { // before engine open
+ jack_error("Cannot open driver");
+ return -1;
+ }
+
+ // Before engine open
+ if (fLoopbackDriver->Open(fEngineControl->fBufferSize, fEngineControl->fSampleRate, 1, 1, fLoopback, fLoopback, false, "loopback", "loopback", 0, 0) != 0) {
+ jack_error("Cannot open driver");
+ return -1;
+ }
+
+ if (fAudioDriver->Attach() != 0) {
+ jack_error("Cannot attach audio driver");
+ return -1;
+ }
+
+ if (fLoopback > 0 && fLoopbackDriver->Attach() != 0) {
+ jack_error("Cannot attach loopback driver");
+ return -1;
+ }
+
+ fFreewheelDriver->SetMaster(false);
+ fAudioDriver->SetMaster(true);
+ if (fLoopback > 0)
+ fAudioDriver->AddSlave(fLoopbackDriver);
+ fAudioDriver->AddSlave(fFreewheelDriver); // After ???
+ InitTime();
+
+#ifdef __APPLE__
+ // Send notification to be used in the Jack Router
+ CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(),
+ CFSTR("com.grame.jackserver.start"),
+ CFSTR("com.grame.jackserver"),
+ NULL,
+ true);
+#endif
+
+ return 0;
+}
+
+int JackServer::Close()
+{
+ JackLog("JackServer::Close\n");
+ fChannel->Close();
+ fSignal->Destroy(); // A REVOIR
+ fAudioDriver->Detach();
+ if (fLoopback > 0)
+ fLoopbackDriver->Detach();
+ fAudioDriver->Close();
+ fFreewheelDriver->Close();
+ fLoopbackDriver->Close();
+ fEngine->Close();
+
+#ifdef __APPLE__
+ // Send notification to be used in the Jack Router
+ CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(),
+ CFSTR("com.grame.jackserver.stop"),
+ CFSTR("com.grame.jackserver"),
+ NULL,
+ true);
+#endif
+
+ return 0;
+}
+
+int JackServer::Start()
+{
+ JackLog("JackServer::Start\n");
+ fEngineControl->fFrameTimer.Init();
+ return fAudioDriver->Start();
+}
+
+int JackServer::Stop()
+{
+ JackLog("JackServer::Stop\n");
+ return fAudioDriver->Stop();
+}
+
+int JackServer::Activate(int refnum)
+{
+ fGraphManager->DirectConnect(fFreewheelDriver->GetClientControl()->fRefNum, refnum);
+ fGraphManager->DirectConnect(refnum, fFreewheelDriver->GetClientControl()->fRefNum);
+ return fEngine->ClientActivate(refnum);
+}
+
+// Disconnection from the FW must be done in last otherwise an intermediate "unconnected"
+// (thus unactivated) state may happen where the client is still checked for its end.
+int JackServer::Deactivate(int refnum)
+{
+ int res = fEngine->ClientDeactivate(refnum);
+
+ // Disconnect only when needed
+ if (fGraphManager->IsDirectConnection(fFreewheelDriver->GetClientControl()->fRefNum, refnum)) {
+ fGraphManager->DirectDisconnect(fFreewheelDriver->GetClientControl()->fRefNum, refnum);
+ } else {
+ JackLog("JackServer::Deactivate: client = %ld was not activated \n", refnum);
+ }
+
+ // Disconnect only when needed
+ if (fGraphManager->IsDirectConnection(refnum, fFreewheelDriver->GetClientControl()->fRefNum)) {
+ fGraphManager->DirectDisconnect(refnum, fFreewheelDriver->GetClientControl()->fRefNum);
+ } else {
+ JackLog("JackServer::Deactivate: client = %ld was not activated \n", refnum);
+ }
+
+ return res;
+}
+
+int JackServer::SetBufferSize(jack_nframes_t nframes)
+{
+ JackLog("JackServer::SetBufferSize nframes = %ld\n", nframes);
+
+ if (nframes > BUFFER_SIZE_MAX)
+ return -1;
+
+ if (fAudioDriver->Stop() != 0) {
+ jack_error("Cannot stop audio driver");
+ return -1;
+ }
+
+ if (fAudioDriver->SetBufferSize(nframes) != 0) {
+ jack_error("Cannot SetBufferSize for audio driver");
+ return -1;
+ }
+
+ if (fFreewheelDriver->SetBufferSize(nframes) != 0) {
+ jack_error("Cannot SetBufferSize for freewheel driver");
+ return -1;
+ }
+
+ fEngine->NotifyBufferSize(nframes);
+
+ fEngineControl->fFrameTimer.Init();
+ return fAudioDriver->Start();
+}
+
+/*
+Freewheel mode is implemented by switching from the (audio + freewheel) driver to the freewheel driver only:
+
+ - "global" connection state is saved
+ - all audio driver ports are deconnected, thus there is no more dependancies with the audio driver
+ - the freewheel driver will be synchronized with the end of graph execution : all clients are connected to the freewheel driver
+ - the freewheel driver becomes the "master"
+
+Normal mode is restored with the connections state valid before freewheel mode was done. Thus one consider that
+no graph state change can be done during freewheel mode.
+*/
+
+int JackServer::SetFreewheel(bool onoff)
+{
+ JackLog("JackServer::SetFreewheel state = %ld\n", onoff);
+
+ if (fFreewheel) {
+ if (onoff) {
+ return -1;
+ } else {
+ fFreewheel = false;
+ fFreewheelDriver->Stop();
+ fGraphManager->Restore(fState); // Restore previous connection state
+ fEngine->NotifyFreewheel(onoff);
+ fFreewheelDriver->SetMaster(false);
+ fEngineControl->fFrameTimer.Init();
+ return fAudioDriver->Start();
+ }
+ } else {
+ if (onoff) {
+ fFreewheel = true;
+ fAudioDriver->Stop();
+ fGraphManager->Save(fState); // Save connection state
+ fGraphManager->DisconnectAllPorts(fAudioDriver->GetClientControl()->fRefNum);
+ fEngine->NotifyFreewheel(onoff);
+ fFreewheelDriver->SetMaster(true);
+ return fFreewheelDriver->Start();
+ } else {
+ return -1;
+ }
+ }
+}
+
+// Coming from the RT thread or server channel
+void JackServer::Notify(int refnum, int notify, int value)
+{
+ switch (notify) {
+
+ case JackNotifyChannelInterface::kGraphOrderCallback:
+ fEngine->NotifyGraphReorder();
+ break;
+
+ case JackNotifyChannelInterface::kXRunCallback:
+ fEngine->NotifyXRun(refnum);
+ break;
+
+ case JackNotifyChannelInterface::kZombifyClient:
+ fEngine->ZombifyClient(refnum);
+ break;
+
+ case JackNotifyChannelInterface::kDeadClient:
+ JackLog("JackServer: kDeadClient ref = %ld\n", refnum);
+ Deactivate(refnum);
+ fEngine->ClientClose(refnum);
+ break;
+ }
+}
+
+JackEngine* JackServer::GetEngine()
+{
+ return fEngine;
+}
+
+JackSynchro** JackServer::GetSynchroTable()
+{
+ return fSynchroTable;
+}
+
+JackEngineControl* JackServer::GetEngineControl()
+{
+ return fEngineControl;
+}
+
+JackGraphManager* JackServer::GetGraphManager()
+{
+ return fGraphManager;
+}
+
+void JackServer::PrintState()
+{
+ fAudioDriver->PrintState();
+ fEngine->PrintState();
+}
+
+} // end of namespace
+
diff --git a/common/JackServer.h b/common/JackServer.h
new file mode 100644
index 00000000..8766844b
--- /dev/null
+++ b/common/JackServer.h
@@ -0,0 +1,96 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackServer__
+#define __JackServer__
+
+#include "JackExports.h"
+#include "driver_interface.h"
+#include "JackDriverLoader.h"
+#include "jslist.h"
+
+namespace Jack
+{
+
+class JackGraphManager;
+class JackConnectionManager;
+class JackDriverClientInterface;
+class JackServerChannelInterface;
+class JackSyncInterface;
+struct JackEngineControl;
+class JackEngine;
+
+/*!
+\brief The Jack server.
+*/
+
+class EXPORT JackServer
+{
+
+ private:
+
+ jack_driver_info_t* fDriverInfo;
+ JackDriverClientInterface* fAudioDriver;
+ JackDriverClientInterface* fFreewheelDriver;
+ JackDriverClientInterface* fLoopbackDriver;
+ JackEngine* fEngine;
+ JackEngineControl* fEngineControl;
+ JackGraphManager* fGraphManager;
+ JackServerChannelInterface* fChannel;
+ JackConnectionManager* fState;
+ JackSynchro* fSynchroTable[CLIENT_NUM];
+ JackSyncInterface* fSignal;
+ bool fSyncMode;
+ bool fFreewheel;
+ long fLoopback;
+
+ public:
+
+ JackServer(bool sync, long timeout, bool rt, long priority, long loopback, bool verbose);
+ virtual ~JackServer();
+
+ int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
+
+ int Close();
+
+ int Start();
+ int Stop();
+
+ int Activate(int refnum);
+ int Deactivate(int refnum);
+
+ int SetBufferSize(jack_nframes_t nframes);
+ int SetFreewheel(bool onoff);
+ void Notify(int refnum, int notify, int value);
+
+ JackEngine* GetEngine();
+ JackEngineControl* GetEngineControl();
+ JackSynchro** GetSynchroTable();
+ JackGraphManager* GetGraphManager();
+
+ void PrintState();
+
+ static JackServer* fInstance; // Unique instance
+};
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackServerAPI.cpp b/common/JackServerAPI.cpp
new file mode 100644
index 00000000..0edbfc42
--- /dev/null
+++ b/common/JackServerAPI.cpp
@@ -0,0 +1,174 @@
+/*
+Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackInternalClient.h"
+#include "JackGraphManager.h"
+#include "JackServer.h"
+#include "JackDebugClient.h"
+#include "JackServerGlobals.h"
+#include "JackError.h"
+#include "varargs.h"
+
+/*
+TODO:
+
+- implement the "jack_client_new", "jack_client_open", "jack_client_close" API so that we can provide a libjackdmp shared library
+to be used by clients for direct access.
+
+- automatic launch of the jack server with the first client open, automatic close when the last client exit. Use of a jackd.rsc configuration file.
+
+*/
+
+#ifdef WIN32
+ #define EXPORT __declspec(dllexport)
+#else
+ #define EXPORT
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ EXPORT jack_client_t* my_jack_internal_client_new(const char* client_name);
+ EXPORT void my_jack_internal_client_close(jack_client_t* ext_client);
+
+ EXPORT jack_client_t * jack_client_open (const char *client_name,
+ jack_options_t options,
+ jack_status_t *status, ...);
+ EXPORT jack_client_t * jack_client_new (const char *client_name);
+ EXPORT int jack_client_close (jack_client_t *client);
+
+#ifdef __cplusplus
+}
+#endif
+
+using namespace Jack;
+
+EXPORT jack_client_t* my_jack_internal_client_new(const char* client_name)
+{
+ JackLog("jack_internal_client_new %s", client_name);
+ if (client_name == NULL) {
+ jack_error("jack_internal_client_new called with a NULL client_name");
+ return NULL;
+ }
+#ifdef __CLIENTDEBUG__
+ JackClient* client = new JackDebugClient(new JackInternalClient(JackServer::fInstance, GetSynchroTable())); // Debug mode
+#else
+ JackClient* client = new JackInternalClient(JackServer::fInstance, GetSynchroTable()); // To improve...
+#endif
+
+ int res = client->Open(client_name);
+ if (res < 0) {
+ delete client;
+ return NULL;
+ } else {
+ return (jack_client_t*)client;
+ }
+}
+
+EXPORT void my_jack_internal_client_close(jack_client_t* ext_client)
+{
+ JackLog("jack_internal_client_close");
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_internal_client_close called with a NULL client");
+ } else {
+ int res = client->Deactivate();
+ JackLog("jack_internal_client_close Deactivate %ld", res);
+ res = client->Close();
+ delete client;
+ JackLog("jack_internal_client_close OK");
+ }
+}
+
+EXPORT jack_client_t* jack_client_new(const char* client_name)
+{
+ int options = JackUseExactName;
+ if (getenv("JACK_START_SERVER") == NULL)
+ options |= JackNoStartServer;
+
+ return jack_client_open(client_name, (jack_options_t)options, NULL);
+}
+
+// TO BE IMPLEMENTED PROPERLY
+EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...)
+{
+ va_list ap; /* variable argument pointer */
+ jack_varargs_t va; /* variable arguments */
+ jack_status_t my_status;
+
+ 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 */
+ va_start(ap, status);
+ jack_varargs_parse(options, ap, &va);
+ va_end(ap);
+
+ JackLog("jack_client_open %s\n", client_name);
+ if (client_name == NULL) {
+ jack_error("jack_client_new called with a NULL client_name");
+ return NULL;
+ }
+
+ JackServerGlobals::Init(); // jack server initialisation
+
+#ifdef __CLIENTDEBUG__
+ JackClient* client = new JackDebugClient(new JackInternalClient(JackServer::fInstance, GetSynchroTable())); // Debug mode
+#else
+ JackClient* client = new JackInternalClient(JackServer::fInstance, GetSynchroTable()); // To improve...
+#endif
+
+ int res = client->Open(client_name);
+ if (res < 0) {
+ delete client;
+ JackServerGlobals::Destroy(); // jack server destruction
+ return NULL;
+ } else {
+ *status = (jack_status_t)0;
+ return (jack_client_t*)client;
+ }
+ return NULL;
+}
+
+EXPORT int jack_client_close(jack_client_t* ext_client)
+{
+ JackLog("jack_client_close\n");
+ JackClient* client = (JackClient*)ext_client;
+ if (client == NULL) {
+ jack_error("jack_client_close called with a NULL client");
+ return -1;
+ }
+ int res = client->Close();
+ delete client;
+ JackLog("jack_client_close OK\n");
+ JackServerGlobals::Destroy(); // jack library destruction
+ return res;
+}
+
diff --git a/common/JackServerGlobals.cpp b/common/JackServerGlobals.cpp
new file mode 100644
index 00000000..96b21e83
--- /dev/null
+++ b/common/JackServerGlobals.cpp
@@ -0,0 +1,389 @@
+/*
+Copyright (C) 2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackServerGlobals.h"
+#include "JackError.h"
+#include "shm.h"
+#include <getopt.h>
+
+#ifndef WIN32
+ #include <dirent.h>
+#endif
+
+#define DEFAULT_TMP_DIR "/tmp"
+char* jack_tmpdir = DEFAULT_TMP_DIR;
+static char* server_name = "default";
+static int realtime = 0;
+static int client_timeout = 0; /* msecs; if zero, use period size. */
+static int realtime_priority = 10;
+static int verbose_aux = 0;
+static int do_mlock = 1;
+static unsigned int port_max = 128;
+static int loopback = 0;
+static int do_unlock = 0;
+static int temporary = 0;
+
+namespace Jack
+{
+
+JackServerGlobals* JackServerGlobals::fGlobals = NULL;
+long JackServerGlobals::fClientCount = 0;
+JackServer* JackServerGlobals::fServer = NULL;
+
+#ifndef WIN32
+
+static char* jack_default_server_name(void)
+{
+ char *server_name;
+ if ((server_name = getenv("JACK_DEFAULT_SERVER")) == NULL)
+ server_name = "default";
+ return server_name;
+}
+
+/* returns the name of the per-user subdirectory of jack_tmpdir */
+static char* jack_user_dir(void)
+{
+ static char user_dir[PATH_MAX] = "";
+
+ /* format the path name on the first call */
+ if (user_dir[0] == '\0') {
+ snprintf (user_dir, sizeof (user_dir), "%s/jack-%d",
+ jack_tmpdir, getuid ());
+ }
+
+ return user_dir;
+}
+
+/* returns the name of the per-server subdirectory of jack_user_dir() */
+
+static char* get_jack_server_dir(const char* toto)
+{
+ static char server_dir[PATH_MAX] = "";
+
+ // format the path name on the first call
+ if (server_dir[0] == '\0') {
+ snprintf (server_dir, sizeof (server_dir), "%s/%s",
+ jack_user_dir (), server_name);
+ }
+
+ return server_dir;
+}
+
+static void
+jack_cleanup_files (const char *server_name)
+{
+ DIR *dir;
+ struct dirent *dirent;
+ char *dir_name = get_jack_server_dir (server_name);
+
+ /* On termination, we remove all files that jackd creates so
+ * subsequent attempts to start jackd will not believe that an
+ * instance is already running. If the server crashes or is
+ * terminated with SIGKILL, this is not possible. So, cleanup
+ * is also attempted when jackd starts.
+ *
+ * There are several tricky issues. First, the previous JACK
+ * server may have run for a different user ID, so its files
+ * may be inaccessible. This is handled by using a separate
+ * JACK_TMP_DIR subdirectory for each user. Second, there may
+ * be other servers running with different names. Each gets
+ * its own subdirectory within the per-user directory. The
+ * current process has already registered as `server_name', so
+ * we know there is no other server actively using that name.
+ */
+
+ /* nothing to do if the server directory does not exist */
+ if ((dir = opendir (dir_name)) == NULL) {
+ return ;
+ }
+
+ /* unlink all the files in this directory, they are mine */
+ while ((dirent = readdir (dir)) != NULL) {
+
+ char fullpath[PATH_MAX];
+
+ if ((strcmp (dirent->d_name, ".") == 0)
+ || (strcmp (dirent->d_name, "..") == 0)) {
+ continue;
+ }
+
+ snprintf (fullpath, sizeof (fullpath), "%s/%s",
+ dir_name, dirent->d_name);
+
+ if (unlink (fullpath)) {
+ jack_error ("cannot unlink `%s' (%s)", fullpath,
+ strerror (errno));
+ }
+ }
+
+ closedir (dir);
+
+ /* now, delete the per-server subdirectory, itself */
+ if (rmdir (dir_name)) {
+ jack_error ("cannot remove `%s' (%s)", dir_name,
+ strerror (errno));
+ }
+
+ /* finally, delete the per-user subdirectory, if empty */
+ if (rmdir (jack_user_dir ())) {
+ if (errno != ENOTEMPTY) {
+ jack_error ("cannot remove `%s' (%s)",
+ jack_user_dir (), strerror (errno));
+ }
+ }
+}
+
+#endif
+
+int JackServerGlobals::JackStart(jack_driver_desc_t* driver_desc, JSList* driver_params, int sync, 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);
+ fServer = new JackServer(sync, time_out_ms, rt, priority, loopback, verbose);
+ int res = fServer->Open(driver_desc, driver_params);
+ return (res < 0) ? res : fServer->Start();
+}
+
+int JackServerGlobals::JackStop()
+{
+ fServer->Stop();
+ fServer->Close();
+ JackLog("Jackdmp: server close\n");
+ delete fServer;
+ JackLog("Jackdmp: delete server\n");
+ return 0;
+}
+
+int JackServerGlobals::JackDelete()
+{
+ delete fServer;
+ JackLog("Jackdmp: delete server\n");
+ return 0;
+}
+
+// Temporary : to test
+
+JackServerGlobals::JackServerGlobals()
+{
+ jack_driver_desc_t* driver_desc;
+ const char *options = "-ad:P:uvshVRL:STFl:t:mn:p:";
+ struct option long_options[] = {
+ { "driver", 1, 0, 'd'
+ },
+ { "verbose", 0, 0, 'v' },
+ { "help", 0, 0, 'h' },
+ { "port-max", 1, 0, 'p' },
+ { "no-mlock", 0, 0, 'm' },
+ { "name", 0, 0, 'n' },
+ { "unlock", 0, 0, 'u' },
+ { "realtime", 0, 0, 'R' },
+ { "loopback", 0, 0, 'L' },
+ { "realtime-priority", 1, 0, 'P' },
+ { "timeout", 1, 0, 't' },
+ { "temporary", 0, 0, 'T' },
+ { "version", 0, 0, 'V' },
+ { "silent", 0, 0, 's' },
+ { "sync", 0, 0, 'S' },
+ { 0, 0, 0, 0 }
+ };
+ int opt = 0;
+ int option_index = 0;
+ int seen_driver = 0;
+ char *driver_name = NULL;
+ char **driver_args = NULL;
+ JSList* driver_params;
+ int driver_nargs = 1;
+ JSList* drivers = NULL;
+ char* server_name = NULL;
+ int show_version = 0;
+ int sync = 0;
+ int rc, i;
+
+ int argc = 8;
+ //char* argv[] = {"jackdmp", "-R", "-v", "-d", "coreaudio", "-p", "512"};
+ char* argv[] = {"jackdmp", "-R", "-S", "-v", "-d", "portaudio", "-p", "512"};
+
+ for (i = 0; i < argc; i++) {
+ printf("arg %i %s\n", i, argv[i]);
+ }
+
+ opterr = 0;
+ while (!seen_driver &&
+ (opt = getopt_long(argc, argv, options,
+ long_options, &option_index)) != EOF) {
+ switch (opt) {
+
+ case 'd':
+ seen_driver = 1;
+ driver_name = optarg;
+ break;
+
+ case 'v':
+ verbose_aux = 1;
+ break;
+
+ case 's':
+ // jack_set_error_function(silent_jack_error_callback);
+ break;
+
+ case 'S':
+ sync = 1;
+ break;
+
+ case 'n':
+ server_name = optarg;
+ break;
+
+ case 'm':
+ do_mlock = 0;
+ break;
+
+ case 'p':
+ port_max = (unsigned int)atol(optarg);
+ break;
+
+ case 'P':
+ realtime_priority = atoi(optarg);
+ break;
+
+ case 'R':
+ realtime = 1;
+ break;
+
+ case 'L':
+ loopback = atoi(optarg);
+ break;
+
+ case 'T':
+ temporary = 1;
+ break;
+
+ case 't':
+ client_timeout = atoi(optarg);
+ break;
+
+ case 'u':
+ do_unlock = 1;
+ break;
+
+ case 'V':
+ show_version = 1;
+ break;
+
+ default:
+ fprintf(stderr, "unknown option character %c\n",
+ optopt);
+ /*fallthru*/
+ case 'h':
+ //usage(stdout);
+ return ;
+ }
+ }
+
+ drivers = jack_drivers_load (drivers);
+ if (!drivers) {
+ fprintf (stderr, "jackdmp: no drivers found; exiting\n");
+ exit (1);
+ }
+
+ driver_desc = jack_find_driver_descriptor (drivers, driver_name);
+ if (!driver_desc) {
+ fprintf (stderr, "jackdmp: unknown driver '%s'\n", driver_name);
+ exit (1);
+ }
+
+ if (optind < argc) {
+ driver_nargs = 1 + argc - optind;
+ } else {
+ driver_nargs = 1;
+ }
+
+ if (driver_nargs == 0) {
+ fprintf (stderr, "No driver specified ... hmm. JACK won't do"
+ " anything when run like this.\n");
+ return ;
+ }
+
+ driver_args = (char **) malloc (sizeof (char *) * driver_nargs);
+ driver_args[0] = driver_name;
+
+ for (i = 1; i < driver_nargs; i++) {
+ driver_args[i] = argv[optind++];
+ }
+
+ if (jack_parse_driver_params (driver_desc, driver_nargs,
+ driver_args, &driver_params)) {
+ return ;
+ }
+
+#ifndef WIN32
+ if (server_name == NULL)
+ server_name = jack_default_server_name ();
+#endif
+
+ rc = jack_register_server (server_name);
+
+ /* clean up shared memory and files from any previous
+ * instance of this server name */
+ jack_cleanup_shm();
+#ifndef WIN32
+ jack_cleanup_files(server_name);
+#endif
+
+ if (!realtime && client_timeout == 0)
+ client_timeout = 500; /* 0.5 sec; usable when non realtime. */
+
+ int res = JackStart(driver_desc, driver_params, sync, client_timeout, realtime, realtime_priority, loopback, verbose_aux);
+ if (res < 0) {
+ jack_error("Cannot start server... exit");
+ JackDelete();
+ return ;
+ }
+}
+
+JackServerGlobals::~JackServerGlobals()
+{
+ JackLog("~JackServerGlobals\n");
+ JackStop();
+ jack_cleanup_shm();
+#ifndef WIN32
+ jack_cleanup_files(server_name);
+#endif
+ jack_unregister_server(server_name);
+}
+
+void JackServerGlobals::Init()
+{
+ if (fClientCount++ == 0 && !fGlobals) {
+ JackLog("JackServerGlobals Init %x\n", fGlobals);
+ fGlobals = new JackServerGlobals();
+ }
+}
+
+void JackServerGlobals::Destroy()
+{
+ if (--fClientCount == 0 && fGlobals) {
+ JackLog("JackServerGlobals Destroy %x\n", fGlobals);
+ delete fGlobals;
+ fGlobals = NULL;
+ }
+}
+
+} // end of namespace
+
+
diff --git a/common/JackServerGlobals.h b/common/JackServerGlobals.h
new file mode 100644
index 00000000..d043ecbe
--- /dev/null
+++ b/common/JackServerGlobals.h
@@ -0,0 +1,58 @@
+/*
+Copyright (C) 2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackServerGlobals__
+#define __JackServerGlobals__
+
+#include "driver_interface.h"
+#include "driver_parse.h"
+#include "JackDriverLoader.h"
+#include "JackServer.h"
+
+#include <assert.h>
+
+namespace Jack
+{
+
+class JackClient;
+
+/*!
+\brief Global server static structure: singleton kind of pattern.
+*/
+
+struct JackServerGlobals
+{
+ static long fClientCount;
+ static JackServerGlobals* fGlobals;
+ static JackServer* fServer;
+
+ JackServerGlobals();
+ virtual ~JackServerGlobals();
+
+ static void Init();
+ static void Destroy();
+ static int JackStart(jack_driver_desc_t* driver_desc, JSList* driver_params, int sync, int time_out_ms, int rt, int priority, int loopback, int verbose);
+ static int JackStop();
+ static int JackDelete();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackShmMem.cpp b/common/JackShmMem.cpp
new file mode 100644
index 00000000..d9b93b24
--- /dev/null
+++ b/common/JackShmMem.cpp
@@ -0,0 +1,92 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackShmMem.h"
+#include "JackError.h"
+#include <stdio.h>
+
+namespace Jack
+{
+
+unsigned long JackShmMem::fSegmentNum = 0;
+unsigned long JackShmMem::fSegmentCount = 0;
+
+jack_shm_info_t JackShmMem::gInfo;
+
+void* JackShmMem::operator new(size_t size)
+{
+ jack_shm_info_t info;
+ JackShmMem* obj;
+ char name[64];
+
+ snprintf(name, sizeof(name), "/jack_shared%ld", JackShmMem::fSegmentNum++);
+
+ if (JackShmMem::fSegmentCount++ == 0) {
+ JackLog("jack_initialize_shm\n");
+ if (jack_initialize_shm_server() < 0) {
+ jack_error("cannot initialize shm", strerror(errno));
+ goto error;
+ }
+ }
+
+ if (jack_shmalloc(name, size, &info)) {
+ jack_error("cannot create shared memory segment of size = %d", size, strerror(errno));
+ goto error;
+ }
+
+ if (jack_attach_shm(&info)) {
+ jack_error("cannot attach shared memory segment name = %s err = %s", name, strerror(errno));
+ jack_destroy_shm(&info);
+ goto error;
+ }
+
+ obj = (JackShmMem*)jack_shm_addr(&info);
+ // It is unsafe to set object fields directly (may be overwritten during object initialization),
+ // so use an intermediate global data
+ gInfo.index = info.index;
+ gInfo.attached_at = info.attached_at;
+ JackLog("JackShmMem::new index = %ld attached = %x size = %ld \n", info.index, info.attached_at, size);
+ return obj;
+
+error:
+ jack_error("JackShmMem::new bad alloc", size);
+ throw new std::bad_alloc;
+}
+
+void JackShmMem::operator delete(void* p, size_t size)
+{
+ jack_shm_info_t info;
+ JackShmMem* obj = (JackShmMem*)p;
+ info.index = obj->fInfo.index;
+ info.attached_at = obj->fInfo.attached_at;
+
+ JackLog("JackShmMem::delete size = %ld index = %ld\n", size, info.index);
+
+ jack_release_shm(&info);
+ jack_destroy_shm(&info);
+
+ if (--JackShmMem::fSegmentCount == 0) {
+ JackLog("jack_cleanup_shm\n");
+ jack_cleanup_shm();
+ }
+}
+
+} // end of namespace
+
diff --git a/common/JackShmMem.h b/common/JackShmMem.h
new file mode 100644
index 00000000..cb9b5d6b
--- /dev/null
+++ b/common/JackShmMem.h
@@ -0,0 +1,308 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackShmMem__
+#define __JackShmMem__
+
+#include "shm.h"
+#include <new> // GCC 4.0
+#include "JackError.h"
+#include <errno.h>
+
+namespace Jack
+{
+
+/*!
+\brief The base class for shared memory management.
+
+A class which objects need to be allocated in shared memory derives from this class.
+*/
+
+class JackShmMem
+{
+
+ private:
+
+ jack_shm_info_t fInfo;
+ static unsigned long fSegmentNum;
+ static unsigned long fSegmentCount;
+ static jack_shm_info_t gInfo;
+
+ public:
+
+ void* operator new(size_t size);
+ void operator delete(void* p, size_t size);
+
+ JackShmMem()
+ {
+ fInfo.index = gInfo.index;
+ fInfo.attached_at = gInfo.attached_at;
+ }
+
+ virtual ~JackShmMem()
+ {}
+
+ int GetShmIndex()
+ {
+ return fInfo.index;
+ }
+
+ char* GetShmAddress()
+ {
+ return (char*)fInfo.attached_at;
+ }
+
+};
+
+/*!
+\brief Pointer on shared memory segment in the client side.
+*/
+
+template <class T>
+class JackShmReadWritePtr
+{
+
+ private:
+
+ jack_shm_info_t fInfo;
+
+ void Init(int index)
+ {
+ if (fInfo.index < 0 && index >= 0) {
+ JackLog("JackShmReadWritePtr::Init %ld %ld\n", index, fInfo.index);
+ if (jack_initialize_shm_client() < 0)
+ throw - 1;
+ fInfo.index = index;
+ if (jack_attach_shm(&fInfo)) {
+ //jack_error("cannot attach shared memory segment", strerror(errno));
+ throw - 2;
+ }
+ }
+ }
+
+ public:
+
+ JackShmReadWritePtr()
+ {
+ fInfo.index = -1;
+ fInfo.attached_at = NULL;
+ }
+
+ JackShmReadWritePtr(int index)
+ {
+ Init(index);
+ }
+
+ virtual ~JackShmReadWritePtr()
+ {
+ if (fInfo.index >= 0) {
+ JackLog("JackShmReadWritePtr::~JackShmReadWritePtr %ld\n", fInfo.index);
+ jack_release_shm(&fInfo);
+ fInfo.index = -1;
+ }
+ }
+
+ T* operator->() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ operator T*() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ JackShmReadWritePtr& operator=(int index)
+ {
+ Init(index);
+ return *this;
+ }
+
+ int GetShmIndex()
+ {
+ return fInfo.index;
+ }
+
+ T* GetShmAddress()
+ {
+ return (T*)fInfo.attached_at;
+ }
+};
+
+/*!
+\brief Pointer on shared memory segment in the client side: destroy the segment (used client control)
+*/
+
+template <class T>
+class JackShmReadWritePtr1
+{
+
+ private:
+
+ jack_shm_info_t fInfo;
+
+ void Init(int index)
+ {
+ if (fInfo.index < 0 && index >= 0) {
+ JackLog("JackShmReadWritePtr1::Init %ld %ld\n", index, fInfo.index);
+ if (jack_initialize_shm_client() < 0)
+ throw - 1;
+ fInfo.index = index;
+ if (jack_attach_shm(&fInfo)) {
+ //jack_error("cannot attach shared memory segment", strerror(errno));
+ throw - 2;
+ }
+ /*
+ nobody else needs to access this shared memory any more, so
+ destroy it. because we have our own attachment to it, it won't
+ vanish till we exit (and release it).
+ */
+ jack_destroy_shm(&fInfo);
+ }
+ }
+
+ public:
+
+ JackShmReadWritePtr1()
+ {
+ fInfo.index = -1;
+ fInfo.attached_at = NULL;
+ }
+
+ JackShmReadWritePtr1(int index)
+ {
+ Init(index);
+ }
+
+ virtual ~JackShmReadWritePtr1()
+ {
+ if (fInfo.index >= 0) {
+ JackLog("JackShmReadWritePtr1::~JackShmReadWritePtr1 %ld\n", fInfo.index);
+ jack_release_shm(&fInfo);
+ fInfo.index = -1;
+ }
+ }
+
+ T* operator->() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ operator T*() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ JackShmReadWritePtr1& operator=(int index)
+ {
+ Init(index);
+ return *this;
+ }
+
+ int GetShmIndex()
+ {
+ return fInfo.index;
+ }
+
+ T* GetShmAddress()
+ {
+ return (T*)fInfo.attached_at;
+ }
+};
+
+/*!
+\brief Pointer on shared memory segment in the client side.
+*/
+
+template <class T>
+class JackShmReadPtr
+{
+
+ private:
+
+ jack_shm_info_t fInfo;
+
+ void Init(int index)
+ {
+ if (fInfo.index < 0 && index >= 0) {
+ JackLog("JackShmPtrRead::Init %ld %ld\n", index, fInfo.index);
+ if (jack_initialize_shm_client() < 0)
+ throw - 1;
+ fInfo.index = index;
+ if (jack_attach_shm_read(&fInfo)) {
+ //jack_error("cannot attach shared memory segment", strerror(errno));
+ throw - 2;
+ }
+ }
+ }
+
+ public:
+
+ JackShmReadPtr()
+ {
+ fInfo.index = -1;
+ fInfo.attached_at = NULL;
+ }
+
+ JackShmReadPtr(int index)
+ {
+ Init(index);
+ }
+
+ virtual ~JackShmReadPtr()
+ {
+ if (fInfo.index >= 0) {
+ JackLog("JackShmPtrRead::~JackShmPtrRead %ld\n", fInfo.index);
+ jack_release_shm(&fInfo);
+ fInfo.index = -1;
+ }
+ }
+
+ T* operator->() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ operator T*() const
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+ JackShmReadPtr& operator=(int index)
+ {
+ Init(index);
+ return *this;
+ }
+
+ int GetShmIndex()
+ {
+ return fInfo.index;
+ }
+
+ T* GetShmAddress()
+ {
+ return (T*)fInfo.attached_at;
+ }
+
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackSocket.cpp b/common/JackSocket.cpp
new file mode 100644
index 00000000..c0500081
--- /dev/null
+++ b/common/JackSocket.cpp
@@ -0,0 +1,312 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackSocket.h"
+#include "JackError.h"
+#include <string.h>
+
+namespace Jack
+{
+
+JackClientSocket::JackClientSocket(int socket): fSocket(socket)
+{}
+
+void JackClientSocket::SetReadTimeOut(long sec)
+{
+ struct timeval timout;
+ 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));
+ }
+}
+
+void JackClientSocket::SetWriteTimeOut(long sec)
+{
+ struct timeval timout;
+ 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));
+ }
+}
+
+int JackClientSocket::Connect(const char* dir, const char* name, int which) // A revoir : utilisation de "which"
+{
+ struct sockaddr_un addr;
+
+ if ((fSocket = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ jack_error("Cannot create socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ addr.sun_family = AF_UNIX;
+ snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name);
+
+ JackLog("Connect: addr.sun_path %s\n", addr.sun_path);
+
+ if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ jack_error("Cannot connect to server socket (%s)", strerror(errno));
+ close(fSocket);
+ return -1;
+ }
+
+#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));
+ }
+#endif
+
+ return 0;
+}
+
+int JackClientSocket::Connect(const char* dir, int which)
+{
+ struct sockaddr_un addr;
+
+ if ((fSocket = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ jack_error("Cannot create socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ 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);
+
+ if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ jack_error("Cannot connect to server socket (%s)", strerror(errno));
+ close(fSocket);
+ return -1;
+ }
+
+#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));
+ }
+#endif
+
+ return 0;
+}
+
+int JackClientSocket::Close()
+{
+ JackLog("JackClientSocket::Close\n");
+ //shutdown(fSocket, SHUT_RDWR);
+ if (fSocket > 0) {
+ close(fSocket);
+ fSocket = -1;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackClientSocket::Read(void* data, int len)
+{
+ int len1;
+ JackLog("JackClientSocket::Read len = %ld\n", len);
+
+ if ((len1 = read(fSocket, data, len)) != len) {
+ jack_error("Cannot read socket %d %d (%s)", len, len1, strerror(errno));
+ if (errno == EWOULDBLOCK) {
+ JackLog("JackClientSocket::Read time out\n");
+ return 0;
+ } else {
+ return -1;
+ }
+ } else {
+ return 0;
+ }
+}
+
+int JackClientSocket::Write(void* data, int len)
+{
+ if (write(fSocket, data, len) != len) {
+ jack_error("Cannot write socket fd %ld (%s)", fSocket, strerror(errno));
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+/*
+void
+jack_cleanup_files ()
+{
+ DIR *dir;
+ struct dirent *dirent;
+
+ // its important that we remove all files that jackd creates
+ // because otherwise subsequent attempts to start jackd will
+ // believe that an instance is already running.
+
+
+ if ((dir = opendir (jack_server_dir)) == NULL) {
+ fprintf (stderr, "jack(%d): cannot open jack FIFO directory "
+ "(%s)\n", getpid(), strerror (errno));
+ return;
+ }
+
+ while ((dirent = readdir (dir)) != NULL) {
+ if (strncmp (dirent->d_name, "jack-", 5) == 0 ||
+ strncmp (dirent->d_name, "jack_", 5) == 0) {
+ char fullpath[PATH_MAX+1];
+ snprintf (fullpath, sizeof (fullpath), "%s/%s",
+ jack_server_dir, dirent->d_name);
+ unlink (fullpath);
+ }
+ }
+
+ closedir (dir);
+}
+*/
+
+int JackServerSocket::Bind(const char* dir, const char* name, int which) // A revoir : utilisation de "which"
+{
+ struct sockaddr_un addr;
+
+ if ((fSocket = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ jack_error("Cannot create server socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ addr.sun_family = AF_UNIX;
+
+ // TO CORRECT: always reuse the same name for now...
+ snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name);
+ snprintf(fName, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name);
+ /*
+ if (access(addr.sun_path, F_OK) == 0) {
+ goto error;
+ }
+ */
+
+ JackLog("Bind: addr.sun_path %s\n", addr.sun_path);
+ unlink(fName); // Security...
+
+ JackLog("Bind: addr.sun_path %s\n", addr.sun_path);
+ unlink(fName); // Security...
+
+ if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ jack_error("Cannot bind server to socket (%s)", strerror(errno));
+ goto error;
+ }
+
+ if (listen(fSocket, 1) < 0) {
+ jack_error("Cannot enable listen on server socket (%s)", strerror(errno));
+ goto error;
+ }
+
+ return 0;
+
+error:
+ unlink(fName);
+ close(fSocket);
+ return -1;
+}
+
+int JackServerSocket::Bind(const char* dir, int which) // A revoir : utilisation de "which"
+{
+ struct sockaddr_un addr;
+
+ if ((fSocket = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ jack_error ("Cannot create server socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ addr.sun_family = AF_UNIX;
+
+ /*
+ for (int i = 0; i < 999; i++) {
+ snprintf(addr.sun_path, sizeof(addr.sun_path) - 1,"%s/jack_%d", dir, i);
+ snprintf(fName, sizeof(addr.sun_path) - 1,"%s/jack_%d", dir, i);
+ if (access(addr.sun_path, F_OK) != 0) {
+ break;
+ }
+ }
+ */
+
+ // TO CORRECT: always reuse the same name for now...
+ snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%d", dir, which);
+ snprintf(fName, sizeof(addr.sun_path) - 1, "%s/jack_%d", dir, which);
+ /*
+ if (access(addr.sun_path, F_OK) == 0) {
+ goto error;
+ }
+ */
+
+ JackLog("Bind: addr.sun_path %s\n", addr.sun_path);
+ unlink(fName); // Security...
+
+ if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ jack_error("Cannot bind server to socket (%s)", strerror(errno));
+ goto error;
+ }
+
+ if (listen(fSocket, 1) < 0) {
+ jack_error("Cannot enable listen on server socket (%s)", strerror(errno));
+ goto error;
+ }
+
+ return 0;
+
+error:
+ unlink(fName);
+ close(fSocket);
+ return -1;
+}
+
+JackClientSocket* JackServerSocket::Accept()
+{
+ struct sockaddr_un client_addr;
+ socklen_t client_addrlen;
+
+ memset(&client_addr, 0, sizeof(client_addr));
+ client_addrlen = sizeof(client_addr);
+
+ int fd = accept(fSocket, (struct sockaddr*) & client_addr, &client_addrlen);
+ if (fd < 0) {
+ jack_error("Cannot accept new connection (%s)", strerror(errno));
+ return 0;
+ } else {
+ return new JackClientSocket(fd);
+ }
+}
+
+int JackServerSocket::Close()
+{
+ JackLog("JackServerSocket::Close %s\n", fName);
+ //shutdown(fSocket, SHUT_RDWR);
+ if (fSocket > 0) {
+ //shutdown(fSocket, SHUT_RDWR);
+ close(fSocket);
+ unlink(fName);
+ fSocket = -1;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+} // end of namespace
+
+
diff --git a/common/JackSocket.h b/common/JackSocket.h
new file mode 100644
index 00000000..ad1b3640
--- /dev/null
+++ b/common/JackSocket.h
@@ -0,0 +1,104 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackSocket__
+#define __JackSocket__
+
+#include "JackChannelTransaction.h"
+
+#include <sys/un.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+namespace Jack
+{
+
+/*!
+\brief Client socket.
+*/
+
+class JackClientSocket : public JackChannelTransaction
+{
+
+ private:
+
+ int fSocket;
+
+ public:
+
+ JackClientSocket(): fSocket( -1)
+ {}
+ JackClientSocket(int socket);
+ virtual ~JackClientSocket()
+ {}
+
+ int Connect(const char* dir, int which);
+ int Connect(const char* dir, const char* name, int which);
+ int Close();
+ int Read(void* data, int len);
+ int Write(void* data, int len);
+ int GetFd()
+ {
+ return fSocket;
+ }
+ void SetReadTimeOut(long sec);
+ void SetWriteTimeOut(long sec);
+};
+
+/*!
+\brief Server socket.
+*/
+
+class JackServerSocket
+{
+
+ private:
+
+ int fSocket;
+ char fName[256];
+
+ public:
+
+ JackServerSocket(): fSocket( -1)
+ {}
+ virtual ~JackServerSocket()
+ {}
+
+ int Bind(const char* dir, int which);
+ int Bind(const char* dir, const char* name, int which);
+ JackClientSocket* Accept();
+ int Close();
+ int GetFd()
+ {
+ return fSocket;
+ }
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSocketClientChannel.cpp b/common/JackSocketClientChannel.cpp
new file mode 100644
index 00000000..05c77c73
--- /dev/null
+++ b/common/JackSocketClientChannel.cpp
@@ -0,0 +1,264 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackSocketClientChannel.h"
+#include "JackRequest.h"
+#include "JackClient.h"
+#include "JackGlobals.h"
+
+namespace Jack
+{
+
+JackSocketClientChannel::JackSocketClientChannel()
+{
+ fThread = JackGlobals::MakeThread(this);
+ fNotificationSocket = NULL;
+ fClient = NULL;
+}
+
+JackSocketClientChannel::~JackSocketClientChannel()
+{
+ delete fThread;
+ delete fNotificationSocket;
+}
+
+int JackSocketClientChannel::Open(const char* name, JackClient* obj)
+{
+ JackLog("JackSocketClientChannel::Open name = %s\n", name);
+
+ if (fRequestSocket.Connect(jack_server_dir, 0) < 0) {
+ jack_error("Cannot connect to server socket");
+ goto error;
+ }
+
+ if (fNotificationListenSocket.Bind(jack_client_dir, name, 0) < 0) {
+ jack_error("Cannot bind socket");
+ goto error;
+ }
+
+ fClient = obj;
+ return 0;
+
+error:
+ fRequestSocket.Close();
+ fNotificationListenSocket.Close();
+ return -1;
+}
+
+void JackSocketClientChannel::Close()
+{
+ fRequestSocket.Close();
+ fNotificationListenSocket.Close();
+ if (fNotificationSocket)
+ fNotificationSocket->Close();
+}
+
+int JackSocketClientChannel::Start()
+{
+ JackLog("JackSocketClientChannel::Start\n");
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack client listener");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackSocketClientChannel::Stop()
+{
+ JackLog("JackSocketClientChannel::Stop\n");
+ fThread->Kill();
+}
+
+void JackSocketClientChannel::ServerSyncCall(JackRequest* req, JackResult* res, int* result)
+{
+ if (req->Write(&fRequestSocket) < 0) {
+ jack_error("Could not write request type = %ld", req->fType);
+ *result = -1;
+ return ;
+ }
+
+ if (res->Read(&fRequestSocket) < 0) {
+ jack_error("Could not read result type = %ld", req->fType);
+ *result = -1;
+ return ;
+ }
+
+ *result = res->fResult;
+}
+
+void JackSocketClientChannel::ServerAsyncCall(JackRequest* req, JackResult* res, int* result)
+{
+ if (req->Write(&fRequestSocket) < 0) {
+ jack_error("Could not write request type = %ld", req->fType);
+ *result = -1;
+ } else {
+ *result = 0;
+ }
+}
+
+void JackSocketClientChannel::ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ JackClientNewRequest req(name);
+ JackClientNewResult res;
+ ServerSyncCall(&req, &res, result);
+ *shared_engine = res.fSharedEngine;
+ *shared_client = res.fSharedClient;
+ *shared_ports = res.fSharedPorts;
+}
+
+void JackSocketClientChannel::ClientClose(int refnum, int* result)
+{
+ JackClientCloseRequest req(refnum);
+ JackResult res;
+ ServerAsyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::ClientActivate(int refnum, int* result)
+{
+ JackActivateRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::ClientDeactivate(int refnum, int* result)
+{
+ JackDeactivateRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+{
+ JackPortRegisterRequest req(refnum, name, "audio", flags, buffer_size);
+ JackPortRegisterResult res;
+ ServerSyncCall(&req, &res, result);
+ *port_index = res.fPortIndex;
+}
+
+void JackSocketClientChannel::PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
+{
+ JackPortUnRegisterRequest req(refnum, port_index);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::PortConnect(int refnum, const char* src, const char* dst, int* result)
+{
+ JackPortConnectNameRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::PortDisconnect(int refnum, const char* src, const char* dst, int* result)
+{
+ JackPortDisconnectNameRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ JackPortConnectRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ JackPortDisconnectRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::SetBufferSize(jack_nframes_t nframes, int* result)
+{
+ JackSetBufferSizeRequest req(nframes);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::SetFreewheel(int onoff, int* result)
+{
+ JackSetFreeWheelRequest req(onoff);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::ReleaseTimebase(int refnum, int* result)
+{
+ JackReleaseTimebaseRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackSocketClientChannel::SetTimebaseCallback(int refnum, int conditional, int* result)
+{
+ JackSetTimebaseCallbackRequest req(refnum, conditional);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+bool JackSocketClientChannel::Init()
+{
+ JackLog("JackSocketClientChannel::Init \n");
+ fNotificationSocket = fNotificationListenSocket.Accept();
+ // No more needed
+ fNotificationListenSocket.Close();
+
+ if (!fNotificationSocket) {
+ jack_error("JackSocketClientChannel: cannot establish notication socket");
+ return false;
+ } else {
+ return true;
+ }
+}
+
+bool JackSocketClientChannel::Execute()
+{
+ JackClientNotification event;
+ JackResult res;
+
+ //fClient->Init(); // To be checked
+
+ if (event.Read(fNotificationSocket) < 0) {
+ fNotificationSocket->Close();
+ jack_error("JackSocketClientChannel read fail");
+ goto error;
+ }
+
+ res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fValue);
+
+ if (event.fSync) {
+ if (res.Write(fNotificationSocket) < 0) {
+ fNotificationSocket->Close();
+ jack_error("JackSocketClientChannel write fail");
+ goto error;
+ }
+ }
+ return true;
+
+error:
+ fClient->ShutDown();
+ return false;
+}
+
+} // end of namespace
+
+
diff --git a/common/JackSocketClientChannel.h b/common/JackSocketClientChannel.h
new file mode 100644
index 00000000..14953141
--- /dev/null
+++ b/common/JackSocketClientChannel.h
@@ -0,0 +1,89 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackSocketClientChannel__
+#define __JackSocketClientChannel__
+
+#include "JackChannel.h"
+#include "JackSocket.h"
+#include "JackThread.h"
+#include "JackRequest.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackClientChannel using sockets.
+*/
+
+class JackSocketClientChannel : public JackClientChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackClientSocket fRequestSocket; // Socket to communicate with the server
+ JackServerSocket fNotificationListenSocket; // Socket listener for server notification
+ JackClientSocket* fNotificationSocket; // Socket for server notification
+ JackThread* fThread; // Thread to execute the event loop
+ JackClient* fClient;
+
+ void ServerSyncCall(JackRequest* req, JackResult* res, int* result);
+ void ServerAsyncCall(JackRequest* req, JackResult* res, int* result);
+
+ public:
+
+ JackSocketClientChannel();
+ virtual ~JackSocketClientChannel();
+
+ int Open(const char* name, JackClient* obj);
+ void Close();
+
+ int Start();
+ void Stop();
+
+ void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void ClientClose(int refnum, int* result);
+
+ void ClientActivate(int refnum, int* result);
+ void ClientDeactivate(int refnum, int* result);
+
+ void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
+ void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
+
+ void PortConnect(int refnum, const char* src, const char* dst, int* result);
+ void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
+
+ void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+ void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+
+ void SetBufferSize(jack_nframes_t nframes, int* result);
+ void SetFreewheel(int onoff, int* result);
+
+ void ReleaseTimebase(int refnum, int* result);
+ void SetTimebaseCallback(int refnum, int conditional, int* result);
+
+ // JackRunnableInterface interface
+ bool Init();
+ bool Execute();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSocketNotifyChannel.cpp b/common/JackSocketNotifyChannel.cpp
new file mode 100644
index 00000000..c0c1a3fd
--- /dev/null
+++ b/common/JackSocketNotifyChannel.cpp
@@ -0,0 +1,79 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackRequest.h"
+#include "JackSocketNotifyChannel.h"
+#include "JackError.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+// Server to client
+int JackSocketNotifyChannel::Open(const char* name)
+{
+ JackLog("JackSocketNotifyChannel::Open name = %s\n", name);
+
+ // Connect to client listen socket
+ if (fNotifySocket.Connect(jack_client_dir, name, 0) < 0) {
+ jack_error("Cannot connect client socket");
+ return -1;
+ }
+ // Use a time out for notifications
+ fNotifySocket.SetReadTimeOut(SOCKET_TIME_OUT);
+ return 0;
+}
+
+void JackSocketNotifyChannel::Close()
+{
+ JackLog("JackSocketNotifyChannel::Close\n");
+ fNotifySocket.Close();
+}
+
+void JackSocketNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result)
+{
+ JackClientNotification event(name, refnum, notify, sync, value);
+ JackResult res;
+
+ // Send notification
+ if (event.Write(&fNotifySocket) < 0) {
+ jack_error("Could not write notification");
+ fNotifySocket.Close();
+ *result = -1;
+ return ;
+ }
+
+ // Read the result in "synchronous" mode only
+ if (sync) {
+ // Get result : use a time out
+ if (res.Read(&fNotifySocket) < 0) {
+ jack_error("Could not read result");
+ fNotifySocket.Close();
+ *result = -1;
+ } else {
+ *result = res.fResult;
+ }
+ } else {
+ *result = 0;
+ }
+}
+
+} // end of namespace
+
+
diff --git a/common/JackSocketNotifyChannel.h b/common/JackSocketNotifyChannel.h
new file mode 100644
index 00000000..a43d76b9
--- /dev/null
+++ b/common/JackSocketNotifyChannel.h
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackSocketNotifyChannel__
+#define __JackSocketNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackSocket.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackNotifyChannel using sockets.
+*/
+
+class JackSocketNotifyChannel : public JackNotifyChannelInterface
+{
+
+ private:
+
+ JackClientSocket fNotifySocket; // Socket to communicate with the server : from server to client
+
+ public:
+
+ JackSocketNotifyChannel()
+ {}
+ virtual ~JackSocketNotifyChannel()
+ {}
+
+ int Open(const char* name); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ void ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSocketServerChannel.cpp b/common/JackSocketServerChannel.cpp
new file mode 100644
index 00000000..5ec70edb
--- /dev/null
+++ b/common/JackSocketServerChannel.cpp
@@ -0,0 +1,375 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackSocketServerChannel.h"
+#include "JackRequest.h"
+#include "JackServer.h"
+#include "JackEngine.h"
+#include "JackGlobals.h"
+#include "JackClient.h"
+#include <assert.h>
+
+using namespace std;
+
+namespace Jack
+{
+
+JackSocketServerChannel::JackSocketServerChannel()
+{
+ fThread = JackGlobals::MakeThread(this);
+ fPollTable = NULL;
+ fRebuild = true;
+}
+
+JackSocketServerChannel::~JackSocketServerChannel()
+{
+ delete fThread;
+ delete[] fPollTable;
+}
+
+int JackSocketServerChannel::Open(JackServer* server)
+{
+ JackLog("JackSocketServerChannel::Open \n");
+ fServer = server;
+
+ // Prepare request socket
+ if (fRequestListenSocket.Bind(jack_server_dir, 0) < 0) {
+ JackLog("JackSocketServerChannel::Open : cannot create result listen socket\n");
+ return -1;
+ }
+
+ // Prepare for poll
+ BuildPoolTable();
+
+ // Start listening
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack server listener");
+ goto error;
+ }
+
+ return 0;
+
+error:
+ fRequestListenSocket.Close();
+ return -1;
+}
+
+void JackSocketServerChannel::Close()
+{
+ fThread->Kill();
+ fRequestListenSocket.Close();
+}
+
+void JackSocketServerChannel::CreateClient()
+{
+ JackLog("JackSocketServerChannel::CreateClient socket\n");
+ JackClientSocket* socket = fRequestListenSocket.Accept();
+ if (socket) {
+ fSocketTable[socket->GetFd()] = make_pair( -1, socket);
+ fRebuild = true;
+ } else {
+ jack_error("Client socket cannot be created");
+ }
+}
+
+void JackSocketServerChannel::AddClient(int fd, char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ JackLog("JackSocketServerChannel::AddClient\n");
+ int refnum = -1;
+ *result = fServer->GetEngine()->ClientNew(name, &refnum, shared_engine, shared_client, shared_ports);
+ if (*result == 0) {
+ fSocketTable[fd].first = refnum;
+ fRebuild = true;
+ } else {
+ jack_error("Cannot create new client");
+ }
+}
+
+void JackSocketServerChannel::RemoveClient(int fd, int refnum)
+{
+ pair<int, JackClientSocket*> elem = fSocketTable[fd];
+ JackClientSocket* socket = elem.second;
+ assert(socket);
+ JackLog("JackSocketServerChannel::RemoveClient ref = %d\n", refnum);
+ fSocketTable.erase(fd);
+ socket->Close();
+ delete socket;
+ fRebuild = true;
+}
+
+void JackSocketServerChannel::KillClient(int fd)
+{
+ pair<int, JackClientSocket*> elem = fSocketTable[fd];
+ JackClientSocket* socket = elem.second;
+ int refnum = elem.first;
+
+ assert(socket);
+ JackLog("JackSocketServerChannel::KillClient ref = %d\n", refnum);
+
+ if (refnum == -1) { // Should never happen... correspond to a client that started the socket but never opened...
+ jack_error("Client not opened");
+ } else {
+ fServer->Notify(refnum, JackNotifyChannelInterface::kDeadClient, 0);
+ }
+
+ fSocketTable.erase(fd);
+ socket->Close();
+ delete socket;
+ fRebuild = true;
+}
+
+int JackSocketServerChannel::HandleRequest(int fd)
+{
+ pair<int, JackClientSocket*> elem = fSocketTable[fd];
+ JackClientSocket* socket = elem.second;
+ assert(socket);
+
+ // Read header
+ JackRequest header;
+ if (header.Read(socket) < 0) {
+ jack_error("HandleRequest: cannot read header");
+ return -1;
+ }
+
+ // Read data
+ switch (header.fType) {
+
+ case JackRequest::kClientNew: {
+ JackLog("JackRequest::ClientNew\n");
+ JackClientNewRequest req;
+ JackClientNewResult res;
+ req.Read(socket);
+ AddClient(fd, req.fName, &res.fSharedEngine, &res.fSharedClient, &res.fSharedPorts, &res.fResult);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kClientClose: {
+ JackLog("JackRequest::ClientClose\n");
+ JackClientCloseRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->ClientClose(req.fRefNum);
+ res.Write(socket);
+ RemoveClient(fd, req.fRefNum);
+ break;
+ }
+
+ case JackRequest::kActivateClient: {
+ JackActivateRequest req;
+ JackResult res;
+ JackLog("JackRequest::ActivateClient\n");
+ req.Read(socket);
+ res.fResult = fServer->Activate(req.fRefNum);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kDeactivateClient: {
+ JackLog("JackRequest::DeactivateClient\n");
+ JackDeactivateRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->Deactivate(req.fRefNum);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kRegisterPort: {
+ JackLog("JackRequest::RegisterPort\n");
+ JackPortRegisterRequest req;
+ JackPortRegisterResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortRegister(req.fRefNum, req.fName, req.fFlags, req.fBufferSize, &res.fPortIndex);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kUnRegisterPort: {
+ JackLog("JackRequest::UnRegisterPort\n");
+ JackPortUnRegisterRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortUnRegister(req.fRefNum, req.fPortIndex);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kConnectNamePorts: {
+ JackLog("JackRequest::ConnectPorts\n");
+ JackPortConnectNameRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortConnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kDisconnectNamePorts: {
+ JackLog("JackRequest::DisconnectPorts\n");
+ JackPortDisconnectNameRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortDisconnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kConnectPorts: {
+ JackLog("JackRequest::ConnectPorts\n");
+ JackPortConnectRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortConnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kDisconnectPorts: {
+ JackLog("JackRequest::DisconnectPorts\n");
+ JackPortDisconnectRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->PortDisconnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kSetBufferSize: {
+ JackLog("JackRequest::SetBufferSize\n");
+ JackSetBufferSizeRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->SetBufferSize(req.fBufferSize);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kSetFreeWheel: {
+ JackLog("JackRequest::SetFreeWheel\n");
+ JackSetFreeWheelRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->SetFreewheel(req.fOnOff);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kReleaseTimebase: {
+ JackLog("JackRequest::kReleaseTimebase\n");
+ JackReleaseTimebaseRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->ReleaseTimebase(req.fRefNum);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kSetTimebaseCallback: {
+ JackLog("JackRequest::kSetTimebaseCallback\n");
+ JackSetTimebaseCallbackRequest req;
+ JackResult res;
+ req.Read(socket);
+ res.fResult = fServer->GetEngine()->SetTimebaseCallback(req.fRefNum, req.fConditionnal);
+ res.Write(socket);
+ break;
+ }
+
+ case JackRequest::kNotification: {
+ JackLog("JackRequest::Notification\n");
+ JackClientNotificationRequest req;
+ req.Read(socket);
+ fServer->Notify(req.fRefNum, req.fNotify, req.fValue);
+ break;
+ }
+
+ default:
+ JackLog("Unknown request %ld\n", header.fType);
+ break;
+ }
+
+ return 0;
+}
+
+void JackSocketServerChannel::BuildPoolTable()
+{
+ if (fRebuild) {
+ fRebuild = false;
+ delete[] fPollTable;
+ fPollTable = new pollfd[fSocketTable.size() + 1];
+
+ JackLog("JackSocketServerChannel::BuildPoolTable size = %d\n", fSocketTable.size() + 1);
+
+ // First fd is the server request socket
+ fPollTable[0].fd = fRequestListenSocket.GetFd();
+ fPollTable[0].events = POLLIN | POLLERR;
+
+ // Next fd for clients
+ map<int, pair<int, JackClientSocket*> >::iterator it;
+ int i;
+
+ for (i = 1, it = fSocketTable.begin(); it != fSocketTable.end(); it++, i++) {
+ JackLog("fSocketTable i = %ld fd = %ld\n", i, it->first);
+ fPollTable[i].fd = it->first;
+ fPollTable[i].events = POLLIN | POLLPRI | POLLERR | POLLHUP | POLLNVAL;
+ }
+ }
+}
+
+bool JackSocketServerChannel::Execute()
+{
+ // Global poll
+ if ((poll(fPollTable, fSocketTable.size() + 1, 10000) < 0) && (errno != EINTR)) {
+ jack_error("Engine poll failed err = %s request thread quits...", strerror(errno));
+ return false;
+ } else {
+
+ // 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);
+ if (fPollTable[i].revents & ~POLLIN) {
+ jack_error("Poll client error err = %s", strerror(errno));
+ KillClient(fd);
+ } else if (fPollTable[i].revents & POLLIN) {
+ if (HandleRequest(fd) < 0) {
+ jack_error("Could not handle external client request");
+ //RemoveClient(fd); TO CHECK
+ }
+ }
+ }
+
+ // Check the server request socket */
+ if (fPollTable[0].revents & POLLERR) {
+ jack_error("Error on server request socket err = %s", strerror(errno));
+ //return false; TO CHECK
+ }
+
+ if (fPollTable[0].revents & POLLIN) {
+ CreateClient();
+ }
+ }
+
+ BuildPoolTable();
+ return true;
+}
+
+} // end of namespace
+
+
diff --git a/common/JackSocketServerChannel.h b/common/JackSocketServerChannel.h
new file mode 100644
index 00000000..0a00ae3c
--- /dev/null
+++ b/common/JackSocketServerChannel.h
@@ -0,0 +1,70 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackSocketServerChannel__
+#define __JackSocketServerChannel__
+
+#include "JackChannel.h"
+#include "JackSocket.h"
+#include "JackThread.h"
+#include <poll.h>
+#include <map>
+
+namespace Jack
+{
+
+/*!
+\brief JackServerChannel using sockets.
+*/
+
+class JackSocketServerChannel : public JackServerChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackServerSocket fRequestListenSocket; // Socket to create request socket for the client
+ JackThread* fThread; // Thread to execute the event loop
+ JackServer* fServer;
+ pollfd* fPollTable;
+ bool fRebuild;
+ std::map<int, std::pair<int, JackClientSocket*> > fSocketTable;
+
+ int HandleRequest(int fd);
+ void CreateClient();
+ void AddClient(int fd, char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void RemoveClient(int fd, int refnum);
+ void KillClient(int fd);
+ void BuildPoolTable();
+
+ public:
+
+ JackSocketServerChannel();
+ virtual ~JackSocketServerChannel();
+
+ int Open(JackServer* server); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ // JackRunnableInterface interface
+ bool Execute();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSocketServerNotifyChannel.cpp b/common/JackSocketServerNotifyChannel.cpp
new file mode 100644
index 00000000..3ca024a1
--- /dev/null
+++ b/common/JackSocketServerNotifyChannel.cpp
@@ -0,0 +1,59 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackSocketServerNotifyChannel.h"
+#include "JackError.h"
+#include "JackRequest.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+int JackSocketServerNotifyChannel::Open()
+{
+ if (fRequestSocket.Connect(jack_server_dir, 0) < 0) {
+ jack_error("Cannot connect to server socket");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackSocketServerNotifyChannel::Close()
+{
+ fRequestSocket.Close();
+}
+
+/*
+The requirement is that the Notification from RT thread can be delivered... not sure using a socket is adequate here...
+Can the write operation block?
+A non blocking write operation shoud be used : check if write can succeed, and ignore the notification otherwise
+(since its mainly used for XRun, ignoring a notification is OK, successive XRun will come...)
+*/
+void JackSocketServerNotifyChannel::ClientNotify(int refnum, int notify, int value)
+{
+ JackClientNotificationRequest req(refnum, notify, value);
+ if (req.Write(&fRequestSocket) < 0) {
+ jack_error("Could not write request type = %ld", req.fType);
+ }
+}
+
+} // end of namespace
+
+
diff --git a/common/JackSocketServerNotifyChannel.h b/common/JackSocketServerNotifyChannel.h
new file mode 100644
index 00000000..f4ce0532
--- /dev/null
+++ b/common/JackSocketServerNotifyChannel.h
@@ -0,0 +1,55 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackSocketServerNotifyChannel__
+#define __JackSocketServerNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackSocket.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackServerNotifyChannel using sockets.
+*/
+
+class JackSocketServerNotifyChannel : public JackServerNotifyChannelInterface
+{
+ private:
+
+ JackClientSocket fRequestSocket;
+
+ public:
+
+ JackSocketServerNotifyChannel()
+ {}
+ virtual ~JackSocketServerNotifyChannel()
+ {}
+
+ int Open();
+ void Close();
+
+ void ClientNotify(int refnum, int notify, int value);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSyncInterface.h b/common/JackSyncInterface.h
new file mode 100644
index 00000000..a2f3cf9f
--- /dev/null
+++ b/common/JackSyncInterface.h
@@ -0,0 +1,51 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackSyncInterface__
+#define __JackSyncInterface__
+
+namespace Jack
+{
+
+/*!
+\brief A synchronization primitive interface.
+*/
+
+class JackSyncInterface
+{
+
+ public:
+
+ JackSyncInterface()
+ {}
+ virtual ~JackSyncInterface()
+ {}
+
+ virtual bool Allocate(const char* name) = 0;
+ virtual bool Connect(const char* name) = 0;
+ virtual bool TimedWait(long usec) = 0;
+ virtual void Wait() = 0;
+ virtual void SignalAll() = 0;
+ virtual void Destroy() = 0;
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackSynchro.h b/common/JackSynchro.h
new file mode 100644
index 00000000..d067ecad
--- /dev/null
+++ b/common/JackSynchro.h
@@ -0,0 +1,102 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackSynchro__
+#define __JackSynchro__
+
+#include "JackError.h"
+
+#define SYNC_MAX_NAME_SIZE 256
+
+namespace Jack
+{
+
+/*!
+\brief An inter process synchronization primitive.
+*/
+
+class JackSynchro
+{
+
+ protected:
+
+ char fName[SYNC_MAX_NAME_SIZE];
+ bool fFlush; // If true, signal are "flushed" : used for drivers that do no consume the signal
+
+ virtual void BuildName(const char* name, char* res)
+ {}
+
+ public:
+
+ JackSynchro(): fFlush(false)
+ {}
+ virtual ~JackSynchro()
+ {}
+
+ virtual bool Signal()
+ {
+ return true;
+ }
+ virtual bool SignalAll()
+ {
+ return true;
+ }
+ virtual bool Wait()
+ {
+ return true;
+ }
+ virtual bool TimedWait(long usec)
+ {
+ return true;
+ }
+ virtual bool Allocate(const char* name, int value)
+ {
+ return true;
+ }
+ virtual bool Connect(const char* name)
+ {
+ return true;
+ }
+ virtual bool ConnectInput(const char* name)
+ {
+ return true;
+ }
+ virtual bool ConnectOutput(const char* name)
+ {
+ return true;
+ }
+ virtual bool Disconnect()
+ {
+ return true;
+ }
+ virtual void Destroy()
+ {}
+
+ void SetFlush(bool mode)
+ {
+ fFlush = mode;
+ }
+
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/common/JackThread.h b/common/JackThread.h
new file mode 100644
index 00000000..1a7aad00
--- /dev/null
+++ b/common/JackThread.h
@@ -0,0 +1,97 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackThread__
+#define __JackThread__
+
+#ifdef WIN32
+ #include <windows.h>
+typedef HANDLE pthread_t;
+typedef ULONGLONG UInt64;
+#else
+ #include <pthread.h>
+typedef unsigned long long UInt64;
+#endif
+
+namespace Jack
+{
+
+/*!
+\brief The base class for runnable objects, that have an <B> Init </B> and <B> Execute </B> method to be called in a thread.
+*/
+
+class JackRunnableInterface
+{
+
+ public:
+
+ JackRunnableInterface()
+ {}
+ virtual ~JackRunnableInterface()
+ {}
+
+ virtual bool Init() /*! Called once when the thread is started */
+ {
+ return true;
+ }
+ virtual bool Execute() = 0; /*! Must be implemented by subclasses */
+};
+
+/*!
+\brief The thread base class.
+*/
+
+class JackThread
+{
+
+ protected:
+
+ JackRunnableInterface* fRunnable;
+ int fPriority;
+ bool fRealTime;
+ volatile bool fRunning;
+ int fCancellation;
+
+ public:
+
+ JackThread(JackRunnableInterface* runnable, int priority, bool real_time, int cancellation):
+ fRunnable(runnable), fPriority(priority), fRealTime(real_time), fRunning(false), fCancellation(cancellation)
+ {}
+ virtual ~JackThread()
+ {}
+
+ virtual int Start() = 0;
+ virtual int StartSync() = 0;
+ virtual int Kill() = 0;
+ virtual int Stop() = 0;
+
+ virtual int AcquireRealTime() = 0;
+ virtual int AcquireRealTime(int priority) = 0;
+ virtual int DropRealTime() = 0;
+
+ virtual void SetParams(UInt64 period, UInt64 computation, UInt64 constraint) // Empty implementation, will only make sense on OSX...
+ {}
+
+ virtual pthread_t GetThreadID() = 0;
+};
+
+} // end of namespace
+
+#endif
diff --git a/common/JackThreadedDriver.cpp b/common/JackThreadedDriver.cpp
new file mode 100644
index 00000000..9a7e89fc
--- /dev/null
+++ b/common/JackThreadedDriver.cpp
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackThreadedDriver.h"
+#include "JackError.h"
+#include "JackGlobals.h"
+#include "JackClient.h"
+#include "JackEngineControl.h"
+
+namespace Jack
+{
+
+JackThreadedDriver::JackThreadedDriver(JackDriverClient* driver)
+{
+ fThread = JackGlobals::MakeThread(this);
+ fDriver = driver;
+}
+
+JackThreadedDriver::~JackThreadedDriver()
+{
+ delete fThread;
+ delete fDriver;
+}
+
+int JackThreadedDriver::Start()
+{
+ JackLog("JackThreadedDriver::Start\n");
+ int res;
+
+ if ((res = fDriver->Start()) < 0) {
+ jack_error("Cannot start driver");
+ return res;
+ }
+ if ((res = fThread->Start()) < 0) {
+ jack_error("Cannot start thread");
+ return res;
+ }
+
+ if (fDriver->IsRealTime()) {
+ JackLog("JackThreadedDriver::Start IsRealTime\n");
+ // Will do "something" on OSX only...
+ // fThread->SetParams(fDriver->fEngineControl->fPeriod, fDriver->fEngineControl->fComputation, fDriver->fEngineControl->fConstraint);
+ if (fThread->AcquireRealTime(GetEngineControl()->fPriority) < 0) {
+ jack_error("AcquireRealTime error");
+ }
+ }
+
+ return 0;
+}
+
+int JackThreadedDriver::Stop()
+{
+ JackLog("JackThreadedDriver::Stop\n");
+ int res;
+
+ if ((res = fThread->Stop()) < 0) { // Stop when the thread cycle is finished
+ jack_error("Cannot stop thread");
+ return res;
+ }
+ if ((res = fDriver->Stop()) < 0) {
+ jack_error("Cannot stop driver");
+ return res;
+ }
+ return 0;
+}
+
+bool JackThreadedDriver::Execute()
+{
+ return (Process() == 0);
+}
+
+} // end of namespace
diff --git a/common/JackThreadedDriver.h b/common/JackThreadedDriver.h
new file mode 100644
index 00000000..66546c83
--- /dev/null
+++ b/common/JackThreadedDriver.h
@@ -0,0 +1,154 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackThreadedDriver__
+#define __JackThreadedDriver__
+
+#include "JackDriver.h"
+#include "JackThread.h"
+
+namespace Jack
+{
+
+/*!
+\brief The base class for threaded drivers. Threaded drivers are used with blocking devices.
+*/
+
+class JackThreadedDriver : public JackDriverClientInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackThread* fThread;
+ JackDriverClient* fDriver;
+
+ public:
+
+ JackThreadedDriver(JackDriverClient* driver);
+ virtual ~JackThreadedDriver();
+
+ virtual int Open()
+ {
+ return fDriver->Open();
+ }
+
+ virtual int Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+ {
+ return fDriver->Open(nframes, samplerate, capturing, playing, inchannels, outchannels, monitor, capture_driver_name, playback_driver_name, capture_latency, playback_latency);
+ }
+
+ virtual int Close()
+ {
+ return fDriver->Close();
+ }
+
+ virtual int Process()
+ {
+ return fDriver->Process();
+ }
+
+ virtual int Attach()
+ {
+ return fDriver->Attach();
+ }
+ virtual int Detach()
+ {
+ return fDriver->Detach();
+ }
+
+ virtual int Read()
+ {
+ return fDriver->Read();
+ }
+ virtual int Write()
+ {
+ return fDriver->Write();
+ }
+
+ virtual int Start();
+ virtual int Stop();
+
+ virtual int SetBufferSize(jack_nframes_t nframes)
+ {
+ return fDriver->SetBufferSize(nframes);
+ }
+
+ virtual void SetMaster(bool onoff)
+ {
+ fDriver->SetMaster(onoff);
+ }
+ virtual bool GetMaster()
+ {
+ return fDriver->GetMaster();
+ }
+
+ virtual void AddSlave(JackDriverInterface* slave)
+ {
+ fDriver->AddSlave(slave);
+ }
+ virtual void RemoveSlave(JackDriverInterface* slave)
+ {
+ fDriver->RemoveSlave(slave);
+ }
+ virtual void ProcessSlaves()
+ {
+ fDriver->ProcessSlaves();
+ }
+
+ virtual void PrintState()
+ {
+ fDriver->PrintState();
+ }
+
+ virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value)
+ {
+ return fDriver->ClientNotify(refnum, name, notify, sync, value);
+ }
+
+ virtual JackClientControl* GetClientControl() const
+ {
+ return fDriver->GetClientControl();
+ }
+
+ virtual bool IsRealTime()
+ {
+ return fDriver->IsRealTime();
+ }
+
+ // JackRunnableInterface interface
+
+ virtual bool Execute();
+
+};
+
+} // end of namespace
+
+
+#endif
diff --git a/common/JackTime.c b/common/JackTime.c
new file mode 100644
index 00000000..dbbf6063
--- /dev/null
+++ b/common/JackTime.c
@@ -0,0 +1,121 @@
+/*
+ Copyright (C) 2001-2003 Paul Davis
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackTime.h"
+#include "JackError.h"
+
+#ifdef __APPLE__
+
+double __jack_time_ratio;
+
+/* This should only be called ONCE per process. */
+void InitTime()
+{
+ JackLog("InitTime\n");
+ mach_timebase_info_data_t info;
+ mach_timebase_info(&info);
+ __jack_time_ratio = ((float)info.numer / info.denom) / 1000;
+}
+
+#endif
+
+#ifdef WIN32
+
+EXPORT LARGE_INTEGER _jack_freq;
+
+void InitTime()
+{
+ QueryPerformanceFrequency(&_jack_freq);
+ JackLog("InitTime freq = %ld %ld\n", _jack_freq.HighPart, _jack_freq.LowPart);
+ _jack_freq.QuadPart = _jack_freq.QuadPart / 1000000; // by usec
+}
+
+jack_time_t GetMicroSeconds(void)
+{
+ LARGE_INTEGER t1;
+ QueryPerformanceCounter (&t1);
+ return (jack_time_t)(((double)t1.QuadPart)/((double)_jack_freq.QuadPart));
+}
+
+// TODO
+#endif
+
+#ifdef linux
+
+#ifdef GETCYCLE_TIME
+
+#include <stdio.h>
+jack_time_t GetMhz(void)
+{
+ FILE *f = fopen("/proc/cpuinfo", "r");
+ if (f == 0)
+ {
+ perror("can't open /proc/cpuinfo\n");
+ exit(1);
+ }
+
+ for ( ; ; )
+ {
+ jack_time_t mhz;
+ int ret;
+ char buf[1000];
+
+ if (fgets(buf, sizeof(buf), f) == NULL) {
+ jack_error ("FATAL: cannot locate cpu MHz in "
+ "/proc/cpuinfo\n");
+ exit(1);
+ }
+
+#if defined(__powerpc__)
+ ret = sscanf(buf, "clock\t: %" SCNu64 "MHz", &mhz);
+#elif defined( __i386__ ) || defined (__hppa__) || defined (__ia64__) || \
+ defined(__x86_64__)
+ ret = sscanf(buf, "cpu MHz : %" SCNu64, &mhz);
+#elif defined( __sparc__ )
+ ret = sscanf(buf, "Cpu0Bogo : %" SCNu64, &mhz);
+#elif defined( __mc68000__ )
+ ret = sscanf(buf, "Clocking: %" SCNu64, &mhz);
+#elif defined( __s390__ )
+ ret = sscanf(buf, "bogomips per cpu: %" SCNu64, &mhz);
+#else /* MIPS, ARM, alpha */
+ ret = sscanf(buf, "BogoMIPS : %" SCNu64, &mhz);
+#endif
+ if (ret == 1)
+ {
+ fclose(f);
+ return (jack_time_t)mhz;
+ }
+ }
+}
+
+jack_time_t __jack_cpu_mhz;
+
+void InitTime()
+{
+ __jack_cpu_mhz = GetMhz();
+}
+
+#else
+void InitTime()
+{}
+
+#endif
+
+#endif
diff --git a/common/JackTime.h b/common/JackTime.h
new file mode 100644
index 00000000..22c1379a
--- /dev/null
+++ b/common/JackTime.h
@@ -0,0 +1,111 @@
+/*
+Copyright (C) 2001-2003 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackTime__
+#define __JackTime__
+
+#include "types.h"
+#include "JackExports.h"
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if defined(__APPLE__)
+
+#include <mach/mach_time.h>
+ #include <unistd.h>
+
+ extern double __jack_time_ratio;
+
+ static inline jack_time_t GetMicroSeconds(void) {
+ return (jack_time_t) (mach_absolute_time () * __jack_time_ratio);
+ }
+
+ /* This should only be called ONCE per process. */
+ extern void InitTime();
+
+ static inline void JackSleep(long usec) {
+ usleep(usec);
+ }
+
+#endif
+
+#ifdef WIN32
+
+ extern EXPORT LARGE_INTEGER _jack_freq;
+
+ /*
+ static jack_time_t GetMicroSeconds(void) {
+ LARGE_INTEGER t1;
+ QueryPerformanceCounter (&t1);
+ return (jack_time_t)(((double)t1.QuadPart)/((double)_jack_freq.QuadPart));
+ }
+ */
+
+ extern EXPORT jack_time_t GetMicroSeconds(void) ;
+
+ extern void InitTime();
+
+ static void JackSleep(long usec) {
+ Sleep(usec / 1000);
+ }
+
+#endif
+
+#ifdef linux
+
+#include <unistd.h>
+
+ static inline void JackSleep(long usec) {
+ usleep(usec);
+ }
+
+#ifdef GETCYCLE_TIME
+ #include "cycles.h"
+ extern jack_time_t __jack_cpu_mhz;
+ extern jack_time_t GetMhz();
+ extern void InitTime();
+ static inline jack_time_t GetMicroSeconds (void) {
+ return get_cycles() / __jack_cpu_mhz;
+ }
+#else
+ #include <time.h>
+ extern void InitTime();
+ static inline jack_time_t GetMicroSeconds (void) {
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return (jack_time_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
+ }
+#endif
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
+
+
+
diff --git a/common/JackTransportEngine.cpp b/common/JackTransportEngine.cpp
new file mode 100644
index 00000000..af484846
--- /dev/null
+++ b/common/JackTransportEngine.cpp
@@ -0,0 +1,259 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackTransportEngine.h"
+#include "JackClientControl.h"
+#include "JackError.h"
+#include "JackTime.h"
+#include <assert.h>
+#include <stdlib.h>
+
+using namespace std;
+
+namespace Jack
+{
+
+JackTransportEngine::JackTransportEngine(): JackAtomicArrayState<jack_position_t>()
+{
+ fTransportState = JackTransportStopped;
+ fTransportCmd = fPreviousCmd = TransportCommandStop;
+ fSyncTimeout = 2000000; /* 2 second default */
+ fSyncTimeLeft = 0;
+ fTimeBaseMaster = -1;
+ fWriteCounter = 0;
+ fPendingPos = false;
+}
+
+// compute the number of cycle for timeout
+void JackTransportEngine::SyncTimeout(jack_nframes_t frame_rate, jack_nframes_t buffer_size)
+{
+ 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);
+}
+
+int JackTransportEngine::ResetTimebase(int refnum)
+{
+ if (fTimeBaseMaster == refnum) {
+ jack_position_t* request = WriteNextStateStart(2); // To check
+ request->valid = (jack_position_bits_t)0;
+ WriteNextStateStop(2);
+ fTimeBaseMaster = -1;
+ return 0;
+ } else {
+ return EINVAL;
+ }
+}
+
+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);
+ return EBUSY;
+ } else {
+ JackLog("ref = %ld was already timebase master\n", refnum);
+ return 0;
+ }
+ } else {
+ fTimeBaseMaster = refnum;
+ JackLog("new timebase master: ref = %ld\n", refnum);
+ return 0;
+ }
+}
+
+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");
+ return true;
+ }
+ }
+ return false;
+}
+
+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);
+ return false;
+ }
+ }
+ JackLog("CheckAllRolling\n");
+ return true;
+}
+
+void JackTransportEngine::MakeAllStarting(JackClientInterface** table)
+{
+ for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) {
+ JackClientInterface* client = table[i];
+ 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);
+ }
+ }
+ JackLog("MakeAllStarting\n");
+}
+
+void JackTransportEngine::CycleBegin(jack_nframes_t frame_rate, jack_time_t time) // really needed?? (woule be done in CycleEnd...)
+{
+ jack_position_t* pending = WriteNextStateStart(1); // Update "pending" state
+ pending->usecs = time;
+ pending->frame_rate = frame_rate;
+ WriteNextStateStop(1);
+}
+
+void JackTransportEngine::CycleEnd(JackClientInterface** table, jack_nframes_t frame_rate, jack_nframes_t buffer_size)
+{
+ TrySwitchState(1); // Switch from "pending" to "current", it always works since there is always a pending state
+
+ /* Handle any new transport command from the last cycle. */
+ transport_command_t cmd = fTransportCmd;
+ if (cmd != fPreviousCmd) {
+ fPreviousCmd = cmd;
+ JackLog("transport command: %s\n", (cmd == TransportCommandStart ? "START" : "STOP"));
+ } else {
+ cmd = TransportCommandNone;
+ }
+
+ /* state transition switch */
+ switch (fTransportState) {
+
+ case JackTransportSynching:
+ if (cmd == TransportCommandStart) {
+ fTransportState = JackTransportStarting;
+ MakeAllStarting(table);
+ SyncTimeout(frame_rate, buffer_size);
+ JackLog("transport locate ==> starting....\n");
+ } else if (fPendingPos) {
+ fTransportState = JackTransportSynching;
+ JackLog("transport locate ==> locate....\n");
+ } else {
+ fTransportState = JackTransportStopped;
+ JackLog("transport locate ==> stopped....\n");
+ }
+ break;
+
+ case JackTransportStopped:
+ // Set a JackTransportStarting for the current cycle, if all clients are ready (now slow_sync) ==> JackTransportRolling next state
+ if (cmd == TransportCommandStart) {
+ fTransportState = JackTransportStarting;
+ MakeAllStarting(table);
+ SyncTimeout(frame_rate, buffer_size);
+ JackLog("transport stopped ==> starting....\n");
+ } else if (fPendingPos || CheckOneSynching(table)) {
+ fTransportState = JackTransportSynching;
+ JackLog("transport stopped ==> locate....\n");
+ }
+ break;
+
+ case JackTransportStarting:
+ JackLog("transport starting fSyncTimeLeft %ld\n", fSyncTimeLeft);
+
+ if (cmd == TransportCommandStop) {
+ fTransportState = JackTransportStopped;
+ JackLog("transport starting ==> stopped\n");
+ } 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);
+ }
+ break;
+
+ case JackTransportRolling:
+ if (cmd == TransportCommandStop) {
+ fTransportState = JackTransportStopped;
+ JackLog("transport rolling ==> stopped\n");
+ } else if (fPendingPos || CheckOneSynching(table)) {
+ fTransportState = JackTransportStarting;
+ MakeAllStarting(table);
+ SyncTimeout(frame_rate, buffer_size);
+ JackLog("transport rolling ==> starting....\n");
+ }
+ break;
+
+ default:
+ jack_error("Invalid JACK transport state: %d", fTransportState);
+ }
+
+ /* Update timebase, if needed. */
+ if (fTransportState == JackTransportRolling) {
+ jack_position_t* pending = WriteNextStateStart(1); // Update "pending" state
+ pending->frame += buffer_size;
+ WriteNextStateStop(1);
+ }
+
+ /* 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_position_t* pending = WriteNextStateStart(1);
+ TransportCopyPosition(request, pending);
+ WriteNextStateStop(1);
+ }
+}
+
+void JackTransportEngine::ReadCurrentPos(jack_position_t* pos)
+{
+ UInt16 next_index = GetCurrentIndex();
+ UInt16 cur_index;
+ do {
+ cur_index = next_index;
+ memcpy(pos, ReadCurrentState(), sizeof(jack_position_t));
+ next_index = GetCurrentIndex();
+ } while (cur_index != next_index); // Until a coherent state has been read
+}
+
+void JackTransportEngine::TransportCopyPosition(jack_position_t* from, jack_position_t* to)
+{
+ int tries = 0;
+ long timeout = 1000;
+
+ do {
+ /* throttle the busy wait if we don't get the answer
+ * very quickly. See comment above about this
+ * design.
+ */
+ if (tries > 10) {
+ JackSleep(20);
+ tries = 0;
+
+ /* debug code to avoid system hangs... */
+ if (--timeout == 0) {
+ jack_error("hung in loop copying position B");
+ abort();
+ }
+ }
+ *to = *from;
+ tries++;
+
+ } while (to->unique_1 != to->unique_2);
+}
+
+
+} // end of namespace
diff --git a/common/JackTransportEngine.h b/common/JackTransportEngine.h
new file mode 100644
index 00000000..0936b94f
--- /dev/null
+++ b/common/JackTransportEngine.h
@@ -0,0 +1,137 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackTransportEngine__
+#define __JackTransportEngine__
+
+#include "transport_types.h"
+#include "JackClientInterface.h"
+#include "JackConstants.h"
+#include "JackAtomicArrayState.h"
+
+namespace Jack
+{
+
+typedef enum {
+ TransportCommandNone = 0,
+ TransportCommandStart = 1,
+ TransportCommandStop = 2,
+} transport_command_t;
+
+/*!
+\brief The client transport structure.
+
+We have:
+
+ - a "current" position
+ - a "pending" position prepared by the server at each cycle
+ - a "request" position wanted by a client
+
+ At the beginning of a cycle the server needs to select a new current position. When a request and a pending position are available,
+ the resquest takes precedence on the pending one. The server atomically switches to the new position.
+ The current position can be read by clients.
+
+ We use a JackAtomicArrayState pattern that allows to manage several "next" states independantly.
+*/
+
+class JackTransportEngine : public JackAtomicArrayState<jack_position_t>
+{
+
+ private:
+
+ jack_transport_state_t fTransportState;
+ volatile transport_command_t fTransportCmd;
+ transport_command_t fPreviousCmd; /* previous transport_cmd */
+ jack_time_t fSyncTimeout;
+ int fSyncTimeLeft;
+ int fTimeBaseMaster;
+ bool fPendingPos;
+ volatile SInt32 fWriteCounter;
+
+ bool CheckOneSynching(JackClientInterface** table);
+ bool CheckAllRolling(JackClientInterface** table);
+ void MakeAllStarting(JackClientInterface** table);
+ void SyncTimeout(jack_nframes_t frame_rate, jack_nframes_t buffer_size);
+
+ public:
+
+ JackTransportEngine();
+
+ ~JackTransportEngine()
+ {}
+
+ void SetCommand(transport_command_t state)
+ {
+ fTransportCmd = state;
+ }
+
+ jack_transport_state_t GetState() const
+ {
+ return fTransportState;
+ }
+
+ int GetTimebaseMaster() const
+ {
+ return fTimeBaseMaster;
+ }
+
+ /*
+ \brief
+ */
+ int ResetTimebase(int refnum);
+
+ /*
+ \brief
+ */
+ int SetTimebase(int refnum, bool conditionnal);
+
+ /*
+ \brief
+ */
+ void CycleBegin(jack_nframes_t frame_rate, jack_time_t time);
+
+ /*
+ \brief
+ */
+ void CycleEnd(JackClientInterface** table, jack_nframes_t frame_rate, jack_nframes_t buffer_size);
+
+ /*
+ \brief
+ */
+ void SetSyncTimeout(jack_time_t timeout)
+ {
+ fSyncTimeout = timeout;
+ }
+
+ void ReadCurrentPos(jack_position_t* pos);
+
+ jack_unique_t GenerateUniqueID()
+ {
+ return (jack_unique_t)INC_ATOMIC(&fWriteCounter);
+ }
+
+ static void TransportCopyPosition(jack_position_t* from, jack_position_t* to);
+
+};
+
+
+} // end of namespace
+
+#endif
diff --git a/common/JackTypes.h b/common/JackTypes.h
new file mode 100644
index 00000000..96c4c41f
--- /dev/null
+++ b/common/JackTypes.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: JackTypes.h,v 1.2.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __JackTypes__
+#define __JackTypes__
+
+namespace Jack
+{
+
+typedef enum {
+ NotTriggered,
+ Triggered,
+ Running,
+ Finished,
+} jack_client_state_t;
+
+}
+
+#endif
diff --git a/common/Jackdmp.cpp b/common/Jackdmp.cpp
new file mode 100644
index 00000000..747e880a
--- /dev/null
+++ b/common/Jackdmp.cpp
@@ -0,0 +1,569 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <assert.h>
+#include <signal.h>
+#include <pwd.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <getopt.h>
+
+#include "JackServer.h"
+#include "JackConstants.h"
+#include "driver_interface.h"
+#include "driver_parse.h"
+#include "JackDriverLoader.h"
+#include "jslist.h"
+#include "JackError.h"
+#include "shm.h"
+#include "jack.h"
+
+using namespace Jack;
+
+static JackServer* fServer;
+static char* server_name = NULL;
+static int realtime_priority = 10;
+static int do_mlock = 1;
+static unsigned int port_max = 128;
+static int realtime = 0;
+static int loopback = 0;
+static int temporary = 0;
+static int client_timeout = 0; /* msecs; if zero, use period size. */
+static int do_unlock = 0;
+static JSList* drivers = NULL;
+
+static sigset_t signals;
+
+#define DEFAULT_TMP_DIR "/tmp"
+char* jack_tmpdir = DEFAULT_TMP_DIR;
+
+static void silent_jack_error_callback (const char *desc)
+{}
+
+static void copyright(FILE* file)
+{
+ fprintf (file, "jackdmp " VERSION "\n"
+ "Copyright 2001-2005 Paul Davis and others.\n"
+ "Copyright 2004-2006 Grame.\n"
+ "jackdmp comes with ABSOLUTELY NO WARRANTY\n"
+ "This is free software, and you are welcome to redistribute it\n"
+ "under certain conditions; see the file COPYING for details\n");
+}
+
+static void usage (FILE* file)
+{
+ copyright (file);
+ fprintf (file, "\n"
+ "usage: jackdmp [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
+ " [ --name OR -n server-name ]\n"
+ // " [ --no-mlock OR -m ]\n"
+ // " [ --unlock OR -u ]\n"
+ " [ --timeout OR -t client-timeout-in-msecs ]\n"
+ " [ --loopback OR -L loopback-port-number ]\n"
+ // " [ --port-max OR -p maximum-number-of-ports]\n"
+ " [ --verbose OR -v ]\n"
+ " [ --silent OR -s ]\n"
+ " [ --sync OR -S ]\n"
+ " [ --version OR -V ]\n"
+ " -d driver [ ... driver args ... ]\n"
+ " where driver can be `alsa', `coreaudio' or `dummy'\n"
+ " jackdmp -d driver --help\n"
+ " to display options for each driver\n\n");
+}
+
+
+static void DoNothingHandler(int sig)
+{
+ /* this is used by the child (active) process, but it never
+ gets called unless we are already shutting down after
+ another signal.
+ */
+ char buf[64];
+ snprintf(buf, sizeof(buf), "received signal %d during shutdown (ignored)\n", sig);
+ write(1, buf, strlen(buf));
+}
+
+static int JackStart(jack_driver_desc_t* driver_desc, JSList* driver_params, int sync, 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);
+ fServer = new JackServer(sync, time_out_ms, rt, priority, loopback, verbose);
+ int res = fServer->Open(driver_desc, driver_params);
+ return (res < 0) ? res : fServer->Start();
+}
+
+static int JackStop()
+{
+ fServer->Stop();
+ fServer->Close();
+ JackLog("Jackdmp: server close\n");
+ delete fServer;
+ JackLog("Jackdmp: delete server\n");
+ return 0;
+}
+
+static int JackDelete()
+{
+ delete fServer;
+ JackLog("Jackdmp: delete server\n");
+ return 0;
+}
+
+static void FilterSIGPIPE()
+{
+ sigset_t set;
+ sigemptyset(&set);
+ sigaddset(&set, SIGPIPE);
+ //sigprocmask(SIG_BLOCK, &set, 0);
+ pthread_sigmask(SIG_BLOCK, &set, 0);
+}
+
+static char* jack_default_server_name(void)
+{
+ char *server_name;
+ if ((server_name = getenv("JACK_DEFAULT_SERVER")) == NULL)
+ server_name = "default";
+ return server_name;
+}
+
+/* returns the name of the per-user subdirectory of jack_tmpdir */
+static char* jack_user_dir(void)
+{
+ static char user_dir[PATH_MAX] = "";
+
+ /* format the path name on the first call */
+ if (user_dir[0] == '\0') {
+ snprintf (user_dir, sizeof (user_dir), "%s/jack-%d",
+ jack_tmpdir, getuid ());
+ }
+
+ return user_dir;
+}
+
+/* returns the name of the per-server subdirectory of jack_user_dir() */
+
+static char* get_jack_server_dir(const char* toto)
+{
+ static char server_dir[PATH_MAX] = "";
+
+ // format the path name on the first call
+ if (server_dir[0] == '\0') {
+ snprintf (server_dir, sizeof (server_dir), "%s/%s",
+ jack_user_dir (), server_name);
+ }
+
+ return server_dir;
+}
+
+static void
+jack_cleanup_files (const char *server_name)
+{
+ DIR *dir;
+ struct dirent *dirent;
+ char *dir_name = get_jack_server_dir (server_name);
+
+ /* On termination, we remove all files that jackd creates so
+ * subsequent attempts to start jackd will not believe that an
+ * instance is already running. If the server crashes or is
+ * terminated with SIGKILL, this is not possible. So, cleanup
+ * is also attempted when jackd starts.
+ *
+ * There are several tricky issues. First, the previous JACK
+ * server may have run for a different user ID, so its files
+ * may be inaccessible. This is handled by using a separate
+ * JACK_TMP_DIR subdirectory for each user. Second, there may
+ * be other servers running with different names. Each gets
+ * its own subdirectory within the per-user directory. The
+ * current process has already registered as `server_name', so
+ * we know there is no other server actively using that name.
+ */
+
+ /* nothing to do if the server directory does not exist */
+ if ((dir = opendir (dir_name)) == NULL) {
+ return ;
+ }
+
+ /* unlink all the files in this directory, they are mine */
+ while ((dirent = readdir (dir)) != NULL) {
+
+ char fullpath[PATH_MAX];
+
+ if ((strcmp (dirent->d_name, ".") == 0)
+ || (strcmp (dirent->d_name, "..") == 0)) {
+ continue;
+ }
+
+ snprintf (fullpath, sizeof (fullpath), "%s/%s",
+ dir_name, dirent->d_name);
+
+ if (unlink (fullpath)) {
+ jack_error ("cannot unlink `%s' (%s)", fullpath,
+ strerror (errno));
+ }
+ }
+
+ closedir (dir);
+
+ /* now, delete the per-server subdirectory, itself */
+ if (rmdir (dir_name)) {
+ jack_error ("cannot remove `%s' (%s)", dir_name,
+ strerror (errno));
+ }
+
+ /* finally, delete the per-user subdirectory, if empty */
+ if (rmdir (jack_user_dir ())) {
+ if (errno != ENOTEMPTY) {
+ jack_error ("cannot remove `%s' (%s)",
+ jack_user_dir (), strerror (errno));
+ }
+ }
+}
+
+#ifdef FORK_SERVER
+
+int main(int argc, char* argv[])
+{
+ int sig;
+ sigset_t allsignals;
+ struct sigaction action;
+ int waiting;
+
+ jack_driver_desc_t* driver_desc;
+ const char *options = "-ad:P:uvshVRL:STFl:t:mn:p:";
+ struct option long_options[] = {
+ { "driver", 1, 0, 'd'
+ },
+ { "verbose", 0, 0, 'v' },
+ { "help", 0, 0, 'h' },
+ { "port-max", 1, 0, 'p' },
+ { "no-mlock", 0, 0, 'm' },
+ { "name", 0, 0, 'n' },
+ { "unlock", 0, 0, 'u' },
+ { "realtime", 0, 0, 'R' },
+ { "loopback", 0, 0, 'L' },
+ { "realtime-priority", 1, 0, 'P' },
+ { "timeout", 1, 0, 't' },
+ { "temporary", 0, 0, 'T' },
+ { "version", 0, 0, 'V' },
+ { "silent", 0, 0, 's' },
+ { "sync", 0, 0, 'S' },
+ { 0, 0, 0, 0 }
+ };
+ int opt = 0;
+ int option_index = 0;
+ int seen_driver = 0;
+ char *driver_name = NULL;
+ char **driver_args = NULL;
+ JSList* driver_params;
+ int driver_nargs = 1;
+ int show_version = 0;
+ int sync = 0;
+ int rc, i;
+
+ opterr = 0;
+ while (!seen_driver &&
+ (opt = getopt_long(argc, argv, options,
+ long_options, &option_index)) != EOF) {
+ switch (opt) {
+
+ case 'd':
+ seen_driver = 1;
+ driver_name = optarg;
+ break;
+
+ case 'v':
+ verbose = 1;
+ break;
+
+ case 's':
+ jack_set_error_function(silent_jack_error_callback);
+ break;
+
+ case 'S':
+ sync = 1;
+ break;
+
+ case 'n':
+ server_name = optarg;
+ break;
+
+ case 'm':
+ do_mlock = 0;
+ break;
+
+ case 'p':
+ port_max = (unsigned int)atol(optarg);
+ break;
+
+ case 'P':
+ realtime_priority = atoi(optarg);
+ break;
+
+ case 'R':
+ realtime = 1;
+ break;
+
+ case 'L':
+ loopback = atoi(optarg);
+ break;
+
+ case 'T':
+ temporary = 1;
+ break;
+
+ case 't':
+ client_timeout = atoi(optarg);
+ break;
+
+ case 'u':
+ do_unlock = 1;
+ break;
+
+ case 'V':
+ show_version = 1;
+ break;
+
+ default:
+ fprintf(stderr, "unknown option character %c\n",
+ optopt);
+ /*fallthru*/
+ case 'h':
+ usage(stdout);
+ return -1;
+ }
+ }
+
+ /*
+ if (show_version) {
+ printf ( "jackd version " VERSION
+ " tmpdir " DEFAULT_TMP_DIR
+ " protocol " PROTOCOL_VERSION
+ "\n");
+ return -1;
+ }
+ */
+
+ if (!seen_driver) {
+ usage (stderr);
+ exit (1);
+ }
+
+ drivers = jack_drivers_load (drivers);
+ if (!drivers) {
+ fprintf (stderr, "jackdmp: no drivers found; exiting\n");
+ exit (1);
+ }
+
+ driver_desc = jack_find_driver_descriptor (drivers, driver_name);
+ if (!driver_desc) {
+ fprintf (stderr, "jackdmp: unknown driver '%s'\n", driver_name);
+ exit (1);
+ }
+
+ if (optind < argc) {
+ driver_nargs = 1 + argc - optind;
+ } else {
+ driver_nargs = 1;
+ }
+
+ if (driver_nargs == 0) {
+ fprintf (stderr, "No driver specified ... hmm. JACK won't do"
+ " anything when run like this.\n");
+ return -1;
+ }
+
+ driver_args = (char **) malloc (sizeof (char *) * driver_nargs);
+ driver_args[0] = driver_name;
+
+ for (i = 1; i < driver_nargs; i++) {
+ driver_args[i] = argv[optind++];
+ }
+
+ if (jack_parse_driver_params (driver_desc, driver_nargs,
+ driver_args, &driver_params)) {
+ exit (0);
+ }
+
+ if (server_name == NULL)
+ server_name = jack_default_server_name ();
+
+ copyright (stdout);
+
+ rc = jack_register_server (server_name);
+ switch (rc) {
+ case EEXIST:
+ fprintf (stderr, "`%s' server already active\n", server_name);
+ exit (1);
+ case ENOSPC:
+ fprintf (stderr, "too many servers already active\n");
+ exit (2);
+ case ENOMEM:
+ fprintf (stderr, "no access to shm registry\n");
+ exit (3);
+ default:
+ if (verbose)
+ fprintf (stderr, "server `%s' registered\n",
+ server_name);
+ }
+
+ /* clean up shared memory and files from any previous
+ * instance of this server name */
+ jack_cleanup_shm();
+ jack_cleanup_files(server_name);
+
+ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+
+ sigemptyset(&signals);
+ sigaddset(&signals, SIGHUP);
+ sigaddset(&signals, SIGINT);
+ sigaddset(&signals, SIGQUIT);
+ sigaddset(&signals, SIGPIPE);
+ sigaddset(&signals, SIGTERM);
+ sigaddset(&signals, SIGUSR1);
+ sigaddset(&signals, SIGUSR2);
+
+ // all child threads will inherit this mask unless they
+ // explicitly reset it
+
+ FilterSIGPIPE();
+ pthread_sigmask(SIG_BLOCK, &signals, 0);
+
+ if (!realtime && client_timeout == 0)
+ client_timeout = 500; /* 0.5 sec; usable when non realtime. */
+
+ int res = JackStart(driver_desc, driver_params, sync, client_timeout, realtime, realtime_priority, loopback, verbose);
+ if (res < 0) {
+ jack_error("Cannot start server... exit");
+ JackDelete();
+ return 0;
+ }
+
+ /*
+ For testing purpose...
+ InternalMetro* client1 = new InternalMetro(1200, 0.4, 20, 80, "metro1");
+ InternalMetro* client2 = new InternalMetro(600, 0.4, 20, 150, "metro2");
+ InternalMetro* client3 = new InternalMetro(1000, 0.4, 20, 110, "metro3");
+ InternalMetro* client4 = new InternalMetro(1200, 0.4, 20, 80, "metro4");
+ InternalMetro* client5 = new InternalMetro(1500, 0.4, 20, 60, "metro5");
+ InternalMetro* client6 = new InternalMetro(1200, 0.4, 20, 84, "metro6");
+ InternalMetro* client7 = new InternalMetro(600, 0.4, 20, 160, "metro7");
+ InternalMetro* client8 = new InternalMetro(1000, 0.4, 20, 113, "metro8");
+ InternalMetro* client9 = new InternalMetro(1200, 0.4, 20, 84, "metro9");
+ InternalMetro* client10 = new InternalMetro(1500, 0.4, 20, 70, "metro10");
+ */
+
+ // install a do-nothing handler because otherwise pthreads
+ // behaviour is undefined when we enter sigwait.
+
+ sigfillset(&allsignals);
+ action.sa_handler = DoNothingHandler;
+ action.sa_mask = allsignals;
+ action.sa_flags = SA_RESTART | SA_RESETHAND;
+
+ for (i = 1; i < NSIG; i++) {
+ if (sigismember(&signals, i)) {
+ sigaction(i, &action, 0);
+ }
+ }
+
+ waiting = TRUE;
+
+ while (waiting) {
+ sigwait(&signals, &sig);
+
+ fprintf(stderr, "jack main caught signal %d\n", sig);
+
+ switch (sig) {
+ case SIGUSR1:
+ //jack_dump_configuration(engine, 1);
+ break;
+ case SIGUSR2:
+ // driver exit
+ waiting = FALSE;
+ break;
+ default:
+ waiting = FALSE;
+ break;
+ }
+ }
+
+ if (sig != SIGSEGV) {
+ // unblock signals so we can see them during shutdown.
+ // this will help prod developers not to lose sight of
+ // bugs that cause segfaults etc. during shutdown.
+ sigprocmask(SIG_UNBLOCK, &signals, 0);
+ }
+
+ JackStop();
+
+ jack_cleanup_shm();
+ jack_cleanup_files(server_name);
+ jack_unregister_server(server_name);
+
+ return 1;
+}
+
+#else
+
+int main(int argc, char* argv[])
+{
+ char c;
+ long sample_sate = lopt(argv, "-r", 44100);
+ long buffer_size = lopt(argv, "-p", 512);
+ long chan_in = lopt(argv, "-i", 2);
+ long chan_out = lopt(argv, "-o", 2);
+ long audiodevice = lopt(argv, "-I", -1);
+ long sync = lopt(argv, "-s", 0);
+ long timeout = lopt(argv, "-t", 100 * 1000);
+ const char* name = flag(argv, "-n", "Built-in Audio");
+ long rt = lopt(argv, "-R", 0);
+ verbose = lopt(argv, "-v", 0);
+
+ copyright(stdout);
+ usage(stdout);
+
+ FilterSIGPIPE();
+
+ printf("jackdmp: sample_sate = %ld buffer_size = %ld chan_in = %ld chan_out = %ld name = %s sync-mode = %ld\n",
+ sample_sate, buffer_size, chan_in, chan_out, name, sync);
+ assert(buffer_size <= BUFFER_SIZE_MAX);
+
+ int res = JackStart(sample_sate, buffer_size, chan_in, chan_out, name, audiodevice, sync, timeout, rt);
+ if (res < 0) {
+ jack_error("Cannot start server... exit\n");
+ JackDelete();
+ return 0;
+ }
+
+ while (((c = getchar()) != 'q')) {
+
+ switch (c) {
+
+ case 's':
+ fServer->PrintState();
+ break;
+ }
+ }
+
+ JackStop();
+ return 0;
+}
+
+#endif
diff --git a/common/cycles.h b/common/cycles.h
new file mode 100644
index 00000000..96dcbb4d
--- /dev/null
+++ b/common/cycles.h
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Code derived from various headers from the Linux kernel
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: cycles.h,v 1.4.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_cycles_h__
+#define __jack_cycles_h__
+
+/*
+ * Standard way to access the cycle counter on i586+ CPUs.
+ * Currently only used on SMP.
+ *
+ * If you really have a SMP machine with i486 chips or older,
+ * compile for that, and this will just always return zero.
+ * That's ok, it just means that the nicer scheduling heuristics
+ * won't work for you.
+ *
+ * We only use the low 32 bits, and we'd simply better make sure
+ * that we reschedule before that wraps. Scheduling at least every
+ * four billion cycles just basically sounds like a good idea,
+ * regardless of how fast the machine is.
+ */
+
+#ifdef __linux__
+
+#ifdef __PPC__
+
+/* PowerPC */
+
+#define CPU_FTR_601 0x00000100
+
+typedef unsigned long cycles_t;
+
+/* For the "cycle" counter we use the timebase lower half. */
+
+extern cycles_t cacheflush_time;
+
+static inline cycles_t get_cycles(void)
+{
+ cycles_t ret = 0;
+
+ __asm__ __volatile__(
+ "98: mftb %0\n"
+ "99:\n"
+ ".section __ftr_fixup,\"a\"\n"
+ " .long %1\n"
+ " .long 0\n"
+ " .long 98b\n"
+ " .long 99b\n"
+ ".previous"
+ : "=r" (ret) : "i" (CPU_FTR_601));
+ return ret;
+}
+
+#endif
+
+#ifdef __i386__
+
+typedef unsigned long long cycles_t;
+
+extern cycles_t cacheflush_time;
+
+#define rdtscll(val) \
+ __asm__ __volatile__("rdtsc" : "=A" (val))
+
+static inline cycles_t get_cycles (void)
+{
+ unsigned long long ret;
+
+ rdtscll(ret);
+ return ret;
+}
+
+#endif
+
+#endif
+
+#endif /* __jack_cycles_h__ */
diff --git a/common/driver_interface.h b/common/driver_interface.h
new file mode 100644
index 00000000..13a642d6
--- /dev/null
+++ b/common/driver_interface.h
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 2003 Bob Ham <rah@bash.sh>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __jack_driver_interface_h__
+#define __jack_driver_interface_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <limits.h>
+
+#ifdef WIN32
+#include "types.h"
+#define PATH_MAX 1024
+#else
+#include <inttypes.h>
+#endif
+
+
+#define JACK_DRIVER_NAME_MAX 15
+#define JACK_DRIVER_PARAM_NAME_MAX 15
+#define JACK_DRIVER_PARAM_STRING_MAX 63
+
+ /** Driver parameter types */
+ typedef enum
+ {
+ JackDriverParamInt = 1,
+ JackDriverParamUInt,
+ JackDriverParamChar,
+ JackDriverParamString,
+ JackDriverParamBool
+ } jack_driver_param_type_t;
+
+ /** Driver parameter value */
+ typedef union
+ {
+ uint32_t ui;
+ int32_t i;
+ char c;
+ char str[JACK_DRIVER_PARAM_STRING_MAX + 1];
+ } jack_driver_param_value_t;
+
+
+ /** A driver parameter descriptor */
+ typedef struct {
+ char name[JACK_DRIVER_NAME_MAX + 1]; /**< The parameter's name */
+ char character; /**< The parameter's character (for getopt, etc) */
+ jack_driver_param_type_t type; /**< The parameter's type */
+ jack_driver_param_value_t value; /**< The parameter's (default) value */
+ char short_desc[64]; /**< A short (~30 chars) description for the user */
+ char long_desc[1024]; /**< A longer description for the user */
+ }
+ jack_driver_param_desc_t;
+
+ /** A driver parameter */
+ typedef struct {
+ char character;
+ jack_driver_param_value_t value;
+ }
+ jack_driver_param_t;
+
+
+ /** A struct for describing a jack driver */
+ typedef struct {
+ char name[JACK_DRIVER_NAME_MAX + 1]; /**< The driver's canonical name */
+ char file[PATH_MAX + 1]; /**< The filename of the driver's shared object file */
+ uint32_t nparams; /**< The number of parameters the driver has */
+ jack_driver_param_desc_t * params; /**< An array of parameter descriptors */
+ }
+ jack_driver_desc_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_driver_interface_h__ */
+
+
diff --git a/common/driver_parse.h b/common/driver_parse.h
new file mode 100644
index 00000000..67a20109
--- /dev/null
+++ b/common/driver_parse.h
@@ -0,0 +1,33 @@
+/*
+Copyright (C) 2003 Bob Ham <rah@bash.sh
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __jack_driver_parse_h__
+#define __jack_driver_parse_h__
+
+#include "jslist.h"
+#include "driver_interface.h"
+#include "JackExports.h"
+
+EXPORT int
+jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr);
+
+
+#endif /* __jack_driver_parse_h__ */
+
+
diff --git a/common/intclient.h b/common/intclient.h
new file mode 100644
index 00000000..8e87f6d8
--- /dev/null
+++ b/common/intclient.h
@@ -0,0 +1,132 @@
+/*
+* Copyright (C) 2004 Jack O'Quin
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation; either version 2.1 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*
+* $Id: intclient.h,v 1.2.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_intclient_h__
+#define __jack_intclient_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ //#include <jack/types.h>
+#include "types.h"
+
+ /**
+ * Get an internal client's name. This is useful when @ref
+ * JackUseExactName was not specified on jack_internal_client_load()
+ * and @ref JackNameNotUnique status was returned. In that case, the
+ * actual name will differ from the @a client_name requested.
+ *
+ * @param client requesting JACK client's handle.
+ *
+ * @param intclient handle returned from jack_internal_client_load()
+ * or jack_internal_client_handle().
+ *
+ * @return NULL if unsuccessful, otherwise pointer to the internal
+ * client name obtained from the heap via malloc(). The caller should
+ * free() this storage when no longer needed.
+ */
+ char *jack_get_internal_client_name (jack_client_t *client,
+ jack_intclient_t intclient);
+
+ /**
+ * Return the @ref jack_intclient_t handle for an internal client
+ * running in the JACK server.
+ *
+ * @param client requesting JACK client's handle.
+ *
+ * @param client_name for the internal client of no more than
+ * jack_client_name_size() characters. The name scope is local to the
+ * current server.
+ *
+ * @param status (if non-NULL) an address for JACK to return
+ * information from this operation. This status word is formed by
+ * OR-ing together the relevant @ref JackStatus bits.
+ *
+ * @return Opaque internal client handle if successful. If 0, the
+ * internal client was not found, and @a *status includes the @ref
+ * JackNoSuchClient and @ref JackFailure bits.
+ */
+ jack_intclient_t jack_internal_client_handle (jack_client_t *client,
+ const char *client_name,
+ jack_status_t *status);
+
+ /**
+ * Load an internal client into the JACK server.
+ *
+ * Internal clients run inside the JACK server process. They can use
+ * most of the same functions as external clients. Each internal
+ * client is built as a shared object module, which must declare
+ * jack_initialize() and jack_finish() entry points called at load and
+ * unload times. See @ref inprocess.c for an example.
+ *
+ * @param client loading JACK client's handle.
+ *
+ * @param client_name of at most jack_client_name_size() characters
+ * for the internal client to load. The name scope is local to the
+ * current server.
+ *
+ * @param options formed by OR-ing together @ref JackOptions bits.
+ * Only the @ref JackLoadOptions bits are valid.
+ *
+ * @param status (if non-NULL) an address for JACK to return
+ * information from the load operation. This status word is formed by
+ * OR-ing together the relevant @ref JackStatus bits.
+ *
+ * <b>Optional parameters:</b> depending on corresponding [@a options
+ * bits] additional parameters may follow @a status (in this order).
+ *
+ * @arg [@ref JackLoadName] <em>(char *) load_name</em> is the shared
+ * object file from which to load the new internal client (otherwise
+ * use the @a client_name).
+ *
+ * @arg [@ref JackLoadInit] <em>(char *) load_init</em> an arbitary
+ * string passed to the internal client's jack_initialize() routine
+ * (otherwise NULL), of no more than @ref JACK_LOAD_INIT_LIMIT bytes.
+ *
+ * @return Opaque internal client handle if successful. If this is 0,
+ * the load operation failed, the internal client was not loaded, and
+ * @a *status includes the @ref JackFailure bit.
+ */
+ jack_intclient_t jack_internal_client_load (jack_client_t *client,
+ const char *client_name,
+ jack_options_t options,
+ jack_status_t *status, ...);
+ /**
+ * Unload an internal client from a JACK server. This calls the
+ * intclient's jack_finish() entry point then removes it. See @ref
+ * inprocess.c for an example.
+ *
+ * @param client unloading JACK client's handle.
+ *
+ * @param intclient handle returned from jack_internal_client_load() or
+ * jack_internal_client_handle().
+ *
+ * @return 0 if successful, otherwise @ref JackStatus bits.
+ */
+ jack_status_t jack_internal_client_unload (jack_client_t *client,
+ jack_intclient_t intclient);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_intclient_h__ */
diff --git a/common/jack.h b/common/jack.h
new file mode 100644
index 00000000..1fb97c8e
--- /dev/null
+++ b/common/jack.h
@@ -0,0 +1,805 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004 Jack O'Quin
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: jack.h,v 1.5.2.6 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_h__
+#define __jack_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifdef WIN32
+ #include <windows.h>
+ typedef HANDLE pthread_t;
+#else
+ #include <pthread.h>
+#endif
+
+ /*
+ #include <jack/types.h>
+ #include <jack/transport.h>
+ */
+
+#include "types.h"
+#include "transport.h"
+
+ /**
+ * Note: More documentation can be found in jack/types.h.
+ */
+
+ /**
+ * Open an external client session with a JACK server. This interface
+ * is more complex but more powerful than jack_client_new(). With it,
+ * clients may choose which of several servers to connect, and control
+ * whether and how to start the server automatically, if it was not
+ * already running. There is also an option for JACK to generate a
+ * unique client name, when necessary.
+ *
+ * @param client_name of at most jack_client_name_size() characters.
+ * The name scope is local to each server. Unless forbidden by the
+ * @ref JackUseExactName option, the server will modify this name to
+ * create a unique variant, if needed.
+ *
+ * @param options formed by OR-ing together @ref JackOptions bits.
+ * Only the @ref JackOpenOptions bits are allowed.
+ *
+ * @param status (if non-NULL) an address for JACK to return
+ * information from the open operation. This status word is formed by
+ * OR-ing together the relevant @ref JackStatus bits.
+ *
+ *
+ * <b>Optional parameters:</b> depending on corresponding [@a options
+ * bits] additional parameters may follow @a status (in this order).
+ *
+ * @arg [@ref JackServerName] <em>(char *) server_name</em> selects
+ * from among several possible concurrent server instances. Server
+ * names are unique to each user. If unspecified, use "default"
+ * unless \$JACK_DEFAULT_SERVER is defined in the process environment.
+ *
+ * @return Opaque client handle if successful. If this is NULL, the
+ * open operation failed, @a *status includes @ref JackFailure and the
+ * caller is not a JACK client.
+ */
+ jack_client_t * jack_client_open (const char *client_name,
+ jack_options_t options,
+ jack_status_t *status, ...);
+
+ /**
+ * Attempt to become an external client of the Jack server.
+ *
+ * JACK is evolving a mechanism for automatically starting the server
+ * when needed. As a transition, jack_client_new() only does this
+ * when \$JACK_START_SERVER is defined in the environment of the
+ * calling process. In the future this will become normal behavior.
+ * For full control of this feature, use jack_client_open(), instead.
+ * In either case, defining \$JACK_NO_START_SERVER disables this
+ * feature.
+ *
+ * @param client_name of at most jack_client_name_size() characters.
+ * If this name is already in use, the request fails.
+ *
+ * @return Opaque client handle if successful, otherwise NULL.
+ *
+ * @note Failure generally means that the JACK server is not running.
+ * If there was some other problem, it will be reported via the @ref
+ * jack_error_callback mechanism. Use jack_client_open() and check
+ * the @a status parameter for more detailed information.
+ */
+ jack_client_t * jack_client_new (const char *client_name);
+
+ /**
+ * Disconnects an external client from a JACK server.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_client_close (jack_client_t *client);
+
+ /**
+ * @return the maximum number of characters in a JACK client name
+ * including the final NULL character. This value is a constant.
+ */
+ int jack_client_name_size (void);
+
+ /**
+ * @return pointer to actual client name. This is useful when @ref
+ * JackUseExactName is not specified on open and @ref
+ * JackNameNotUnique status was returned. In that case, the actual
+ * name will differ from the @a client_name requested.
+ */
+ char * jack_get_client_name (jack_client_t *client);
+
+ /**
+ * Load an internal client into the Jack server.
+ *
+ * Internal clients run inside the JACK server process. They can use
+ * most of the same functions as external clients. Each internal
+ * client must declare jack_initialize() and jack_finish() entry
+ * points, called at load and unload times. See inprocess.c for an
+ * example of how to write an internal client.
+ *
+ * @deprecated Please use jack_internal_client_load().
+ *
+ * @param client_name of at most jack_client_name_size() characters.
+ *
+ * @param load_name of a shared object file containing the code for
+ * the new client.
+ *
+ * @param load_init an arbitary string passed to the jack_initialize()
+ * routine of the new client (may be NULL).
+ *
+ * @return 0 if successful.
+ */
+ int jack_internal_client_new (const char *client_name,
+ const char *load_name,
+ const char *load_init);
+
+ jack_client_t* my_jack_internal_client_new(const char* client_name);
+
+ /**
+ * Remove an internal client from a JACK server.
+ *
+ * @deprecated Please use jack_internal_client_load().
+ */
+ void jack_internal_client_close (const char *client_name);
+
+ void my_jack_internal_client_close (jack_client_t* client);
+
+ /**
+ * @param client pointer to JACK client structure.
+ *
+ * Check if the JACK subsystem is running with -R (--realtime).
+ *
+ * @return 1 if JACK is running realtime, 0 otherwise
+ */
+ int jack_is_realtime (jack_client_t *client);
+
+ /**
+ * @param client pointer to JACK client structure.
+ * @param function The jack_shutdown function pointer.
+ * @param arg The arguments for the jack_shutdown function.
+ *
+ * Register a function (and argument) to be called if and when the
+ * JACK server shuts down the client thread. The function must
+ * be written as if it were an asynchonrous POSIX signal
+ * handler --- use only async-safe functions, and remember that it
+ * is executed from another thread. A typical function might
+ * set a flag or write to a pipe so that the rest of the
+ * application knows that the JACK client thread has shut
+ * down.
+ *
+ * NOTE: clients do not need to call this. It exists only
+ * to help more complex clients understand what is going
+ * on. It should be called before jack_client_activate().
+ */
+ void jack_on_shutdown (jack_client_t *client,
+ void (*function)(void *arg), void *arg);
+
+ /**
+ * Tell the Jack server to call @a process_callback whenever there is
+ * work be done, passing @a arg as the second argument.
+ *
+ * The code in the supplied function must be suitable for real-time
+ * execution. That means that it cannot call functions that might
+ * block for a long time.  This includes malloc, free, printf,
+ * pthread_mutex_lock, sleep, wait, poll, select, pthread_join,
+ * pthread_cond_wait, etc, etc.  See
+ * http://jackit.sourceforge.net/docs/design/design.html#SECTION00411000000000000000
+ * for more information.
+ *
+ * @return 0 on success, otherwise a non-zero error code, causing JACK
+ * to remove that client from the process() graph.
+ */
+ int jack_set_process_callback (jack_client_t *client,
+ JackProcessCallback process_callback,
+ void *arg);
+
+ /**
+ * Tell JACK to call @a thread_init_callback once just after
+ * the creation of the thread in which all other callbacks
+ * will be handled.
+ *
+ * The code in the supplied function does not need to be
+ * suitable for real-time execution.
+ *
+ * @return 0 on success, otherwise a non-zero error code, causing JACK
+ * to remove that client from the process() graph.
+ */
+ int jack_set_thread_init_callback (jack_client_t *client,
+ JackThreadInitCallback thread_init_callback,
+ void *arg);
+
+ /**
+ * Tell the Jack server to call @a freewheel_callback
+ * whenever we enter or leave "freewheel" mode, passing @a
+ * arg as the second argument. The first argument to the
+ * callback will be non-zero if JACK is entering freewheel
+ * mode, and zero otherwise.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+ int jack_set_freewheel_callback (jack_client_t *client,
+ JackFreewheelCallback freewheel_callback,
+ void *arg);
+
+ /**
+ * Start/Stop JACK's "freewheel" mode.
+ *
+ * When in "freewheel" mode, JACK no longer waits for
+ * any external event to begin the start of the next process
+ * cycle.
+ *
+ * As a result, freewheel mode causes "faster than realtime"
+ * execution of a JACK graph. If possessed, real-time
+ * scheduling is dropped when entering freewheel mode, and
+ * if appropriate it is reacquired when stopping.
+ *
+ * IMPORTANT: on systems using capabilities to provide real-time
+ * scheduling (i.e. Linux kernel 2.4), if onoff is zero, this function
+ * must be called from the thread that originally called jack_activate().
+ * This restriction does not apply to other systems (e.g. Linux kernel 2.6
+ * or OS X).
+ *
+ * @param client pointer to JACK client structure
+ * @param onoff if non-zero, freewheel mode starts. Otherwise
+ * freewheel mode ends.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+ int jack_set_freewheel(jack_client_t* client, int onoff);
+
+ /**
+ * Change the buffer size passed to the @a process_callback.
+ *
+ * This operation stops the JACK engine process cycle, then calls all
+ * registered @a bufsize_callback functions before restarting the
+ * process cycle. This will cause a gap in the audio flow, so it
+ * should only be done at appropriate stopping points.
+ *
+ * @see jack_set_buffer_size_callback()
+ *
+ * @param client pointer to JACK client structure.
+ * @param nframes new buffer size. Must be a power of two.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes);
+
+ /**
+ * Tell JACK to call @a bufsize_callback whenever the size of the the
+ * buffer that will be passed to the @a process_callback is about to
+ * change. Clients that depend on knowing the buffer size must supply
+ * a @a bufsize_callback before activating themselves.
+ *
+ * @param client pointer to JACK client structure.
+ * @param bufsize_callback function to call when the buffer size changes.
+ * @param arg argument for @a bufsize_callback.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_buffer_size_callback (jack_client_t *client,
+ JackBufferSizeCallback bufsize_callback,
+ void *arg);
+
+ /**
+ * Tell the Jack server to call @a srate_callback whenever the system
+ * sample rate changes.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_sample_rate_callback (jack_client_t *client,
+ JackSampleRateCallback srate_callback,
+ void *arg);
+
+ /**
+ * Tell the JACK server to call @a registration_callback whenever a
+ * port is registered or unregistered, passing @a arg as a parameter.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_port_registration_callback (jack_client_t *,
+ JackPortRegistrationCallback
+ registration_callback, void *arg);
+
+ /**
+ * Tell the JACK server to call @a graph_callback whenever the
+ * processing graph is reordered, passing @a arg as a parameter.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_graph_order_callback (jack_client_t *,
+ JackGraphOrderCallback graph_callback,
+ void *);
+
+ /**
+ * Tell the JACK server to call @a xrun_callback whenever there is a
+ * xrun, passing @a arg as a parameter.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_set_xrun_callback (jack_client_t *,
+ JackXRunCallback xrun_callback, void *arg);
+
+ /**
+ * Tell the Jack server that the program is ready to start processing
+ * audio.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_activate (jack_client_t *client);
+
+ /**
+ * Tell the Jack server to remove this @a client from the process
+ * graph. Also, disconnect all ports belonging to it, since inactive
+ * clients have no port connections.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_deactivate (jack_client_t *client);
+
+ /**
+ * Create a new port for the client. This is an object used for moving
+ * data of any type in or out of the client. Ports may be connected
+ * in various ways.
+ *
+ * Each port has a short name. The port's full name contains the name
+ * of the client concatenated with a colon (:) followed by its short
+ * name. The jack_port_name_size() is the maximum length of this full
+ * name. Exceeding that will cause the port registration to fail and
+ * return NULL.
+ *
+ * All ports have a type, which may be any non-NULL and non-zero
+ * length string, passed as an argument. Some port types are built
+ * into the JACK API, currently only JACK_DEFAULT_AUDIO_TYPE.
+ *
+ * @param client pointer to JACK client structure.
+ * @param port_name non-empty short name for the new port (not
+ * including the leading @a "client_name:").
+ * @param port_type port type name. If longer than
+ * jack_port_type_size(), only that many characters are significant.
+ * @param flags @ref JackPortFlags bit mask.
+ * @param buffer_size must be non-zero if this is not a built-in @a
+ * port_type. Otherwise, it is ignored.
+ *
+ * @return jack_port_t pointer on success, otherwise NULL.
+ */
+ jack_port_t * jack_port_register (jack_client_t *client,
+ const char *port_name,
+ const char *port_type,
+ unsigned long flags,
+ unsigned long buffer_size);
+
+ /**
+ * Remove the port from the client, disconnecting any existing
+ * connections.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_unregister (jack_client_t *, jack_port_t *);
+
+ /**
+ * This returns a pointer to the memory area associated with the
+ * specified port. For an output port, it will be a memory area
+ * that can be written to; for an input port, it will be an area
+ * containing the data from the port's connection(s), or
+ * zero-filled. if there are multiple inbound connections, the data
+ * will be mixed appropriately.
+ *
+ * FOR OUTPUT PORTS ONLY
+ * ---------------------
+ * You may cache the value returned, but only between calls to
+ * your "blocksize" callback. For this reason alone, you should
+ * either never cache the return value or ensure you have
+ * a "blocksize" callback and be sure to invalidate the cached
+ * address from there.
+ */
+ void * jack_port_get_buffer (jack_port_t *, jack_nframes_t);
+
+ /**
+ * @return the full name of the jack_port_t (including the @a
+ * "client_name:" prefix).
+ *
+ * @see jack_port_name_size().
+ */
+ const char * jack_port_name (const jack_port_t *port);
+
+ /**
+ * @return the short name of the jack_port_t (not including the @a
+ * "client_name:" prefix).
+ *
+ * @see jack_port_name_size().
+ */
+ const char * jack_port_short_name (const jack_port_t *port);
+
+ /**
+ * @return the @ref JackPortFlags of the jack_port_t.
+ */
+ int jack_port_flags (const jack_port_t *port);
+
+ /**
+ * @return the @a port type, at most jack_port_type_size() characters
+ * including a final NULL.
+ */
+ const char * jack_port_type (const jack_port_t *port);
+
+ /**
+ * @return TRUE if the jack_port_t belongs to the jack_client_t.
+ */
+ int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
+
+ /**
+ * @return number of connections to or from @a port.
+ *
+ * @pre The calling client must own @a port.
+ */
+ int jack_port_connected (const jack_port_t *port);
+
+ /**
+ * @return TRUE if the locally-owned @a port is @b directly connected
+ * to the @a port_name.
+ *
+ * @see jack_port_name_size()
+ */
+ int jack_port_connected_to (const jack_port_t *port,
+ const char *port_name);
+
+ /**
+ * @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
+ * returned value.
+ *
+ * @param port locally owned jack_port_t pointer.
+ *
+ * @see jack_port_name_size(), jack_port_get_all_connections()
+ */
+ const char ** jack_port_get_connections (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
+ * returned value.
+ *
+ * This differs from jack_port_get_connections() in two important
+ * respects:
+ *
+ * 1) You may not call this function from code that is
+ * executed in response to a JACK event. For example,
+ * you cannot use it in a GraphReordered handler.
+ *
+ * 2) You need not be the owner of the port to get information
+ * about its connections.
+ *
+ * @see jack_port_name_size()
+ */
+ const char ** jack_port_get_all_connections (const jack_client_t *client,
+ const jack_port_t *port);
+
+ /**
+ * A client may call this on a pair of its own ports to
+ * semi-permanently wire them together. This means that
+ * a client that wants to direct-wire an input port to
+ * an output port can call this and then no longer
+ * have to worry about moving data between them. Any data
+ * arriving at the input port will appear automatically
+ * at the output port.
+ *
+ * The 'destination' port must be an output port. The 'source'
+ * port must be an input port. Both ports must belong to
+ * the same client. You cannot use this to tie ports between
+ * clients. That is what a connection is for.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_tie (jack_port_t *src, jack_port_t *dst);
+
+ /**
+ * This undoes the effect of jack_port_tie(). The port
+ * should be same as the 'destination' port passed to
+ * jack_port_tie().
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_untie (jack_port_t *port);
+
+ /**
+ * A client may call this function to prevent other objects
+ * from changing the connection status of a port. The port
+ * must be owned by the calling client.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_lock (jack_client_t *, jack_port_t *);
+
+ /**
+ * This allows other objects to change the connection status of a port.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_unlock (jack_client_t *, jack_port_t *);
+
+ /**
+ * @return the time (in frames) between data being available or
+ * delivered at/to a port, and the time at which it arrived at or is
+ * delivered to the "other side" of the port. E.g. for a physical
+ * audio output port, this is the time between writing to the port and
+ * when the signal will leave the connector. For a physical audio
+ * input port, this is the time between the sound arriving at the
+ * connector and the corresponding frames being readable from the
+ * port.
+ */
+ jack_nframes_t jack_port_get_latency (jack_port_t *port);
+
+ /**
+ * The maximum of the sum of the latencies in every
+ * connection path that can be drawn between the port and other
+ * ports with the @ref JackPortIsTerminal flag set.
+ */
+ jack_nframes_t jack_port_get_total_latency (jack_client_t *,
+ jack_port_t *port);
+
+ /**
+ * The port latency is zero by default. Clients that control
+ * physical hardware with non-zero latency should call this
+ * to set the latency to its correct value. Note that the value
+ * should include any systemic latency present "outside" the
+ * physical hardware controlled by the client. For example,
+ * for a client controlling a digital audio interface connected
+ * to an external digital converter, the latency setting should
+ * include both buffering by the audio interface *and* the converter.
+ */
+ void jack_port_set_latency (jack_port_t *, jack_nframes_t);
+
+ /**
+ *
+ */
+ int jack_recompute_total_latencies (jack_client_t*);
+
+ /**
+ * Modify a port's short name. May be called at any time. If the
+ * resulting full name (including the @a "client_name:" prefix) is
+ * longer than jack_port_name_size(), it will be truncated.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+ int jack_port_set_name (jack_port_t *port, const char *port_name);
+
+ /**
+ * If @ref JackPortCanMonitor is set for this @a port, turn input
+ * monitoring on or off. Otherwise, do nothing.
+ */
+ int jack_port_request_monitor (jack_port_t *port, int onoff);
+
+ /**
+ * If @ref JackPortCanMonitor is set for this @a port_name, turn input
+ * monitoring on or off. Otherwise, do nothing.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ *
+ * @see jack_port_name_size()
+ */
+ int jack_port_request_monitor_by_name (jack_client_t *client,
+ const char *port_name, int onoff);
+
+ /**
+ * If @ref JackPortCanMonitor is set for a port, this function turns
+ * on input monitoring if it was off, and turns it off if only one
+ * request has been made to turn it on. Otherwise it does nothing.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_port_ensure_monitor (jack_port_t *port, int onoff);
+
+ /**
+ * @return TRUE if input monitoring has been requested for @a port.
+ */
+ int jack_port_monitoring_input (jack_port_t *port);
+
+ /**
+ * Establish a connection between two ports.
+ *
+ * When a connection exists, data written to the source port will
+ * be available to be read at the destination port.
+ *
+ * @pre The port types must be identical.
+ *
+ * @pre The @ref JackPortFlags of the @a source_port must include @ref
+ * JackPortIsOutput.
+ *
+ * @pre The @ref JackPortFlags of the @a destination_port must include
+ * @ref JackPortIsInput.
+ *
+ * @return 0 on success, EEXIST if the connection is already made,
+ * otherwise a non-zero error code
+ */
+ int jack_connect (jack_client_t *,
+ const char *source_port,
+ const char *destination_port);
+
+ /**
+ * Remove a connection between two ports.
+ *
+ * @pre The port types must be identical.
+ *
+ * @pre The @ref JackPortFlags of the @a source_port must include @ref
+ * JackPortIsOutput.
+ *
+ * @pre The @ref JackPortFlags of the @a destination_port must include
+ * @ref JackPortIsInput.
+ *
+ * @return 0 on success, otherwise a non-zero error code
+ */
+ int jack_disconnect (jack_client_t *,
+ const char *source_port,
+ const char *destination_port);
+
+ /**
+ * Perform the same function as jack_disconnect() using port handles
+ * rather than names. This avoids the name lookup inherent in the
+ * name-based version.
+ *
+ * Clients connecting their own ports are likely to use this function,
+ * while generic connection clients (e.g. patchbays) would use
+ * jack_disconnect().
+ */
+ int jack_port_disconnect (jack_client_t *, jack_port_t *);
+
+ /**
+ * @return the maximum number of characters in a full JACK port name
+ * including the final NULL character. This value is a constant.
+ *
+ * A port's full name contains the owning client name concatenated
+ * with a colon (:) followed by its short name and a NULL
+ * character.
+ */
+ int jack_port_name_size(void);
+
+ /**
+ * @return the maximum number of characters in a JACK port type name
+ * including the final NULL character. This value is a constant.
+ */
+ int jack_port_type_size(void);
+
+ /**
+ * @return the sample rate of the jack system, as set by the user when
+ * jackd was started.
+ */
+ jack_nframes_t jack_get_sample_rate (jack_client_t *);
+
+ /**
+ * @return the current maximum size that will ever be passed to the @a
+ * process_callback. It should only be used *before* the client has
+ * been activated. This size may change, clients that depend on it
+ * must register a @a bufsize_callback so they will be notified if it
+ * does.
+ *
+ * @see jack_set_buffer_size_callback()
+ */
+ jack_nframes_t jack_get_buffer_size (jack_client_t *);
+
+ /**
+ * @param port_name_pattern A regular expression used to select
+ * ports by name. If NULL or of zero length, no selection based
+ * on name will be carried out.
+ * @param type_name_pattern A regular expression used to select
+ * ports by type. If NULL or of zero length, no selection based
+ * on type will be carried out.
+ * @param flags A value used to select ports by their flags.
+ * 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
+ * non-NULL returned value.
+ *
+ * @see jack_port_name_size(), jack_port_type_size()
+ */
+ const char ** jack_get_ports (jack_client_t *,
+ const char *port_name_pattern,
+ const char *type_name_pattern,
+ unsigned long flags);
+
+ /**
+ * @return address of the jack_port_t named @a port_name.
+ *
+ * @see jack_port_name_size()
+ */
+ jack_port_t * jack_port_by_name (jack_client_t *, const char *port_name);
+
+ /**
+ * @return address of the jack_port_t of a @a port_id.
+ */
+ jack_port_t * jack_port_by_id (jack_client_t *client,
+ jack_port_id_t port_id);
+
+ /**
+ * Old-style interface to become the timebase for the entire JACK
+ * subsystem.
+ *
+ * @deprecated This function still exists for compatibility with the
+ * earlier transport interface, but it does nothing. Instead, see
+ * transport.h and use jack_set_timebase_callback().
+ *
+ * @return ENOSYS, function not implemented.
+ */
+ int jack_engine_takeover_timebase (jack_client_t *);
+
+ /**
+ * @return the time in frames that has passed since the JACK server
+ * began the current process cycle.
+ */
+ jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
+
+ /**
+ * @return an estimate of the current time in frames. This is a
+ * running counter, no significance should be attached to its value,
+ * but it can be compared to a previously returned value.
+ */
+ jack_nframes_t jack_frame_time (const jack_client_t *);
+
+ /**
+ * @return the frame_time after the last processing of the graph
+ * this is only to be used from the process callback.
+ *
+ * This function can be used to put timestamps generated by
+ * jack_frame_time() in correlation to the current process cycle.
+ */
+ jack_nframes_t jack_last_frame_time (const jack_client_t *client);
+
+ /**
+ * @return the current CPU load estimated by JACK. This is a running
+ * average of the time it takes to execute a full process cycle for
+ * all clients as a percentage of the real time available per cycle
+ * determined by the buffer size and sample rate.
+ */
+ float jack_cpu_load (jack_client_t *client);
+
+ /**
+ * @return the pthread ID of the thread running the JACK client side
+ * code.
+ */
+ pthread_t jack_client_thread_id (jack_client_t *);
+
+ /**
+ * Display JACK error message.
+ *
+ * Set via jack_set_error_function(), otherwise a JACK-provided
+ * default will print @a msg (plus a newline) to stderr.
+ *
+ * @param msg error message text (no newline at end).
+ */
+ extern void (*jack_error_callback)(const char *msg);
+
+ /**
+ * Set the @ref jack_error_callback for error message display.
+ *
+ * The JACK library provides two built-in callbacks for this purpose:
+ * default_jack_error_callback() and silent_jack_error_callback().
+ */
+ void jack_set_error_function (void (*func)(const char *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_h__ */
diff --git a/common/jslist.h b/common/jslist.h
new file mode 100644
index 00000000..45e8c266
--- /dev/null
+++ b/common/jslist.h
@@ -0,0 +1,287 @@
+/*
+ Based on gslist.c from glib-1.2.9 (LGPL).
+
+ Adaption to JACK, Copyright (C) 2002 Kai Vehmanen.
+ - replaced use of gtypes with normal ANSI C types
+ - glib's memory allocation routines replaced with
+ malloc/free calls
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __jack_jslist_h__
+#define __jack_jslist_h__
+
+#include <stdlib.h>
+
+#ifdef WIN32
+#define __inline__ inline
+#endif
+
+typedef struct _JSList JSList;
+
+typedef int (*JCompareFunc) (void* a, void* b);
+struct _JSList
+{
+ void *data;
+ JSList *next;
+};
+
+static __inline__
+JSList*
+jack_slist_alloc (void)
+{
+ JSList *new_list;
+
+ new_list = (JSList*)malloc(sizeof(JSList));
+ new_list->data = NULL;
+ new_list->next = NULL;
+
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_prepend (JSList* list, void* data)
+{
+ JSList *new_list;
+
+ new_list = (JSList*)malloc(sizeof(JSList));
+ new_list->data = data;
+ new_list->next = list;
+
+ return new_list;
+}
+
+#define jack_slist_next(slist) ((slist) ? (((JSList *)(slist))->next) : NULL)
+static __inline__
+JSList*
+jack_slist_last (JSList *list)
+{
+ if (list) {
+ while (list->next)
+ list = list->next;
+ }
+
+ return list;
+}
+
+static __inline__
+JSList*
+jack_slist_remove_link (JSList *list,
+ JSList *link)
+{
+ JSList *tmp;
+ JSList *prev;
+
+ prev = NULL;
+ tmp = list;
+
+ while (tmp) {
+ if (tmp == link) {
+ if (prev)
+ prev->next = tmp->next;
+ if (list == tmp)
+ list = list->next;
+
+ tmp->next = NULL;
+ break;
+ }
+
+ prev = tmp;
+ tmp = tmp->next;
+ }
+
+ return list;
+}
+
+static __inline__
+void
+jack_slist_free (JSList *list)
+{
+ while (list) {
+ JSList *next = list->next;
+ free(list);
+ list = next;
+ }
+}
+
+static __inline__
+void
+jack_slist_free_1 (JSList *list)
+{
+ if (list) {
+ free(list);
+ }
+}
+
+static __inline__
+JSList*
+jack_slist_remove (JSList *list,
+ void *data)
+{
+ JSList *tmp;
+ JSList *prev;
+
+ prev = NULL;
+ tmp = list;
+
+ while (tmp) {
+ if (tmp->data == data) {
+ if (prev)
+ prev->next = tmp->next;
+ if (list == tmp)
+ list = list->next;
+
+ tmp->next = NULL;
+ jack_slist_free (tmp);
+
+ break;
+ }
+
+ prev = tmp;
+ tmp = tmp->next;
+ }
+
+ return list;
+}
+
+static __inline__
+unsigned int
+jack_slist_length (JSList *list)
+{
+ unsigned int length;
+
+ length = 0;
+ while (list) {
+ length++;
+ list = list->next;
+ }
+
+ return length;
+}
+
+static __inline__
+JSList*
+jack_slist_find (JSList *list,
+ void *data)
+{
+ while (list) {
+ if (list->data == data)
+ break;
+ list = list->next;
+ }
+
+ return list;
+}
+
+static __inline__
+JSList*
+jack_slist_copy (JSList *list)
+{
+ JSList *new_list = NULL;
+
+ if (list) {
+ JSList *last;
+
+ new_list = jack_slist_alloc ();
+ new_list->data = list->data;
+ last = new_list;
+ list = list->next;
+ while (list) {
+ last->next = jack_slist_alloc ();
+ last = last->next;
+ last->data = list->data;
+ list = list->next;
+ }
+ }
+
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_append (JSList *list,
+ void *data)
+{
+ JSList *new_list;
+ JSList *last;
+
+ new_list = jack_slist_alloc ();
+ new_list->data = data;
+
+ if (list) {
+ last = jack_slist_last (list);
+ last->next = new_list;
+
+ return list;
+ } else
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_sort_merge (JSList *l1,
+ JSList *l2,
+ JCompareFunc compare_func)
+{
+ JSList list, *l;
+
+ l = &list;
+
+ while (l1 && l2) {
+ if (compare_func(l1->data, l2->data) < 0) {
+ l = l->next = l1;
+ l1 = l1->next;
+ } else {
+ l = l->next = l2;
+ l2 = l2->next;
+ }
+ }
+ l->next = l1 ? l1 : l2;
+
+ return list.next;
+}
+
+static __inline__
+JSList*
+jack_slist_sort (JSList *list,
+ JCompareFunc compare_func)
+{
+ JSList *l1, *l2;
+
+ if (!list)
+ return NULL;
+ if (!list->next)
+ return list;
+
+ l1 = list;
+ l2 = list->next;
+
+ while ((l2 = l2->next) != NULL) {
+ if ((l2 = l2->next) == NULL)
+ break;
+ l1 = l1->next;
+ }
+ l2 = l1->next;
+ l1->next = NULL;
+
+ return jack_slist_sort_merge (jack_slist_sort (list, compare_func),
+ jack_slist_sort (l2, compare_func),
+ compare_func);
+}
+
+#endif /* __jack_jslist_h__ */
diff --git a/common/patest_sine.c b/common/patest_sine.c
new file mode 100644
index 00000000..80a9c499
--- /dev/null
+++ b/common/patest_sine.c
@@ -0,0 +1,151 @@
+/** @file patest_sine.c
+ @brief Play a sine wave for several seconds.
+ @author Ross Bencina <rossb@audiomulch.com>
+ @author Phil Burk <philburk@softsynth.com>
+*/
+/*
+ * $Id: patest_sine.c,v 1.1.2.1 2006/06/06 19:37:56 letz Exp $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+#include <stdio.h>
+#include <math.h>
+#include "portaudio.h"
+
+#define NUM_SECONDS (5)
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (200)
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ int left_phase;
+ int right_phase;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ *out++ = data->sine[data->left_phase]; /* left */
+ *out++ = data->sine[data->right_phase]; /* right */
+ data->left_phase += 1;
+ if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;
+ data->right_phase += 3; /* higher pitch so we can distinguish left and right. */
+ if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ PaStreamParameters outputParameters;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+
+
+ printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+ data.left_phase = data.right_phase = 0;
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
+ outputParameters.channelCount = 2; /* stereo output */
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
diff --git a/common/ringbuffer.c b/common/ringbuffer.c
new file mode 100644
index 00000000..75170411
--- /dev/null
+++ b/common/ringbuffer.c
@@ -0,0 +1,359 @@
+/*
+ Copyright (C) 2000 Paul Davis
+ Copyright (C) 2003 Rohan Drape
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ ISO/POSIX C version of Paul Davis's lock free ringbuffer C++ code.
+ This is safe for the case of one read thread and one write thread.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#ifdef USE_MLOCK
+#include <sys/mman.h>
+#endif /* USE_MLOCK */
+#include "ringbuffer.h"
+
+/* Create a new ringbuffer to hold at least `sz' bytes of data. The
+ actual buffer size is rounded up to the next power of two. */
+
+jack_ringbuffer_t *
+jack_ringbuffer_create (size_t sz)
+{
+ int power_of_two;
+ jack_ringbuffer_t *rb;
+
+ rb = malloc (sizeof (jack_ringbuffer_t));
+
+ for (power_of_two = 1; 1 << power_of_two < sz; power_of_two++);
+
+ rb->size = 1 << power_of_two;
+ rb->size_mask = rb->size;
+ rb->size_mask -= 1;
+ rb->write_ptr = 0;
+ rb->read_ptr = 0;
+ rb->buf = malloc (rb->size);
+ memset(rb->buf, 0, rb->size);
+ rb->mlocked = 0;
+
+ return rb;
+}
+
+/* Free all data associated with the ringbuffer `rb'. */
+
+void
+jack_ringbuffer_free (jack_ringbuffer_t * rb)
+{
+#ifdef USE_MLOCK
+ if (rb->mlocked) {
+ munlock (rb->buf, rb->size);
+ }
+#endif /* USE_MLOCK */
+ free (rb->buf);
+}
+
+/* Lock the data block of `rb' using the system call 'mlock'. */
+
+int
+jack_ringbuffer_mlock (jack_ringbuffer_t * rb)
+{
+#ifdef USE_MLOCK
+ if (mlock (rb->buf, rb->size)) {
+ return -1;
+ }
+#endif /* USE_MLOCK */
+ rb->mlocked = 1;
+ return 0;
+}
+
+/* Reset the read and write pointers to zero. This is not thread
+ safe. */
+
+void
+jack_ringbuffer_reset (jack_ringbuffer_t * rb)
+{
+ rb->read_ptr = 0;
+ rb->write_ptr = 0;
+}
+
+/* Return the number of bytes available for reading. This is the
+ number of bytes in front of the read pointer and behind the write
+ pointer. */
+
+size_t
+jack_ringbuffer_read_space (const jack_ringbuffer_t * rb)
+{
+ size_t w, r;
+
+ w = rb->write_ptr;
+ r = rb->read_ptr;
+
+ if (w > r) {
+ return w - r;
+ } else {
+ return (w - r + rb->size) & rb->size_mask;
+ }
+}
+
+/* Return the number of bytes available for writing. This is the
+ number of bytes in front of the write pointer and behind the read
+ pointer. */
+
+size_t
+jack_ringbuffer_write_space (const jack_ringbuffer_t * rb)
+{
+ size_t w, r;
+
+ w = rb->write_ptr;
+ r = rb->read_ptr;
+
+ if (w > r) {
+ return ((r - w + rb->size) & rb->size_mask) - 1;
+ } else if (w < r) {
+ return (r - w) - 1;
+ } else {
+ return rb->size - 1;
+ }
+}
+
+/* The copying data reader. Copy at most `cnt' bytes from `rb' to
+ `dest'. Returns the actual number of bytes copied. */
+
+size_t
+jack_ringbuffer_read (jack_ringbuffer_t * rb, char *dest, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_read;
+ size_t n1, n2;
+
+ if ((free_cnt = jack_ringbuffer_read_space (rb)) == 0) {
+ return 0;
+ }
+
+ to_read = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = rb->read_ptr + to_read;
+
+ if (cnt2 > rb->size) {
+ n1 = rb->size - rb->read_ptr;
+ n2 = cnt2 & rb->size_mask;
+ } else {
+ n1 = to_read;
+ n2 = 0;
+ }
+
+ memcpy (dest, &(rb->buf[rb->read_ptr]), n1);
+ rb->read_ptr += n1;
+ rb->read_ptr &= rb->size_mask;
+
+ if (n2) {
+ memcpy (dest + n1, &(rb->buf[rb->read_ptr]), n2);
+ rb->read_ptr += n2;
+ rb->read_ptr &= rb->size_mask;
+ }
+
+ return to_read;
+}
+
+/* The copying data reader w/o read pointer advance. Copy at most
+ `cnt' bytes from `rb' to `dest'. Returns the actual number of bytes
+copied. */
+
+size_t
+jack_ringbuffer_peek (jack_ringbuffer_t * rb, char *dest, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_read;
+ size_t n1, n2;
+ size_t tmp_read_ptr;
+
+ tmp_read_ptr = rb->read_ptr;
+
+ if ((free_cnt = jack_ringbuffer_read_space (rb)) == 0) {
+ return 0;
+ }
+
+ to_read = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = tmp_read_ptr + to_read;
+
+ if (cnt2 > rb->size) {
+ n1 = rb->size - tmp_read_ptr;
+ n2 = cnt2 & rb->size_mask;
+ } else {
+ n1 = to_read;
+ n2 = 0;
+ }
+
+ memcpy (dest, &(rb->buf[tmp_read_ptr]), n1);
+ tmp_read_ptr += n1;
+ tmp_read_ptr &= rb->size_mask;
+
+ if (n2) {
+ memcpy (dest + n1, &(rb->buf[tmp_read_ptr]), n2);
+ tmp_read_ptr += n2;
+ tmp_read_ptr &= rb->size_mask;
+ }
+
+ return to_read;
+}
+
+
+/* The copying data writer. Copy at most `cnt' bytes to `rb' from
+ `src'. Returns the actual number of bytes copied. */
+
+size_t
+jack_ringbuffer_write (jack_ringbuffer_t * rb, const char *src, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_write;
+ size_t n1, n2;
+
+ if ((free_cnt = jack_ringbuffer_write_space (rb)) == 0) {
+ return 0;
+ }
+
+ to_write = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = rb->write_ptr + to_write;
+
+ if (cnt2 > rb->size) {
+ n1 = rb->size - rb->write_ptr;
+ n2 = cnt2 & rb->size_mask;
+ } else {
+ n1 = to_write;
+ n2 = 0;
+ }
+
+ memcpy (&(rb->buf[rb->write_ptr]), src, n1);
+ rb->write_ptr += n1;
+ rb->write_ptr &= rb->size_mask;
+
+ if (n2) {
+ memcpy (&(rb->buf[rb->write_ptr]), src + n1, n2);
+ rb->write_ptr += n2;
+ rb->write_ptr &= rb->size_mask;
+ }
+
+ return to_write;
+}
+
+/* Advance the read pointer `cnt' places. */
+
+void
+jack_ringbuffer_read_advance (jack_ringbuffer_t * rb, size_t cnt)
+{
+ rb->read_ptr += cnt;
+ rb->read_ptr &= rb->size_mask;
+}
+
+/* Advance the write pointer `cnt' places. */
+
+void
+jack_ringbuffer_write_advance (jack_ringbuffer_t * rb, size_t cnt)
+{
+ rb->write_ptr += cnt;
+ rb->write_ptr &= rb->size_mask;
+}
+
+/* The non-copying data reader. `vec' is an array of two places. Set
+ the values at `vec' to hold the current readable data at `rb'. If
+ the readable data is in one segment the second segment has zero
+ length. */
+
+void
+jack_ringbuffer_get_read_vector (const jack_ringbuffer_t * rb,
+ jack_ringbuffer_data_t * vec)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = rb->write_ptr;
+ r = rb->read_ptr;
+
+ if (w > r) {
+ free_cnt = w - r;
+ } else {
+ free_cnt = (w - r + rb->size) & rb->size_mask;
+ }
+
+ cnt2 = r + free_cnt;
+
+ if (cnt2 > rb->size) {
+
+ /* Two part vector: the rest of the buffer after the current write
+ ptr, plus some from the start of the buffer. */
+
+ vec[0].buf = &(rb->buf[r]);
+ vec[0].len = rb->size - r;
+ vec[1].buf = rb->buf;
+ vec[1].len = cnt2 & rb->size_mask;
+
+ } else {
+
+ /* Single part vector: just the rest of the buffer */
+
+ vec[0].buf = &(rb->buf[r]);
+ vec[0].len = free_cnt;
+ vec[1].len = 0;
+ }
+}
+
+/* The non-copying data writer. `vec' is an array of two places. Set
+ the values at `vec' to hold the current writeable data at `rb'. If
+ the writeable data is in one segment the second segment has zero
+ length. */
+
+void
+jack_ringbuffer_get_write_vector (const jack_ringbuffer_t * rb,
+ jack_ringbuffer_data_t * vec)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = rb->write_ptr;
+ r = rb->read_ptr;
+
+ if (w > r) {
+ free_cnt = ((r - w + rb->size) & rb->size_mask) - 1;
+ } else if (w < r) {
+ free_cnt = (r - w) - 1;
+ } else {
+ free_cnt = rb->size - 1;
+ }
+
+ cnt2 = w + free_cnt;
+
+ if (cnt2 > rb->size) {
+
+ /* Two part vector: the rest of the buffer after the current write
+ ptr, plus some from the start of the buffer. */
+
+ vec[0].buf = &(rb->buf[w]);
+ vec[0].len = rb->size - w;
+ vec[1].buf = rb->buf;
+ vec[1].len = cnt2 & rb->size_mask;
+ } else {
+ vec[0].buf = &(rb->buf[w]);
+ vec[0].len = free_cnt;
+ vec[1].len = 0;
+ }
+}
diff --git a/common/ringbuffer.h b/common/ringbuffer.h
new file mode 100644
index 00000000..78bf6536
--- /dev/null
+++ b/common/ringbuffer.h
@@ -0,0 +1,235 @@
+/*
+ Copyright (C) 2000 Paul Davis
+ Copyright (C) 2003 Rohan Drape
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: ringbuffer.h,v 1.2.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef _RINGBUFFER_H
+#define _RINGBUFFER_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <sys/types.h>
+
+ /** @file ringbuffer.h
+ *
+ * A set of library functions to make lock-free ringbuffers available
+ * to JACK clients. The `capture_client.c' (in the example_clients
+ * directory) is a fully functioning user of this API.
+ *
+ * The key attribute of a ringbuffer is that it can be safely accessed
+ * by two threads simultaneously -- one reading from the buffer and
+ * the other writing to it -- without using any synchronization or
+ * mutual exclusion primitives. For this to work correctly, there can
+ * only be a single reader and a single writer thread. Their
+ * identities cannot be interchanged.
+ */
+
+ typedef struct {
+ char *buf;
+ size_t len;
+ }
+ jack_ringbuffer_data_t ;
+
+ typedef struct {
+ char *buf;
+ volatile size_t write_ptr;
+ volatile size_t read_ptr;
+ size_t size;
+ size_t size_mask;
+ int mlocked;
+ }
+ jack_ringbuffer_t ;
+
+ /**
+ * Allocates a ringbuffer data structure of a specified size. The
+ * caller must arrange for a call to jack_ringbuffer_free() to release
+ * the memory associated with the ringbuffer.
+ *
+ * @param sz the ringbuffer size in bytes.
+ *
+ * @return a pointer to a new jack_ringbuffer_t, if successful; NULL
+ * otherwise.
+ */
+ jack_ringbuffer_t *jack_ringbuffer_create(size_t sz);
+
+ /**
+ * Frees the ringbuffer data structure allocated by an earlier call to
+ * jack_ringbuffer_create().
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ */
+ void jack_ringbuffer_free(jack_ringbuffer_t *rb);
+
+ /**
+ * Fill a data structure with a description of the current readable
+ * data held in the ringbuffer. This description is returned in a two
+ * element array of jack_ringbuffer_data_t. Two elements are needed
+ * because the data to be read may be split across the end of the
+ * ringbuffer.
+ *
+ * The first element will always contain a valid @a len field, which
+ * may be zero or greater. If the @a len field is non-zero, then data
+ * can be read in a contiguous fashion using the address given in the
+ * corresponding @a buf field.
+ *
+ * If the second element has a non-zero @a len field, then a second
+ * contiguous stretch of data can be read from the address given in
+ * its corresponding @a buf field.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param vec a pointer to a 2 element array of jack_ringbuffer_data_t.
+ *
+ */
+ void jack_ringbuffer_get_read_vector(const jack_ringbuffer_t *rb,
+ jack_ringbuffer_data_t *vec);
+
+ /**
+ * Fill a data structure with a description of the current writable
+ * space in the ringbuffer. The description is returned in a two
+ * element array of jack_ringbuffer_data_t. Two elements are needed
+ * because the space available for writing may be split across the end
+ * of the ringbuffer.
+ *
+ * The first element will always contain a valid @a len field, which
+ * may be zero or greater. If the @a len field is non-zero, then data
+ * can be written in a contiguous fashion using the address given in
+ * the corresponding @a buf field.
+ *
+ * If the second element has a non-zero @a len field, then a second
+ * contiguous stretch of data can be written to the address given in
+ * the corresponding @a buf field.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param vec a pointer to a 2 element array of jack_ringbuffer_data_t.
+ */
+ void jack_ringbuffer_get_write_vector(const jack_ringbuffer_t *rb,
+ jack_ringbuffer_data_t *vec);
+
+ /**
+ * Read data from the ringbuffer.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param dest a pointer to a buffer where data read from the
+ * ringbuffer will go.
+ * @param cnt the number of bytes to read.
+ *
+ * @return the number of bytes read, which may range from 0 to cnt.
+ */
+ size_t jack_ringbuffer_read(jack_ringbuffer_t *rb, char *dest, size_t cnt);
+
+ /**
+ * Read data from the ringbuffer. Opposed to jack_ringbuffer_read()
+ * this function does not move the read pointer. Thus it's
+ * a convenient way to inspect data in the ringbuffer in a
+ * continous fashion. The price is that the data is copied
+ * into a user provided buffer. For "raw" non-copy inspection
+ * of the data in the ringbuffer use jack_ringbuffer_get_read_vector().
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param dest a pointer to a buffer where data read from the
+ * ringbuffer will go.
+ * @param cnt the number of bytes to read.
+ *
+ * @return the number of bytes read, which may range from 0 to cnt.
+ */
+ size_t jack_ringbuffer_peek(jack_ringbuffer_t *rb, char *dest, size_t cnt);
+
+ /**
+ * Advance the read pointer.
+ *
+ * After data have been read from the ringbuffer using the pointers
+ * returned by jack_ringbuffer_get_read_vector(), use this function to
+ * advance the buffer pointers, making that space available for future
+ * write operations.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param cnt the number of bytes read.
+ */
+ void jack_ringbuffer_read_advance(jack_ringbuffer_t *rb, size_t cnt);
+
+ /**
+ * Return the number of bytes available for reading.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ *
+ * @return the number of bytes available to read.
+ */
+ size_t jack_ringbuffer_read_space(const jack_ringbuffer_t *rb);
+
+ /**
+ * Lock a ringbuffer data block into memory.
+ *
+ * Uses the mlock() system call. This is not a realtime operation.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ */
+ int jack_ringbuffer_mlock(jack_ringbuffer_t *rb);
+
+ /**
+ * Reset the read and write pointers, making an empty buffer.
+ *
+ * This is not thread safe.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ */
+ void jack_ringbuffer_reset(jack_ringbuffer_t *rb);
+
+ /**
+ * Write data into the ringbuffer.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param src a pointer to the data to be written to the ringbuffer.
+ * @param cnt the number of bytes to write.
+ *
+ * @return the number of bytes write, which may range from 0 to cnt
+ */
+ size_t jack_ringbuffer_write(jack_ringbuffer_t *rb, const char *src,
+ size_t cnt);
+
+ /**
+ * Advance the write pointer.
+ *
+ * After data have been written the ringbuffer using the pointers
+ * returned by jack_ringbuffer_get_write_vector(), use this function
+ * to advance the buffer pointer, making the data available for future
+ * read operations.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ * @param cnt the number of bytes written.
+ */
+ void jack_ringbuffer_write_advance(jack_ringbuffer_t *rb, size_t cnt);
+
+ /**
+ * Return the number of bytes available for writing.
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ *
+ * @return the amount of free space (in bytes) available for writing.
+ */
+ size_t jack_ringbuffer_write_space(const jack_ringbuffer_t *rb);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/common/shm.c b/common/shm.c
new file mode 100644
index 00000000..1c0ad939
--- /dev/null
+++ b/common/shm.c
@@ -0,0 +1,1182 @@
+/* This module provides a set of abstract shared memory interfaces
+ * with support using both System V and POSIX shared memory
+ * implementations. The code is divided into three sections:
+ *
+ * - common (interface-independent) code
+ * - POSIX implementation
+ * - System V implementation
+ *
+ * The implementation used is determined by whether USE_POSIX_SHM was
+ * set in the ./configure step.
+ */
+
+/*
+ * Copyright (C) 2003 Paul Davis
+ * Copyright (C) 2004 Jack O'Quin
+ *
+ * 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
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: shm.c,v 1.8.2.16 2006/08/28 10:10:16 letz Exp $
+ */
+
+#ifdef WIN32
+#include <process.h>
+#else
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <limits.h>
+#include <errno.h>
+#include <dirent.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/shm.h>
+#include <sys/sem.h>
+#include <stdlib.h>
+
+#endif
+
+#include "shm.h"
+#include "JackError.h"
+
+#ifdef USE_POSIX_SHM
+static jack_shmtype_t jack_shmtype = shm_POSIX;
+#elif WIN32
+static jack_shmtype_t jack_shmtype = shm_WIN32;
+#else
+static jack_shmtype_t jack_shmtype = shm_SYSV;
+#endif
+
+/* interface-dependent forward declarations */
+static int jack_access_registry (jack_shm_info_t *ri);
+static int jack_create_registry (jack_shm_info_t *ri);
+static void jack_remove_shm (jack_shm_id_t *id);
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * common interface-independent section
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* The JACK SHM registry is a chunk of memory for keeping track of the
+ * shared memory used by each active JACK server. This allows the
+ * server to clean up shared memory when it exits. To avoid memory
+ * leakage due to kill -9, crashes or debugger-driven exits, this
+ * cleanup is also done when a new instance of that server starts.
+ */
+
+/* per-process global data for the SHM interfaces */
+static jack_shm_id_t registry_id; /* SHM id for the registry */
+
+#ifdef WIN32
+static jack_shm_info_t registry_info = {/* SHM info for the registry */
+ JACK_SHM_NULL_INDEX,
+ NULL
+};
+#else
+static jack_shm_info_t registry_info = { /* SHM info for the registry */
+ .index = JACK_SHM_NULL_INDEX,
+ .attached_at = MAP_FAILED
+};
+
+#endif
+
+/* pointers to registry header and array */
+static jack_shm_header_t *jack_shm_header = NULL;
+static jack_shm_registry_t *jack_shm_registry = NULL;
+static char jack_shm_server_prefix[JACK_SERVER_NAME_SIZE] = "";
+
+/* jack_shm_lock_registry() serializes updates to the shared memory
+ * segment JACK uses to keep track of the SHM segements allocated to
+ * all its processes, including multiple servers.
+ *
+ * This is not a high-contention lock, but it does need to work across
+ * multiple processes. High transaction rates and realtime safety are
+ * not required. Any solution needs to at least be portable to POSIX
+ * and POSIX-like systems.
+ *
+ * We must be particularly careful to ensure that the lock be released
+ * if the owning process terminates abnormally. Otherwise, a segfault
+ * or kill -9 at the wrong moment could prevent JACK from ever running
+ * again on that machine until after a reboot.
+ */
+
+#define JACK_SEMAPHORE_KEY 0x282929
+#ifndef USE_POSIX_SHM
+#define JACK_SHM_REGISTRY_KEY JACK_SEMAPHORE_KEY
+#endif
+
+static int semid = -1;
+
+#ifdef WIN32
+
+// steph TODO
+static void
+semaphore_init () {}
+
+static void
+semaphore_add (int value) {}
+
+#else
+/* all semaphore errors are fatal -- issue message, but do not return */
+static void
+semaphore_error (char *msg)
+{
+ jack_error ("Fatal JACK semaphore error: %s (%s)",
+ msg, strerror (errno));
+ abort ();
+}
+
+static void
+semaphore_init ()
+{
+ key_t semkey = JACK_SEMAPHORE_KEY;
+ struct sembuf sbuf;
+ int create_flags = IPC_CREAT | IPC_EXCL
+ | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
+
+ /* Get semaphore ID associated with this key. */
+ if ((semid = semget(semkey, 0, 0)) == -1) {
+
+ /* Semaphore does not exist - Create. */
+ if ((semid = semget(semkey, 1, create_flags)) != -1) {
+
+ /* Initialize the semaphore, allow one owner. */
+ sbuf.sem_num = 0;
+ sbuf.sem_op = 1;
+ sbuf.sem_flg = 0;
+ if (semop(semid, &sbuf, 1) == -1) {
+ semaphore_error ("semop");
+ }
+
+ } else if (errno == EEXIST) {
+ if ((semid = semget(semkey, 0, 0)) == -1) {
+ semaphore_error ("semget");
+ }
+
+ } else {
+ semaphore_error ("semget creation");
+ }
+ }
+}
+
+static inline void
+semaphore_add (int value)
+{
+ struct sembuf sbuf;
+
+ sbuf.sem_num = 0;
+ sbuf.sem_op = value;
+ sbuf.sem_flg = SEM_UNDO;
+ if (semop(semid, &sbuf, 1) == -1) {
+ semaphore_error ("semop");
+ }
+}
+
+#endif
+
+static void
+jack_shm_lock_registry (void)
+{
+ if (semid == -1)
+ semaphore_init ();
+
+ semaphore_add (-1);
+}
+
+static void
+jack_shm_unlock_registry (void)
+{
+ semaphore_add (1);
+}
+
+static void
+jack_shm_init_registry ()
+{
+ /* registry must be locked */
+ int i;
+
+ memset (jack_shm_header, 0, JACK_SHM_REGISTRY_SIZE);
+
+ jack_shm_header->magic = JACK_SHM_MAGIC;
+ //jack_shm_header->protocol = jack_protocol_version; // steph
+ jack_shm_header->type = jack_shmtype;
+ jack_shm_header->size = JACK_SHM_REGISTRY_SIZE;
+ jack_shm_header->hdr_len = sizeof (jack_shm_header_t);
+ jack_shm_header->entry_len = sizeof (jack_shm_registry_t);
+
+ for (i = 0; i < MAX_SHM_ID; ++i) {
+ jack_shm_registry[i].index = i;
+ }
+}
+
+static int
+jack_shm_validate_registry ()
+{
+ /* registry must be locked */
+
+ if ((jack_shm_header->magic == JACK_SHM_MAGIC)
+ //&& (jack_shm_header->protocol == jack_protocol_version) // steph
+ && (jack_shm_header->type == jack_shmtype)
+ && (jack_shm_header->size == JACK_SHM_REGISTRY_SIZE)
+ && (jack_shm_header->hdr_len == sizeof (jack_shm_header_t))
+ && (jack_shm_header->entry_len == sizeof (jack_shm_registry_t))) {
+
+ return 0; /* registry OK */
+ }
+
+ return -1;
+}
+
+/* set a unique per-user, per-server shm prefix string
+ *
+ * According to the POSIX standard:
+ *
+ * "The name argument conforms to the construction rules for a
+ * pathname. If name begins with the slash character, then processes
+ * calling shm_open() with the same value of name refer to the same
+ * shared memory object, as long as that name has not been
+ * removed. If name does not begin with the slash character, the
+ * effect is implementation-defined. The interpretation of slash
+ * characters other than the leading slash character in name is
+ * implementation-defined."
+ *
+ * Since the Linux implementation does not allow slashes *within* the
+ * name, in the interest of portability we use colons instead.
+ */
+static void
+jack_set_server_prefix (const char *server_name)
+{
+#ifdef WIN32
+ snprintf (jack_shm_server_prefix, sizeof (jack_shm_server_prefix),
+ "jack-%d:%s:", _getpid (), server_name); // steph TO CHECK
+#else
+ snprintf (jack_shm_server_prefix, sizeof (jack_shm_server_prefix),
+ "/jack-%d:%s:", getuid (), server_name);
+#endif
+
+}
+
+/* gain server addressability to shared memory registration segment
+ *
+ * returns: 0 if successful
+ */
+static int
+jack_server_initialize_shm (void)
+{
+ int rc;
+
+ if (jack_shm_header)
+ return 0; /* already initialized */
+
+ jack_shm_lock_registry ();
+
+ rc = jack_access_registry (&registry_info);
+
+ switch (rc) {
+ case ENOENT: /* registry does not exist */
+ rc = jack_create_registry (&registry_info);
+ break;
+ case 0: /* existing registry */
+ if (jack_shm_validate_registry () == 0)
+ break;
+ /* else it was invalid, so fall through */
+ case EINVAL: /* bad registry */
+ /* Apparently, this registry was created by an older
+ * JACK version. Delete it so we can try again. */
+ jack_release_shm (&registry_info);
+ jack_remove_shm (&registry_id);
+ if ((rc = jack_create_registry (&registry_info)) != 0) {
+ jack_error ("incompatible shm registry (%s)",
+ strerror (errno));
+#ifndef USE_POSIX_SHM
+ jack_error ("to delete, use `ipcrm -M 0x%0.8x'",
+ JACK_SHM_REGISTRY_KEY);
+#endif
+ }
+ break;
+ default: /* failure return code */
+ break;
+ }
+
+ jack_shm_unlock_registry ();
+ return rc;
+}
+
+/* gain client addressability to shared memory registration segment
+ *
+ * NOTE: this function is no longer used for server initialization,
+ * instead it calls jack_register_server().
+ *
+ * returns: 0 if successful
+ */
+int
+jack_initialize_shm (const char *server_name)
+{
+ int rc;
+
+ if (jack_shm_header)
+ return 0; /* already initialized */
+
+ jack_set_server_prefix (server_name);
+
+ jack_shm_lock_registry ();
+ if ((rc = jack_access_registry (&registry_info)) == 0) {
+ if ((rc = jack_shm_validate_registry ()) != 0) {
+ jack_error ("Incompatible shm registry, "
+ "are jackd and libjack in sync?");
+ }
+ }
+ jack_shm_unlock_registry ();
+
+ return rc;
+}
+
+
+// steph
+
+int jack_initialize_shm_server()
+{
+ return jack_initialize_shm("default");
+}
+
+int jack_initialize_shm_client()
+{
+ return jack_initialize_shm("default");
+}
+
+char* jack_shm_addr (jack_shm_info_t* si)
+{
+ return (char*)si->attached_at;
+}
+
+void
+jack_destroy_shm (jack_shm_info_t* si)
+{
+ /* must NOT have the registry locked */
+ if (si->index == JACK_SHM_NULL_INDEX)
+ return; /* segment not allocated */
+
+ jack_remove_shm (&jack_shm_registry[si->index].id);
+ jack_release_shm_info (si->index);
+}
+
+jack_shm_registry_t *
+jack_get_free_shm_info ()
+{
+ /* registry must be locked */
+ jack_shm_registry_t* si = NULL;
+ int i;
+
+ for (i = 0; i < MAX_SHM_ID; ++i) {
+ if (jack_shm_registry[i].size == 0) {
+ break;
+ }
+ }
+
+ if (i < MAX_SHM_ID) {
+ si = &jack_shm_registry[i];
+ }
+
+ return si;
+}
+
+static void
+jack_release_shm_entry (jack_shm_registry_index_t index)
+{
+ /* the registry must be locked */
+ jack_shm_registry[index].size = 0;
+ jack_shm_registry[index].allocator = 0;
+ memset (&jack_shm_registry[index].id, 0,
+ sizeof (jack_shm_registry[index].id));
+}
+
+void
+jack_release_shm_info (jack_shm_registry_index_t index)
+{
+#ifdef WIN32
+ int my_pid = _getpid();
+#else
+ pid_t my_pid = getpid();
+#endif
+
+ /* must NOT have the registry locked */
+ if (jack_shm_registry[index].allocator == my_pid) {
+ jack_shm_lock_registry ();
+ jack_release_shm_entry (index);
+ jack_shm_unlock_registry ();
+ }
+}
+
+/* Claim server_name for this process.
+ *
+ * returns 0 if successful
+ * EEXIST if server_name was already active for this user
+ * ENOSPC if server registration limit reached
+ * ENOMEM if unable to access shared memory registry
+ */
+EXPORT int
+jack_register_server (const char *server_name)
+{
+ int i;
+
+#ifdef WIN32
+ int my_pid = _getpid();
+#else
+ pid_t my_pid = getpid();
+#endif
+
+ jack_set_server_prefix (server_name);
+
+ if (jack_server_initialize_shm ())
+ return ENOMEM;
+
+ jack_shm_lock_registry ();
+
+ /* See if server_name already registered. Since server names
+ * are per-user, we register the unique server prefix string.
+ */
+ for (i = 0; i < MAX_SERVERS; i++) {
+
+ if (strncmp (jack_shm_header->server[i].name,
+ jack_shm_server_prefix,
+ JACK_SERVER_NAME_SIZE) != 0)
+ continue; /* no match */
+
+ if (jack_shm_header->server[i].pid == my_pid)
+ return 0; /* it's me */
+
+ /* see if server still exists */
+ #ifndef WIN32 // steph TO CHECK
+ if (kill (jack_shm_header->server[i].pid, 0) == 0) {
+ return EEXIST; /* other server running */
+ }
+ #endif
+
+ /* it's gone, reclaim this entry */
+ memset (&jack_shm_header->server[i], 0,
+ sizeof (jack_shm_server_t));
+ }
+
+ /* find a free entry */
+ for (i = 0; i < MAX_SERVERS; i++) {
+ if (jack_shm_header->server[i].pid == 0)
+ break;
+ }
+
+ if (i >= MAX_SERVERS)
+ return ENOSPC; /* out of space */
+
+ /* claim it */
+ jack_shm_header->server[i].pid = my_pid;
+ strncpy (jack_shm_header->server[i].name,
+ jack_shm_server_prefix,
+ JACK_SERVER_NAME_SIZE);
+
+ jack_shm_unlock_registry ();
+ return 0;
+}
+
+/* release server_name registration */
+EXPORT void
+jack_unregister_server (const char *server_name /* unused */)
+{
+ int i;
+
+#ifdef WIN32
+ int my_pid = _getpid();
+#else
+ pid_t my_pid = getpid();
+#endif
+
+ jack_shm_lock_registry ();
+
+ for (i = 0; i < MAX_SERVERS; i++) {
+ if (jack_shm_header->server[i].pid == my_pid) {
+ memset (&jack_shm_header->server[i], 0,
+ sizeof (jack_shm_server_t));
+ }
+ }
+
+ jack_shm_unlock_registry ();
+}
+
+/* called for server startup and termination */
+EXPORT int
+jack_cleanup_shm ()
+{
+ int i;
+ int destroy;
+ jack_shm_info_t copy;
+
+#ifdef WIN32
+ int my_pid = _getpid();
+#else
+ pid_t my_pid = getpid();
+#endif
+
+ jack_shm_lock_registry ();
+
+ for (i = 0; i < MAX_SHM_ID; i++) {
+ jack_shm_registry_t* r;
+
+ r = &jack_shm_registry[i];
+ memcpy (&copy, r, sizeof (jack_shm_info_t));
+ destroy = FALSE;
+
+ /* ignore unused entries */
+ if (r->allocator == 0)
+ continue;
+
+ /* is this my shm segment? */
+ if (r->allocator == my_pid) {
+
+ /* allocated by this process, so unattach
+ and destroy. */
+ jack_release_shm (&copy);
+ destroy = TRUE;
+
+ } else {
+
+ /* see if allocator still exists */
+ #ifdef WIN32 // steph
+ printf("TODO: kill API not available !!\n");
+ #else
+ if (kill (r->allocator, 0)) {
+ if (errno == ESRCH) {
+ /* allocator no longer exists,
+ * so destroy */
+ destroy = TRUE;
+ }
+ }
+ #endif
+ }
+
+ if (destroy) {
+
+ int index = copy.index;
+
+ if ((index >= 0) && (index < MAX_SHM_ID)) {
+ jack_remove_shm (&jack_shm_registry[index].id);
+ jack_release_shm_entry (index);
+ }
+ r->size = 0;
+ r->allocator = 0;
+ }
+ }
+
+ jack_shm_unlock_registry ();
+ return TRUE;
+}
+
+/* resize a shared memory segment
+ *
+ * There is no way to resize a System V shm segment. Resizing is
+ * possible with POSIX shm, but not with the non-conformant Mac OS X
+ * implementation. Since POSIX shm is mainly used on that platform,
+ * it's simpler to treat them both the same.
+ *
+ * So, we always resize by deleting and reallocating. This is
+ * tricky, because the old segment will not disappear until
+ * all the clients have released it. We only do what we can
+ * from here.
+ *
+ * This is not done under a single lock. I don't even want to think
+ * about all the things that could possibly go wrong if multple
+ * processes tried to resize the same segment concurrently. That
+ * probably doesn't happen.
+ */
+int
+jack_resize_shm (jack_shm_info_t* si, jack_shmsize_t size)
+{
+ jack_shm_id_t id;
+
+ /* The underlying type of `id' differs for SYSV and POSIX */
+ memcpy (&id, &jack_shm_registry[si->index].id, sizeof (id));
+
+ jack_release_shm (si);
+ jack_destroy_shm (si);
+
+ if (jack_shmalloc ((char *) id, size, si)) {
+ return -1;
+ }
+
+ return jack_attach_shm (si);
+}
+
+#ifdef USE_POSIX_SHM
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * POSIX interface-dependent functions
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* gain addressability to existing SHM registry segment
+ *
+ * sets up global registry pointers, if successful
+ *
+ * returns: 0 if existing registry accessed successfully
+ * ENOENT if registry does not exist
+ * EINVAL if registry exists, but has the wrong size
+ */
+static int
+jack_access_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+ int shm_fd;
+
+ strncpy (registry_id, "/jack-shm-registry", sizeof (registry_id));
+
+ /* try to open an existing segment */
+ if ((shm_fd = shm_open (registry_id, O_RDWR, 0666)) < 0) {
+ int rc = errno;
+ if (errno != ENOENT) {
+ jack_error ("Cannot open existing shm registry segment"
+ " (%s)", strerror (errno));
+ }
+ close (shm_fd);
+ return rc;
+ }
+
+ if ((ri->attached_at = mmap (0, JACK_SHM_REGISTRY_SIZE,
+ PROT_READ|PROT_WRITE,
+ MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
+ jack_error ("Cannot mmap shm registry segment (%s)",
+ strerror (errno));
+ close (shm_fd);
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+
+ close (shm_fd); // steph
+ return 0;
+}
+
+/* create a new SHM registry segment
+ *
+ * sets up global registry pointers, if successful
+ *
+ * returns: 0 if registry created successfully
+ * nonzero error code if unable to allocate a new registry
+ */
+static int
+jack_create_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+ int shm_fd;
+
+ strncpy (registry_id, "/jack-shm-registry", sizeof (registry_id));
+
+ if ((shm_fd = shm_open (registry_id, O_RDWR|O_CREAT, 0666)) < 0) {
+ int rc = errno;
+ jack_error ("Cannot create shm registry segment (%s)",
+ strerror (errno));
+ return rc;
+ }
+
+ /* Set the desired segment size. NOTE: the non-conformant Mac
+ * OS X POSIX shm only allows ftruncate() on segment creation.
+ */
+ if (ftruncate (shm_fd, JACK_SHM_REGISTRY_SIZE) < 0) {
+ int rc = errno;
+ jack_error ("Cannot set registry size (%s)", strerror (errno));
+ jack_remove_shm (&registry_id);
+ close (shm_fd);
+ return rc;
+ }
+
+ if ((ri->attached_at = mmap (0, JACK_SHM_REGISTRY_SIZE,
+ PROT_READ|PROT_WRITE,
+ MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
+ jack_error ("Cannot mmap shm registry segment (%s)",
+ strerror (errno));
+ jack_remove_shm (&registry_id);
+ close (shm_fd);
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+
+ /* initialize registry contents */
+ jack_shm_init_registry ();
+ close (shm_fd); // steph
+ return 0;
+}
+
+static void
+jack_remove_shm (jack_shm_id_t *id)
+{
+ /* registry may or may not be locked */
+ shm_unlink ((char *) id);
+}
+
+void
+jack_release_shm (jack_shm_info_t* si)
+{
+ /* registry may or may not be locked */
+ if (si->attached_at != MAP_FAILED) {
+ munmap (si->attached_at, jack_shm_registry[si->index].size);
+ }
+}
+
+/* allocate a POSIX shared memory segment */
+int
+jack_shmalloc (const char *shm_name, jack_shmsize_t size, jack_shm_info_t* si)
+{
+ jack_shm_registry_t* registry;
+ int shm_fd;
+ int rc = -1;
+ char name[SHM_NAME_MAX+1];
+
+ jack_shm_lock_registry ();
+
+ if ((registry = jack_get_free_shm_info ()) == NULL) {
+ jack_error ("shm registry full");
+ goto unlock;
+ }
+
+ /* On Mac OS X, the maximum length of a shared memory segment
+ * name is SHM_NAME_MAX (instead of NAME_MAX or PATH_MAX as
+ * defined by the standard). Unfortunately, Apple sets this
+ * value so small (about 31 bytes) that it is useless for
+ * actual names. So, we construct a short name from the
+ * registry index for uniqueness and ignore the shm_name
+ * parameter. Bah!
+ */
+ snprintf (name, sizeof (name), "/jack-%d", registry->index);
+
+ if (strlen (name) >= sizeof (registry->id)) {
+ jack_error ("shm segment name too long %s", name);
+ goto unlock;
+ }
+
+ if ((shm_fd = shm_open (name, O_RDWR|O_CREAT, 0666)) < 0) {
+ jack_error ("Cannot create shm segment %s (%s)",
+ name, strerror (errno));
+ goto unlock;
+ }
+
+ if (ftruncate (shm_fd, size) < 0) {
+ jack_error ("Cannot set size of engine shm "
+ "registry 0 (%s)",
+ strerror (errno));
+ close (shm_fd);
+ goto unlock;
+ }
+
+ close (shm_fd);
+ registry->size = size;
+ strncpy (registry->id, name, sizeof (registry->id));
+ registry->allocator = getpid();
+ si->index = registry->index;
+ si->attached_at = MAP_FAILED; /* not attached */
+ rc = 0; /* success */
+
+ unlock:
+ jack_shm_unlock_registry ();
+ return rc;
+}
+
+int
+jack_attach_shm (jack_shm_info_t* si)
+{
+ int shm_fd;
+ jack_shm_registry_t *registry = &jack_shm_registry[si->index];
+
+ if ((shm_fd = shm_open (registry->id,
+ O_RDWR, 0666)) < 0) {
+ jack_error ("Cannot open shm segment %s (%s)", registry->id,
+ strerror (errno));
+ return -1;
+ }
+
+ if ((si->attached_at = mmap (0, registry->size, PROT_READ|PROT_WRITE,
+ MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
+ jack_error ("Cannot mmap shm segment %s (%s)",
+ registry->id,
+ strerror (errno));
+ close (shm_fd);
+ return -1;
+ }
+
+ close (shm_fd);
+ return 0;
+}
+
+int
+jack_attach_shm_read (jack_shm_info_t* si)
+{
+ int shm_fd;
+ jack_shm_registry_t *registry = &jack_shm_registry[si->index];
+
+ if ((shm_fd = shm_open (registry->id,
+ O_RDONLY, 0666)) < 0) {
+ jack_error ("Cannot open shm segment %s (%s)", registry->id,
+ strerror (errno));
+ return -1;
+ }
+
+ if ((si->attached_at = mmap (0, registry->size, PROT_READ,
+ MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
+ jack_error ("Cannot mmap shm segment %s (%s)",
+ registry->id,
+ strerror (errno));
+ close (shm_fd);
+ return -1;
+ }
+
+ close (shm_fd);
+ return 0;
+}
+
+#elif WIN32
+
+static int
+jack_access_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+ HANDLE shm_fd;
+ LPSECURITY_ATTRIBUTES sec = 0;
+
+ strncpy (registry_id, "jack-shm-registry", sizeof (registry_id));
+
+ /* try to open an existing segment */
+
+ if ((shm_fd = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, registry_id)) == NULL) {
+ int rc = GetLastError();
+ if (rc != ERROR_FILE_NOT_FOUND) {
+ jack_error ("Cannot open existing shm registry segment (%ld)", rc);
+ }
+ return rc;
+ }
+
+ if ((ri->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
+ jack_error ("Cannot mmap shm registry segment (%ld)", GetLastError());
+ jack_remove_shm (&registry_id);
+ CloseHandle (shm_fd);
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+
+ //CloseHandle(shm_fd); // TO CHECK
+ return 0;
+}
+
+static int
+jack_create_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+ HANDLE shm_fd;
+
+ strncpy (registry_id, "jack-shm-registry", sizeof (registry_id));
+
+ if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
+ 0, PAGE_READWRITE,
+ 0, JACK_SHM_REGISTRY_SIZE,
+ registry_id)) == NULL || (shm_fd == INVALID_HANDLE_VALUE)) {
+ int rc = GetLastError();
+ jack_error ("Cannot create shm registry segment (%ld)", rc);
+ return rc;
+ }
+
+ if ((ri->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
+ jack_error ("Cannot mmap shm registry segment (%ld)", GetLastError());
+ jack_remove_shm (&registry_id);
+ CloseHandle (shm_fd);
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+
+ /* initialize registry contents */
+ jack_shm_init_registry ();
+
+ //CloseHandle(shm_fd); // TO CHECK
+ return 0;
+}
+
+static void
+jack_remove_shm (jack_shm_id_t *id)
+{
+ /* nothing to do */
+}
+
+void
+jack_release_shm (jack_shm_info_t* si)
+{
+ /* registry may or may not be locked */
+ if (si->attached_at != NULL) {
+ UnmapViewOfFile (si->attached_at);
+ }
+}
+
+int
+jack_shmalloc (const char *shm_name, jack_shmsize_t size, jack_shm_info_t* si)
+{
+ jack_shm_registry_t* registry;
+ HANDLE shm_fd;
+ int rc = -1;
+ char name[SHM_NAME_MAX+1];
+
+ jack_shm_lock_registry ();
+
+ if ((registry = jack_get_free_shm_info ()) == NULL) {
+ jack_error ("shm registry full");
+ goto unlock;
+ }
+
+ snprintf (name, sizeof (name), "jack-%d", registry->index);
+
+ if (strlen (name) >= sizeof (registry->id)) {
+ jack_error ("shm segment name too long %s", name);
+ goto unlock;
+ }
+
+ if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
+ 0, PAGE_READWRITE,
+ 0, size,
+ name)) == NULL || (shm_fd == INVALID_HANDLE_VALUE)) {
+ int rc = GetLastError();
+ jack_error ("Cannot create shm segment (%ld)",rc);
+ goto unlock;
+ }
+
+ //CloseHandle (shm_fd); // TO CHECK
+
+ registry->size = size;
+ strncpy (registry->id, name, sizeof (registry->id));
+ registry->allocator = _getpid();
+ si->index = registry->index;
+ si->attached_at = NULL; /* not attached */
+ rc = 0; /* success */
+
+ unlock:
+ jack_shm_unlock_registry ();
+ return rc;
+}
+
+int
+jack_attach_shm (jack_shm_info_t* si)
+{
+ HANDLE shm_fd;
+ jack_shm_registry_t *registry = &jack_shm_registry[si->index];
+
+ if ((shm_fd = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, registry->id)) == NULL) {
+ int rc = GetLastError();
+ jack_error ("Cannot open shm segment (%ld)",rc);
+ return -1;
+ }
+
+ if ((si->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, registry->size)) == NULL) {
+ jack_error ("Cannot mmap shm segment (%ld)", GetLastError());
+ jack_remove_shm (&registry_id);
+ CloseHandle (shm_fd);
+ return -1;
+ }
+
+ //CloseHandle (shm_fd); // TO CHECK
+ return 0;
+}
+
+int
+jack_attach_shm_read (jack_shm_info_t* si)
+{
+ HANDLE shm_fd;
+ jack_shm_registry_t *registry = &jack_shm_registry[si->index];
+
+ if ((shm_fd = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, registry->id)) == NULL) {
+ int rc = GetLastError();
+ jack_error ("Cannot open shm segment (%ld)",rc);
+ return -1;
+ }
+
+ if ((si->attached_at = MapViewOfFile (shm_fd, FILE_MAP_READ, 0, 0, registry->size)) == NULL) {
+ jack_error ("Cannot mmap shm segment (%ld)", GetLastError());
+ jack_remove_shm (&registry_id);
+ CloseHandle (shm_fd);
+ return -1;
+ }
+
+ //CloseHandle (shm_fd); // TO CHECK
+ return 0;
+}
+
+#else
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * System V interface-dependent functions
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* gain addressability to existing SHM registry segment
+ *
+ * sets up global registry pointers, if successful
+ *
+ * returns: 0 if existing registry accessed successfully
+ * ENOENT if registry does not exist
+ * EINVAL if registry exists, but has the wrong size
+ * other nonzero error code if unable to access registry
+ */
+static int
+jack_access_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+
+ /* try without IPC_CREAT to get existing segment */
+ if ((registry_id = shmget (JACK_SHM_REGISTRY_KEY,
+ JACK_SHM_REGISTRY_SIZE, 0666)) < 0) {
+
+ switch (errno) {
+
+ case ENOENT: /* segment does not exist */
+ return ENOENT;
+
+ case EINVAL: /* segment exists, but too small */
+ /* attempt minimum size access */
+ registry_id = shmget (JACK_SHM_REGISTRY_KEY, 1, 0666);
+ return EINVAL;
+
+ default: /* or other error */
+ jack_error ("unable to access shm registry (%s)",
+ strerror (errno));
+ return errno;
+ }
+ }
+
+ if ((ri->attached_at = shmat (registry_id, 0, 0)) < 0) {
+ jack_error ("Cannot attach shm registry segment (%s)",
+ strerror (errno));
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+ return 0;
+}
+
+/* create a new SHM registry segment
+ *
+ * sets up global registry pointers, if successful
+ *
+ * returns: 0 if registry created successfully
+ * nonzero error code if unable to allocate a new registry
+ */
+static int
+jack_create_registry (jack_shm_info_t *ri)
+{
+ /* registry must be locked */
+ if ((registry_id = shmget (JACK_SHM_REGISTRY_KEY,
+ JACK_SHM_REGISTRY_SIZE,
+ 0666|IPC_CREAT)) < 0) {
+ jack_error ("Cannot create shm registry segment (%s)",
+ strerror (errno));
+ return errno;
+ }
+
+ if ((ri->attached_at = shmat (registry_id, 0, 0)) < 0) {
+ jack_error ("Cannot attach shm registry segment (%s)",
+ strerror (errno));
+ return EINVAL;
+ }
+
+ /* set up global pointers */
+ ri->index = JACK_SHM_REGISTRY_INDEX;
+ jack_shm_header = ri->attached_at;
+ jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
+
+ /* initialize registry contents */
+ jack_shm_init_registry ();
+ return 0;
+}
+
+static void
+jack_remove_shm (jack_shm_id_t *id)
+{
+ /* registry may or may not be locked */
+ shmctl (*id, IPC_RMID, NULL);
+}
+
+void
+jack_release_shm (jack_shm_info_t* si)
+{
+ /* registry may or may not be locked */
+ if (si->attached_at != MAP_FAILED) {
+ shmdt (si->attached_at);
+ }
+}
+
+int
+jack_shmalloc (const char* name_not_used, jack_shmsize_t size,
+ jack_shm_info_t* si)
+{
+ int shmflags;
+ int shmid;
+ int rc = -1;
+ jack_shm_registry_t* registry;
+
+ jack_shm_lock_registry ();
+
+ if ((registry = jack_get_free_shm_info ())) {
+
+ shmflags = 0666 | IPC_CREAT | IPC_EXCL;
+
+ if ((shmid = shmget (IPC_PRIVATE, size, shmflags)) >= 0) {
+
+ registry->size = size;
+ registry->id = shmid;
+ registry->allocator = getpid();
+ si->index = registry->index;
+ si->attached_at = MAP_FAILED; /* not attached */
+ rc = 0;
+
+ } else {
+ jack_error ("Cannot create shm segment %s (%s)",
+ name_not_used, strerror (errno));
+ }
+ }
+
+ jack_shm_unlock_registry ();
+ return rc;
+}
+
+int
+jack_attach_shm (jack_shm_info_t* si)
+{
+ if ((si->attached_at = shmat (jack_shm_registry[si->index].id, 0, 0)) < 0) {
+ jack_error ("Cannot attach shm segment (%s)",
+ strerror (errno));
+ jack_release_shm_info (si->index);
+ return -1;
+ }
+ return 0;
+}
+
+#endif /* !USE_POSIX_SHM */
diff --git a/common/shm.h b/common/shm.h
new file mode 100644
index 00000000..2ef29fc4
--- /dev/null
+++ b/common/shm.h
@@ -0,0 +1,156 @@
+#ifndef __jack_shm_h__
+#define __jack_shm_h__
+
+#include <limits.h>
+#include <sys/types.h>
+#include "types.h"
+#include "JackExports.h"
+
+
+#define TRUE 1
+#define FALSE 0
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define MAX_SERVERS 8 /* maximum concurrent servers */
+#define MAX_SHM_ID 256 /* generally about 16 per server */
+#define JACK_SERVER_NAME_SIZE 256 /* maximum length of server name */
+#define JACK_SHM_MAGIC 0x4a41434b /* shm magic number: "JACK" */
+#define JACK_SHM_NULL_INDEX -1 /* NULL SHM index */
+#define JACK_SHM_REGISTRY_INDEX -2 /* pseudo SHM index for registry */
+
+
+ /* On Mac OS X, SHM_NAME_MAX is the maximum length of a shared memory
+ * segment name (instead of NAME_MAX or PATH_MAX as defined by the
+ * standard).
+ */
+#ifdef USE_POSIX_SHM
+
+#ifndef SHM_NAME_MAX
+#define SHM_NAME_MAX NAME_MAX
+#endif
+ typedef char shm_name_t[SHM_NAME_MAX];
+ typedef shm_name_t jack_shm_id_t;
+
+#elif WIN32 // steph TO CHECK
+#define NAME_MAX 255
+#ifndef SHM_NAME_MAX
+#define SHM_NAME_MAX NAME_MAX
+#endif
+ typedef char shm_name_t[SHM_NAME_MAX];
+ typedef shm_name_t jack_shm_id_t;
+
+#else
+ /* System V SHM */
+ typedef int jack_shm_id_t;
+#endif /* SHM type */
+
+ /* shared memory type */
+ typedef enum {
+ shm_POSIX = 1, /* POSIX shared memory */
+ shm_SYSV = 2, /* System V shared memory */
+ shm_WIN32 = 3 /* Windows 32 shared memory */
+ } jack_shmtype_t;
+
+ typedef int16_t jack_shm_registry_index_t;
+
+ /**
+ * A structure holding information about shared memory allocated by
+ * JACK. this persists across invocations of JACK, and can be used by
+ * multiple JACK servers. It contains no pointers and is valid across
+ * address spaces.
+ *
+ * The registry consists of two parts: a header including an array of
+ * server names, followed by an array of segment registry entries.
+ */
+ typedef struct _jack_shm_server {
+#ifdef WIN32
+ int pid; /* process ID */
+#else
+
+ pid_t pid; /* process ID */
+#endif
+
+ char name[JACK_SERVER_NAME_SIZE];
+ }
+ jack_shm_server_t;
+
+ typedef struct _jack_shm_header {
+ uint32_t magic; /* magic number */
+ uint16_t protocol; /* JACK protocol version */
+ jack_shmtype_t type; /* shm type */
+ jack_shmsize_t size; /* total registry segment size */
+ jack_shmsize_t hdr_len; /* size of header */
+ jack_shmsize_t entry_len; /* size of registry entry */
+ jack_shm_server_t server[MAX_SERVERS]; /* current server array */
+ }
+ jack_shm_header_t;
+
+ typedef struct _jack_shm_registry {
+ jack_shm_registry_index_t index; /* offset into the registry */
+
+#ifdef WIN32
+
+ int allocator; /* PID that created shm segment */
+#else
+
+ pid_t allocator; /* PID that created shm segment */
+#endif
+
+ jack_shmsize_t size; /* for POSIX unattach */
+ jack_shm_id_t id; /* API specific, see above */
+ }
+ jack_shm_registry_t;
+
+#define JACK_SHM_REGISTRY_SIZE (sizeof (jack_shm_header_t) \
+ + sizeof (jack_shm_registry_t) * MAX_SHM_ID)
+
+ /**
+ * a structure holding information about shared memory
+ * allocated by JACK. this version is valid only
+ * for a given address space. It contains a pointer
+ * indicating where the shared memory has been
+ * attached to the address space.
+ */
+ typedef struct _jack_shm_info {
+ jack_shm_registry_index_t index; /* offset into the registry */
+ void *attached_at; /* address where attached */
+ }
+ jack_shm_info_t;
+
+ /* utility functions used only within JACK */
+
+ extern void jack_shm_copy_from_registry (jack_shm_info_t*,
+ jack_shm_registry_index_t);
+ extern void jack_shm_copy_to_registry (jack_shm_info_t*,
+ jack_shm_registry_index_t*);
+ extern void jack_release_shm_info (jack_shm_registry_index_t);
+
+ extern char* jack_shm_addr (jack_shm_info_t* si); // steph
+
+ /* here beginneth the API */
+
+ EXPORT extern int jack_register_server (const char *server_name);
+ EXPORT extern void jack_unregister_server (const char *server_name);
+
+ extern int jack_initialize_shm (const char *server_name);
+ extern int jack_initialize_shm_server (void); // steph
+ extern int jack_initialize_shm_client (void); // steph
+ EXPORT extern int jack_cleanup_shm (void);
+
+ extern int jack_shmalloc (const char *shm_name, jack_shmsize_t size,
+ jack_shm_info_t* result);
+ extern void jack_release_shm (jack_shm_info_t*);
+ extern void jack_destroy_shm (jack_shm_info_t*);
+ extern int jack_attach_shm (jack_shm_info_t*);
+ extern int jack_attach_shm_read (jack_shm_info_t*); // steph
+ extern int jack_resize_shm (jack_shm_info_t*, jack_shmsize_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_shm_h__ */
diff --git a/common/statistics.h b/common/statistics.h
new file mode 100644
index 00000000..23ea4b66
--- /dev/null
+++ b/common/statistics.h
@@ -0,0 +1,59 @@
+/*
+* Copyright (C) 2004 Rui Nuno Capela, Lee Revell
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public License
+* as published by the Free Software Foundation; either version 2.1
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this program; if not, write to the Free
+* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+* 02111-1307, USA.
+*
+* $Id: statistics.h,v 1.2.2.3 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __statistics_h__
+#define __statistics_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ //#include <jack/types.h>
+#include "types.h"
+
+ /**
+ * @return the maximum delay reported by the backend since
+ * startup or reset. When compared to the period size in usecs, this
+ * can be used to estimate the ideal period size for a given setup.
+ */
+ float jack_get_max_delayed_usecs (jack_client_t *client);
+
+ /**
+ * @return the delay in microseconds due to the most recent XRUN
+ * occurrence. This probably only makes sense when called from a @ref
+ * JackXRunCallback defined using jack_set_xrun_callback().
+ */
+ float jack_get_xrun_delayed_usecs (jack_client_t *client);
+
+ /**
+ * Reset the maximum delay counter. This would be useful
+ * to estimate the effect that a change to the configuration of a running
+ * system (e.g. toggling kernel preemption) has on the delay
+ * experienced by JACK, without having to restart the JACK engine.
+ */
+ void jack_reset_max_delayed_usecs (jack_client_t *client);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __statistics_h__ */
diff --git a/common/thread.h b/common/thread.h
new file mode 100644
index 00000000..a7ddd4a7
--- /dev/null
+++ b/common/thread.h
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2004 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: thread.h,v 1.1.2.2 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_thread_h__
+#define __jack_thread_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifdef WIN32
+ #include <windows.h>
+ typedef HANDLE pthread_t;
+#else
+ #include <pthread.h>
+#endif
+
+
+ /** @file thread.h
+ *
+ * Library functions to standardize thread creation for JACK and its
+ * clients. These interfaces hide some system variations in the
+ * handling of realtime scheduling and associated privileges.
+ */
+
+ /**
+ * Attempt to enable realtime scheduling for a thread. On some
+ * systems that may require special privileges.
+ *
+ * @param thread POSIX thread ID.
+ * @param priority requested thread priority.
+ *
+ * @returns 0, if successful; EPERM, if the calling process lacks
+ * required realtime privileges; otherwise some other error number.
+ */
+ int jack_acquire_real_time_scheduling (pthread_t thread, int priority);
+
+ /**
+ * Create a thread for JACK or one of its clients. The thread is
+ * created executing @a start_routine with @a arg as its sole
+ * argument.
+ *
+ * @param client the JACK client for whom the thread is being created. May be
+ * NULL if the client is being created within the JACK server.
+ * @param thread place to return POSIX thread ID.
+ * @param priority thread priority, if realtime.
+ * @param realtime true for the thread to use realtime scheduling. On
+ * some systems that may require special privileges.
+ * @param start_routine function the thread calls when it starts.
+ * @param arg parameter passed to the @a start_routine.
+ *
+ * @returns 0, if successful; otherwise some error number.
+ */
+ int jack_client_create_thread (jack_client_t* client,
+ pthread_t *thread,
+ int priority,
+ int realtime, /* boolean */
+ void *(*start_routine)(void*),
+ void *arg);
+
+ /**
+ * Drop realtime scheduling for a thread.
+ *
+ * @param thread POSIX thread ID.
+ *
+ * @returns 0, if successful; otherwise an error number.
+ */
+ int jack_drop_real_time_scheduling (pthread_t thread);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_thread_h__ */
diff --git a/common/transport.h b/common/transport.h
new file mode 100644
index 00000000..877f8a68
--- /dev/null
+++ b/common/transport.h
@@ -0,0 +1,430 @@
+/*
+ Copyright (C) 2002 Paul Davis
+ Copyright (C) 2003 Jack O'Quin
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: transport.h,v 1.8.2.5 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_transport_h__
+#define __jack_transport_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ //#include <jack/types.h>
+#include "types.h"
+
+ /**
+ * Transport states.
+ */
+ typedef enum {
+
+ /* the order matters for binary compatibility */
+ JackTransportStopped = 0, /**< Transport halted */
+ JackTransportRolling = 1, /**< Transport playing */
+ JackTransportLooping = 2, /**< For OLD_TRANSPORT, now ignored */
+ JackTransportStarting = 3, /**< Waiting for sync ready */
+ JackTransportSynching = 4 /**< temporary*/
+
+ } jack_transport_state_t;
+
+ typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */
+
+ /**
+ * Optional struct jack_position_t fields.
+ */
+ typedef enum {
+
+ JackPositionBBT = 0x10, /**< Bar, Beat, Tick */
+ JackPositionTimecode = 0x20 /**< External timecode */
+
+ } jack_position_bits_t;
+
+ /** all valid position bits */
+#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
+#define EXTENDED_TIME_INFO
+
+ /**
+ * Struct for transport position information.
+ */
+ typedef struct {
+
+ /* these four cannot be set from clients: the server sets them */
+ jack_unique_t unique_1; /**< unique ID */
+ jack_time_t usecs; /**< monotonic, free-rolling */
+ jack_nframes_t frame_rate; /**< current frame rate (per second) */
+ jack_nframes_t frame; /**< frame number, always present */
+
+ jack_position_bits_t valid; /**< which other fields are valid */
+
+ /* JackPositionBBT fields: */
+ int32_t bar; /**< current bar */
+ int32_t beat; /**< current beat-within-bar */
+ int32_t tick; /**< current tick-within-beat */
+ double bar_start_tick;
+
+ float beats_per_bar; /**< time signature "numerator" */
+ float beat_type; /**< time signature "denominator" */
+ double ticks_per_beat;
+ double beats_per_minute;
+
+ /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */
+ double frame_time; /**< current time in seconds */
+ double next_time; /**< next sequential frame_time
+ (unless repositioned) */
+
+ /* For binary compatibility, new fields should be allocated from
+ * this padding area with new valid bits controlling access, so
+ * the existing structure size and offsets are preserved. */
+ int32_t padding[10];
+
+ /* When (unique_1 == unique_2) the contents are consistent. */
+ jack_unique_t unique_2; /**< unique ID */
+
+ }
+ jack_position_t;
+
+ /**
+ * Called by the timebase master to release itself from that
+ * responsibility.
+ *
+ * If the timebase master releases the timebase or leaves the JACK
+ * graph for any reason, the JACK engine takes over at the start of
+ * the next process cycle. The transport state does not change. If
+ * rolling, it continues to play, with frame numbers as the only
+ * available position information.
+ *
+ * @see jack_set_timebase_callback
+ *
+ * @param client the JACK client structure.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+
+ int jack_release_timebase (jack_client_t *client);
+
+ /**
+ * Prototype for the @a sync_callback defined by slow-sync clients.
+ * When the client is active, this callback is invoked just before
+ * process() in the same thread. This occurs once after registration,
+ * then subsequently whenever some client requests a new position, or
+ * the transport enters the ::JackTransportStarting state. This
+ * realtime function must not wait.
+ *
+ * The transport @a state will be:
+ *
+ * - ::JackTransportStopped when a new position is requested;
+ * - ::JackTransportStarting when the transport is waiting to start;
+ * - ::JackTransportRolling when the timeout has expired, and the
+ * position is now a moving target.
+ *
+ * @param state current transport state.
+ * @param pos new transport position.
+ * @param arg the argument supplied by jack_set_sync_callback().
+ *
+ * @return TRUE (non-zero) when ready to roll.
+ */
+ typedef int (*JackSyncCallback)(jack_transport_state_t state,
+ jack_position_t *pos,
+ void *arg);
+
+ /**
+ * Register (or unregister) as a slow-sync client, one that cannot
+ * respond immediately to transport position changes.
+ *
+ * The @a sync_callback will be invoked at the first available
+ * opportunity after its registration is complete. If the client is
+ * currently active this will be the following process cycle,
+ * otherwise it will be the first cycle after calling jack_activate().
+ * After that, it runs according to the ::JackSyncCallback rules.
+ * Clients that don't set a @a sync_callback are assumed to be ready
+ * immediately any time the transport wants to start.
+ *
+ * @param client the JACK client structure.
+ * @param sync_callback is a realtime function that returns TRUE when
+ * the client is ready. Setting @a sync_callback to NULL declares that
+ * this client no longer requires slow-sync processing.
+ * @param arg an argument for the @a sync_callback function.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+
+ int jack_set_sync_callback (jack_client_t *client,
+ JackSyncCallback sync_callback,
+ void *arg);
+ /**
+ * Set the timeout value for slow-sync clients.
+ *
+ * This timeout prevents unresponsive slow-sync clients from
+ * completely halting the transport mechanism. The default is two
+ * seconds. When the timeout expires, the transport starts rolling,
+ * even if some slow-sync clients are still unready. The @a
+ * sync_callbacks of these clients continue being invoked, giving them
+ * a chance to catch up.
+ *
+ * @see jack_set_sync_callback
+ *
+ * @param client the JACK client structure.
+ * @param timeout is delay (in microseconds) before the timeout expires.
+ *
+ * @return 0 on success, otherwise a non-zero error code.
+ */
+
+ int jack_set_sync_timeout (jack_client_t *client,
+ jack_time_t timeout);
+ /**
+ * Prototype for the @a timebase_callback used to provide extended
+ * position information. Its output affects all of the following
+ * process cycle. This realtime function must not wait.
+ *
+ * This function is called immediately after process() in the same
+ * thread whenever the transport is rolling, or when any client has
+ * requested a new position in the previous cycle. The first cycle
+ * after jack_set_timebase_callback() is also treated as a new
+ * position, or the first cycle after jack_activate() if the client
+ * had been inactive.
+ *
+ * The timebase master may not use its @a pos argument to set @a
+ * pos->frame. To change position, use jack_transport_reposition() or
+ * jack_transport_locate(). These functions are realtime-safe, the @a
+ * timebase_callback can call them directly.
+ *
+ * @param state current transport state.
+ * @param nframes number of frames in current period.
+ * @param pos address of the position structure for the next cycle; @a
+ * pos->frame will be its frame number. If @a new_pos is FALSE, this
+ * structure contains extended position information from the current
+ * cycle. If TRUE, it contains whatever was set by the requester.
+ * The @a timebase_callback's task is to update the extended
+ * information here.
+ * @param new_pos TRUE (non-zero) for a newly requested @a pos, or for
+ * the first cycle after the @a timebase_callback is defined.
+ * @param arg the argument supplied by jack_set_timebase_callback().
+ */
+ typedef void (*JackTimebaseCallback)(jack_transport_state_t state,
+ jack_nframes_t nframes,
+ jack_position_t *pos,
+ int new_pos,
+ void *arg);
+
+ /**
+ * Register as timebase master for the JACK subsystem.
+ *
+ * The timebase master registers a callback that updates extended
+ * position information such as beats or timecode whenever necessary.
+ * Without this extended information, there is no need for this
+ * function.
+ *
+ * There is never more than one master at a time. When a new client
+ * takes over, the former @a timebase_callback is no longer called.
+ * Taking over the timebase may be done conditionally, so it fails if
+ * there was a master already.
+ *
+ * @param client the JACK client structure.
+ * @param conditional non-zero for a conditional request.
+ * @param timebase_callback is a realtime function that returns
+ * position information.
+ * @param arg an argument for the @a timebase_callback function.
+ *
+ * @return
+ * - 0 on success;
+ * - EBUSY if a conditional request fails because there was already a
+ * timebase master;
+ * - other non-zero error code.
+ */
+
+ int jack_set_timebase_callback (jack_client_t *client,
+ int conditional,
+ JackTimebaseCallback timebase_callback,
+ void *arg);
+ /**
+ * Reposition the transport to a new frame number.
+ *
+ * May be called at any time by any client. The new position takes
+ * effect in two process cycles. If there are slow-sync clients and
+ * the transport is already rolling, it will enter the
+ * ::JackTransportStarting state and begin invoking their @a
+ * sync_callbacks until ready. This function is realtime-safe.
+ *
+ * @see jack_transport_reposition, jack_set_sync_callback
+ *
+ * @param client the JACK client structure.
+ * @param frame frame number of new transport position.
+ *
+ * @return 0 if valid request, non-zero otherwise.
+ */
+
+ int jack_transport_locate (jack_client_t *client,
+ jack_nframes_t frame);
+ /**
+ * Query the current transport state and position.
+ *
+ * This function is realtime-safe, and can be called from any thread.
+ * If called from the process thread, @a pos corresponds to the first
+ * frame of the current cycle and the state returned is valid for the
+ * entire cycle.
+ *
+ * @param client the JACK client structure.
+ * @param pos pointer to structure for returning current transport
+ * position; @a pos->valid will show which fields contain valid data.
+ * If @a pos is NULL, do not return position information.
+ *
+ * @return Current transport state.
+ */
+
+ jack_transport_state_t jack_transport_query (const jack_client_t *client,
+ jack_position_t *pos);
+ /**
+ * Return an estimate of the current transport frame,
+ * including any time elapsed since the last transport
+ * positional update.
+ *
+ * @param client the JACK client structure
+ */
+
+ jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client);
+ /**
+ * Request a new transport position.
+ *
+ * May be called at any time by any client. The new position takes
+ * effect in two process cycles. If there are slow-sync clients and
+ * the transport is already rolling, it will enter the
+ * ::JackTransportStarting state and begin invoking their @a
+ * sync_callbacks until ready. This function is realtime-safe.
+ *
+ * @see jack_transport_locate, jack_set_sync_callback
+ *
+ * @param client the JACK client structure.
+ * @param pos requested new transport position.
+ *
+ * @return 0 if valid request, EINVAL if position structure rejected.
+ */
+
+ int jack_transport_reposition (jack_client_t *client,
+ jack_position_t *pos);
+ /**
+ * Start the JACK transport rolling.
+ *
+ * Any client can make this request at any time. It takes effect no
+ * sooner than the next process cycle, perhaps later if there are
+ * slow-sync clients. This function is realtime-safe.
+ *
+ * @see jack_set_sync_callback
+ *
+ * @param client the JACK client structure.
+ */
+
+ void jack_transport_start (jack_client_t *client);
+ /**
+ * Stop the JACK transport.
+ *
+ * Any client can make this request at any time. It takes effect on
+ * the next process cycle. This function is realtime-safe.
+ *
+ * @param client the JACK client structure.
+ */
+
+ void jack_transport_stop (jack_client_t *client);
+
+ /*********************************************************************
+ * The following interfaces are DEPRECATED. They are only provided
+ * for compatibility with the earlier JACK transport implementation.
+ *********************************************************************/
+
+ /**
+ * Optional struct jack_transport_info_t fields.
+ *
+ * @see jack_position_bits_t.
+ */
+ typedef enum {
+
+ JackTransportState = 0x1, /**< Transport state */
+ JackTransportPosition = 0x2, /**< Frame number */
+ JackTransportLoop = 0x4, /**< Loop boundaries (ignored) */
+ JackTransportSMPTE = 0x8, /**< SMPTE (ignored) */
+ JackTransportBBT = 0x10 /**< Bar, Beat, Tick */
+
+ } jack_transport_bits_t;
+
+ /**
+ * Deprecated struct for transport position information.
+ *
+ * @deprecated This is for compatibility with the earlier transport
+ * interface. Use the jack_position_t struct, instead.
+ */
+ typedef struct {
+
+ /* these two cannot be set from clients: the server sets them */
+
+ jack_nframes_t frame_rate; /**< current frame rate (per second) */
+ jack_time_t usecs; /**< monotonic, free-rolling */
+
+ jack_transport_bits_t valid; /**< which fields are legal to read */
+ jack_transport_state_t transport_state;
+ jack_nframes_t frame;
+ jack_nframes_t loop_start;
+ jack_nframes_t loop_end;
+
+ long smpte_offset; /**< SMPTE offset (from frame 0) */
+ float smpte_frame_rate; /**< 29.97, 30, 24 etc. */
+
+ int bar;
+ int beat;
+ int tick;
+ double bar_start_tick;
+
+ float beats_per_bar;
+ float beat_type;
+ double ticks_per_beat;
+ double beats_per_minute;
+
+ }
+ jack_transport_info_t;
+
+ /**
+ * Gets the current transport info structure (deprecated).
+ *
+ * @param client the JACK client structure.
+ * @param tinfo current transport info structure. The "valid" field
+ * describes which fields contain valid data.
+ *
+ * @deprecated This is for compatibility with the earlier transport
+ * interface. Use jack_transport_query(), instead.
+ *
+ * @pre Must be called from the process thread.
+ */
+
+ void jack_get_transport_info (jack_client_t *client,
+ jack_transport_info_t *tinfo);
+ /**
+ * Set the transport info structure (deprecated).
+ *
+ * @deprecated This function still exists for compatibility with the
+ * earlier transport interface, but it does nothing. Instead, define
+ * a ::JackTimebaseCallback.
+ */
+
+ void jack_set_transport_info (jack_client_t *client,
+ jack_transport_info_t *tinfo);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_transport_h__ */
diff --git a/common/transport_types.h b/common/transport_types.h
new file mode 100644
index 00000000..74aa94ec
--- /dev/null
+++ b/common/transport_types.h
@@ -0,0 +1,223 @@
+/*
+ Copyright (C) 2002 Paul Davis
+ Copyright (C) 2003 Jack O'Quin
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: transport_types.h,v 1.1.2.2 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_transport_aux_h__
+#define __jack_transport_aux_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ //#include <jack/types.h>
+#include "types.h"
+
+ /**
+ * Transport states.
+ */
+ typedef enum {
+
+ /* the order matters for binary compatibility */
+ JackTransportStopped = 0, /**< Transport halted */
+ JackTransportRolling = 1, /**< Transport playing */
+ JackTransportLooping = 2, /**< For OLD_TRANSPORT, now ignored */
+ JackTransportStarting = 3, /**< Waiting for sync ready */
+ JackTransportSynching = 4 /**< temporary*/
+
+ } jack_transport_state_t;
+
+ typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */
+
+ /**
+ * Optional struct jack_position_t fields.
+ */
+ typedef enum {
+
+ JackPositionBBT = 0x10, /**< Bar, Beat, Tick */
+ JackPositionTimecode = 0x20 /**< External timecode */
+
+ } jack_position_bits_t;
+
+ /** all valid position bits */
+#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
+#define EXTENDED_TIME_INFO
+
+ /**
+ * Struct for transport position information.
+ */
+ typedef struct {
+
+ /* these four cannot be set from clients: the server sets them */
+ jack_unique_t unique_1; /**< unique ID */
+ jack_time_t usecs; /**< monotonic, free-rolling */
+ jack_nframes_t frame_rate; /**< current frame rate (per second) */
+ jack_nframes_t frame; /**< frame number, always present */
+
+ jack_position_bits_t valid; /**< which other fields are valid */
+
+ /* JackPositionBBT fields: */
+ int32_t bar; /**< current bar */
+ int32_t beat; /**< current beat-within-bar */
+ int32_t tick; /**< current tick-within-beat */
+ double bar_start_tick;
+
+ float beats_per_bar; /**< time signature "numerator" */
+ float beat_type; /**< time signature "denominator" */
+ double ticks_per_beat;
+ double beats_per_minute;
+
+ /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */
+ double frame_time; /**< current time in seconds */
+ double next_time; /**< next sequential frame_time
+ (unless repositioned) */
+
+ /* For binary compatibility, new fields should be allocated from
+ * this padding area with new valid bits controlling access, so
+ * the existing structure size and offsets are preserved. */
+ int32_t padding[10];
+
+ /* When (unique_1 == unique_2) the contents are consistent. */
+ jack_unique_t unique_2; /**< unique ID */
+
+ }
+ jack_position_t;
+
+ /**
+ * Prototype for the @a sync_callback defined by slow-sync clients.
+ * When the client is active, this callback is invoked just before
+ * process() in the same thread. This occurs once after registration,
+ * then subsequently whenever some client requests a new position, or
+ * the transport enters the ::JackTransportStarting state. This
+ * realtime function must not wait.
+ *
+ * The transport @a state will be:
+ *
+ * - ::JackTransportStopped when a new position is requested;
+ * - ::JackTransportStarting when the transport is waiting to start;
+ * - ::JackTransportRolling when the timeout has expired, and the
+ * position is now a moving target.
+ *
+ * @param state current transport state.
+ * @param pos new transport position.
+ * @param arg the argument supplied by jack_set_sync_callback().
+ *
+ * @return TRUE (non-zero) when ready to roll.
+ */
+ typedef int (*JackSyncCallback)(jack_transport_state_t state,
+ jack_position_t *pos,
+ void *arg);
+
+
+ /**
+ * Prototype for the @a timebase_callback used to provide extended
+ * position information. Its output affects all of the following
+ * process cycle. This realtime function must not wait.
+ *
+ * This function is called immediately after process() in the same
+ * thread whenever the transport is rolling, or when any client has
+ * requested a new position in the previous cycle. The first cycle
+ * after jack_set_timebase_callback() is also treated as a new
+ * position, or the first cycle after jack_activate() if the client
+ * had been inactive.
+ *
+ * The timebase master may not use its @a pos argument to set @a
+ * pos->frame. To change position, use jack_transport_reposition() or
+ * jack_transport_locate(). These functions are realtime-safe, the @a
+ * timebase_callback can call them directly.
+ *
+ * @param state current transport state.
+ * @param nframes number of frames in current period.
+ * @param pos address of the position structure for the next cycle; @a
+ * pos->frame will be its frame number. If @a new_pos is FALSE, this
+ * structure contains extended position information from the current
+ * cycle. If TRUE, it contains whatever was set by the requester.
+ * The @a timebase_callback's task is to update the extended
+ * information here.
+ * @param new_pos TRUE (non-zero) for a newly requested @a pos, or for
+ * the first cycle after the @a timebase_callback is defined.
+ * @param arg the argument supplied by jack_set_timebase_callback().
+ */
+ typedef void (*JackTimebaseCallback)(jack_transport_state_t state,
+ jack_nframes_t nframes,
+ jack_position_t *pos,
+ int new_pos,
+ void *arg);
+
+ /*********************************************************************
+ * The following interfaces are DEPRECATED. They are only provided
+ * for compatibility with the earlier JACK transport implementation.
+ *********************************************************************/
+
+ /**
+ * Optional struct jack_transport_info_t fields.
+ *
+ * @see jack_position_bits_t.
+ */
+ typedef enum {
+
+ JackTransportState = 0x1, /**< Transport state */
+ JackTransportPosition = 0x2, /**< Frame number */
+ JackTransportLoop = 0x4, /**< Loop boundaries (ignored) */
+ JackTransportSMPTE = 0x8, /**< SMPTE (ignored) */
+ JackTransportBBT = 0x10 /**< Bar, Beat, Tick */
+
+ } jack_transport_bits_t;
+
+ /**
+ * Deprecated struct for transport position information.
+ *
+ * @deprecated This is for compatibility with the earlier transport
+ * interface. Use the jack_position_t struct, instead.
+ */
+ typedef struct {
+
+ /* these two cannot be set from clients: the server sets them */
+
+ jack_nframes_t frame_rate; /**< current frame rate (per second) */
+ jack_time_t usecs; /**< monotonic, free-rolling */
+
+ jack_transport_bits_t valid; /**< which fields are legal to read */
+ jack_transport_state_t transport_state;
+ jack_nframes_t frame;
+ jack_nframes_t loop_start;
+ jack_nframes_t loop_end;
+
+ long smpte_offset; /**< SMPTE offset (from frame 0) */
+ float smpte_frame_rate; /**< 29.97, 30, 24 etc. */
+
+ int bar;
+ int beat;
+ int tick;
+ double bar_start_tick;
+
+ float beats_per_bar;
+ float beat_type;
+ double ticks_per_beat;
+ double beats_per_minute;
+
+ }
+ jack_transport_info_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_transport_aux_h__ */
diff --git a/common/types.h b/common/types.h
new file mode 100644
index 00000000..ec294348
--- /dev/null
+++ b/common/types.h
@@ -0,0 +1,395 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004 Jack O'Quin
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: types.h,v 1.4.2.8 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __jack_types_h__
+#define __jack_types_h__
+
+#ifdef WIN32
+ #include <windows.h>
+typedef char int8_t;
+typedef unsigned char uint8_t;
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef long int32_t;
+typedef unsigned long uint32_t;
+typedef LONGLONG int64_t;
+typedef ULONGLONG uint64_t;
+#else
+ #include <inttypes.h>
+#endif
+
+typedef int32_t jack_shmsize_t;
+
+/**
+ * Type used to represent sample frame counts.
+ */
+typedef uint32_t jack_nframes_t;
+
+/**
+ * Maximum value that can be stored in jack_nframes_t
+ */
+#define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but C++ has a problem with that. */
+
+/**
+ * Type used to represent the value of free running
+ * monotonic clock with units of microseconds.
+ */
+
+#ifdef WIN32
+typedef int64_t jack_time_t;
+//typedef double jack_time_t;
+//typedef uint64_t jack_time_t;
+
+#else
+typedef uint64_t jack_time_t;
+#endif
+
+/**
+ * Maximum size of @a load_init string passed to an internal client
+ * jack_initialize() function via jack_internal_client_load().
+ */
+#define JACK_LOAD_INIT_LIMIT 1024
+
+/**
+ * jack_intclient_t is an opaque type representing a loaded internal
+ * client. You may only access it using the API provided in @ref
+ * intclient.h "<jack/intclient.h>".
+ */
+typedef uint64_t jack_intclient_t;
+
+/**
+ * jack_port_t is an opaque type. You may only access it using the
+ * API provided.
+ */
+typedef struct _jack_port jack_port_t;
+
+/**
+ * jack_client_t is an opaque type. You may only access it using the
+ * API provided.
+ */
+typedef struct _jack_client jack_client_t;
+
+/**
+ * Ports have unique ids. A port registration callback is the only
+ * place you ever need to know their value.
+ */
+#if defined(__x86_64__)
+typedef uint64_t jack_port_id_t;
+#else
+typedef uint32_t jack_port_id_t;
+#endif
+
+/**
+ * Prototype for the client supplied function that is called
+ * by the engine anytime there is work to be done.
+ *
+ * @pre nframes == jack_get_buffer_size()
+ * @pre nframes == pow(2,x)
+ *
+ * @param nframes number of frames to process
+ * @param arg pointer to a client supplied structure
+ *
+ * @return zero on success, non-zero on error
+ */
+typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
+
+/**
+ * Prototype for the client supplied function that is called
+ * once after the creation of the thread in which other
+ * callbacks will be made. Special thread characteristics
+ * can be set from this callback, for example. This is a
+ * highly specialized callback and most clients will not
+ * and should not use it.
+ *
+ * @param arg pointer to a client supplied structure
+ *
+ * @return void
+ */
+typedef void (*JackThreadInitCallback)(void *arg);
+
+/**
+ * Prototype for the client supplied function that is called
+ * whenever the processing graph is reordered.
+ *
+ * @param arg pointer to a client supplied structure
+ *
+ * @return zero on success, non-zero on error
+ */
+typedef int (*JackGraphOrderCallback)(void *arg);
+
+/**
+ * Prototype for the client-supplied function that is called whenever
+ * an xrun has occured.
+ *
+ * @see jack_get_xrun_delayed_usecs()
+ *
+ * @param arg pointer to a client supplied structure
+ *
+ * @return zero on success, non-zero on error
+ */
+typedef int (*JackXRunCallback)(void *arg);
+
+/**
+ * Prototype for the @a bufsize_callback that is invoked whenever the
+ * JACK engine buffer size changes. Although this function is called
+ * in the JACK process thread, the normal process cycle is suspended
+ * during its operation, causing a gap in the audio flow. So, the @a
+ * bufsize_callback can allocate storage, touch memory not previously
+ * referenced, and perform other operations that are not realtime
+ * safe.
+ *
+ * @param nframes buffer size
+ * @param arg pointer supplied by jack_set_buffer_size_callback().
+ *
+ * @return zero on success, non-zero on error
+ */
+typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
+
+/**
+ * Prototype for the client supplied function that is called
+ * when the engine sample rate changes.
+ *
+ * @param nframes new engine sample rate
+ * @param arg pointer to a client supplied structure
+ *
+ * @return zero on success, non-zero on error
+ */
+typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
+
+/**
+ * Prototype for the client supplied function that is called
+ * whenever a port is registered or unregistered.
+ *
+ * @param arg pointer to a client supplied structure
+ */
+typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int, void *arg);
+
+/**
+ * Prototype for the client supplied function that is called
+ * whenever jackd starts or stops freewheeling.
+ *
+ * @param starting non-zero if we start starting to freewheel, zero otherwise
+ * @param arg pointer to a client supplied structure
+ */
+typedef void (*JackFreewheelCallback)(int starting, void *arg);
+
+/**
+ * Used for the type argument of jack_port_register() for default
+ * audio ports.
+ */
+#define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
+
+/**
+ * For convenience, use this typedef if you want to be able to change
+ * between float and double. You may want to typedef sample_t to
+ * jack_default_audio_sample_t in your application.
+ */
+typedef float jack_default_audio_sample_t;
+
+/**
+ * A port has a set of flags that are formed by AND-ing together the
+ * desired values from the list below. The flags "JackPortIsInput" and
+ * "JackPortIsOutput" are mutually exclusive and it is an error to use
+ * them both.
+ */
+enum JackPortFlags {
+
+ /**
+ * if JackPortIsInput is set, then the port can receive
+ * data.
+ */
+ JackPortIsInput = 0x1,
+
+ /**
+ * if JackPortIsOutput is set, then data can be read from
+ * the port.
+ */
+ JackPortIsOutput = 0x2,
+
+ /**
+ * if JackPortIsPhysical is set, then the port corresponds
+ * to some kind of physical I/O connector.
+ */
+ JackPortIsPhysical = 0x4,
+
+ /**
+ * if JackPortCanMonitor is set, then a call to
+ * jack_port_request_monitor() makes sense.
+ *
+ * Precisely what this means is dependent on the client. A typical
+ * result of it being called with TRUE as the second argument is
+ * that data that would be available from an output port (with
+ * JackPortIsPhysical set) is sent to a physical output connector
+ * as well, so that it can be heard/seen/whatever.
+ *
+ * Clients that do not control physical interfaces
+ * should never create ports with this bit set.
+ */
+ JackPortCanMonitor = 0x8,
+
+ /**
+ * JackPortIsTerminal means:
+ *
+ * for an input port: the data received by the port
+ * will not be passed on or made
+ * available at any other port
+ *
+ * for an output port: the data available at the port
+ * does not originate from any other port
+ *
+ * Audio synthesizers, I/O hardware interface clients, HDR
+ * systems are examples of clients that would set this flag for
+ * their ports.
+ */
+ JackPortIsTerminal = 0x10
+};
+
+/**
+ * @ref jack_options_t bits
+ */
+enum JackOptions {
+
+ /**
+ * Null value to use when no option bits are needed.
+ */
+ JackNullOption = 0x00,
+
+ /**
+ * Do not automatically start the JACK server when it is not
+ * already running. This option is always selected if
+ * \$JACK_NO_START_SERVER is defined in the calling process
+ * environment.
+ */
+ JackNoStartServer = 0x01,
+
+ /**
+ * Use the exact client name requested. Otherwise, JACK
+ * automatically generates a unique one, if needed.
+ */
+ JackUseExactName = 0x02,
+
+ /**
+ * Open with optional <em>(char *) server_name</em> parameter.
+ */
+ JackServerName = 0x04,
+
+ /**
+ * Load internal client from optional <em>(char *)
+ * load_name</em>. Otherwise use the @a client_name.
+ */
+ JackLoadName = 0x08,
+
+ /**
+ * Pass optional <em>(char *) load_init</em> string to the
+ * jack_initialize() entry point of an internal client.
+ */
+ JackLoadInit = 0x10
+};
+
+/** Valid options for opening an external client. */
+#define JackOpenOptions (JackServerName|JackNoStartServer|JackUseExactName)
+
+/** Valid options for loading an internal client. */
+#define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
+
+/**
+ * Options for several JACK operations, formed by OR-ing together the
+ * relevant @ref JackOptions bits.
+ */
+typedef enum JackOptions jack_options_t;
+
+/**
+ * @ref jack_status_t bits
+ */
+enum JackStatus {
+
+ /**
+ * Overall operation failed.
+ */
+ JackFailure = 0x01,
+
+ /**
+ * The operation contained an invalid or unsupported option.
+ */
+ JackInvalidOption = 0x02,
+
+ /**
+ * The desired client name was not unique. With the @ref
+ * JackUseExactName option this situation is fatal. Otherwise,
+ * the name was modified by appending a dash and a two-digit
+ * number in the range "-01" to "-99". The
+ * jack_get_client_name() function will return the exact string
+ * that was used. If the specified @a client_name plus these
+ * extra characters would be too long, the open fails instead.
+ */
+ JackNameNotUnique = 0x04,
+
+ /**
+ * The JACK server was started as a result of this operation.
+ * Otherwise, it was running already. In either case the caller
+ * is now connected to jackd, so there is no race condition.
+ * When the server shuts down, the client will find out.
+ */
+ JackServerStarted = 0x08,
+
+ /**
+ * Unable to connect to the JACK server.
+ */
+ JackServerFailed = 0x10,
+
+ /**
+ * Communication error with the JACK server.
+ */
+ JackServerError = 0x20,
+
+ /**
+ * Requested client does not exist.
+ */
+ JackNoSuchClient = 0x40,
+
+ /**
+ * Unable to load internal client
+ */
+ JackLoadFailure = 0x80,
+
+ /**
+ * Unable to initialize client
+ */
+ JackInitFailure = 0x100,
+
+ /**
+ * Unable to access shared memory
+ */
+ JackShmFailure = 0x200,
+
+ /**
+ * Client's protocol version does not match
+ */
+ JackVersionError = 0x400
+};
+
+/**
+ * Status word returned from several JACK operations, formed by
+ * OR-ing together the relevant @ref JackStatus bits.
+ */
+typedef enum JackStatus jack_status_t;
+
+#endif /* __jack_types_h__ */
diff --git a/common/varargs.h b/common/varargs.h
new file mode 100644
index 00000000..238cb3c1
--- /dev/null
+++ b/common/varargs.h
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2004 Jack O'Quin
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation; either version 2.1 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*
+* $Id: varargs.h,v 1.3 2005/11/23 11:24:00 letz Exp $
+*/
+
+#ifndef __jack_varargs_h__
+#define __jack_varargs_h__
+
+#include <stdlib.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /* variable argument structure */
+ typedef struct {
+ char *server_name; /* server name */
+ char *load_name; /* load module name */
+ char *load_init; /* initialization string */
+ }
+ jack_varargs_t;
+
+ static char* jack_default_server_name (void) {
+ char *server_name;
+ if ((server_name = getenv("JACK_DEFAULT_SERVER")) == NULL)
+ server_name = "default";
+ return server_name;
+ }
+
+ static inline void jack_varargs_init (jack_varargs_t *va) {
+ memset (va, 0, sizeof(jack_varargs_t));
+ va->server_name = jack_default_server_name();
+ }
+
+ static inline void jack_varargs_parse (jack_options_t options, va_list ap, jack_varargs_t *va) {
+ // initialize default settings
+ jack_varargs_init (va);
+
+ if ((options & JackServerName)) {
+ char *sn = va_arg(ap, char *);
+ if (sn)
+ va->server_name = sn;
+ }
+ if ((options & JackLoadName))
+ va->load_name = va_arg(ap, char *);
+ if ((options & JackLoadInit))
+ va->load_init = va_arg(ap, char *);
+ }
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_varargs_h__ */
diff --git a/example-clients/connect.c b/example-clients/connect.c
new file mode 100644
index 00000000..c9713124
--- /dev/null
+++ b/example-clients/connect.c
@@ -0,0 +1,141 @@
+/*
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: connect.c,v 1.1.2.1 2006/06/05 16:54:55 letz Exp $
+*/
+
+#include <stdio.h>
+#include <errno.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+
+#include "jack.h"
+
+jack_port_t *input_port;
+jack_port_t *output_port;
+int connecting, disconnecting;
+#define TRUE 1
+#define FALSE 0
+
+int
+main (int argc, char *argv[])
+
+{
+ jack_client_t* client = NULL;
+ char *my_name = strrchr(argv[0], '/');
+ connecting = disconnecting = FALSE;
+ if (my_name == 0) {
+ my_name = argv[0];
+ } else {
+ my_name ++;
+ }
+
+ printf("name %s\n", my_name);
+
+ if (strstr(my_name, "jack_disconnect")) {
+ disconnecting = TRUE;
+ } else
+ if (strstr(my_name, "jack_connect")) {
+ connecting = TRUE;
+ } else {
+ fprintf(stderr, "ERROR! client should be called jack_connect or jack_disconnect. client is called %s\n", my_name);
+ //return 1;
+ goto error;
+ }
+
+ printf("connecting %ld\n",connecting);
+
+ if (argc != 3) {
+ fprintf (stderr, "usage: %s <src_port> <dst_port>\n", my_name);
+ fprintf(stderr, "The source port must be an output port of the source client.\n");
+ fprintf (stderr, "The destination port must be an input port of the destination client.\n");
+ //return 1;
+ goto error;
+ }
+
+ /* try to become a client of the JACK server */
+
+ if ((client = jack_client_new (my_name)) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ //return 1;
+ goto error;
+ }
+
+ /* 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.
+ */
+
+// printf ("engine sample rate: %" PRIu32 "\n",jack_get_sample_rate (client));
+
+ /* find the two ports */
+
+ if ((input_port = jack_port_by_name(client, argv[1])) == 0) {
+ fprintf (stderr, "ERROR %s not a valid port\n", argv[1]);
+ goto error;
+ }
+ if ((output_port = jack_port_by_name(client, argv[2])) == 0) {
+ 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)) {
+ fprintf (stderr, "cannot activate client");
+ goto error;
+ }
+
+ /* connect the ports. Note: you can't do this before
+ the client is activated (this may change in the future).
+ */
+
+ /* jack_port_connect not yet implemented
+ if (jack_port_connect(client, input_port, output_port)) {
+ fprintf (stderr, "cannot connect ports\n");
+ }
+ */
+ if (connecting) {
+ printf("connecting %s %s\n",jack_port_name(input_port), jack_port_name(output_port));
+
+ if (jack_connect(client, jack_port_name(input_port), jack_port_name(output_port))) {
+ fprintf (stderr, "cannot connect ports\n");
+ goto error;
+ }
+ }
+ if (disconnecting) {
+ printf("disconnecting %s %s\n",jack_port_name(input_port), jack_port_name(output_port));
+
+ if (jack_disconnect(client, jack_port_name(input_port), jack_port_name(output_port))) {
+ fprintf (stderr, "cannot disconnect ports\n");
+ goto error;
+ }
+ }
+ //jack_deactivate (client);
+ jack_client_close (client);
+ return 0;
+
+error:
+ if (client) jack_client_close (client);
+ return 1;
+}
+
diff --git a/example-clients/echo.cpp b/example-clients/echo.cpp
new file mode 100644
index 00000000..153d2fc9
--- /dev/null
+++ b/example-clients/echo.cpp
@@ -0,0 +1,527 @@
+/* link with */
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <math.h>
+#include <errno.h>
+#include <time.h>
+#include <vector>
+#include <stack>
+#include <string>
+#include <map>
+#include <iostream>
+
+#include <libgen.h>
+#include <jack/jack.h>
+
+// g++ -O3 -lm -lsndfile myfx.cpp
+
+using namespace std;
+
+
+#define max(x,y) (((x)>(y)) ? (x) : (y))
+#define min(x,y) (((x)<(y)) ? (x) : (y))
+
+// abs is now predefined
+//template<typename T> T abs (T a) { return (a<T(0)) ? -a : a; }
+
+
+inline int lsr (int x, int n)
+{
+ return int(((unsigned int)x) >> n);
+}
+
+
+/******************************************************************************
+*******************************************************************************
+
+ VECTOR INTRINSICS
+
+*******************************************************************************
+*******************************************************************************/
+
+inline void *aligned_calloc(size_t nmemb, size_t size)
+{
+ return (void*)((unsigned)(calloc((nmemb*size) + 15, sizeof(char))) + 15 & 0xfffffff0);
+}
+
+
+
+
+
+
+/******************************************************************************
+*******************************************************************************
+
+ USER INTERFACE
+
+*******************************************************************************
+*******************************************************************************/
+
+class UI
+{
+ bool fStopped;
+ public:
+
+ UI() : fStopped(false)
+ {}
+ virtual ~UI()
+ {}
+
+ // -- active widgets
+
+ virtual void addButton(char* label, float* zone) = 0;
+ virtual void addToggleButton(char* label, float* zone) = 0;
+ virtual void addCheckButton(char* label, float* zone) = 0;
+ virtual void addVerticalSlider(char* label, float* zone, float init, float min, float max, float step) = 0;
+ virtual void addHorizontalSlider(char* label, float* zone, float init, float min, float max, float step) = 0;
+ virtual void addNumEntry(char* label, float* zone, float init, float min, float max, float step) = 0;
+
+ // -- passive widgets
+
+ virtual void addNumDisplay(char* label, float* zone, int precision) = 0;
+ virtual void addTextDisplay(char* label, float* zone, char* names[], float min, float max) = 0;
+ virtual void addHorizontalBargraph(char* label, float* zone, float min, float max) = 0;
+ virtual void addVerticalBargraph(char* label, float* zone, float min, float max) = 0;
+
+ // -- frames and labels
+
+ virtual void openFrameBox(char* label) = 0;
+ virtual void openTabBox(char* label) = 0;
+ virtual void openHorizontalBox(char* label) = 0;
+ virtual void openVerticalBox(char* label) = 0;
+ virtual void closeBox() = 0;
+
+ virtual void show() = 0;
+ virtual void run() = 0;
+
+ void stop()
+ {
+ fStopped = true;
+ }
+ bool stopped()
+ {
+ return fStopped;
+ }
+};
+
+struct param
+{
+ float* fZone;
+ float fMin;
+ float fMax;
+ param(float* z, float a, float b) : fZone(z), fMin(a), fMax(b)
+ {}
+}
+;
+
+class CMDUI : public UI
+{
+ int fArgc;
+ char** fArgv;
+ stack<string> fPrefix;
+ map<string, param> fKeyParam;
+
+ void addOption(char* label, float* zone, float min, float max)
+ {
+ string fullname = fPrefix.top() + label;
+ fKeyParam.insert(make_pair(fullname, param(zone, min, max)));
+ }
+
+ void openAnyBox(char* label)
+ {
+ string prefix;
+
+ if (label && label[0]) {
+ prefix = fPrefix.top() + "-" + label;
+ } else {
+ prefix = fPrefix.top();
+ }
+ fPrefix.push(prefix);
+ }
+
+
+ public:
+
+ CMDUI(int argc, char *argv[]) : UI(), fArgc(argc), fArgv(argv)
+ {
+ fPrefix.push("--");
+ }
+ virtual ~CMDUI()
+ {}
+
+ virtual void addButton(char* label, float* zone)
+ {}
+ ;
+ virtual void addToggleButton(char* label, float* zone)
+ {}
+ ;
+ virtual void addCheckButton(char* label, float* zone)
+ {}
+ ;
+
+ virtual void addVerticalSlider(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ virtual void addHorizontalSlider(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ virtual void addNumEntry(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ // -- passive widgets
+
+ virtual void addNumDisplay(char* label, float* zone, int precision)
+ {}
+ virtual void addTextDisplay(char* label, float* zone, char* names[], float min, float max)
+ {}
+ virtual void addHorizontalBargraph(char* label, float* zone, float min, float max)
+ {}
+ virtual void addVerticalBargraph(char* label, float* zone, float min, float max)
+ {}
+
+ virtual void openFrameBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openTabBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openHorizontalBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openVerticalBox(char* label)
+ {
+ openAnyBox(label);
+ }
+
+ virtual void closeBox()
+ {
+ fPrefix.pop();
+ }
+
+ virtual void show()
+ {}
+ virtual void run()
+ {
+ char c;
+ printf("Type 'q' to quit\n");
+ while ((c = getchar()) != 'q') {
+ sleep(1);
+ }
+ }
+
+ void print()
+ {
+ map<string, param>::iterator i;
+ cout << fArgc << "\n";
+ cout << fArgv[0] << " option list : ";
+ for (i = fKeyParam.begin(); i != fKeyParam.end(); i++) {
+ cout << "[ " << i->first << " " << i->second.fMin << ".." << i->second.fMax << " ] ";
+ }
+ //cout << " infile outfile\n";
+ }
+
+ void process_command()
+ {
+ map<string, param>::iterator p;
+ for (int i = 1; i < fArgc; i++) {
+ if (fArgv[i][0] == '-') {
+ p = fKeyParam.find(fArgv[i]);
+ if (p == fKeyParam.end()) {
+ cout << fArgv[0] << " : unrecognized option " << fArgv[i] << "\n";
+ print();
+ exit(1);
+ }
+ char* end;
+ *(p->second.fZone) = float(strtod(fArgv[i + 1], &end));
+ i++;
+ }
+ }
+ }
+
+ void process_init()
+ {
+ map<string, param>::iterator p;
+ for (int i = 1; i < fArgc; i++) {
+ if (fArgv[i][0] == '-') {
+ p = fKeyParam.find(fArgv[i]);
+ if (p == fKeyParam.end()) {
+ cout << fArgv[0] << " : unrecognized option " << fArgv[i] << "\n";
+ exit(1);
+ }
+ char* end;
+ *(p->second.fZone) = float(strtod(fArgv[i + 1], &end));
+ i++;
+ }
+ }
+ }
+};
+
+//----------------------------------------------------------------
+// d�inition du processeur de signal
+//----------------------------------------------------------------
+
+class dsp
+{
+ protected:
+ int fSamplingFreq;
+ public:
+ dsp()
+ {}
+ virtual ~dsp()
+ {}
+
+ virtual int getNumInputs() = 0;
+ virtual int getNumOutputs() = 0;
+ virtual void buildUserInterface(UI* interface) = 0;
+ virtual void init(int samplingRate) = 0;
+ virtual void compute(int len, float** inputs, float** outputs) = 0;
+ virtual void conclude()
+ {}
+}
+;
+
+
+//----------------------------------------------------------------------------
+// FAUST generated code
+//----------------------------------------------------------------------------
+
+
+class mydsp : public dsp
+{
+ private:
+ class SIG0
+ {
+ private:
+ int fSamplingFreq;
+ public:
+ int getNumInputs()
+ {
+ return 0;
+ }
+ int getNumOutputs()
+ {
+ return 1;
+ }
+ void init(int samplingFreq)
+ {
+ fSamplingFreq = samplingFreq;
+ }
+ void fill (int count, float output[])
+ {
+ for (int i = 0; i < count; i++) {
+ output[i] = 0.000000f;
+ }
+ }
+ };
+
+
+ float R0_0;
+ float fslider0;
+ float ftbl0[65536];
+ int R1_0;
+ float fdata0;
+ float fslider1;
+ public:
+ virtual int getNumInputs()
+ {
+ return 1;
+ }
+ virtual int getNumOutputs()
+ {
+ return 1;
+ }
+ virtual void init(int samplingFreq)
+ {
+ fSamplingFreq = samplingFreq;
+ R0_0 = 0.0;
+ fslider0 = 0.000000f;
+ SIG0 sig0;
+ sig0.init(samplingFreq);
+ sig0.fill(65536, ftbl0);
+ R1_0 = 0;
+ fdata0 = (1.000000e-03f * fSamplingFreq);
+ fslider1 = 0.000000f;
+ }
+ virtual void buildUserInterface(UI* interface)
+ {
+ interface->openVerticalBox("echo-simple");
+ interface->openVerticalBox("echo 1000");
+ interface->addHorizontalSlider("feedback", &fslider0, 0.000000f, 0.000000f, 100.000000f, 0.100000f);
+ interface->addHorizontalSlider("millisecond", &fslider1, 0.000000f, 0.000000f, 1000.000000f, 0.100000f);
+ interface->closeBox();
+ interface->closeBox();
+ }
+ virtual void compute (int count, float** input, float** output)
+ {
+ float* input0 __attribute__ ((aligned(16)));
+ input0 = input[0];
+ float* output0 __attribute__ ((aligned(16)));
+ output0 = output[0];
+ float ftemp0 = (1.000000e-02f * fslider0);
+ int itemp0 = int((int((fdata0 * fslider1)) - 1));
+ for (int i = 0; i < count; i++) {
+ R1_0 = ((1 + R1_0) & 65535);
+ ftbl0[R1_0] = R0_0;
+ R0_0 = (input0[i] + (ftemp0 * ftbl0[((R1_0 - itemp0) & 65535)]));
+ output0[i] = R0_0;
+ }
+ }
+};
+
+
+
+mydsp DSP;
+
+
+/******************************************************************************
+*******************************************************************************
+
+ JACK AUDIO INTERFACE
+
+*******************************************************************************
+*******************************************************************************/
+
+
+
+//----------------------------------------------------------------------------
+// number of input and output channels
+//----------------------------------------------------------------------------
+
+int gNumInChans;
+int gNumOutChans;
+
+
+//----------------------------------------------------------------------------
+// Jack ports
+//----------------------------------------------------------------------------
+
+jack_port_t *input_ports[256];
+jack_port_t *output_ports[256];
+
+//----------------------------------------------------------------------------
+// tables of noninterleaved input and output channels for FAUST
+//----------------------------------------------------------------------------
+
+float* gInChannel[256];
+float* gOutChannel[256];
+
+//----------------------------------------------------------------------------
+// Jack Callbacks
+//----------------------------------------------------------------------------
+
+int srate(jack_nframes_t nframes, void *arg)
+{
+ printf("the sample rate is now %u/sec\n", nframes);
+ return 0;
+}
+
+void jack_shutdown(void *arg)
+{
+ exit(1);
+}
+
+int process (jack_nframes_t nframes, void *arg)
+{
+ for (int i = 0; i < gNumInChans; i++) {
+ gInChannel[i] = (float *)jack_port_get_buffer(input_ports[i], nframes);
+ }
+ for (int i = 0; i < gNumOutChans; i++) {
+ gOutChannel[i] = (float *)jack_port_get_buffer(output_ports[i], nframes);
+ }
+ DSP.compute(nframes, gInChannel, gOutChannel);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+// MAIN
+//-------------------------------------------------------------------------
+
+int main(int argc, char *argv[] )
+{
+ char jackname[256];
+ char** physicalInPorts;
+ char** physicalOutPorts;
+ jack_client_t* client;
+
+ CMDUI* interface = new CMDUI(argc, argv);
+ DSP.buildUserInterface(interface);
+
+ snprintf(jackname, 255, "%s", basename(argv[0]));
+
+ if ((client = jack_client_new(jackname)) == 0) {
+ fprintf(stderr, "jack server not running?\n");
+ return 1;
+ }
+
+ jack_set_process_callback(client, process, 0);
+
+ jack_set_sample_rate_callback(client, srate, 0);
+
+ jack_on_shutdown(client, jack_shutdown, 0);
+
+ gNumInChans = DSP.getNumInputs();
+ gNumOutChans = DSP.getNumOutputs();
+
+ for (int i = 0; i < gNumInChans; i++) {
+ char buf[256];
+ snprintf(buf, 256, "in_%d", i);
+ input_ports[i] = jack_port_register(client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+ }
+ for (int i = 0; i < gNumOutChans; i++) {
+ char buf[256];
+ snprintf(buf, 256, "out_%d", i);
+ output_ports[i] = jack_port_register(client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ }
+
+ DSP.init(jack_get_sample_rate(client));
+ DSP.buildUserInterface(interface);
+
+ interface->process_command();
+
+ physicalInPorts = (char **)jack_get_ports(client, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+ physicalOutPorts = (char **)jack_get_ports(client, NULL, NULL, JackPortIsPhysical | JackPortIsOutput);
+
+ if (jack_activate(client)) {
+ fprintf(stderr, "cannot activate client");
+ return 1;
+ }
+
+ if (physicalOutPorts != NULL) {
+ for (int i = 0; i < gNumInChans && physicalOutPorts[i]; i++) {
+ jack_connect(client, physicalOutPorts[i], jack_port_name(input_ports[i]));
+ }
+ }
+
+ if (physicalInPorts != NULL) {
+ for (int i = 0; i < gNumOutChans && physicalInPorts[i]; i++) {
+ jack_connect(client, jack_port_name(output_ports[i]), physicalInPorts[i]);
+ }
+ }
+
+ interface->run();
+
+ jack_deactivate(client);
+
+ for (int i = 0; i < gNumInChans; i++) {
+ jack_port_unregister(client, input_ports[i]);
+ }
+ for (int i = 0; i < gNumOutChans; i++) {
+ jack_port_unregister(client, output_ports[i]);
+ }
+
+ jack_client_close(client);
+
+ return 0;
+}
diff --git a/example-clients/external_metro.cpp b/example-clients/external_metro.cpp
new file mode 100644
index 00000000..248cbcac
--- /dev/null
+++ b/example-clients/external_metro.cpp
@@ -0,0 +1,154 @@
+/*
+ Copyright (C) 2002 Anthony Van Groningen
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "external_metro.h"
+
+typedef jack_default_audio_sample_t sample_t;
+
+const double PI = 3.14;
+
+static int process_audio (jack_nframes_t nframes, void* arg)
+{
+ ExternalMetro* metro = (ExternalMetro*)arg;
+ sample_t *buffer = (sample_t *) jack_port_get_buffer (metro->output_port, nframes);
+ jack_nframes_t frames_left = nframes;
+
+ while (metro->wave_length - metro->offset < frames_left) {
+ memcpy (buffer + (nframes - frames_left), metro->wave + metro->offset, sizeof (sample_t) * (metro->wave_length - metro->offset));
+ frames_left -= metro->wave_length - metro->offset;
+ metro->offset = 0;
+ }
+ if (frames_left > 0) {
+ memcpy (buffer + (nframes - frames_left), metro->wave + metro->offset, sizeof (sample_t) * frames_left);
+ metro->offset += frames_left;
+ }
+
+ return 0;
+}
+
+ExternalMetro::ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name)
+{
+ sample_t scale;
+ int i, attack_length, decay_length;
+ double *amp;
+ int attack_percent = 1, decay_percent = 10;
+ char *bpm_string = "bpm";
+
+ offset = 0;
+
+ /* Initial Jack setup, get sample rate */
+ if (!client_name) {
+ client_name = (char *) malloc (9 * sizeof (char));
+ strcpy (client_name, "metro");
+ }
+ if ((client = jack_client_new (client_name)) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ return ;
+ }
+
+ jack_set_process_callback (client, process_audio, this);
+ output_port = jack_port_register (client, bpm_string, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ input_port = jack_port_register (client, "metro_in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+
+ sr = jack_get_sample_rate (client);
+
+ /* setup wave table parameters */
+ wave_length = 60 * sr / bpm;
+ tone_length = sr * dur_arg / 1000;
+ attack_length = tone_length * attack_percent / 100;
+ decay_length = tone_length * decay_percent / 100;
+ scale = 2 * PI * freq / sr;
+
+ if (tone_length >= wave_length) {
+ /*
+ fprintf (stderr, "invalid duration (tone length = %" PRIu32
+ ", wave length = %" PRIu32 "\n", tone_length,
+ wave_length);
+ */
+ return ;
+ }
+ if (attack_length + decay_length > (int)tone_length) {
+ fprintf (stderr, "invalid attack/decay\n");
+ return ;
+ }
+
+ /* Build the wave table */
+ wave = (sample_t *) malloc (wave_length * sizeof(sample_t));
+ amp = (double *) malloc (tone_length * sizeof(double));
+
+ for (i = 0; i < attack_length; i++) {
+ amp[i] = max_amp * i / ((double) attack_length);
+ }
+ for (i = attack_length; i < (int) tone_length - decay_length; i++) {
+ amp[i] = max_amp;
+ }
+ for (i = (int)tone_length - decay_length; i < (int)tone_length; i++) {
+ amp[i] = - max_amp * (i - (double) tone_length) / ((double) decay_length);
+ }
+ for (i = 0; i < (int) tone_length; i++) {
+ wave[i] = amp[i] * sin (scale * i);
+ }
+ for (i = tone_length; i < (int) wave_length; i++) {
+ wave[i] = 0;
+ }
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ }
+}
+
+ExternalMetro::~ExternalMetro()
+{
+ jack_deactivate(client);
+ jack_port_unregister(client, input_port);
+ jack_port_unregister(client, output_port);
+ jack_client_close(client);
+}
+
+int main (int argc, char *argv[])
+{
+ ExternalMetro* client1 = NULL;
+ ExternalMetro* client2 = NULL;
+ ExternalMetro* client3 = NULL;
+ ExternalMetro* client4 = NULL;
+ ExternalMetro* client5 = NULL;
+
+ client1 = new ExternalMetro(1200, 0.4, 20, 80, "t1");
+
+
+ //sleep(1);
+ client2 = new ExternalMetro(600, 0.4, 20, 150, "t2");
+
+ //sleep(1);
+ client3 = new ExternalMetro(1000, 0.4, 20, 110, "t3");
+
+ client4 = new ExternalMetro(400, 0.4, 20, 200, "t4");
+
+ client5 = new ExternalMetro(1500, 0.4, 20, 150, "t5");
+
+
+ while ((getchar() != 'q')) {
+ sleep(1);
+ };
+
+ delete client1;
+ delete client2;
+ delete client3;
+ delete client4;
+ delete client5;
+}
diff --git a/example-clients/external_metro.h b/example-clients/external_metro.h
new file mode 100644
index 00000000..cf9e72f2
--- /dev/null
+++ b/example-clients/external_metro.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: external_metro.h,v 1.3.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __external_metro__
+#define __external_metro__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <math.h>
+#include <getopt.h>
+#include <string.h>
+
+#include "jack.h"
+#include "transport.h"
+
+
+ typedef jack_default_audio_sample_t sample_t;
+
+ /*!
+ \brief A class to test external clients
+ */
+
+ struct ExternalMetro {
+
+ jack_client_t *client;
+ jack_port_t *input_port;
+ jack_port_t *output_port;
+
+ unsigned long sr;
+ int freq;
+ int bpm;
+ jack_nframes_t tone_length, wave_length;
+ sample_t *wave;
+ long offset ;
+
+ ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name);
+ virtual ~ExternalMetro();
+
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/example-clients/freeverb.cpp b/example-clients/freeverb.cpp
new file mode 100644
index 00000000..6053877c
--- /dev/null
+++ b/example-clients/freeverb.cpp
@@ -0,0 +1,898 @@
+/* link with */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <math.h>
+#include <errno.h>
+#include <time.h>
+#include <vector>
+#include <stack>
+#include <string>
+#include <map>
+#include <iostream>
+
+//#include <libgen.h>
+#include "jack.h"
+#include <windows.h>
+
+// g++ -O3 -lm -lsndfile myfx.cpp
+
+using namespace std;
+
+
+#define max(x,y) (((x)>(y)) ? (x) : (y))
+#define min(x,y) (((x)<(y)) ? (x) : (y))
+
+// abs is now predefined
+//template<typename T> T abs (T a) { return (a<T(0)) ? -a : a; }
+
+
+inline int lsr (int x, int n)
+{
+ return int(((unsigned int)x) >> n);
+}
+
+
+/******************************************************************************
+*******************************************************************************
+
+ VECTOR INTRINSICS
+
+*******************************************************************************
+*******************************************************************************/
+
+inline void *aligned_calloc(size_t nmemb, size_t size)
+{
+ return (void*)((unsigned)(calloc((nmemb*size) + 15, sizeof(char))) + 15 & 0xfffffff0);
+}
+
+
+
+
+
+
+/******************************************************************************
+*******************************************************************************
+
+ USER INTERFACE
+
+*******************************************************************************
+*******************************************************************************/
+
+class UI
+{
+ bool fStopped;
+ public:
+
+ UI() : fStopped(false)
+ {}
+ virtual ~UI()
+ {}
+
+ // -- active widgets
+
+ virtual void addButton(char* label, float* zone) = 0;
+ virtual void addToggleButton(char* label, float* zone) = 0;
+ virtual void addCheckButton(char* label, float* zone) = 0;
+ virtual void addVerticalSlider(char* label, float* zone, float init, float min, float max, float step) = 0;
+ virtual void addHorizontalSlider(char* label, float* zone, float init, float min, float max, float step) = 0;
+ virtual void addNumEntry(char* label, float* zone, float init, float min, float max, float step) = 0;
+
+ // -- passive widgets
+
+ virtual void addNumDisplay(char* label, float* zone, int precision) = 0;
+ virtual void addTextDisplay(char* label, float* zone, char* names[], float min, float max) = 0;
+ virtual void addHorizontalBargraph(char* label, float* zone, float min, float max) = 0;
+ virtual void addVerticalBargraph(char* label, float* zone, float min, float max) = 0;
+
+ // -- frames and labels
+
+ virtual void openFrameBox(char* label) = 0;
+ virtual void openTabBox(char* label) = 0;
+ virtual void openHorizontalBox(char* label) = 0;
+ virtual void openVerticalBox(char* label) = 0;
+ virtual void closeBox() = 0;
+
+ virtual void show() = 0;
+ virtual void run() = 0;
+
+ void stop()
+ {
+ fStopped = true;
+ }
+ bool stopped()
+ {
+ return fStopped;
+ }
+};
+
+struct param
+{
+ float* fZone;
+ float fMin;
+ float fMax;
+ param(float* z, float a, float b) : fZone(z), fMin(a), fMax(b)
+ {}
+}
+;
+
+class CMDUI : public UI
+{
+ int fArgc;
+ char** fArgv;
+ stack<string> fPrefix;
+ map<string, param> fKeyParam;
+
+ void addOption(char* label, float* zone, float min, float max)
+ {
+ string fullname = fPrefix.top() + label;
+ fKeyParam.insert(make_pair(fullname, param(zone, min, max)));
+ }
+
+ void openAnyBox(char* label)
+ {
+ string prefix;
+
+ if (label && label[0]) {
+ prefix = fPrefix.top() + "-" + label;
+ } else {
+ prefix = fPrefix.top();
+ }
+ fPrefix.push(prefix);
+ }
+
+
+ public:
+
+ CMDUI(int argc, char *argv[]) : UI(), fArgc(argc), fArgv(argv)
+ {
+ fPrefix.push("--");
+ }
+ virtual ~CMDUI()
+ {}
+
+ virtual void addButton(char* label, float* zone)
+ {}
+ ;
+ virtual void addToggleButton(char* label, float* zone)
+ {}
+ ;
+ virtual void addCheckButton(char* label, float* zone)
+ {}
+ ;
+
+ virtual void addVerticalSlider(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ virtual void addHorizontalSlider(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ virtual void addNumEntry(char* label, float* zone, float init, float min, float max, float step)
+ {
+ addOption(label, zone, min, max);
+ }
+
+ // -- passive widgets
+
+ virtual void addNumDisplay(char* label, float* zone, int precision)
+ {}
+ virtual void addTextDisplay(char* label, float* zone, char* names[], float min, float max)
+ {}
+ virtual void addHorizontalBargraph(char* label, float* zone, float min, float max)
+ {}
+ virtual void addVerticalBargraph(char* label, float* zone, float min, float max)
+ {}
+
+ virtual void openFrameBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openTabBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openHorizontalBox(char* label)
+ {
+ openAnyBox(label);
+ }
+ virtual void openVerticalBox(char* label)
+ {
+ openAnyBox(label);
+ }
+
+ virtual void closeBox()
+ {
+ fPrefix.pop();
+ }
+
+ virtual void show()
+ {}
+ virtual void run()
+ {
+ char c;
+ printf("Type 'q' to quit\n");
+ while ((c = getchar()) != 'q') {
+ //sleep(1);
+ Sleep(1000);
+ }
+ }
+
+ void print()
+ {
+ map<string, param>::iterator i;
+ cout << fArgc << "\n";
+ cout << fArgv[0] << " option list : ";
+ for (i = fKeyParam.begin(); i != fKeyParam.end(); i++) {
+ cout << "[ " << i->first << " " << i->second.fMin << ".." << i->second.fMax << " ] ";
+ }
+ //cout << " infile outfile\n";
+ }
+
+ void process_command()
+ {
+ map<string, param>::iterator p;
+ for (int i = 1; i < fArgc; i++) {
+ if (fArgv[i][0] == '-') {
+ p = fKeyParam.find(fArgv[i]);
+ if (p == fKeyParam.end()) {
+ cout << fArgv[0] << " : unrecognized option " << fArgv[i] << "\n";
+ print();
+ exit(1);
+ }
+ char* end;
+ *(p->second.fZone) = float(strtod(fArgv[i + 1], &end));
+ i++;
+ }
+ }
+ }
+
+ void process_init()
+ {
+ map<string, param>::iterator p;
+ for (int i = 1; i < fArgc; i++) {
+ if (fArgv[i][0] == '-') {
+ p = fKeyParam.find(fArgv[i]);
+ if (p == fKeyParam.end()) {
+ cout << fArgv[0] << " : unrecognized option " << fArgv[i] << "\n";
+ exit(1);
+ }
+ char* end;
+ *(p->second.fZone) = float(strtod(fArgv[i + 1], &end));
+ i++;
+ }
+ }
+ }
+};
+
+//----------------------------------------------------------------
+// d�inition du processeur de signal
+//----------------------------------------------------------------
+
+class dsp
+{
+ protected:
+ int fSamplingFreq;
+ public:
+ dsp()
+ {}
+ virtual ~dsp()
+ {}
+
+ virtual int getNumInputs() = 0;
+ virtual int getNumOutputs() = 0;
+ virtual void buildUserInterface(UI* interface) = 0;
+ virtual void init(int samplingRate) = 0;
+ virtual void compute(int len, float** inputs, float** outputs) = 0;
+ virtual void conclude()
+ {}
+}
+;
+
+
+//----------------------------------------------------------------------------
+// FAUST generated code
+//----------------------------------------------------------------------------
+
+
+class mydsp : public dsp
+{
+ private:
+ float fslider0;
+ float R0_0;
+ int iota0;
+ float dline0[225];
+ float R1_0;
+ int iota1;
+ float dline1[341];
+ float R2_0;
+ int iota2;
+ float dline2[441];
+ float R3_0;
+ int iota3;
+ float dline3[556];
+ float R4_0;
+ int iota4;
+ float dline4[1617];
+ float fslider1;
+ float R5_0;
+ float fslider2;
+ float R6_0;
+ int iota5;
+ float dline5[1557];
+ float R7_0;
+ float R8_0;
+ int iota6;
+ float dline6[1491];
+ float R9_0;
+ float R10_0;
+ int iota7;
+ float dline7[1422];
+ float R11_0;
+ float R12_0;
+ int iota8;
+ float dline8[1277];
+ float R13_0;
+ float R14_0;
+ int iota9;
+ float dline9[1116];
+ float R15_0;
+ float R16_0;
+ int iota10;
+ float dline10[1188];
+ float R17_0;
+ float R18_0;
+ int iota11;
+ float dline11[1356];
+ float R19_0;
+ float R3_1;
+ float R2_1;
+ float R1_1;
+ float R0_1;
+ float R20_0;
+ int iota12;
+ float dline12[248];
+ float R21_0;
+ int iota13;
+ float dline13[364];
+ float R22_0;
+ int iota14;
+ float dline14[464];
+ float R23_0;
+ int iota15;
+ float dline15[579];
+ float R24_0;
+ int iota16;
+ float dline16[1640];
+ float R25_0;
+ float R26_0;
+ int iota17;
+ float dline17[1580];
+ float R27_0;
+ float R28_0;
+ int iota18;
+ float dline18[1514];
+ float R29_0;
+ float R30_0;
+ int iota19;
+ float dline19[1445];
+ float R31_0;
+ float R32_0;
+ int iota20;
+ float dline20[1300];
+ float R33_0;
+ float R34_0;
+ int iota21;
+ float dline21[1139];
+ float R35_0;
+ float R36_0;
+ int iota22;
+ float dline22[1211];
+ float R37_0;
+ float R38_0;
+ int iota23;
+ float dline23[1379];
+ float R39_0;
+ float R23_1;
+ float R22_1;
+ float R21_1;
+ float R20_1;
+ public:
+ virtual int getNumInputs()
+ {
+ return 2;
+ }
+ virtual int getNumOutputs()
+ {
+ return 2;
+ }
+ virtual void init(int samplingFreq)
+ {
+ int i;
+ fSamplingFreq = samplingFreq;
+ fslider0 = 0.333300f;
+ R0_0 = 0.0;
+ iota0 = 0;
+ for (i = 0; i < 225; i++)
+ dline0[i] = 0.0;
+ R1_0 = 0.0;
+ iota1 = 0;
+ for (i = 0; i < 341; i++)
+ dline1[i] = 0.0;
+ R2_0 = 0.0;
+ iota2 = 0;
+ for (i = 0; i < 441; i++)
+ dline2[i] = 0.0;
+ R3_0 = 0.0;
+ iota3 = 0;
+ for (i = 0; i < 556; i++)
+ dline3[i] = 0.0;
+ R4_0 = 0.0;
+ iota4 = 0;
+ for (i = 0; i < 1617; i++)
+ dline4[i] = 0.0;
+ fslider1 = 0.9500000f;
+ R5_0 = 0.0;
+ fslider2 = 0.9500000f;
+ R6_0 = 0.0;
+ iota5 = 0;
+ for (i = 0; i < 1557; i++)
+ dline5[i] = 0.0;
+ R7_0 = 0.0;
+ R8_0 = 0.0;
+ iota6 = 0;
+ for (i = 0; i < 1491; i++)
+ dline6[i] = 0.0;
+ R9_0 = 0.0;
+ R10_0 = 0.0;
+ iota7 = 0;
+ for (i = 0; i < 1422; i++)
+ dline7[i] = 0.0;
+ R11_0 = 0.0;
+ R12_0 = 0.0;
+ iota8 = 0;
+ for (i = 0; i < 1277; i++)
+ dline8[i] = 0.0;
+ R13_0 = 0.0;
+ R14_0 = 0.0;
+ iota9 = 0;
+ for (i = 0; i < 1116; i++)
+ dline9[i] = 0.0;
+ R15_0 = 0.0;
+ R16_0 = 0.0;
+ iota10 = 0;
+ for (i = 0; i < 1188; i++)
+ dline10[i] = 0.0;
+ R17_0 = 0.0;
+ R18_0 = 0.0;
+ iota11 = 0;
+ for (i = 0; i < 1356; i++)
+ dline11[i] = 0.0;
+ R19_0 = 0.0;
+ R3_1 = 0.0;
+ R2_1 = 0.0;
+ R1_1 = 0.0;
+ R0_1 = 0.0;
+ R20_0 = 0.0;
+ iota12 = 0;
+ for (i = 0; i < 248; i++)
+ dline12[i] = 0.0;
+ R21_0 = 0.0;
+ iota13 = 0;
+ for (i = 0; i < 364; i++)
+ dline13[i] = 0.0;
+ R22_0 = 0.0;
+ iota14 = 0;
+ for (i = 0; i < 464; i++)
+ dline14[i] = 0.0;
+ R23_0 = 0.0;
+ iota15 = 0;
+ for (i = 0; i < 579; i++)
+ dline15[i] = 0.0;
+ R24_0 = 0.0;
+ iota16 = 0;
+ for (i = 0; i < 1640; i++)
+ dline16[i] = 0.0;
+ R25_0 = 0.0;
+ R26_0 = 0.0;
+ iota17 = 0;
+ for (i = 0; i < 1580; i++)
+ dline17[i] = 0.0;
+ R27_0 = 0.0;
+ R28_0 = 0.0;
+ iota18 = 0;
+ for (i = 0; i < 1514; i++)
+ dline18[i] = 0.0;
+ R29_0 = 0.0;
+ R30_0 = 0.0;
+ iota19 = 0;
+ for (i = 0; i < 1445; i++)
+ dline19[i] = 0.0;
+ R31_0 = 0.0;
+ R32_0 = 0.0;
+ iota20 = 0;
+ for (i = 0; i < 1300; i++)
+ dline20[i] = 0.0;
+ R33_0 = 0.0;
+ R34_0 = 0.0;
+ iota21 = 0;
+ for (i = 0; i < 1139; i++)
+ dline21[i] = 0.0;
+ R35_0 = 0.0;
+ R36_0 = 0.0;
+ iota22 = 0;
+ for (i = 0; i < 1211; i++)
+ dline22[i] = 0.0;
+ R37_0 = 0.0;
+ R38_0 = 0.0;
+ iota23 = 0;
+ for (i = 0; i < 1379; i++)
+ dline23[i] = 0.0;
+ R39_0 = 0.0;
+ R23_1 = 0.0;
+ R22_1 = 0.0;
+ R21_1 = 0.0;
+ R20_1 = 0.0;
+ }
+
+ virtual void buildUserInterface(UI* inter)
+ {
+ inter->openVerticalBox("Freeverb");
+ inter->addHorizontalSlider("Damp", &fslider2, 0.500000f, 0.000000f, 1.000000f, 2.500000e-02f);
+ inter->addHorizontalSlider("RoomSize", &fslider1, 0.500000f, 0.000000f, 1.000000f, 2.500000e-02f);
+ inter->addHorizontalSlider("Wet", &fslider0, 0.333300f, 0.000000f, 1.000000f, 2.500000e-02f);
+ inter->closeBox();
+ }
+ virtual void compute (int count, float** input, float** output)
+ {
+ float* input0;
+ input0 = input[0];
+ float* input1;
+ input1 = input[1];
+ float* output0;
+ output0 = output[0];
+ float* output1;
+ output1 = output[1];
+ float ftemp0 = fslider0;
+ float ftemp1 = (1 - ftemp0);
+ float ftemp5 = (0.700000f + (0.280000f * fslider1));
+ float ftemp6 = (0.400000f * fslider2);
+ float ftemp7 = (1 - ftemp6);
+ for (int i = 0; i < count; i++) {
+ float ftemp2 = input0[i];
+ if (++iota0 == 225)
+ iota0 = 0;
+ float T0 = dline0[iota0];
+ if (++iota1 == 341)
+ iota1 = 0;
+ float T1 = dline1[iota1];
+ if (++iota2 == 441)
+ iota2 = 0;
+ float T2 = dline2[iota2];
+ if (++iota3 == 556)
+ iota3 = 0;
+ float T3 = dline3[iota3];
+ if (++iota4 == 1617)
+ iota4 = 0;
+ float T4 = dline4[iota4];
+ float ftemp3 = input1[i];
+ float ftemp4 = (1.500000e-02f * (ftemp2 + ftemp3));
+ R5_0 = ((ftemp7 * R4_0) + (ftemp6 * R5_0));
+ dline4[iota4] = (ftemp4 + (ftemp5 * R5_0));
+ R4_0 = T4;
+ if (++iota5 == 1557)
+ iota5 = 0;
+ float T5 = dline5[iota5];
+ R7_0 = ((ftemp7 * R6_0) + (ftemp6 * R7_0));
+ dline5[iota5] = (ftemp4 + (ftemp5 * R7_0));
+ R6_0 = T5;
+ if (++iota6 == 1491)
+ iota6 = 0;
+ float T6 = dline6[iota6];
+ R9_0 = ((ftemp7 * R8_0) + (ftemp6 * R9_0));
+ dline6[iota6] = (ftemp4 + (ftemp5 * R9_0));
+ R8_0 = T6;
+ if (++iota7 == 1422)
+ iota7 = 0;
+ float T7 = dline7[iota7];
+ R11_0 = ((ftemp7 * R10_0) + (ftemp6 * R11_0));
+ dline7[iota7] = (ftemp4 + (ftemp5 * R11_0));
+ R10_0 = T7;
+ if (++iota8 == 1277)
+ iota8 = 0;
+ float T8 = dline8[iota8];
+ R13_0 = ((ftemp7 * R12_0) + (ftemp6 * R13_0));
+ dline8[iota8] = (ftemp4 + (ftemp5 * R13_0));
+ R12_0 = T8;
+ if (++iota9 == 1116)
+ iota9 = 0;
+ float T9 = dline9[iota9];
+ R15_0 = ((ftemp7 * R14_0) + (ftemp6 * R15_0));
+ dline9[iota9] = (ftemp4 + (ftemp5 * R15_0));
+ R14_0 = T9;
+ if (++iota10 == 1188)
+ iota10 = 0;
+ float T10 = dline10[iota10];
+ R17_0 = ((ftemp7 * R16_0) + (ftemp6 * R17_0));
+ dline10[iota10] = (ftemp4 + (ftemp5 * R17_0));
+ R16_0 = T10;
+ if (++iota11 == 1356)
+ iota11 = 0;
+ float T11 = dline11[iota11];
+ R19_0 = ((ftemp7 * R18_0) + (ftemp6 * R19_0));
+ dline11[iota11] = (ftemp4 + (ftemp5 * R19_0));
+ R18_0 = T11;
+ float ftemp8 = (R16_0 + R18_0);
+ dline3[iota3] = ((((0.500000f * R3_0) + R4_0) + (R6_0 + R8_0)) + ((R10_0 + R12_0) + (R14_0 + ftemp8)));
+ float R3temp0 = T3;
+ float R3temp1 = (R3_0 - (((R4_0 + R6_0) + (R8_0 + R10_0)) + ((R12_0 + R14_0) + ftemp8)));
+ R3_0 = R3temp0;
+ R3_1 = R3temp1;
+ dline2[iota2] = ((0.500000f * R2_0) + R3_1);
+ float R2temp0 = T2;
+ float R2temp1 = (R2_0 - R3_1);
+ R2_0 = R2temp0;
+ R2_1 = R2temp1;
+ dline1[iota1] = ((0.500000f * R1_0) + R2_1);
+ float R1temp0 = T1;
+ float R1temp1 = (R1_0 - R2_1);
+ R1_0 = R1temp0;
+ R1_1 = R1temp1;
+ dline0[iota0] = ((0.500000f * R0_0) + R1_1);
+ float R0temp0 = T0;
+ float R0temp1 = (R0_0 - R1_1);
+ R0_0 = R0temp0;
+ R0_1 = R0temp1;
+ output0[i] = ((ftemp1 * ftemp2) + (ftemp0 * R0_1));
+ if (++iota12 == 248)
+ iota12 = 0;
+ float T12 = dline12[iota12];
+ if (++iota13 == 364)
+ iota13 = 0;
+ float T13 = dline13[iota13];
+ if (++iota14 == 464)
+ iota14 = 0;
+ float T14 = dline14[iota14];
+ if (++iota15 == 579)
+ iota15 = 0;
+ float T15 = dline15[iota15];
+ if (++iota16 == 1640)
+ iota16 = 0;
+ float T16 = dline16[iota16];
+ R25_0 = ((ftemp7 * R24_0) + (ftemp6 * R25_0));
+ dline16[iota16] = (ftemp4 + (ftemp5 * R25_0));
+ R24_0 = T16;
+ if (++iota17 == 1580)
+ iota17 = 0;
+ float T17 = dline17[iota17];
+ R27_0 = ((ftemp7 * R26_0) + (ftemp6 * R27_0));
+ dline17[iota17] = (ftemp4 + (ftemp5 * R27_0));
+ R26_0 = T17;
+ if (++iota18 == 1514)
+ iota18 = 0;
+ float T18 = dline18[iota18];
+ R29_0 = ((ftemp7 * R28_0) + (ftemp6 * R29_0));
+ dline18[iota18] = (ftemp4 + (ftemp5 * R29_0));
+ R28_0 = T18;
+ if (++iota19 == 1445)
+ iota19 = 0;
+ float T19 = dline19[iota19];
+ R31_0 = ((ftemp7 * R30_0) + (ftemp6 * R31_0));
+ dline19[iota19] = (ftemp4 + (ftemp5 * R31_0));
+ R30_0 = T19;
+ if (++iota20 == 1300)
+ iota20 = 0;
+ float T20 = dline20[iota20];
+ R33_0 = ((ftemp7 * R32_0) + (ftemp6 * R33_0));
+ dline20[iota20] = (ftemp4 + (ftemp5 * R33_0));
+ R32_0 = T20;
+ if (++iota21 == 1139)
+ iota21 = 0;
+ float T21 = dline21[iota21];
+ R35_0 = ((ftemp7 * R34_0) + (ftemp6 * R35_0));
+ dline21[iota21] = (ftemp4 + (ftemp5 * R35_0));
+ R34_0 = T21;
+ if (++iota22 == 1211)
+ iota22 = 0;
+ float T22 = dline22[iota22];
+ R37_0 = ((ftemp7 * R36_0) + (ftemp6 * R37_0));
+ dline22[iota22] = (ftemp4 + (ftemp5 * R37_0));
+ R36_0 = T22;
+ if (++iota23 == 1379)
+ iota23 = 0;
+ float T23 = dline23[iota23];
+ R39_0 = ((ftemp7 * R38_0) + (ftemp6 * R39_0));
+ dline23[iota23] = (ftemp4 + (ftemp5 * R39_0));
+ R38_0 = T23;
+ float ftemp9 = (R36_0 + R38_0);
+ dline15[iota15] = ((((0.500000f * R23_0) + R24_0) + (R26_0 + R28_0)) + ((R30_0 + R32_0) + (R34_0 + ftemp9)));
+ float R23temp0 = T15;
+ float R23temp1 = (R23_0 - (((R24_0 + R26_0) + (R28_0 + R30_0)) + ((R32_0 + R34_0) + ftemp9)));
+ R23_0 = R23temp0;
+ R23_1 = R23temp1;
+ dline14[iota14] = ((0.500000f * R22_0) + R23_1);
+ float R22temp0 = T14;
+ float R22temp1 = (R22_0 - R23_1);
+ R22_0 = R22temp0;
+ R22_1 = R22temp1;
+ dline13[iota13] = ((0.500000f * R21_0) + R22_1);
+ float R21temp0 = T13;
+ float R21temp1 = (R21_0 - R22_1);
+ R21_0 = R21temp0;
+ R21_1 = R21temp1;
+ dline12[iota12] = ((0.500000f * R20_0) + R21_1);
+ float R20temp0 = T12;
+ float R20temp1 = (R20_0 - R21_1);
+ R20_0 = R20temp0;
+ R20_1 = R20temp1;
+ output1[i] = ((ftemp1 * ftemp3) + (ftemp0 * R20_1));
+ }
+ }
+};
+
+
+
+mydsp DSP;
+
+
+/******************************************************************************
+*******************************************************************************
+
+ JACK AUDIO INTERFACE
+
+*******************************************************************************
+*******************************************************************************/
+
+
+
+//----------------------------------------------------------------------------
+// number of input and output channels
+//----------------------------------------------------------------------------
+
+int gNumInChans;
+int gNumOutChans;
+
+
+//----------------------------------------------------------------------------
+// Jack ports
+//----------------------------------------------------------------------------
+
+jack_port_t *input_ports[256];
+jack_port_t *output_ports[256];
+
+//----------------------------------------------------------------------------
+// tables of noninterleaved input and output channels for FAUST
+//----------------------------------------------------------------------------
+
+float* gInChannel[256];
+float* gOutChannel[256];
+
+//----------------------------------------------------------------------------
+// Jack Callbacks
+//----------------------------------------------------------------------------
+
+int srate(jack_nframes_t nframes, void *arg)
+{
+ printf("the sample rate is now %u/sec\n", nframes);
+ return 0;
+}
+
+void jack_shutdown(void *arg)
+{
+ exit(1);
+}
+
+int process (jack_nframes_t nframes, void *arg)
+{
+ int i;
+ for (i = 0; i < gNumInChans; i++) {
+ gInChannel[i] = (float *)jack_port_get_buffer(input_ports[i], nframes);
+ }
+ for (i = 0; i < gNumOutChans; i++) {
+ gOutChannel[i] = (float *)jack_port_get_buffer(output_ports[i], nframes);
+ }
+ DSP.compute(nframes, gInChannel, gOutChannel);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+// MAIN
+//-------------------------------------------------------------------------
+
+int main(int argc, char *argv[] )
+{
+ char jackname[256];
+ char** physicalInPorts;
+ char** physicalOutPorts;
+ jack_client_t* client;
+ int i;
+
+ CMDUI* inter = new CMDUI(argc, argv);
+ DSP.buildUserInterface(inter);
+
+ //_snprintf(jackname, 255, "%s", basename(argv[0]));
+ _snprintf(jackname, 255, "%s", "freeverb");
+
+ if ((client = jack_client_new(jackname)) == 0) {
+ fprintf(stderr, "jack server not running?\n");
+ return 1;
+ }
+
+ jack_set_process_callback(client, process, 0);
+
+ jack_set_sample_rate_callback(client, srate, 0);
+
+ jack_on_shutdown(client, jack_shutdown, 0);
+
+ gNumInChans = DSP.getNumInputs();
+ gNumOutChans = DSP.getNumOutputs();
+
+ for (i = 0; i < gNumInChans; i++) {
+ char buf[256];
+ _snprintf(buf, 256, "in_%d", i);
+ input_ports[i] = jack_port_register(client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+ }
+ for (i = 0; i < gNumOutChans; i++) {
+ char buf[256];
+ _snprintf(buf, 256, "out_%d", i);
+ output_ports[i] = jack_port_register(client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ }
+
+ DSP.init(jack_get_sample_rate(client));
+ DSP.buildUserInterface(inter);
+
+ inter->process_command();
+
+ physicalInPorts = (char **)jack_get_ports(client, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+ physicalOutPorts = (char **)jack_get_ports(client, NULL, NULL, JackPortIsPhysical | JackPortIsOutput);
+
+ if (jack_activate(client)) {
+ fprintf(stderr, "cannot activate client");
+ return 1;
+ }
+
+ /*
+ if (physicalOutPorts != NULL) {
+ for (int i = 0; i < gNumInChans && physicalOutPorts[i]; i++) {
+ jack_connect(client, physicalOutPorts[i], jack_port_name(input_ports[i]));
+ }
+ }
+ */
+
+ if (physicalInPorts != NULL) {
+ for (int i = 0; i < gNumOutChans && physicalInPorts[i]; i++) {
+ jack_connect(client, jack_port_name(output_ports[i]), physicalInPorts[i]);
+ }
+ }
+
+ /*
+ jack_connect(client, "AudioPlayer:out1", jack_port_name(input_ports[0]));
+ jack_connect(client, "AudioPlayer:out1", jack_port_name(input_ports[1]));
+
+ jack_connect(client, "AudioPlayer:out2", jack_port_name(input_ports[0]));
+ jack_connect(client, "AudioPlayer:out2", jack_port_name(input_ports[1]));
+ */
+
+ jack_connect(client, "JackRouter:out1", jack_port_name(input_ports[0]));
+ jack_connect(client, "JackRouter:out2", jack_port_name(input_ports[1]));
+
+
+ inter->run();
+
+ jack_deactivate(client);
+
+ for (i = 0; i < gNumInChans; i++) {
+ jack_port_unregister(client, input_ports[i]);
+ }
+ for (i = 0; i < gNumOutChans; i++) {
+ jack_port_unregister(client, output_ports[i]);
+ }
+
+ jack_client_close(client);
+
+ return 0;
+}
diff --git a/example-clients/freewheel.c b/example-clients/freewheel.c
new file mode 100644
index 00000000..00f6e9ce
--- /dev/null
+++ b/example-clients/freewheel.c
@@ -0,0 +1,86 @@
+/*
+ * freewheel - start/stop JACK "freewheeling" mode
+ *
+ * Copyright (C) 2003 Paul Davis.
+ *
+ * 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
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include "jack.h"
+#include "transport.h"
+
+char *package; /* program name */
+jack_client_t *client;
+int onoff;
+
+void jack_shutdown(void *arg)
+{
+ fprintf(stderr, "JACK shut down, exiting ...\n");
+ exit(1);
+}
+
+void signal_handler(int sig)
+{
+ jack_client_close(client);
+ fprintf(stderr, "signal received, exiting ...\n");
+ exit(0);
+}
+
+void parse_arguments(int argc, char *argv[])
+{
+ if (argc < 2) {
+ fprintf(stderr, "usage: %s y|n\n", package);
+ exit(9);
+ }
+
+ if (argv[1][0] == 'y' || argv[1][0] == 'Y' || argv[1][0] == '1') {
+ onoff = 1;
+ } else {
+ onoff = 0;
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ parse_arguments (argc, argv);
+
+ /* become a JACK client */
+ if ((client = jack_client_new ("freewheel1")) == 0) {
+ fprintf (stderr, "JACK server not running?\n");
+ exit(1);
+ }
+
+ signal (SIGQUIT, signal_handler);
+ signal (SIGTERM, signal_handler);
+ signal (SIGHUP, signal_handler);
+ signal (SIGINT, signal_handler);
+
+ jack_on_shutdown (client, jack_shutdown, 0);
+
+ if (jack_set_freewheel (client, onoff)) {
+ fprintf (stderr, "failed to reset freewheel mode\n");
+ }
+
+ jack_client_close(client);
+
+ return 0;
+}
diff --git a/example-clients/internal_metro.cpp b/example-clients/internal_metro.cpp
new file mode 100644
index 00000000..d40ff223
--- /dev/null
+++ b/example-clients/internal_metro.cpp
@@ -0,0 +1,123 @@
+/*
+ Copyright (C) 2002 Anthony Van Groningen
+ Copyright (C) 2005 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "internal_metro.h"
+
+typedef jack_default_audio_sample_t sample_t;
+
+const double PI = 3.14;
+
+static int process_audio (jack_nframes_t nframes, void* arg)
+{
+ InternalMetro* metro = (InternalMetro*)arg;
+ sample_t *buffer = (sample_t *) jack_port_get_buffer (metro->output_port, nframes);
+ jack_nframes_t frames_left = nframes;
+
+ while (metro->wave_length - metro->offset < frames_left) {
+ memcpy (buffer + (nframes - frames_left), metro->wave + metro->offset, sizeof (sample_t) * (metro->wave_length - metro->offset));
+ frames_left -= metro->wave_length - metro->offset;
+ metro->offset = 0;
+ }
+ if (frames_left > 0) {
+ memcpy (buffer + (nframes - frames_left), metro->wave + metro->offset, sizeof (sample_t) * frames_left);
+ metro->offset += frames_left;
+ }
+
+ return 0;
+}
+
+InternalMetro::InternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name)
+{
+ sample_t scale;
+ int i, attack_length, decay_length;
+ double *amp;
+ int attack_percent = 1, decay_percent = 10;
+ char *bpm_string = "bpm";
+
+ offset = 0;
+
+ /* Initial Jack setup, get sample rate */
+ if (!client_name) {
+ client_name = (char *) malloc (9 * sizeof (char));
+ strcpy (client_name, "metro");
+ }
+ if ((client = my_jack_internal_client_new (client_name)) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ return ;
+ }
+
+ jack_set_process_callback (client, process_audio, this);
+ output_port = jack_port_register (client, bpm_string, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ input_port = jack_port_register (client, "metro_in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+
+ sr = jack_get_sample_rate (client);
+
+ /* setup wave table parameters */
+ wave_length = 60 * sr / bpm;
+ tone_length = sr * dur_arg / 1000;
+ attack_length = tone_length * attack_percent / 100;
+ decay_length = tone_length * decay_percent / 100;
+ scale = 2 * PI * freq / sr;
+
+ if (tone_length >= wave_length) {
+ /*
+ fprintf (stderr, "invalid duration (tone length = %" PRIu32
+ ", wave length = %" PRIu32 "\n", tone_length,
+ wave_length);
+ */
+ return ;
+ }
+ if (attack_length + decay_length > (int)tone_length) {
+ fprintf (stderr, "invalid attack/decay\n");
+ return ;
+ }
+
+ /* Build the wave table */
+ wave = (sample_t *) malloc (wave_length * sizeof(sample_t));
+ amp = (double *) malloc (tone_length * sizeof(double));
+
+ for (i = 0; i < attack_length; i++) {
+ amp[i] = max_amp * i / ((double) attack_length);
+ }
+ for (i = attack_length; i < (int) tone_length - decay_length; i++) {
+ amp[i] = max_amp;
+ }
+ for (i = (int)tone_length - decay_length; i < (int)tone_length; i++) {
+ amp[i] = - max_amp * (i - (double) tone_length) / ((double) decay_length);
+ }
+ for (i = 0; i < (int) tone_length; i++) {
+ wave[i] = amp[i] * sin (scale * i);
+ }
+ for (i = tone_length; i < (int) wave_length; i++) {
+ wave[i] = 0;
+ }
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ return ;
+ }
+}
+
+InternalMetro::~InternalMetro()
+{
+ jack_deactivate(client);
+ jack_port_unregister(client, input_port);
+ jack_port_unregister(client, output_port);
+ my_jack_internal_client_close(client);
+}
diff --git a/example-clients/internal_metro.h b/example-clients/internal_metro.h
new file mode 100644
index 00000000..a603f62c
--- /dev/null
+++ b/example-clients/internal_metro.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: internal_metro.h,v 1.2.2.1 2006/06/20 14:44:00 letz Exp $
+*/
+
+#ifndef __internal_metro__
+#define __internal_metro__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <math.h>
+#include <getopt.h>
+#include <string.h>
+
+#include "jack.h"
+#include "transport.h"
+
+
+ typedef jack_default_audio_sample_t sample_t;
+
+ /*!
+ \brief A class to test internal clients
+ */
+
+ struct InternalMetro {
+
+ jack_client_t *client;
+ jack_port_t *input_port;
+ jack_port_t *output_port;
+
+ unsigned long sr;
+ int freq;
+ int bpm;
+ jack_nframes_t tone_length, wave_length;
+ sample_t *wave;
+ long offset ;
+
+ InternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name);
+ virtual ~InternalMetro();
+
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/example-clients/jdelay.cpp b/example-clients/jdelay.cpp
new file mode 100644
index 00000000..1fdb6273
--- /dev/null
+++ b/example-clients/jdelay.cpp
@@ -0,0 +1,260 @@
+/*
+ Copyright (C) 2003 Fons Adriaensen <fons.adriaensen@skynet.be>
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+// --------------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#ifdef WIN32
+ #include "jack.h"
+ #define M_PI 3.141562653
+#else
+ #include <unistd.h>
+ #include <jack/jack.h>
+#endif
+
+
+
+class Freq
+{
+public:
+
+ int p;
+ int f;
+ float a;
+ float xa;
+ float ya;
+ float xf;
+ float yf;
+};
+
+
+class MTDM
+{
+public:
+
+ MTDM (void);
+ int process (size_t len, float *inp, float *out);
+ int resolve (void);
+ void invert (void) { _inv ^= 1; }
+ int inv (void) { return _inv; }
+ double del (void) { return _del; }
+ double err (void) { return _err; }
+
+private:
+
+ double _del;
+ double _err;
+ int _cnt;
+ int _inv;
+ Freq _freq [5];
+};
+
+
+MTDM::MTDM (void) : _cnt (0), _inv (0)
+{
+ int i;
+ Freq *F;
+
+ _freq [0].f = 4096;
+ _freq [1].f = 512;
+ _freq [2].f = 1088;
+ _freq [3].f = 1544;
+ _freq [4].f = 2049;
+
+ _freq [0].a = 0.2f;
+ _freq [1].a = 0.1f;
+ _freq [2].a = 0.1f;
+ _freq [3].a = 0.1f;
+ _freq [4].a = 0.1f;
+
+ for (i = 0, F = _freq; i < 5; i++, F++)
+ {
+ F->p = 128;
+ F->xa = F->ya = 0.0f;
+ F->xf = F->yf = 0.0f;
+ }
+}
+
+
+int MTDM::process (size_t len, float *ip, float *op)
+{
+ int i;
+ float vip, vop, a, c, s;
+ Freq *F;
+
+ while (len--)
+ {
+ vop = 0.0f;
+ vip = *ip++;
+ for (i = 0, F = _freq; i < 5; i++, F++)
+ {
+ a = 2 * M_PI * (F->p & 0xFFFF) / 65536.0;
+ F->p += F->f;
+ c = cosf (a);
+ s = -sinf (a);
+ vop += F->a * s;
+ F->xa += s * vip;
+ F->ya += c * vip;
+ }
+ *op++ = vop;
+ if (++_cnt == 16)
+ {
+ for (i = 0, F = _freq; i < 5; i++, F++)
+ {
+ F->xf += 1e-3f * (F->xa - F->xf + 1e-20);
+ F->yf += 1e-3f * (F->ya - F->yf + 1e-20);
+ F->xa = F->ya = 0.0f;
+ }
+ _cnt = 0;
+ }
+ }
+
+ return 0;
+}
+
+
+int MTDM::resolve (void)
+{
+ int i, k, m;
+ double d, e, f0, p;
+ Freq *F = _freq;
+
+ if (hypot (F->xf, F->yf) < 0.01) return -1;
+ d = atan2 (F->yf, F->xf) / (2 * M_PI);
+ if (_inv) d += 0.5f;
+ if (d > 0.5f) d -= 1.0f;
+ f0 = _freq [0].f;
+ m = 1;
+ _err = 0.0;
+ for (i = 0; i < 4; i++)
+ {
+ F++;
+ p = atan2 (F->yf, F->xf) / (2 * M_PI) - d * F->f / f0;
+ if (_inv) p += 0.5f;
+ p -= floor (p);
+ p *= 8;
+ k = (int)(floor (p + 0.5));
+ e = fabs (p - k);
+ if (e > _err) _err = e;
+ if (e > 0.4) return 1;
+ d += m * (k & 7);
+ m *= 8;
+ }
+ _del = 16 * d;
+
+ return 0;
+}
+
+
+// --------------------------------------------------------------------------------
+
+
+static MTDM mtdm;
+static jack_client_t *jack_handle;
+static jack_port_t *jack_capt;
+static jack_port_t *jack_play;
+
+
+static void jack_shutdown (void *arg)
+{
+ exit (1);
+}
+
+
+static int jack_callback (jack_nframes_t nframes, void *arg)
+{
+ float *ip, *op;
+
+ ip = (float *)(jack_port_get_buffer (jack_capt, nframes));
+ op = (float *)(jack_port_get_buffer (jack_play, nframes));
+ return mtdm.process (nframes, ip, op);;
+}
+
+
+int main (int ac, char *av [])
+{
+ int i, k;
+ const char** ports;
+
+ if ((jack_handle = jack_client_new ("jdelay")) == 0)
+ {
+ fprintf (stderr, "Can't connect to JACK\n");
+ return 1;
+ }
+
+ jack_set_process_callback (jack_handle, jack_callback, 0);
+ jack_on_shutdown (jack_handle, jack_shutdown, 0);
+ jack_capt = jack_port_register (jack_handle, "in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+ jack_play = jack_port_register (jack_handle, "out", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+
+ if (jack_activate (jack_handle))
+ {
+ fprintf(stderr, "Can't activate JACK");
+ return 1;
+ }
+
+ if ((ports = jack_get_ports(jack_handle, NULL, NULL, JackPortIsPhysical | JackPortIsOutput)) == NULL) {
+ printf("Cannot find any physical capture ports\n");
+ } else {
+ for (int i = 0; i < 8 && ports[i] ; i++) {
+ jack_connect(jack_handle, ports[i], jack_port_name(jack_capt));
+ }
+ free(ports);
+ }
+
+ if ((ports = jack_get_ports(jack_handle, NULL, NULL, JackPortIsPhysical | JackPortIsInput)) == NULL) {
+ printf("Cannot find any physical playback ports");
+ } else {
+ for (int i = 0; i < 8 && ports[i]; i++) {
+ jack_connect(jack_handle, jack_port_name(jack_play), ports[i]);
+ }
+ free(ports);
+ }
+
+ while (1)
+ {
+#ifdef WIN32
+ Sleep (250);
+#else
+ usleep (250000);
+#endif
+
+ if (mtdm.resolve () < 0) printf ("Signal below threshold...\n");
+ else
+ {
+ if (mtdm.err () > 0.3)
+ {
+ mtdm.invert ();
+ mtdm.resolve ();
+ }
+ printf ("%10.3lf frames", mtdm.del ());
+ if (mtdm.err () > 0.2) printf (" ??");
+ if (mtdm.inv ()) printf (" Inv");
+ printf ("\n");
+ }
+ }
+
+ return 0;
+}
+
+
+// --------------------------------------------------------------------------------
diff --git a/example-clients/lsp.c b/example-clients/lsp.c
new file mode 100644
index 00000000..bff8774f
--- /dev/null
+++ b/example-clients/lsp.c
@@ -0,0 +1,143 @@
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <getopt.h>
+
+#include "jack.h"
+
+char * my_name;
+
+void
+show_version (void)
+{
+ //fprintf (stderr, "%s: JACK Audio Connection Kit version " VERSION "\n",
+ //my_name);
+}
+
+void
+show_usage (void)
+{
+ show_version ();
+ fprintf (stderr, "\nUsage: %s [options]\n", my_name);
+ fprintf (stderr, "List active Jack ports, and optionally display extra information.\n\n");
+ fprintf (stderr, "Display options:\n");
+ fprintf (stderr, " -c, --connections List connections to/from each port\n");
+ fprintf (stderr, " -l, --latency Display total latency in frames at each port\n");
+ fprintf (stderr, " -p, --properties Display port properties. Output may include:\n"
+ " input|output, can-monitor, physical, terminal\n\n");
+ fprintf (stderr, " -h, --help Display this help message\n");
+ fprintf (stderr, " --version Output version information and exit\n\n");
+ fprintf (stderr, "For more information see http://jackit.sourceforge.net/\n");
+}
+
+int
+main (int argc, char *argv[])
+{
+ jack_client_t *client;
+ const char **ports, **connections;
+ unsigned int i, j;
+ int show_con = 0;
+ int show_latency = 0;
+ int show_properties = 0;
+ int c;
+ int option_index;
+
+ struct option long_options[] = {
+ { "connections", 0, 0, 'c' },
+ { "latency", 0, 0, 'l' },
+ { "properties", 0, 0, 'p' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { 0, 0, 0, 0 }
+ };
+
+ my_name = strrchr(argv[0], '/');
+ if (my_name == 0) {
+ my_name = argv[0];
+ } else {
+ my_name ++;
+ }
+
+ while ((c = getopt_long (argc, argv, "clphv", long_options, &option_index)) >= 0) {
+ switch (c) {
+ case 'c':
+ show_con = 1;
+ break;
+ case 'l':
+ show_latency = 1;
+ break;
+ case 'p':
+ show_properties = 1;
+ break;
+ case 'h':
+ show_usage ();
+ return 1;
+ break;
+ case 'v':
+ show_version ();
+ return 1;
+ break;
+ default:
+ show_usage ();
+ return 1;
+ break;
+ }
+ }
+
+ /* try to become a client of the JACK server */
+
+ if ((client = jack_client_new ("lsp")) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ return 1;
+ }
+
+ ports = jack_get_ports (client, NULL, NULL, 0);
+
+ for (i = 0; ports[i]; ++i) {
+ printf ("%s\n", ports[i]);
+ if (show_con) {
+ if ((connections = jack_port_get_all_connections (client, jack_port_by_name(client, ports[i]))) != 0) {
+ for (j = 0; connections[j]; j++) {
+ printf (" %s\n", connections[j]);
+ }
+ free (connections);
+ }
+ }
+ if (show_latency) {
+ jack_port_t *port = jack_port_by_name (client, ports[i]);
+ if (port) {
+// printf (" latency = %" PRIu32 " frames\n",
+// jack_port_get_total_latency (client, port));
+ free (port);
+ }
+ }
+ if (show_properties) {
+ jack_port_t *port = jack_port_by_name (client, ports[i]);
+ if (port) {
+ int flags = jack_port_flags (port);
+ printf (" properties: ");
+ if (flags & JackPortIsInput) {
+ fputs ("input,", stdout);
+ }
+ if (flags & JackPortIsOutput) {
+ fputs ("output,", stdout);
+ }
+ if (flags & JackPortCanMonitor) {
+ fputs ("can-monitor,", stdout);
+ }
+ if (flags & JackPortIsPhysical) {
+ fputs ("physical,", stdout);
+ }
+ if (flags & JackPortIsTerminal) {
+ fputs ("terminal,", stdout);
+ }
+ putc ('\n', stdout);
+ }
+ }
+ }
+ jack_client_close (client);
+ exit (0);
+}
diff --git a/example-clients/metro.c b/example-clients/metro.c
new file mode 100644
index 00000000..ec9f8833
--- /dev/null
+++ b/example-clients/metro.c
@@ -0,0 +1,296 @@
+/*
+ Copyright (C) 2002 Anthony Van Groningen
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+#include <math.h>
+#include <getopt.h>
+#include <string.h>
+
+#include "jack.h"
+
+typedef jack_default_audio_sample_t sample_t;
+
+const double PI = 3.14;
+
+jack_client_t *client;
+jack_port_t *input_port;
+jack_port_t *output_port;
+unsigned long sr;
+int freq = 880;
+int bpm;
+jack_nframes_t tone_length, wave_length;
+sample_t *wave;
+long offset = 0;
+int transport_aware = 0;
+jack_transport_state_t transport_state;
+
+void
+usage ()
+
+{
+ fprintf (stderr, "\n"
+"usage: jack_metro \n"
+" [ --frequency OR -f frequency (in Hz) ]\n"
+" [ --amplitude OR -A maximum amplitude (between 0 and 1) ]\n"
+" [ --duration OR -D duration (in ms) ]\n"
+" [ --attack OR -a attack (in percent of duration) ]\n"
+" [ --decay OR -d decay (in percent of duration) ]\n"
+" [ --name OR -n jack name for metronome client ]\n"
+" [ --transport OR -t transport aware ]\n"
+" --bpm OR -b beats per minute\n"
+);
+}
+
+void
+process_silence (jack_nframes_t nframes)
+{
+ sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes);
+ memset (buffer, 0, sizeof (jack_default_audio_sample_t) * nframes);
+}
+
+int
+process_audio (jack_nframes_t nframes, void *arg)
+{
+ sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes);
+ jack_nframes_t frames_left = nframes;
+
+ while (wave_length - offset < frames_left) {
+ memcpy (buffer + (nframes - frames_left), wave + offset, sizeof (sample_t) * (wave_length - offset));
+ frames_left -= wave_length - offset;
+ offset = 0;
+ }
+ if (frames_left > 0) {
+ memcpy (buffer + (nframes - frames_left), wave + offset, sizeof (sample_t) * frames_left);
+ offset += frames_left;
+ }
+
+ return 0;
+}
+
+/*
+int
+process (jack_nframes_t nframes, void *arg)
+{
+ if (transport_aware) {
+ jack_position_t pos;
+
+ if (jack_transport_query (client, &pos)
+ != JackTransportRolling) {
+
+ process_silence (nframes);
+ return 0;
+ }
+ offset = pos.frame % wave_length;
+ }
+ process_audio (nframes);
+ return 0;
+}
+*/
+int
+sample_rate_change () {
+ printf("Sample rate has changed! Exiting...\n");
+ exit(-1);
+}
+
+int
+main (int argc, char *argv[])
+{
+
+ sample_t scale;
+ int i, attack_length, decay_length;
+ double *amp;
+ double max_amp = 0.5;
+ int option_index;
+ int opt;
+ int got_bpm = 0;
+ int attack_percent = 1, decay_percent = 10, dur_arg = 100;
+ char *client_name = 0;
+ char *bpm_string = "bpm";
+ int verbose = 0;
+
+ const char *options = "f:A:D:a:d:b:n:thv";
+ struct option long_options[] =
+ {
+ {"frequency", 1, 0, 'f'},
+ {"amplitude", 1, 0, 'A'},
+ {"duration", 1, 0, 'D'},
+ {"attack", 1, 0, 'a'},
+ {"decay", 1, 0, 'd'},
+ {"bpm", 1, 0, 'b'},
+ {"name", 1, 0, 'n'},
+ {"transport", 0, 0, 't'},
+ {"help", 0, 0, 'h'},
+ {"verbose", 0, 0, 'v'},
+ {0, 0, 0, 0}
+ };
+
+ while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) {
+ switch (opt) {
+ case 'f':
+ if ((freq = atoi (optarg)) <= 0) {
+ fprintf (stderr, "invalid frequency\n");
+ return -1;
+ }
+ break;
+ case 'A':
+ if (((max_amp = atof (optarg)) <= 0)|| (max_amp > 1)) {
+ fprintf (stderr, "invalid amplitude\n");
+ return -1;
+ }
+ break;
+ case 'D':
+ dur_arg = atoi (optarg);
+ fprintf (stderr, "durarg = %u\n", dur_arg);
+ break;
+ case 'a':
+ if (((attack_percent = atoi (optarg)) < 0) || (attack_percent > 100)) {
+ fprintf (stderr, "invalid attack percent\n");
+ return -1;
+ }
+ break;
+ case 'd':
+ if (((decay_percent = atoi (optarg)) < 0) || (decay_percent > 100)) {
+ fprintf (stderr, "invalid decay percent\n");
+ return -1;
+ }
+ break;
+ case 'b':
+ got_bpm = 1;
+ if ((bpm = atoi (optarg)) < 0) {
+ fprintf (stderr, "invalid bpm\n");
+ return -1;
+ }
+ bpm_string = (char *) malloc ((strlen (optarg) + 4) * sizeof (char));
+ strcpy (bpm_string, optarg);
+ strcat (bpm_string, "_bpm");
+ break;
+ case 'n':
+ client_name = (char *) malloc (strlen (optarg) * sizeof (char));
+ strcpy (client_name, optarg);
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 't':
+ transport_aware = 1;
+ break;
+ default:
+ fprintf (stderr, "unknown option %c\n", opt);
+ case 'h':
+ usage ();
+ return -1;
+ }
+ }
+
+ if (!got_bpm) {
+ fprintf (stderr, "bpm not specified\n");
+ usage ();
+ return -1;
+ }
+
+ /* Initial Jack setup, get sample rate */
+ if (!client_name) {
+ client_name = (char *) malloc (9 * sizeof (char));
+ strcpy (client_name, "metro");
+ }
+ if ((client = jack_client_new (client_name)) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ return 1;
+ }
+
+ jack_set_process_callback (client, process_audio, 0);
+ output_port = jack_port_register (client, bpm_string, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ input_port = jack_port_register (client, "metro_in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
+
+ sr = jack_get_sample_rate (client);
+
+ /* setup wave table parameters */
+ wave_length = 60 * sr / bpm;
+ tone_length = sr * dur_arg / 1000;
+ attack_length = tone_length * attack_percent / 100;
+ decay_length = tone_length * decay_percent / 100;
+ scale = 2 * PI * freq / sr;
+
+ if (tone_length >= wave_length) {
+ //fprintf (stderr, "invalid duration (tone length = %" PRIu32
+ // ", wave length = %" PRIu32 "\n", tone_length,
+ // wave_length);
+ return -1;
+ }
+ if (attack_length + decay_length > (int)tone_length) {
+ fprintf (stderr, "invalid attack/decay\n");
+ return -1;
+ }
+
+ /* Build the wave table */
+ wave = (sample_t *) malloc (wave_length * sizeof(sample_t));
+ amp = (double *) malloc (tone_length * sizeof(double));
+
+ for (i = 0; i < attack_length; i++) {
+ amp[i] = max_amp * i / ((double) attack_length);
+ }
+ for (i = attack_length; i < (int) tone_length - decay_length; i++) {
+ amp[i] = max_amp;
+ }
+ for (i = (int)tone_length - decay_length; i < (int)tone_length; i++) {
+ amp[i] = - max_amp * (i - (double) tone_length) / ((double) decay_length);
+ }
+ for (i = 0; i < (int) tone_length; i++) {
+ wave[i] = amp[i] * sin (scale * i);
+ }
+ for (i = tone_length; i < (int) wave_length; i++) {
+ wave[i] = 0;
+ }
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ return 1;
+ }
+
+
+#ifdef WIN32
+ // Connection can only be done after activation
+ jack_connect(client,jack_port_name(output_port), "portaudio:winmme:in1");
+ jack_connect(client,jack_port_name(output_port), "portaudio:winmme:in2");
+ jack_connect(client,"portaudio:winmme:out2", jack_port_name(input_port));
+#else
+ // Connection can only be done after activation
+ jack_connect(client,jack_port_name(output_port), "coreaudio:Built-in Audio:in2");
+ jack_connect(client,"coreaudio:Built-in Audio:out2", jack_port_name(input_port));
+#endif
+
+ while ((getchar() != 'q')) {
+ //while (1) {
+ //sleep(1);
+ //printf("jack_frame_time %ld\n", (long)jack_frame_time(client));
+ //usleep(2000);
+ };
+
+ if (jack_deactivate (client)) {
+ fprintf (stderr, "cannot deactivate client");
+ return 1;
+ }
+
+ jack_client_close(client);
+ return 0;
+}
diff --git a/example-clients/showtime.c b/example-clients/showtime.c
new file mode 100644
index 00000000..c88d241f
--- /dev/null
+++ b/example-clients/showtime.c
@@ -0,0 +1,101 @@
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+#include <stdlib.h>
+
+#include <jack/jack.h>
+#include <jack/transport.h>
+
+jack_client_t *client;
+
+
+void
+showtime ()
+{
+ jack_position_t current;
+ jack_transport_state_t transport_state;
+ jack_nframes_t frame_time;
+
+ transport_state = jack_transport_query (client, &current);
+ frame_time = jack_frame_time (client);
+
+ //printf ("frame: %7" PRIu32 " @ %" PRIu32 "\t", current.frame, frame_time);
+
+ printf ("frame = %ld frame_time = %ld usecs = %lld \t", current.frame, frame_time, current.usecs);
+
+ switch (transport_state) {
+ case JackTransportStopped:
+ printf ("state: Stopped");
+ break;
+ case JackTransportRolling:
+ printf ("state: Rolling");
+ break;
+ case JackTransportStarting:
+ printf ("state: Starting");
+ break;
+ default:
+ printf ("state: [unknown]");
+ }
+
+ if (current.valid & JackPositionBBT)
+ printf ("\tBBT: %3" PRIi32 "|%" PRIi32 "|%04"
+ PRIi32, current.bar, current.beat, current.tick);
+
+ if (current.valid & JackPositionTimecode)
+ printf ("\tTC: (%.6f, %.6f)",
+ current.frame_time, current.next_time);
+ printf ("\n");
+}
+
+void
+jack_shutdown (void *arg)
+{
+ exit (1);
+}
+
+void
+signal_handler (int sig)
+{
+ jack_client_close (client);
+ fprintf (stderr, "signal received, exiting ...\n");
+ exit (0);
+}
+
+int
+main (int argc, char *argv[])
+{
+ /* try to become a client of the JACK server */
+
+ if ((client = jack_client_new ("showtime")) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ return 1;
+ }
+
+ signal (SIGQUIT, signal_handler);
+ signal (SIGTERM, signal_handler);
+ signal (SIGHUP, signal_handler);
+ signal (SIGINT, signal_handler);
+
+ /* tell the JACK server to call `jack_shutdown()' if
+ it ever shuts down, either entirely, or if it
+ just decides to stop calling us.
+ */
+
+ jack_on_shutdown (client, jack_shutdown, 0);
+
+ /* tell the JACK server that we are ready to roll */
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ return 1;
+ }
+
+ while (1) {
+ usleep (20);
+ showtime ();
+ }
+
+ jack_client_close (client);
+ exit (0);
+}
diff --git a/example-clients/simple_client.c b/example-clients/simple_client.c
new file mode 100644
index 00000000..20005ca7
--- /dev/null
+++ b/example-clients/simple_client.c
@@ -0,0 +1,260 @@
+/** @file simple_client.c
+ *
+ * @brief This simple client demonstrates the basic features of JACK
+ * as they would be used by many applications.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+//#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+//#include <jack/jack.h>
+#include "jack.h"
+
+jack_port_t *input_port;
+jack_port_t *output_port1, *output_port2;
+jack_client_t *client;
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (200)
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ int left_phase;
+ int right_phase;
+}
+paTestData;
+
+
+/* a simple state machine for this client */
+volatile enum {
+ Init,
+ Run,
+ Exit
+} client_state = Init;
+
+/**
+ * The process callback for this JACK application is called in a
+ * special realtime thread once for each audio cycle.
+ *
+ * This client follows a simple rule: when the JACK transport is
+ * running, copy the input port to the output. When it stops, exit.
+ */
+
+/*
+int
+process (jack_nframes_t nframes, void *arg)
+{
+ jack_default_audio_sample_t *in, *out;
+ jack_transport_state_t ts = jack_transport_query(client, NULL);
+ int i;
+
+ if (ts == JackTransportRolling) {
+
+ if (client_state == Init)
+ client_state = Run;
+
+ in = jack_port_get_buffer (input_port, nframes);
+ out = jack_port_get_buffer (output_port, nframes);
+
+ memcpy (out, in,
+ sizeof (jack_default_audio_sample_t) * nframes);
+
+ } else if (ts == JackTransportStopped) {
+
+ if (client_state == Run)
+ client_state = Exit;
+ }
+
+ return 0;
+}
+*/
+
+int
+process (jack_nframes_t nframes, void *arg)
+{
+ jack_default_audio_sample_t *in, *out1, *out2;
+ paTestData *data = (paTestData*)arg;
+ int i;
+
+ in = jack_port_get_buffer (input_port, nframes);
+ out1 = jack_port_get_buffer (output_port1, nframes);
+ out2 = jack_port_get_buffer (output_port2, nframes);
+
+ for( i=0; i<nframes; i++ )
+ {
+ out1[i] = data->sine[data->left_phase]; /* left */
+ out2[i] = data->sine[data->right_phase]; /* right */
+ data->left_phase += 1;
+ if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;
+ data->right_phase += 3; /* higher pitch so we can distinguish left and right. */
+ if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
+ }
+
+ return 0;
+}
+
+/**
+ * JACK calls this shutdown_callback if the server ever shuts down or
+ * decides to disconnect the client.
+ */
+void
+jack_shutdown (void *arg)
+{
+ exit (1);
+}
+
+int
+main (int argc, char *argv[])
+{
+ const char **ports;
+ const char *client_name;
+ const char *server_name = NULL;
+ jack_options_t options = JackNullOption;
+ jack_status_t status;
+ paTestData data;
+ int i;
+
+ if (argc >= 2) { /* client name specified? */
+ client_name = argv[1];
+ if (argc >= 3) { /* server name specified? */
+ server_name = argv[2];
+ options |= JackServerName;
+ }
+ } else { /* use basename of argv[0] */
+ client_name = strrchr(argv[0], '/');
+ if (client_name == 0) {
+ client_name = argv[0];
+ } else {
+ client_name++;
+ }
+ }
+
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = 0.2 * (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+ data.left_phase = data.right_phase = 0;
+
+
+ /* open a client connection to the JACK server */
+
+ client = jack_client_open (client_name, options, &status, server_name);
+ if (client == NULL) {
+ fprintf (stderr, "jack_client_open() failed, "
+ "status = 0x%2.0x\n", status);
+ if (status & JackServerFailed) {
+ fprintf (stderr, "Unable to connect to JACK server\n");
+ }
+ exit (1);
+ }
+ if (status & JackServerStarted) {
+ fprintf (stderr, "JACK server started\n");
+ }
+ if (status & JackNameNotUnique) {
+ client_name = jack_get_client_name(client);
+ fprintf (stderr, "unique name `%s' assigned\n", client_name);
+ }
+
+ /* tell the JACK server to call `process()' whenever
+ there is work to be done.
+ */
+
+ jack_set_process_callback (client, process, &data);
+
+ /* tell the JACK server to call `jack_shutdown()' if
+ it ever shuts down, either entirely, or if it
+ just decides to stop calling us.
+ */
+
+ jack_on_shutdown (client, jack_shutdown, 0);
+
+ /* display the current sample rate.
+ */
+
+// printf ("engine sample rate: %" PRIu32 "\n",
+// jack_get_sample_rate (client));
+
+ /* create two ports */
+
+ input_port = jack_port_register (client, "input",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsInput, 0);
+ output_port1 = jack_port_register (client, "output1",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+
+ output_port2 = jack_port_register (client, "output2",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+
+ if ((input_port == NULL) || (output_port1 == NULL) || (output_port2 == NULL)) {
+ fprintf(stderr, "no more JACK ports available\n");
+ exit (1);
+ }
+
+ /* Tell the JACK server that we are ready to roll. Our
+ * process() callback will start running now. */
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ exit (1);
+ }
+
+ /* Connect the ports. You can't do this before the client is
+ * activated, because we can't make connections to clients
+ * that aren't running. Note the confusing (but necessary)
+ * orientation of the driver backend ports: playback ports are
+ * "input" to the backend, and capture ports are "output" from
+ * it.
+ */
+
+ ports = jack_get_ports (client, NULL, NULL,
+ JackPortIsPhysical|JackPortIsOutput);
+ if (ports == NULL) {
+ fprintf(stderr, "no physical capture ports\n");
+ exit (1);
+ }
+
+ if (jack_connect (client, ports[0], jack_port_name (input_port))) {
+ fprintf (stderr, "cannot connect input ports\n");
+ }
+
+ free (ports);
+
+ ports = jack_get_ports (client, NULL, NULL,
+ JackPortIsPhysical|JackPortIsInput);
+ if (ports == NULL) {
+ fprintf(stderr, "no physical playback ports\n");
+ exit (1);
+ }
+
+ if (jack_connect (client, jack_port_name (output_port1), ports[0])) {
+ fprintf (stderr, "cannot connect output ports\n");
+ }
+
+ if (jack_connect (client, jack_port_name (output_port2), ports[1])) {
+ fprintf (stderr, "cannot connect output ports\n");
+ }
+
+ free (ports);
+
+ /* keep running until the transport stops */
+
+ while (client_state != Exit) {
+ #ifdef WIN32
+ Sleep(1000);
+ #else
+ sleep (1);
+ #endif
+ }
+
+ jack_client_close (client);
+ exit (0);
+}
diff --git a/example-clients/transport.c b/example-clients/transport.c
new file mode 100644
index 00000000..685768a0
--- /dev/null
+++ b/example-clients/transport.c
@@ -0,0 +1,460 @@
+/*
+ * transport.c -- JACK transport master example client.
+ *
+ * Copyright (C) 2003 Jack O'Quin.
+ *
+ * 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
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+#include <jack/jack.h>
+#include <jack/transport.h>
+
+
+char *package; /* program name */
+int done = 0;
+jack_client_t *client;
+
+/* Time and tempo variables. These are global to the entire,
+ * transport timeline. There is no attempt to keep a true tempo map.
+ * The default time signature is: "march time", 4/4, 120bpm
+ */
+float time_beats_per_bar = 4.0;
+float time_beat_type = 4.0;
+double time_ticks_per_beat = 1920.0;
+double time_beats_per_minute = 120.0;
+volatile int time_reset = 1; /* true when time values change */
+
+/* JACK timebase callback.
+ *
+ * Runs in the process thread. Realtime, must not wait.
+ */
+void timebase(jack_transport_state_t state, jack_nframes_t nframes,
+ jack_position_t *pos, int new_pos, void *arg)
+{
+ double min; /* minutes since frame 0 */
+ long abs_tick; /* ticks since frame 0 */
+ long abs_beat; /* beats since frame 0 */
+
+ if (new_pos || time_reset) {
+
+ pos->valid = JackPositionBBT;
+ pos->beats_per_bar = time_beats_per_bar;
+ pos->beat_type = time_beat_type;
+ pos->ticks_per_beat = time_ticks_per_beat;
+ pos->beats_per_minute = time_beats_per_minute;
+
+ time_reset = 0; /* time change complete */
+
+ /* Compute BBT info from frame number. This is relatively
+ * simple here, but would become complex if we supported tempo
+ * or time signature changes at specific locations in the
+ * transport timeline. */
+
+ min = pos->frame / ((double) pos->frame_rate * 60.0);
+ abs_tick = min * pos->beats_per_minute * pos->ticks_per_beat;
+ abs_beat = abs_tick / pos->ticks_per_beat;
+
+ pos->bar = abs_beat / pos->beats_per_bar;
+ pos->beat = abs_beat - (pos->bar * pos->beats_per_bar) + 1;
+ pos->tick = abs_tick - (abs_beat * pos->ticks_per_beat);
+ pos->bar_start_tick = pos->bar * pos->beats_per_bar *
+ pos->ticks_per_beat;
+ pos->bar++; /* adjust start to bar 1 */
+
+#if 0
+ /* some debug code... */
+ fprintf(stderr, "\nnew position: %" PRIu32 "\tBBT: %3"
+ PRIi32 "|%" PRIi32 "|%04" PRIi32 "\n",
+ pos->frame, pos->bar, pos->beat, pos->tick);
+#endif
+
+ } else {
+
+ /* Compute BBT info based on previous period. */
+ pos->tick +=
+ nframes * pos->ticks_per_beat * pos->beats_per_minute
+ / (pos->frame_rate * 60);
+
+ while (pos->tick >= pos->ticks_per_beat) {
+ pos->tick -= pos->ticks_per_beat;
+ if (++pos->beat > pos->beats_per_bar) {
+ pos->beat = 1;
+ ++pos->bar;
+ pos->bar_start_tick +=
+ pos->beats_per_bar
+ * pos->ticks_per_beat;
+ }
+ }
+ }
+}
+
+void jack_shutdown(void *arg)
+{
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0400
+ rl_cleanup_after_signal();
+#endif
+ fprintf(stderr, "JACK shut down, exiting ...\n");
+ exit(1);
+}
+
+void signal_handler(int sig)
+{
+ jack_client_close(client);
+ fprintf(stderr, "signal received, exiting ...\n");
+ exit(0);
+}
+
+
+/* Command functions: see commands[] table following. */
+
+void com_activate(char *arg)
+{
+ if (jack_activate(client)) {
+ fprintf(stderr, "cannot activate client");
+ }
+}
+
+void com_deactivate(char *arg)
+{
+ if (jack_deactivate(client)) {
+ fprintf(stderr, "cannot deactivate client");
+ }
+}
+
+void com_exit(char *arg)
+{
+ done = 1;
+}
+
+void com_help(char *); /* forward declaration */
+
+void com_locate(char *arg)
+{
+ jack_nframes_t frame = 0;
+
+ if (*arg != '\0')
+ frame = atoi(arg);
+
+ jack_transport_locate(client, frame);
+}
+
+void com_master(char *arg)
+{
+ int cond = (*arg != '\0');
+ if (jack_set_timebase_callback(client, cond, timebase, NULL) != 0)
+ fprintf(stderr, "Unable to take over timebase.\n");
+}
+
+void com_play(char *arg)
+{
+ jack_transport_start(client);
+}
+
+void com_release(char *arg)
+{
+ jack_release_timebase(client);
+}
+
+void com_stop(char *arg)
+{
+ jack_transport_stop(client);
+}
+
+/* Change the tempo for the entire timeline, not just from the current
+ * location. */
+void com_tempo(char *arg)
+{
+ float tempo = 120.0;
+
+ if (*arg != '\0')
+ tempo = atof(arg);
+
+ time_beats_per_minute = tempo;
+ time_reset = 1;
+}
+
+/* Set sync timeout in seconds. */
+void com_timeout(char *arg)
+{
+ double timeout = 2.0;
+
+ if (*arg != '\0')
+ timeout = atof(arg);
+
+ jack_set_sync_timeout(client, (jack_time_t) (timeout*1000000));
+}
+
+
+/* Command parsing based on GNU readline info examples. */
+
+typedef void cmd_function_t(char *); /* command function type */
+
+/* Transport command table. */
+typedef struct {
+ char *name; /* user printable name */
+ cmd_function_t *func; /* function to call */
+ char *doc; /* documentation */
+} command_t;
+
+/* command table must be in alphabetical order */
+command_t commands[] = {
+ {"activate", com_activate, "Call jack_activate()"},
+ {"exit", com_exit, "Exit transport program"},
+ {"deactivate", com_deactivate, "Call jack_deactivate()"},
+ {"help", com_help, "Display help text [<command>]"},
+ {"locate", com_locate, "Locate to frame <position>"},
+ {"master", com_master, "Become timebase master "
+ "[<conditionally>]"},
+ {"play", com_play, "Start transport rolling"},
+ {"quit", com_exit, "Synonym for `exit'"},
+ {"release", com_release, "Release timebase"},
+ {"stop", com_stop, "Stop transport"},
+ {"tempo", com_tempo, "Set beat tempo <beats_per_min>"},
+ {"timeout", com_timeout, "Set sync timeout in <seconds>"},
+ {"?", com_help, "Synonym for `help'" },
+ {(char *)NULL, (cmd_function_t *)NULL, (char *)NULL }
+};
+
+command_t *find_command(char *name)
+{
+ register int i;
+ size_t namelen;
+
+ if ((name == NULL) || (*name == '\0'))
+ return ((command_t *)NULL);
+
+ namelen = strlen(name);
+ for (i = 0; commands[i].name; i++)
+ if (strncmp(name, commands[i].name, namelen) == 0) {
+
+ /* make sure the match is unique */
+ if ((commands[i+1].name) &&
+ (strncmp(name, commands[i+1].name, namelen) == 0))
+ return ((command_t *)NULL);
+ else
+ return (&commands[i]);
+ }
+
+ return ((command_t *)NULL);
+}
+
+void com_help(char *arg)
+{
+ register int i;
+ command_t *cmd;
+
+ if (!*arg) {
+ /* print help for all commands */
+ for (i = 0; commands[i].name; i++) {
+ printf("%s\t\t%s.\n", commands[i].name,
+ commands[i].doc);
+ }
+
+ } else if ((cmd = find_command(arg))) {
+ printf("%s\t\t%s.\n", cmd->name, cmd->doc);
+
+ } else {
+ int printed = 0;
+
+ printf("No `%s' command. Valid command names are:\n", arg);
+
+ for (i = 0; commands[i].name; i++) {
+ /* Print in six columns. */
+ if (printed == 6) {
+ printed = 0;
+ printf ("\n");
+ }
+
+ printf ("%s\t", commands[i].name);
+ printed++;
+ }
+
+ printf("\n\nTry `help [command]\' for more information.\n");
+ }
+}
+
+void execute_command(char *line)
+{
+ register int i;
+ command_t *command;
+ char *word;
+
+ /* Isolate the command word. */
+ i = 0;
+ while (line[i] && whitespace(line[i]))
+ i++;
+ word = line + i;
+
+ while (line[i] && !whitespace(line[i]))
+ i++;
+
+ if (line[i])
+ line[i++] = '\0';
+
+ command = find_command(word);
+
+ if (!command) {
+ fprintf(stderr, "%s: No such command. There is `help\'.\n",
+ word);
+ return;
+ }
+
+ /* Get argument to command, if any. */
+ while (whitespace(line[i]))
+ i++;
+
+ word = line + i;
+
+ /* invoke the command function. */
+ (*command->func)(word);
+}
+
+
+/* Strip whitespace from the start and end of string. */
+char *stripwhite(char *string)
+{
+ register char *s, *t;
+
+ s = string;
+ while (whitespace(*s))
+ s++;
+
+ if (*s == '\0')
+ return s;
+
+ t = s + strlen (s) - 1;
+ while (t > s && whitespace(*t))
+ t--;
+ *++t = '\0';
+
+ return s;
+}
+
+char *dupstr(char *s)
+{
+ char *r = malloc(strlen(s) + 1);
+ strcpy(r, s);
+ return r;
+}
+
+/* Readline generator function for command completion. */
+char *command_generator (const char *text, int state)
+{
+ static int list_index, len;
+ char *name;
+
+ /* If this is a new word to complete, initialize now. This
+ includes saving the length of TEXT for efficiency, and
+ initializing the index variable to 0. */
+ if (!state) {
+ list_index = 0;
+ len = strlen (text);
+ }
+
+ /* Return the next name which partially matches from the
+ command list. */
+ while ((name = commands[list_index].name)) {
+ list_index++;
+
+ if (strncmp(name, text, len) == 0)
+ return dupstr(name);
+ }
+
+ return (char *) NULL; /* No names matched. */
+}
+
+void command_loop()
+{
+ char *line, *cmd;
+ char prompt[32];
+
+ snprintf(prompt, sizeof(prompt), "%s> ", package);
+
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = package;
+
+ /* Define a custom completion function. */
+ rl_completion_entry_function = command_generator;
+
+ /* Read and execute commands until the user quits. */
+ while (!done) {
+
+ line = readline(prompt);
+
+ if (line == NULL) { /* EOF? */
+ printf("\n"); /* close out prompt */
+ done = 1;
+ break;
+ }
+
+ /* Remove leading and trailing whitespace from the line. */
+ cmd = stripwhite(line);
+
+ /* If anything left, add to history and execute it. */
+ if (*cmd)
+ {
+ add_history(cmd);
+ execute_command(cmd);
+ }
+
+ free(line); /* realine() called malloc() */
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ jack_status_t status;
+
+ /* basename $0 */
+ package = strrchr(argv[0], '/');
+ if (package == 0)
+ package = argv[0];
+ else
+ package++;
+
+ /* open a connection to the JACK server */
+ client = jack_client_open (package, JackNullOption, &status);
+ if (client == NULL) {
+ fprintf (stderr, "jack_client_open() failed, "
+ "status = 0x%2.0x\n", status);
+ return 1;
+ }
+
+ signal(SIGQUIT, signal_handler);
+ signal(SIGTERM, signal_handler);
+ signal(SIGHUP, signal_handler);
+ signal(SIGINT, signal_handler);
+
+ jack_on_shutdown(client, jack_shutdown, 0);
+
+ if (jack_activate(client)) {
+ fprintf(stderr, "cannot activate client");
+ return 1;
+ }
+
+ /* execute commands until done */
+ command_loop();
+
+ jack_client_close(client);
+ exit(0);
+}
diff --git a/example-clients/zombie.c b/example-clients/zombie.c
new file mode 100644
index 00000000..970306bf
--- /dev/null
+++ b/example-clients/zombie.c
@@ -0,0 +1,89 @@
+/*
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: zombie.c,v 1.1 2005/08/18 11:42:08 letz Exp $
+*/
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "jack.h"
+
+int running = 1;
+int count = 0;
+jack_port_t* output_port;
+
+int
+process(jack_nframes_t nframes, void* arg)
+{
+ if (count++ == 1000) {
+ printf("process block\n");
+ //while (1) {}
+ sleep(1);
+ }
+
+ return 0;
+}
+
+void
+shutdown (void *arg)
+{
+ printf("shutdown \n");
+ running = 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ jack_client_t* client = NULL;
+
+ /* try to become a client of the JACK server */
+ if ((client = jack_client_new ("zombie")) == 0) {
+ fprintf (stderr, "jack server not running?\n");
+ goto error;
+ }
+
+ jack_set_process_callback (client, process, NULL);
+ jack_on_shutdown(client, shutdown, NULL);
+ output_port = jack_port_register (client, "port1", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+
+ /* tell the JACK server that we are ready to roll */
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ goto error;
+ }
+
+ jack_connect(client, jack_port_name(output_port), "coreaudio:Built-in Audio:in2");
+
+ while (running) {
+ sleep(1);
+ printf ("run\n");
+ }
+
+ jack_deactivate (client);
+ jack_client_close (client);
+ return 0;
+
+error:
+ if (client)
+ jack_client_close (client);
+ return 1;
+}
+
diff --git a/linux/Makefile b/linux/Makefile
new file mode 100644
index 00000000..2d6f2ba2
--- /dev/null
+++ b/linux/Makefile
@@ -0,0 +1,123 @@
+subprojects := ../common ../common/test alsa
+
+# WARNING: installation works correctly only when done in /usr/local
+
+prefix := /usr/local
+
+sources := $(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard ../common/*.cpp) $(wildcard ../common/test/*.cpp)
+
+TARGET_LINUX_SERVER := jackdmp
+
+TARGET_LINUX_SERVER_LIB := libjackdmp.so
+
+TARGET_LINUX_CLIENT_LIB := libjackmp.so
+
+TARGET_LINUX_ALSA := jack_alsa.so
+
+TARGET_LINUX_DUMMY := jack_dummy.so
+
+VPATH := $(subprojects)
+
+LIB_LINUX := -lpthread -lrt -lasound
+
+
+objects_common_server_lib := JackActivationCount.o JackAPI.o JackAudioDriver.o JackClient.o JackConnectionManager.o \
+ JackDriver.o JackEngine.o JackEngineTiming.o JackError.o JackExternalClient.o JackFrameTimer.o \
+ JackFreewheelDriver.o JackGlobalsServer.o JackGraphManager.o JackInternalClient.o JackPort.o JackPosixSemaphore.o JackPosixThread.o JackFifo.o JackLoopbackDriver.o\
+ JackServer.o JackShmMem.o JackThreadedDriver.o shm.o JackSocket.o JackSocketServerChannel.o JackSocketNotifyChannel.o \
+ JackSocketServerNotifyChannel.o JackTime.o JackServerAPI.o JackGlobals.o JackDriverLoader.o internal_metro.o JackDebugClient.o JackTransportEngine.o JackServerGlobals.o
+
+objects_common_client_lib := JackActivationCount.o JackAPI.o JackClient.o JackConnectionManager.o ringbuffer.o \
+ JackError.o JackFrameTimer.o JackGlobalsClient.o JackGraphManager.o JackLibClient.o JackLibAPI.o JackPort.o JackPosixSemaphore.o JackFifo.o \
+ JackPosixThread.o JackShmMem.o shm.o JackSocket.o JackSocketClientChannel.o JackTime.o JackGlobals.o JackDebugClient.o JackTransportEngine.o \
+
+
+objects_linux_server := Jackdmp.o
+
+objects_linux_alsa := JackAlsaDriver.o memops.o generic_hw.o hdsp.o hammerfall.o ice1712.o
+
+objects_linux_dummy := JackDummyDriver.o
+
+CFLAGS := -g -O3 -fPIC -DUSE_POSIX_SHM $(addprefix -I, $(subprojects)) $(CFLAGS)
+CXXFLAGS := -g -O3 -fPIC -DSOCKET_RPC_FIFO_SEMA -D__SMP__ $(addprefix -I, $(subprojects)) $(CXXFLAGS)
+
+
+# Use this line to compile with POSIX names semaphore
+#CXXFLAGS := -g -03 -fPIC -DSOCKET_RPC_POSIX_SEMA -D__SMP__ $(addprefix -I, $(subprojects)) $(CXXFLAGS)
+
+# Add the -D__CLIENTDEBUG__ flag to activate client validation
+
+
+linux : $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_SERVER) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_DUMMY) \
+ synchroClient synchroServer synchroServerClient testSem
+
+all : $(TARGET_LINUX_SERVER) $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_DUMMY)
+
+synchroClient: JackPosixSemaphore.o testSynchroClient.o JackPosixThread.o JackError.o JackFifo.o
+ $(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroClient.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o synchroClient
+
+synchroServer: JackPosixSemaphore.o testSynchroServer.o JackPosixThread.o JackError.o JackFifo.o
+ $(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroServer.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o synchroServer
+
+synchroServerClient: JackPosixSemaphore.o testSynchroServerClient.o JackPosixThread.o JackError.o JackFifo.o JackPthreadCond.o JackShmMem.o shm.o
+ $(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroServerClient.o JackPosixThread.o JackError.o JackFifo.o JackShmMem.o shm.o JackPthreadCond.o $(LIB_LINUX) -o synchroServerClient
+
+testSem: JackPosixSemaphore.o testSem.o JackPosixThread.o JackError.o JackFifo.o
+ $(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSem.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o testSem
+
+
+$(TARGET_LINUX_SERVER_LIB) : $(objects_common_server_lib)
+ $(CXX) $(CXXFLAGS) -shared $(objects_common_server_lib) $(LIB_LINUX) -o $(TARGET_LINUX_SERVER_LIB)
+
+$(TARGET_LINUX_CLIENT_LIB) : $(objects_common_client_lib) $(objects_linux_lib)
+ $(CXX) $(CXXFLAGS) -shared $(objects_common_client_lib) $(objects_linux_lib) $(LIB_LINUX) -o $(TARGET_LINUX_CLIENT_LIB)
+
+$(TARGET_LINUX_SERVER) : $(objects_linux_server)
+ $(CXX) $(CXXFLAGS) $(objects_linux_server) $(LIB_LINUX) libjackdmp.so -o $(TARGET_LINUX_SERVER)
+
+$(TARGET_LINUX_ALSA) : $(objects_linux_alsa)
+ $(CXX) $(CXXFLAGS) -shared $(objects_linux_alsa) $(LIB_LINUX) libjackdmp.so -o $(TARGET_LINUX_ALSA)
+
+$(TARGET_LINUX_DUMMY) : $(objects_linux_dummy)
+ $(CXX) $(CXXFLAGS) -shared $(objects_linux_dummy) $(LIB_LINUX) libjackdmp.so -o $(TARGET_LINUX_DUMMY)
+
+
+# Install jackdmp and overwrite jack installation
+install:
+ cp jackdmp $(prefix)/bin
+ cp libjackmp.so $(prefix)/lib
+ cp libjackdmp.so $(prefix)/lib
+ install -d $(prefix)/lib/jackmp/
+ cp jack_alsa.so $(prefix)/lib/jackmp
+ cp jack_dummy.so $(prefix)/lib/jackmp
+ cd $(prefix)/lib && [ -f libjack.so.0.0.23 ] && mv -f libjack.so.0.0.23 tmp_libjack.so.0.0.23 || echo "Jack not found, continue..."
+ cd $(prefix)/lib && rm -f libjack.so*
+ cd $(prefix)/lib && ln -s libjackmp.so libjack.so
+ cd $(prefix)/lib && ln -s libjackmp.so libjack.so.0
+ /sbin/ldconfig
+
+
+# Remove jackdmp and tries to restore jack
+remove:
+ rm $(prefix)/bin/jackdmp
+ rm $(prefix)/lib/libjackmp.so
+ rm $(prefix)/lib/libjackdmp.so
+ rm -r $(prefix)/lib/jackmp
+ cd $(prefix)/lib && rm -f libjack.so*
+ cd $(prefix)/lib && [ -f tmp_libjack.so.0.0.23 ] && mv -f tmp_libjack.so.0.0.23 libjack.so.0.0.23 \
+ && ln -s libjack.so.0.0.23 libjack.so && ln -s libjack.so.0.0.23 libjack.so.0 || echo "Jack not restored"
+ /sbin/ldconfig
+
+
+clean :
+ rm -f *.o
+ rm -f $(TARGET_LINUX_SERVER) $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_DUMMY) \
+ synchroClient synchroServer synchroServerClient testSem
+
+depend :
+ #makedepend -w120 -Y -- $(CXXFLAGS) -- $(sources)
+
+dox:
+ doxygen
+
+# DO NOT DELETE
diff --git a/linux/alsa/JackAlsaDriver.cpp b/linux/alsa/JackAlsaDriver.cpp
new file mode 100644
index 00000000..0423e949
--- /dev/null
+++ b/linux/alsa/JackAlsaDriver.cpp
@@ -0,0 +1,2675 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <unistd.h>
+
+#include <math.h>
+#include <stdio.h>
+#include <memory.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <regex.h>
+#include <string.h>
+
+#include "JackAlsaDriver.h"
+#include "JackEngineControl.h"
+#include "JackClientControl.h"
+#include "JackPort.h"
+#include "JackGraphManager.h"
+
+#include "hammerfall.h"
+#include "hdsp.h"
+#include "ice1712.h"
+#include "usx2y.h"
+
+#include "generic.h"
+#include "memops.h"
+//#include "generic_hw.c"
+//#include "hdsp.c"
+//#include "hammerfall.c"
+
+namespace Jack
+{
+
+typedef long AudioDeviceID;
+
+#define jack_get_microseconds GetMicroSeconds
+
+void
+JackAlsaDriver::alsa_driver_release_channel_dependent_memory (alsa_driver_t *driver)
+{
+ bitset_destroy (&driver->channels_done);
+ bitset_destroy (&driver->channels_not_done);
+
+ if (driver->playback_addr) {
+ free (driver->playback_addr);
+ driver->playback_addr = 0;
+ }
+
+ if (driver->capture_addr) {
+ free (driver->capture_addr);
+ driver->capture_addr = 0;
+ }
+
+ if (driver->playback_interleave_skip) {
+ free (driver->playback_interleave_skip);
+ driver->playback_interleave_skip = NULL;
+ }
+
+ if (driver->capture_interleave_skip) {
+ free (driver->capture_interleave_skip);
+ driver->capture_interleave_skip = NULL;
+ }
+
+ if (driver->silent) {
+ free (driver->silent);
+ driver->silent = 0;
+ }
+
+ if (driver->dither_state) {
+ free (driver->dither_state);
+ driver->dither_state = 0;
+ }
+}
+
+int
+JackAlsaDriver::alsa_driver_check_capabilities (alsa_driver_t *driver)
+{
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_check_card_type (alsa_driver_t *driver)
+{
+ int err;
+ snd_ctl_card_info_t *card_info;
+ char * ctl_name;
+ regex_t expression;
+
+ snd_ctl_card_info_alloca (&card_info);
+
+ regcomp(&expression, "(plug)?hw:[0-9](,[0-9])?", REG_ICASE | REG_EXTENDED);
+
+ if (!regexec(&expression, driver->alsa_name_playback, 0, NULL, 0)) {
+ /* the user wants a hw or plughw device, the ctl name
+ * should be hw:x where x is the card number */
+
+ char tmp[5];
+ strncpy(tmp, strstr(driver->alsa_name_playback, "hw"), 4);
+ tmp[4] = '\0';
+ printf("control device %s\n", tmp);
+ ctl_name = strdup(tmp);
+ } else {
+ ctl_name = strdup(driver->alsa_name_playback);
+ }
+
+ // XXX: I don't know the "right" way to do this. Which to use
+ // driver->alsa_name_playback or driver->alsa_name_capture.
+ if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) {
+ jack_error ("control open \"%s\" (%s)", ctl_name,
+ snd_strerror(err));
+ return -1;
+ }
+
+ if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
+ jack_error ("control hardware info \"%s\" (%s)",
+ driver->alsa_name_playback, snd_strerror (err));
+ snd_ctl_close (driver->ctl_handle);
+ return -1;
+ }
+
+ driver->alsa_driver = strdup(snd_ctl_card_info_get_driver (card_info));
+
+ regfree(&expression);
+ free(ctl_name);
+
+ return alsa_driver_check_capabilities (driver);
+}
+
+int
+JackAlsaDriver::alsa_driver_hammerfall_hardware (alsa_driver_t *driver)
+{
+ driver->hw = jack_alsa_hammerfall_hw_new (driver);
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_hdsp_hardware (alsa_driver_t *driver)
+{
+ driver->hw = jack_alsa_hdsp_hw_new (driver);
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_ice1712_hardware (alsa_driver_t *driver)
+{
+ driver->hw = jack_alsa_ice1712_hw_new (driver);
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_usx2y_hardware (alsa_driver_t *driver)
+{
+ // steph
+ //driver->hw = jack_alsa_usx2y_hw_new (driver);
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_generic_hardware (alsa_driver_t *driver)
+{
+ driver->hw = jack_alsa_generic_hw_new (driver);
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_hw_specific (alsa_driver_t *driver, int hw_monitoring,
+ int hw_metering)
+{
+ int err;
+
+ if (!strcmp(driver->alsa_driver, "RME9652")) {
+ if ((err = alsa_driver_hammerfall_hardware (driver)) != 0) {
+ return err;
+ }
+ } else if (!strcmp(driver->alsa_driver, "H-DSP")) {
+ if ((err = alsa_driver_hdsp_hardware (driver)) != 0) {
+ return err;
+ }
+ } else if (!strcmp(driver->alsa_driver, "ICE1712")) {
+ if ((err = alsa_driver_ice1712_hardware (driver)) != 0) {
+ return err;
+ }
+ } else if (!strcmp(driver->alsa_driver, "USB US-X2Y")) {
+ if ((err = alsa_driver_usx2y_hardware (driver)) != 0) {
+ return err;
+ }
+ } else {
+ if ((err = alsa_driver_generic_hardware (driver)) != 0) {
+ return err;
+ }
+ }
+
+ if (driver->hw->capabilities & Cap_HardwareMonitoring) {
+ driver->has_hw_monitoring = TRUE;
+ /* XXX need to ensure that this is really FALSE or
+ * TRUE or whatever*/
+ driver->hw_monitoring = hw_monitoring;
+ } else {
+ driver->has_hw_monitoring = FALSE;
+ driver->hw_monitoring = FALSE;
+ }
+
+ if (driver->hw->capabilities & Cap_ClockLockReporting) {
+ driver->has_clock_sync_reporting = TRUE;
+ } else {
+ driver->has_clock_sync_reporting = FALSE;
+ }
+
+ if (driver->hw->capabilities & Cap_HardwareMetering) {
+ driver->has_hw_metering = TRUE;
+ driver->hw_metering = hw_metering;
+ } else {
+ driver->has_hw_metering = FALSE;
+ driver->hw_metering = FALSE;
+ }
+
+ return 0;
+}
+
+void
+JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
+{
+ switch (driver->playback_sample_bytes) {
+ case 2:
+ if (driver->playback_interleaved) {
+ driver->channel_copy = memcpy_interleave_d16_s16;
+ } else {
+ driver->channel_copy = memcpy_fake;
+ }
+
+ switch (driver->dither) {
+ case Rectangular:
+ printf("Rectangular dithering at 16 bits\n");
+ driver->write_via_copy = sample_move_dither_rect_d16_sS;
+ break;
+
+ case Triangular:
+ printf("Triangular dithering at 16 bits\n");
+ driver->write_via_copy = sample_move_dither_tri_d16_sS;
+ break;
+
+ case Shaped:
+ printf("Noise-shaped dithering at 16 bits\n");
+ driver->write_via_copy =
+ sample_move_dither_shaped_d16_sS;
+ break;
+
+ default:
+ driver->write_via_copy = sample_move_d16_sS;
+ break;
+ }
+ break;
+
+ case 3:
+ if (driver->playback_interleaved) {
+ driver->channel_copy = memcpy_interleave_d24_s24;
+ } else {
+ driver->channel_copy = memcpy_fake;
+ }
+
+ switch (driver->dither) {
+ case Rectangular:
+ printf("Rectangular dithering at 16 bits\n");
+ driver->write_via_copy = sample_move_dither_rect_d24_sS;
+ break;
+
+ case Triangular:
+ printf("Triangular dithering at 16 bits\n");
+ driver->write_via_copy = sample_move_dither_tri_d24_sS;
+ break;
+
+ case Shaped:
+ printf("Noise-shaped dithering at 16 bits\n");
+ driver->write_via_copy =
+ sample_move_dither_shaped_d24_sS;
+ break;
+
+ default:
+ driver->write_via_copy = sample_move_d24_sS;
+ break;
+ }
+ break;
+
+ case 4:
+ if (driver->playback_interleaved) {
+ driver->channel_copy = memcpy_interleave_d32_s32;
+ } else {
+ driver->channel_copy = memcpy_fake;
+ }
+
+ switch (driver->dither) {
+ case Rectangular:
+ printf("Rectangular dithering at 16 bits\n");
+ driver->write_via_copy =
+ sample_move_dither_rect_d32u24_sS;
+ break;
+
+ case Triangular:
+ printf("Triangular dithering at 16 bits\n");
+ driver->write_via_copy =
+ sample_move_dither_tri_d32u24_sS;
+ break;
+
+ case Shaped:
+ printf("Noise-shaped dithering at 16 bits\n");
+ driver->write_via_copy =
+ sample_move_dither_shaped_d32u24_sS;
+ break;
+
+ default:
+ driver->write_via_copy = sample_move_d32u24_sS;
+ break;
+ }
+ break;
+ }
+
+ switch (driver->capture_sample_bytes) {
+ case 2:
+ driver->read_via_copy = sample_move_dS_s16;
+ break;
+ case 3:
+ driver->read_via_copy = sample_move_dS_s24;
+ break;
+ case 4:
+ driver->read_via_copy = sample_move_dS_s32u24;
+ break;
+ }
+}
+
+int
+JackAlsaDriver::alsa_driver_configure_stream (alsa_driver_t *driver, char *device_name,
+ const char *stream_name,
+ snd_pcm_t *handle,
+ snd_pcm_hw_params_t *hw_params,
+ snd_pcm_sw_params_t *sw_params,
+ unsigned int *nperiodsp,
+ unsigned long *nchns,
+ unsigned long sample_width)
+{
+ int err, format;
+ unsigned int frame_rate;
+ snd_pcm_uframes_t stop_th;
+ static struct {
+ char Name[16];
+ snd_pcm_format_t format;
+ }
+ formats[] = {
+ {"32bit", SND_PCM_FORMAT_S32},
+ {"24bit", SND_PCM_FORMAT_S24_3},
+ {"16bit", SND_PCM_FORMAT_S16},
+ };
+#define NOFORMATS (sizeof(formats)/sizeof(formats[0]))
+
+ if ((err = snd_pcm_hw_params_any (handle, hw_params)) < 0) {
+ jack_error ("ALSA: no playback configurations available (%s)",
+ snd_strerror (err));
+ return -1;
+ }
+
+ if ((err = snd_pcm_hw_params_set_periods_integer (handle, hw_params))
+ < 0) {
+ jack_error ("ALSA: cannot restrict period size to integral"
+ " value.");
+ return -1;
+ }
+
+ if ((err = snd_pcm_hw_params_set_access (
+ handle, hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED))
+ < 0) {
+ if ((err = snd_pcm_hw_params_set_access (
+ handle, hw_params,
+ SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) {
+ if ((err = snd_pcm_hw_params_set_access (
+ handle, hw_params,
+ SND_PCM_ACCESS_MMAP_COMPLEX)) < 0) {
+
+ jack_error ("ALSA: mmap-based access is not possible"
+ " for the %s "
+ "stream of this audio interface",
+ stream_name);
+ return -1;
+ }
+ }
+ }
+
+ format = sample_width == 4 ? 0 : NOFORMATS - 1;
+ while (1) {
+ if ((err = snd_pcm_hw_params_set_format (
+ handle, hw_params, formats[format].format)) < 0) {
+ int failed_format = format;
+ if ((sample_width == 4
+ ? format++ < NOFORMATS - 1
+ : format-- > 0)) {
+ jack_error ("Note: audio device %s doesn't support a %s sample format"
+ " so JACK will try a %s format instead", device_name,
+ formats[failed_format].Name,
+ formats[format].Name);
+ } else {
+ jack_error ("Sorry. The audio interface \"%s\""
+ " doesn't support any of the"
+ " hardware sample formats that"
+ " JACK's alsa-driver can use.",
+ device_name);
+ return -1;
+ }
+ } else
+ break;
+ }
+
+ frame_rate = driver->frame_rate ;
+ err = snd_pcm_hw_params_set_rate_near (handle, hw_params,
+ &frame_rate, NULL) ;
+ driver->frame_rate = frame_rate ;
+ if (err < 0) {
+ //jack_error ("ALSA: cannot set sample/frame rate to %"
+ // PRIu32 " for %s", driver->frame_rate,
+ // stream_name);
+ return -1;
+ }
+ if (!*nchns) {
+ /*if not user-specified, try to find the maximum
+ * number of channels */
+ unsigned int channels_max ;
+ err = snd_pcm_hw_params_get_channels_max (hw_params,
+ &channels_max);
+ *nchns = channels_max ;
+
+ if (*nchns > 1024) {
+
+ /* the hapless user is an unwitting victim of
+ the "default" ALSA PCM device, which can
+ support up to 16 million channels. since
+ they can't be bothered to set up a proper
+ default device, limit the number of
+ channels for them to a sane default.
+ */
+
+ jack_error (
+ "You appear to be using the ALSA software \"plug\" layer, probably\n"
+ "a result of using the \"default\" ALSA device. This is less\n"
+ "efficient than it could be. Consider using a hardware device\n"
+ "instead rather than using the plug layer. Usually the name of the\n"
+ "hardware device that corresponds to the first sound card is hw:0\n"
+ );
+ *nchns = 2;
+ }
+ }
+
+ if ((err = snd_pcm_hw_params_set_channels (handle, hw_params,
+ *nchns)) < 0) {
+ jack_error ("ALSA: cannot set channel count to %u for %s",
+ *nchns, stream_name);
+ return -1;
+ }
+
+ if ((err = snd_pcm_hw_params_set_period_size (handle, hw_params,
+ driver->frames_per_cycle,
+ 0))
+ < 0) {
+ // steph
+ //jack_error ("ALSA: cannot set period size to %" PRIu32
+ // " frames for %s", driver->frames_per_cycle,
+ // stream_name);
+ return -1;
+ }
+
+ *nperiodsp = driver->user_nperiods;
+ snd_pcm_hw_params_set_periods_min (handle, hw_params, nperiodsp, NULL);
+ if (*nperiodsp < driver->user_nperiods)
+ *nperiodsp = driver->user_nperiods;
+ if (snd_pcm_hw_params_set_periods_near (handle, hw_params,
+ nperiodsp, NULL) < 0) {
+ jack_error ("ALSA: cannot set number of periods to %u for %s",
+ *nperiodsp, stream_name);
+ return -1;
+ }
+
+ if (*nperiodsp < driver->user_nperiods) {
+ jack_error ("ALSA: got smaller periods %u than %u for %s",
+ *nperiodsp, (unsigned int) driver->user_nperiods,
+ stream_name);
+ return -1;
+ }
+ fprintf(stderr, "nperiods = %d for %s\n", *nperiodsp, stream_name);
+
+ // steph
+ /*
+ if (!jack_power_of_two(driver->frames_per_cycle)) {
+ jack_error("JACK: frames must be a power of two "
+ "(64, 512, 1024, ...)\n");
+ return -1;
+ }
+ */
+
+ if ((err = snd_pcm_hw_params_set_buffer_size (handle, hw_params,
+ *nperiodsp *
+ driver->frames_per_cycle))
+ < 0) {
+ /*
+ jack_error ("ALSA: cannot set buffer length to %" PRIu32
+ " for %s",
+ *nperiodsp * driver->frames_per_cycle,
+ stream_name);
+ */
+ return -1;
+ }
+
+ if ((err = snd_pcm_hw_params (handle, hw_params)) < 0) {
+ jack_error ("ALSA: cannot set hardware parameters for %s",
+ stream_name);
+ return -1;
+ }
+
+ snd_pcm_sw_params_current (handle, sw_params);
+
+ if ((err = snd_pcm_sw_params_set_start_threshold (handle, sw_params,
+ 0U)) < 0) {
+ jack_error ("ALSA: cannot set start mode for %s", stream_name);
+ return -1;
+ }
+
+ stop_th = *nperiodsp * driver->frames_per_cycle;
+ if (driver->soft_mode) {
+ stop_th = (snd_pcm_uframes_t) - 1;
+ }
+
+ if ((err = snd_pcm_sw_params_set_stop_threshold (
+ handle, sw_params, stop_th)) < 0) {
+ jack_error ("ALSA: cannot set stop mode for %s",
+ stream_name);
+ return -1;
+ }
+
+ if ((err = snd_pcm_sw_params_set_silence_threshold (
+ handle, sw_params, 0)) < 0) {
+ jack_error ("ALSA: cannot set silence threshold for %s",
+ stream_name);
+ return -1;
+ }
+
+#if 0
+ fprintf (stderr, "set silence size to %lu * %lu = %lu\n",
+ driver->frames_per_cycle, *nperiodsp,
+ driver->frames_per_cycle * *nperiodsp);
+
+ if ((err = snd_pcm_sw_params_set_silence_size (
+ handle, sw_params,
+ driver->frames_per_cycle * *nperiodsp)) < 0) {
+ jack_error ("ALSA: cannot set silence size for %s",
+ stream_name);
+ return -1;
+ }
+#endif
+
+ if (handle == driver->playback_handle)
+ err = snd_pcm_sw_params_set_avail_min (
+ handle, sw_params,
+ driver->frames_per_cycle
+ * (*nperiodsp - driver->user_nperiods + 1));
+ else
+ err = snd_pcm_sw_params_set_avail_min (
+ handle, sw_params, driver->frames_per_cycle);
+
+ if (err < 0) {
+ jack_error ("ALSA: cannot set avail min for %s", stream_name);
+ return -1;
+ }
+
+ if ((err = snd_pcm_sw_params (handle, sw_params)) < 0) {
+ jack_error ("ALSA: cannot set software parameters for %s\n",
+ stream_name);
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate)
+{
+ int dir;
+ snd_pcm_uframes_t p_period_size = 0;
+ snd_pcm_uframes_t c_period_size = 0;
+ channel_t chn;
+ unsigned int pr = 0;
+ unsigned int cr = 0;
+ int err;
+
+ driver->frame_rate = rate;
+ driver->frames_per_cycle = frames_per_cycle;
+ driver->user_nperiods = user_nperiods;
+
+ /* // steph
+ fprintf (stderr, "configuring for %" PRIu32 "Hz, period = %"
+ PRIu32 " frames, buffer = %" PRIu32 " periods\n",
+ rate, frames_per_cycle, user_nperiods);
+ */
+
+ if (driver->capture_handle) {
+ if (alsa_driver_configure_stream (
+ driver,
+ driver->alsa_name_capture,
+ "capture",
+ driver->capture_handle,
+ driver->capture_hw_params,
+ driver->capture_sw_params,
+ &driver->capture_nperiods,
+ (long unsigned int*)&driver->capture_nchannels,
+ driver->capture_sample_bytes)) {
+ jack_error ("ALSA: cannot configure capture channel");
+ return -1;
+ }
+ }
+
+ if (driver->playback_handle) {
+ if (alsa_driver_configure_stream (
+ driver,
+ driver->alsa_name_playback,
+ "playback",
+ driver->playback_handle,
+ driver->playback_hw_params,
+ driver->playback_sw_params,
+ &driver->playback_nperiods,
+ (long unsigned int*)&driver->playback_nchannels,
+ driver->playback_sample_bytes)) {
+ jack_error ("ALSA: cannot configure playback channel");
+ return -1;
+ }
+ }
+
+ /* check the rate, since thats rather important */
+
+ if (driver->playback_handle) {
+ snd_pcm_hw_params_get_rate (driver->playback_hw_params,
+ &pr, &dir);
+ }
+
+ if (driver->capture_handle) {
+ snd_pcm_hw_params_get_rate (driver->capture_hw_params,
+ &cr, &dir);
+ }
+
+ if (driver->capture_handle && driver->playback_handle) {
+ if (cr != pr) {
+ jack_error ("playback and capture sample rates do "
+ "not match (%d vs. %d)", pr, cr);
+ }
+
+ /* only change if *both* capture and playback rates
+ * don't match requested certain hardware actually
+ * still works properly in full-duplex with slightly
+ * different rate values between adc and dac
+ */
+ if (cr != driver->frame_rate && pr != driver->frame_rate) {
+ jack_error ("sample rate in use (%d Hz) does not "
+ "match requested rate (%d Hz)",
+ cr, driver->frame_rate);
+ driver->frame_rate = cr;
+ }
+
+ } else if (driver->capture_handle && cr != driver->frame_rate) {
+ jack_error ("capture sample rate in use (%d Hz) does not "
+ "match requested rate (%d Hz)",
+ cr, driver->frame_rate);
+ driver->frame_rate = cr;
+ } else if (driver->playback_handle && pr != driver->frame_rate) {
+ jack_error ("playback sample rate in use (%d Hz) does not "
+ "match requested rate (%d Hz)",
+ pr, driver->frame_rate);
+ driver->frame_rate = pr;
+ }
+
+
+ /* check the fragment size, since thats non-negotiable */
+
+ if (driver->playback_handle) {
+ snd_pcm_access_t access;
+
+ err = snd_pcm_hw_params_get_period_size (
+ driver->playback_hw_params, &p_period_size, &dir);
+ err = snd_pcm_hw_params_get_format (
+ driver->playback_hw_params,
+ &(driver->playback_sample_format));
+ err = snd_pcm_hw_params_get_access (driver->playback_hw_params,
+ &access);
+ driver->playback_interleaved =
+ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
+ || (access == SND_PCM_ACCESS_MMAP_COMPLEX);
+
+ if (p_period_size != driver->frames_per_cycle) {
+ /*
+ jack_error ("alsa_pcm: requested an interrupt every %"
+ PRIu32
+ " frames but got %u frames for playback",
+ driver->frames_per_cycle, p_period_size);
+ */
+ return -1;
+ }
+ }
+
+ if (driver->capture_handle) {
+ snd_pcm_access_t access;
+
+ err = snd_pcm_hw_params_get_period_size (
+ driver->capture_hw_params, &c_period_size, &dir);
+ err = snd_pcm_hw_params_get_format (
+ driver->capture_hw_params,
+ &(driver->capture_sample_format));
+ err = snd_pcm_hw_params_get_access (driver->capture_hw_params,
+ &access);
+ driver->capture_interleaved =
+ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
+ || (access == SND_PCM_ACCESS_MMAP_COMPLEX);
+
+
+ if (c_period_size != driver->frames_per_cycle) {
+ /* // steph
+ jack_error ("alsa_pcm: requested an interrupt every %"
+ PRIu32
+ " frames but got %uc frames for capture",
+ driver->frames_per_cycle, p_period_size);
+ */
+ return -1;
+ }
+ }
+
+ driver->playback_sample_bytes =
+ snd_pcm_format_physical_width (driver->playback_sample_format)
+ / 8;
+ driver->capture_sample_bytes =
+ snd_pcm_format_physical_width (driver->capture_sample_format)
+ / 8;
+
+ if (driver->playback_handle) {
+ switch (driver->playback_sample_format) {
+ case SND_PCM_FORMAT_S32_LE:
+ case SND_PCM_FORMAT_S24_3:
+ case SND_PCM_FORMAT_S16_LE:
+ case SND_PCM_FORMAT_S32_BE:
+ case SND_PCM_FORMAT_S16_BE:
+ break;
+
+ default:
+ jack_error ("programming error: unhandled format "
+ "type for playback");
+ exit (1);
+ }
+ }
+
+ if (driver->capture_handle) {
+ switch (driver->capture_sample_format) {
+ case SND_PCM_FORMAT_S32_LE:
+ case SND_PCM_FORMAT_S24_3:
+ case SND_PCM_FORMAT_S16_LE:
+ case SND_PCM_FORMAT_S32_BE:
+ case SND_PCM_FORMAT_S16_BE:
+ break;
+
+ default:
+ jack_error ("programming error: unhandled format "
+ "type for capture");
+ exit (1);
+ }
+ }
+
+ if (driver->playback_interleaved) {
+ const snd_pcm_channel_area_t *my_areas;
+ snd_pcm_uframes_t offset, frames;
+ if (snd_pcm_mmap_begin(driver->playback_handle,
+ &my_areas, &offset, &frames) < 0) {
+ jack_error ("ALSA: %s: mmap areas info error",
+ driver->alsa_name_playback);
+ return -1;
+ }
+ //driver->playback_interleave_skip = my_areas[0].step / 8; steph
+ driver->interleave_unit =
+ snd_pcm_format_physical_width (
+ driver->playback_sample_format) / 8;
+ } else {
+ driver->interleave_unit = 0; /* NOT USED */
+ //driver->playback_interleave_skip = steph
+ // snd_pcm_format_physical_width (
+ // driver->playback_sample_format) / 8;
+ }
+
+ if (driver->capture_interleaved) {
+ const snd_pcm_channel_area_t *my_areas;
+ snd_pcm_uframes_t offset, frames;
+ if (snd_pcm_mmap_begin(driver->capture_handle,
+ &my_areas, &offset, &frames) < 0) {
+ jack_error ("ALSA: %s: mmap areas info error",
+ driver->alsa_name_capture);
+ return -1;
+ }
+ //driver->capture_interleave_skip = my_areas[0].step / 8; steph
+ } else {
+ //driver->capture_interleave_skip =
+ // snd_pcm_format_physical_width (
+ // driver->capture_sample_format) / 8;
+ }
+
+ if (driver->playback_nchannels > driver->capture_nchannels) {
+ driver->max_nchannels = driver->playback_nchannels;
+ driver->user_nchannels = driver->capture_nchannels;
+ } else {
+ driver->max_nchannels = driver->capture_nchannels;
+ driver->user_nchannels = driver->playback_nchannels;
+ }
+
+ alsa_driver_setup_io_function_pointers (driver);
+
+ /* Allocate and initialize structures that rely on the
+ channels counts.
+
+ Set up the bit pattern that is used to record which
+ channels require action on every cycle. any bits that are
+ not set after the engine's process() call indicate channels
+ that potentially need to be silenced.
+ */
+
+ bitset_create (&driver->channels_done, driver->max_nchannels);
+ bitset_create (&driver->channels_not_done, driver->max_nchannels);
+
+ if (driver->playback_handle) {
+ driver->playback_addr = (char **)
+ malloc (sizeof (char *) * driver->playback_nchannels);
+ memset (driver->playback_addr, 0,
+ sizeof (char *) * driver->playback_nchannels);
+ driver->playback_interleave_skip = (unsigned long *)
+ malloc (sizeof (unsigned long *) * driver->playback_nchannels);
+ memset (driver->playback_interleave_skip, 0,
+ sizeof (unsigned long *) * driver->playback_nchannels);
+ driver->silent = (unsigned long *)
+ malloc (sizeof (unsigned long)
+ * driver->playback_nchannels);
+
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ driver->silent[chn] = 0;
+ }
+
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ bitset_add (driver->channels_done, chn);
+ }
+
+ driver->dither_state = (dither_state_t *)
+ calloc ( driver->playback_nchannels,
+ sizeof (dither_state_t));
+ }
+
+ if (driver->capture_handle) {
+ driver->capture_addr = (char **)
+ malloc (sizeof (char *) * driver->capture_nchannels);
+ memset (driver->capture_addr, 0,
+ sizeof (char *) * driver->capture_nchannels);
+ driver->capture_interleave_skip = (unsigned long *)
+ malloc (sizeof (unsigned long *) * driver->capture_nchannels);
+ memset (driver->capture_interleave_skip, 0,
+ sizeof (unsigned long *) * driver->capture_nchannels);
+ }
+
+ driver->clock_sync_data = (ClockSyncStatus *)
+ malloc (sizeof (ClockSyncStatus) * driver->max_nchannels);
+
+ driver->period_usecs =
+ (jack_time_t) floor ((((float) driver->frames_per_cycle) /
+ driver->frame_rate) * 1000000.0f);
+ driver->poll_timeout = (int) floor (1.5f * driver->period_usecs);
+
+ // steph
+ /*
+ if (driver->engine) {
+ driver->engine->set_buffer_size (driver->engine,
+ driver->frames_per_cycle);
+ }
+ */
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_reset_parameters (alsa_driver_t *driver,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate)
+{
+ /* XXX unregister old ports ? */
+ alsa_driver_release_channel_dependent_memory (driver);
+ return alsa_driver_set_parameters (driver,
+ frames_per_cycle,
+ user_nperiods, rate);
+}
+
+int
+JackAlsaDriver::alsa_driver_get_channel_addresses (alsa_driver_t *driver,
+ snd_pcm_uframes_t *capture_avail,
+ snd_pcm_uframes_t *playback_avail,
+ snd_pcm_uframes_t *capture_offset,
+ snd_pcm_uframes_t *playback_offset)
+{
+ unsigned long err;
+ channel_t chn;
+
+ if (capture_avail) {
+ if ((err = snd_pcm_mmap_begin (
+ driver->capture_handle, &driver->capture_areas,
+ (snd_pcm_uframes_t *) capture_offset,
+ (snd_pcm_uframes_t *) capture_avail)) < 0) {
+ jack_error ("ALSA: %s: mmap areas info error",
+ driver->alsa_name_capture);
+ return -1;
+ }
+
+ for (chn = 0; chn < driver->capture_nchannels; chn++) {
+ const snd_pcm_channel_area_t *a =
+ &driver->capture_areas[chn];
+ driver->capture_addr[chn] = (char *) a->addr
+ + ((a->first + a->step * *capture_offset) / 8);
+ driver->capture_interleave_skip[chn] = (unsigned long ) (a->step / 8); // steph
+ }
+ }
+
+ if (playback_avail) {
+ if ((err = snd_pcm_mmap_begin (
+ driver->playback_handle, &driver->playback_areas,
+ (snd_pcm_uframes_t *) playback_offset,
+ (snd_pcm_uframes_t *) playback_avail)) < 0) {
+ jack_error ("ALSA: %s: mmap areas info error ",
+ driver->alsa_name_playback);
+ return -1;
+ }
+
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ const snd_pcm_channel_area_t *a =
+ &driver->playback_areas[chn];
+ driver->playback_addr[chn] = (char *) a->addr
+ + ((a->first + a->step * *playback_offset) / 8);
+ driver->playback_interleave_skip[chn] = (unsigned long ) (a->step / 8); // steph
+ }
+ }
+
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_start (alsa_driver_t *driver)
+{
+ int err;
+ snd_pcm_uframes_t poffset, pavail;
+ channel_t chn;
+
+ driver->poll_last = 0;
+ driver->poll_next = 0;
+
+ if (driver->playback_handle) {
+ if ((err = snd_pcm_prepare (driver->playback_handle)) < 0) {
+ jack_error ("ALSA: prepare error for playback on "
+ "\"%s\" (%s)", driver->alsa_name_playback,
+ snd_strerror(err));
+ return -1;
+ }
+ }
+
+ if ((driver->capture_handle && driver->capture_and_playback_not_synced)
+ || !driver->playback_handle) {
+ if ((err = snd_pcm_prepare (driver->capture_handle)) < 0) {
+ jack_error ("ALSA: prepare error for capture on \"%s\""
+ " (%s)", driver->alsa_name_capture,
+ snd_strerror(err));
+ return -1;
+ }
+ }
+
+ if (driver->hw_monitoring) {
+ if (driver->input_monitor_mask || driver->all_monitor_in) {
+ if (driver->all_monitor_in) {
+ driver->hw->set_input_monitor_mask (driver->hw, ~0U);
+ } else {
+ driver->hw->set_input_monitor_mask (
+ driver->hw, driver->input_monitor_mask);
+ }
+ } else {
+ driver->hw->set_input_monitor_mask (driver->hw,
+ driver->input_monitor_mask);
+ }
+ }
+
+ if (driver->playback_handle) {
+ driver->playback_nfds =
+ snd_pcm_poll_descriptors_count (driver->playback_handle);
+ } else {
+ driver->playback_nfds = 0;
+ }
+
+ if (driver->capture_handle) {
+ driver->capture_nfds =
+ snd_pcm_poll_descriptors_count (driver->capture_handle);
+ } else {
+ driver->capture_nfds = 0;
+ }
+
+ if (driver->pfd) {
+ free (driver->pfd);
+ }
+
+ driver->pfd = (struct pollfd *)
+ malloc (sizeof (struct pollfd) *
+ (driver->playback_nfds + driver->capture_nfds + 2));
+
+ if (driver->playback_handle) {
+ /* fill playback buffer with zeroes, and mark
+ all fragments as having data.
+ */
+
+ pavail = snd_pcm_avail_update (driver->playback_handle);
+
+ if (pavail !=
+ driver->frames_per_cycle * driver->playback_nperiods) {
+ jack_error ("ALSA: full buffer not available at start");
+ return -1;
+ }
+
+ if (alsa_driver_get_channel_addresses (driver,
+ 0, &pavail, 0, &poffset)) {
+ return -1;
+ }
+
+ /* XXX this is cheating. ALSA offers no guarantee that
+ we can access the entire buffer at any one time. It
+ works on most hardware tested so far, however, buts
+ its a liability in the long run. I think that
+ alsa-lib may have a better function for doing this
+ here, where the goal is to silence the entire
+ buffer.
+ */
+
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ alsa_driver_silence_on_channel (
+ driver, chn,
+ driver->user_nperiods
+ * driver->frames_per_cycle);
+ }
+
+ snd_pcm_mmap_commit (driver->playback_handle, poffset,
+ driver->user_nperiods
+ * driver->frames_per_cycle);
+
+ if ((err = snd_pcm_start (driver->playback_handle)) < 0) {
+ jack_error ("ALSA: could not start playback (%s)",
+ snd_strerror (err));
+ return -1;
+ }
+ }
+
+ if ((driver->capture_handle && driver->capture_and_playback_not_synced)
+ || !driver->playback_handle) {
+ if ((err = snd_pcm_start (driver->capture_handle)) < 0) {
+ jack_error ("ALSA: could not start capture (%s)",
+ snd_strerror (err));
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_stop (alsa_driver_t *driver)
+{
+ int err;
+ //JSList* node;
+ //int chn;
+
+ /* silence all capture port buffers, because we might
+ be entering offline mode.
+ */
+
+ // steph
+ /*
+ for (chn = 0, node = driver->capture_ports; node;
+ node = jack_slist_next (node), chn++) {
+
+ jack_port_t* port;
+ char* buf;
+ jack_nframes_t nframes = driver->engine->control->buffer_size;
+
+ port = (jack_port_t *) node->data;
+ buf = jack_port_get_buffer (port, nframes);
+ memset (buf, 0, sizeof (jack_default_audio_sample_t) * nframes);
+ }
+ */
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ jack_default_audio_sample_t* buf =
+ (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[i], fEngineControl->fBufferSize);
+ memset (buf, 0, sizeof (jack_default_audio_sample_t) * fEngineControl->fBufferSize);
+ }
+
+ if (driver->playback_handle) {
+ if ((err = snd_pcm_drop (driver->playback_handle)) < 0) {
+ jack_error ("ALSA: channel flush for playback "
+ "failed (%s)", snd_strerror (err));
+ return -1;
+ }
+ }
+
+ if (!driver->playback_handle
+ || driver->capture_and_playback_not_synced) {
+ if (driver->capture_handle) {
+ if ((err = snd_pcm_drop (driver->capture_handle)) < 0) {
+ jack_error ("ALSA: channel flush for "
+ "capture failed (%s)",
+ snd_strerror (err));
+ return -1;
+ }
+ }
+ }
+
+ if (driver->hw_monitoring) {
+ driver->hw->set_input_monitor_mask (driver->hw, 0);
+ }
+
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_read (alsa_driver_t *driver, jack_nframes_t nframes)
+{
+ snd_pcm_sframes_t contiguous;
+ snd_pcm_sframes_t nread;
+ snd_pcm_sframes_t offset;
+ jack_nframes_t orig_nframes;
+ jack_default_audio_sample_t* buf;
+ //channel_t chn;
+ //JSList *node;
+ //jack_port_t* port;
+ int err;
+
+ // steph
+ /*
+ if (!driver->capture_handle || driver->engine->freewheeling) {
+ return 0;
+ }
+ */
+ if (!driver->capture_handle) {
+ return 0;
+ }
+ if (nframes > driver->frames_per_cycle) {
+ return -1;
+ }
+
+ nread = 0;
+ contiguous = 0;
+ orig_nframes = nframes;
+
+ while (nframes) {
+
+ contiguous = nframes;
+
+ if (alsa_driver_get_channel_addresses (
+ driver,
+ (snd_pcm_uframes_t *) &contiguous,
+ (snd_pcm_uframes_t *) 0,
+ (snd_pcm_uframes_t *)&offset, 0) < 0) {
+ return -1;
+ }
+
+ // steph
+ for (int i = 0; i < fCaptureChannels; i++) {
+ if (fGraphManager->GetConnectionsNum(fCapturePortList[i]) > 0) {
+ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fCapturePortList[i], orig_nframes);
+ alsa_driver_read_from_channel (driver, i, buf + nread, contiguous);
+ }
+ }
+
+ /* // steph
+ for (chn = 0, node = driver->capture_ports; node;
+ node = jack_slist_next (node), chn++) {
+
+ port = (jack_port_t *) node->data;
+
+ if (!jack_port_connected (port)) {
+ // no-copy optimization
+ continue;
+ }
+ buf = jack_port_get_buffer (port, orig_nframes);
+ alsa_driver_read_from_channel (driver, chn,
+ buf + nread, contiguous);
+ }
+ */
+
+ if ((err = snd_pcm_mmap_commit (driver->capture_handle,
+ offset, contiguous)) < 0) {
+ // steph
+ // jack_error ("ALSA: could not complete read of %"
+ // PRIu32 " frames: error = %d\n", contiguous, err);
+ jack_error ("ALSA: could not complete read of %d frames: error = %d", contiguous, err);
+ return -1;
+ }
+
+ nframes -= contiguous;
+ nread += contiguous;
+ }
+
+ return 0;
+}
+
+int
+JackAlsaDriver::alsa_driver_write (alsa_driver_t* driver, jack_nframes_t nframes)
+{
+ //channel_t chn;
+ //JSList *node;
+ //JSList *mon_node;
+ jack_default_audio_sample_t* buf;
+ jack_default_audio_sample_t* monbuf;
+ jack_nframes_t orig_nframes;
+ snd_pcm_sframes_t nwritten;
+ snd_pcm_sframes_t contiguous;
+ snd_pcm_sframes_t offset;
+ JackPort* port;
+ //jack_port_t *port;
+ int err;
+
+ driver->process_count++;
+
+ // steph
+ /*
+ if (!driver->playback_handle || driver->engine->freewheeling) {
+ return 0;
+ }
+ */
+ if (!driver->playback_handle) {
+ return 0;
+ }
+
+ if (nframes > driver->frames_per_cycle) {
+ return -1;
+ }
+
+ nwritten = 0;
+ contiguous = 0;
+ orig_nframes = nframes;
+
+ /* check current input monitor request status */
+
+ driver->input_monitor_mask = 0;
+
+ // steph
+ /*
+ for (chn = 0, node = driver->capture_ports; node;
+ node = jack_slist_next (node), chn++) {
+ if (((jack_port_t *) node->data)->shared->monitor_requests) {
+ driver->input_monitor_mask |= (1<<chn);
+ }
+ }
+ */
+ for (int i = 0; i < fCaptureChannels; i++) {
+ port = fGraphManager->GetPort(fCapturePortList[i]);
+ if (port->MonitoringInput()) {
+ driver->input_monitor_mask |= (1<<i);
+ }
+ }
+
+ if (driver->hw_monitoring) {
+ if ((driver->hw->input_monitor_mask
+ != driver->input_monitor_mask)
+ && !driver->all_monitor_in) {
+ driver->hw->set_input_monitor_mask (
+ driver->hw, driver->input_monitor_mask);
+ }
+ }
+
+ while (nframes) {
+
+ contiguous = nframes;
+
+ if (alsa_driver_get_channel_addresses (
+ driver,
+ (snd_pcm_uframes_t *) 0,
+ (snd_pcm_uframes_t *) &contiguous,
+ 0, (snd_pcm_uframes_t *)&offset) < 0) {
+ return -1;
+ }
+
+ // steph
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ // Ouput ports
+ if (fGraphManager->GetConnectionsNum(fPlaybackPortList[i]) > 0) {
+ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[i], orig_nframes);
+ alsa_driver_write_to_channel (driver, i, buf + nwritten, contiguous);
+ // Monitor ports
+ if (fWithMonitorPorts && fGraphManager->GetConnectionsNum(fMonitorPortList[i]) > 0) {
+ monbuf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fMonitorPortList[i], orig_nframes);
+ memcpy(monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t));
+ }
+ }
+ }
+
+ /*
+ for (chn = 0, node = driver->playback_ports, mon_node=driver->monitor_ports;
+ node;
+ node = jack_slist_next (node), chn++) {
+
+ port = (jack_port_t *) node->data;
+
+ if (!jack_port_connected (port)) {
+ continue;
+ }
+ buf = jack_port_get_buffer (port, orig_nframes);
+ alsa_driver_write_to_channel (driver, chn,
+ buf + nwritten, contiguous);
+
+ if (mon_node) {
+ port = (jack_port_t *) mon_node->data;
+ if (!jack_port_connected (port)) {
+ continue;
+ }
+ monbuf = jack_port_get_buffer (port, orig_nframes);
+ memcpy (monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t));
+ mon_node = jack_slist_next (mon_node);
+ }
+ }
+ */
+
+ if (!bitset_empty (driver->channels_not_done)) {
+ alsa_driver_silence_untouched_channels (driver,
+ contiguous);
+ }
+
+ if ((err = snd_pcm_mmap_commit (driver->playback_handle,
+ offset, contiguous)) < 0) {
+ // steph
+ // jack_error ("ALSA: could not complete playback of %"
+ // PRIu32 " frames: error = %d", contiguous, err);
+ jack_error ("ALSA: could not complete playback of %d frames: error = %d", contiguous, err);
+ if (err != EPIPE && err != ESTRPIPE)
+ return -1;
+ }
+
+ nframes -= contiguous;
+ nwritten += contiguous;
+ }
+ return 0;
+}
+
+void
+JackAlsaDriver::alsa_driver_delete (alsa_driver_t *driver)
+{
+ JSList *node;
+
+ for (node = driver->clock_sync_listeners; node;
+ node = jack_slist_next (node)) {
+ free (node->data);
+ }
+ jack_slist_free (driver->clock_sync_listeners);
+
+ if (driver->capture_handle) {
+ snd_pcm_close (driver->capture_handle);
+ driver->capture_handle = 0;
+ }
+
+ if (driver->playback_handle) {
+ snd_pcm_close (driver->playback_handle);
+ driver->capture_handle = 0;
+ }
+
+ if (driver->capture_hw_params) {
+ snd_pcm_hw_params_free (driver->capture_hw_params);
+ driver->capture_hw_params = 0;
+ }
+
+ if (driver->playback_hw_params) {
+ snd_pcm_hw_params_free (driver->playback_hw_params);
+ driver->playback_hw_params = 0;
+ }
+
+ if (driver->capture_sw_params) {
+ snd_pcm_sw_params_free (driver->capture_sw_params);
+ driver->capture_sw_params = 0;
+ }
+
+ if (driver->playback_sw_params) {
+ snd_pcm_sw_params_free (driver->playback_sw_params);
+ driver->playback_sw_params = 0;
+ }
+
+ if (driver->pfd) {
+ free (driver->pfd);
+ }
+
+ if (driver->hw) {
+ driver->hw->release (driver->hw);
+ driver->hw = 0;
+ }
+ free(driver->alsa_name_playback);
+ free(driver->alsa_name_capture);
+ free(driver->alsa_driver);
+
+ alsa_driver_release_channel_dependent_memory (driver);
+ jack_driver_nt_finish ((jack_driver_nt_t *) driver);
+ free (driver);
+}
+
+jack_driver_t *
+JackAlsaDriver::alsa_driver_new (char *name, char *playback_alsa_device,
+ char *capture_alsa_device,
+ jack_client_t *client,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate,
+ int hw_monitoring,
+ int hw_metering,
+ int capturing,
+ int playing,
+ DitherAlgorithm dither,
+ int soft_mode,
+ int monitor,
+ int user_capture_nchnls,
+ int user_playback_nchnls,
+ int shorts_first,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency
+ )
+{
+ int err;
+
+ alsa_driver_t *driver;
+
+ /*
+ printf ("creating alsa driver ... %s|%s|%" PRIu32 "|%" PRIu32
+ "|%" PRIu32"|%" PRIu32"|%" PRIu32 "|%s|%s|%s|%s\n",
+ playing ? playback_alsa_device : "-",
+ capturing ? capture_alsa_device : "-",
+ frames_per_cycle, user_nperiods, rate,
+ user_capture_nchnls,user_playback_nchnls,
+ hw_monitoring ? "hwmon": "nomon",
+ hw_metering ? "hwmeter":"swmeter",
+ soft_mode ? "soft-mode":"-",
+ shorts_first ? "16bit":"32bit");
+ */
+
+ driver = (alsa_driver_t *) calloc (1, sizeof (alsa_driver_t));
+
+ jack_driver_nt_init ((jack_driver_nt_t *) driver);
+
+ //driver->nt_attach = (JackDriverNTAttachFunction) alsa_driver_attach;
+ //driver->nt_detach = (JackDriverNTDetachFunction) alsa_driver_detach;
+ //driver->read = (JackDriverReadFunction) alsa_driver_read;
+ //driver->write = (JackDriverReadFunction) alsa_driver_write;
+ //driver->null_cycle = (JackDriverNullCycleFunction) alsa_driver_null_cycle;
+ //driver->nt_bufsize = (JackDriverNTBufSizeFunction) alsa_driver_bufsize;
+ //driver->nt_start = (JackDriverNTStartFunction) alsa_driver_start;
+ //driver->nt_stop = (JackDriverNTStopFunction) alsa_driver_stop;
+ //driver->nt_run_cycle = (JackDriverNTRunCycleFunction) alsa_driver_run_cycle;
+
+ driver->playback_handle = NULL;
+ driver->capture_handle = NULL;
+ driver->ctl_handle = 0;
+ driver->hw = 0;
+ driver->capture_and_playback_not_synced = FALSE;
+ driver->max_nchannels = 0;
+ driver->user_nchannels = 0;
+ driver->playback_nchannels = user_playback_nchnls;
+ driver->capture_nchannels = user_capture_nchnls;
+ driver->playback_sample_bytes = (shorts_first ? 2 : 4);
+ driver->capture_sample_bytes = (shorts_first ? 2 : 4);
+ driver->capture_frame_latency = capture_latency;
+ driver->playback_frame_latency = playback_latency;
+
+ driver->playback_addr = 0;
+ driver->capture_addr = 0;
+ driver->playback_interleave_skip = NULL; // steph
+ driver->capture_interleave_skip = NULL; // steph
+
+ driver->silent = 0;
+ driver->all_monitor_in = FALSE;
+ driver->with_monitor_ports = monitor;
+
+ driver->clock_mode = ClockMaster; /* XXX is it? */
+ driver->input_monitor_mask = 0; /* XXX is it? */
+
+ driver->capture_ports = 0;
+ driver->playback_ports = 0;
+ driver->monitor_ports = 0;
+
+ driver->pfd = 0;
+ driver->playback_nfds = 0;
+ driver->capture_nfds = 0;
+
+ driver->dither = dither;
+ driver->soft_mode = soft_mode;
+
+ pthread_mutex_init (&driver->clock_sync_lock, 0);
+ driver->clock_sync_listeners = 0;
+
+ driver->poll_late = 0;
+ driver->xrun_count = 0;
+ driver->process_count = 0;
+
+ driver->alsa_name_playback = strdup (playback_alsa_device);
+ driver->alsa_name_capture = strdup (capture_alsa_device);
+
+ if (alsa_driver_check_card_type (driver)) {
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ alsa_driver_hw_specific (driver, hw_monitoring, hw_metering);
+
+ if (playing) {
+ if (snd_pcm_open (&driver->playback_handle,
+ playback_alsa_device,
+ SND_PCM_STREAM_PLAYBACK,
+ SND_PCM_NONBLOCK) < 0) {
+ switch (errno) {
+ case EBUSY:
+ jack_error ("the playback device \"%s\" is "
+ "already in use. Please stop the"
+ " application using it and "
+ "run JACK again",
+ playback_alsa_device);
+ alsa_driver_delete (driver);
+ return NULL;
+ break;
+
+ case EPERM:
+ jack_error ("you do not have permission to open "
+ "the audio device \"%s\" for playback",
+ playback_alsa_device);
+ alsa_driver_delete (driver);
+ return NULL;
+ break;
+ }
+
+ driver->playback_handle = NULL;
+ }
+
+ if (driver->playback_handle) {
+ snd_pcm_nonblock (driver->playback_handle, 0);
+ }
+ }
+
+ if (capturing) {
+ if (snd_pcm_open (&driver->capture_handle,
+ capture_alsa_device,
+ SND_PCM_STREAM_CAPTURE,
+ SND_PCM_NONBLOCK) < 0) {
+ switch (errno) {
+ case EBUSY:
+ jack_error ("the capture device \"%s\" is "
+ "already in use. Please stop the"
+ " application using it and "
+ "run JACK again",
+ capture_alsa_device);
+ alsa_driver_delete (driver);
+ return NULL;
+ break;
+
+ case EPERM:
+ jack_error ("you do not have permission to open "
+ "the audio device \"%s\" for capture",
+ capture_alsa_device);
+ alsa_driver_delete (driver);
+ return NULL;
+ break;
+ }
+
+ driver->capture_handle = NULL;
+ }
+
+ if (driver->capture_handle) {
+ snd_pcm_nonblock (driver->capture_handle, 0);
+ }
+ }
+
+ if (driver->playback_handle == NULL) {
+ if (playing) {
+
+ /* they asked for playback, but we can't do it */
+
+ jack_error ("ALSA: Cannot open PCM device %s for "
+ "playback. Falling back to capture-only"
+ " mode", name);
+
+ if (driver->capture_handle == NULL) {
+ /* can't do anything */
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ playing = FALSE;
+ }
+ }
+
+ if (driver->capture_handle == NULL) {
+ if (capturing) {
+
+ /* they asked for capture, but we can't do it */
+
+ jack_error ("ALSA: Cannot open PCM device %s for "
+ "capture. Falling back to playback-only"
+ " mode", name);
+
+ if (driver->playback_handle == NULL) {
+ /* can't do anything */
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ capturing = FALSE;
+ }
+ }
+
+ driver->playback_hw_params = 0;
+ driver->capture_hw_params = 0;
+ driver->playback_sw_params = 0;
+ driver->capture_sw_params = 0;
+
+ if (driver->playback_handle) {
+ if ((err = snd_pcm_hw_params_malloc (
+ &driver->playback_hw_params)) < 0) {
+ jack_error ("ALSA: could not allocate playback hw"
+ " params structure");
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ if ((err = snd_pcm_sw_params_malloc (
+ &driver->playback_sw_params)) < 0) {
+ jack_error ("ALSA: could not allocate playback sw"
+ " params structure");
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+ }
+
+ if (driver->capture_handle) {
+ if ((err = snd_pcm_hw_params_malloc (
+ &driver->capture_hw_params)) < 0) {
+ jack_error ("ALSA: could not allocate capture hw"
+ " params structure");
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ if ((err = snd_pcm_sw_params_malloc (
+ &driver->capture_sw_params)) < 0) {
+ jack_error ("ALSA: could not allocate capture sw"
+ " params structure");
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+ }
+
+ if (alsa_driver_set_parameters (driver, frames_per_cycle,
+ user_nperiods, rate)) {
+ alsa_driver_delete (driver);
+ return NULL;
+ }
+
+ driver->capture_and_playback_not_synced = FALSE;
+
+ if (driver->capture_handle && driver->playback_handle) {
+ if (snd_pcm_link (driver->capture_handle,
+ driver->playback_handle) != 0) {
+ driver->capture_and_playback_not_synced = TRUE;
+ }
+ }
+
+ driver->client = client;
+
+ return (jack_driver_t *) driver;
+}
+
+int JackAlsaDriver::Attach()
+{
+ JackPort* port;
+ int port_index;
+ unsigned long port_flags;
+
+ char buf[JACK_PORT_NAME_SIZE];
+
+ port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal;
+
+ assert(fCaptureChannels < PORT_NUM);
+ assert(fPlaybackChannels < PORT_NUM);
+
+ alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver;
+
+ JackLog("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
+
+ for (int i = 0; i < fCaptureChannels; i++) {
+ snprintf(buf, sizeof(buf) - 1, "%s:capture_%u", fClientControl->fName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("driver: cannot register port for %s", buf);
+ return -1;
+ }
+ port = fGraphManager->GetPort(port_index);
+ 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);
+ }
+
+ port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal;
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ snprintf(buf, sizeof(buf) - 1, "%s:playback_%u", fClientControl->fName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("driver: cannot register port for %s", buf);
+ return -1;
+ }
+ port = fGraphManager->GetPort(port_index);
+ 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);
+
+ // Monitor ports
+ if (fWithMonitorPorts) {
+ JackLog("Create monitor port \n");
+ snprintf(buf, sizeof(buf) - 1, "%s:monitor_%lu",fClientControl->fName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, JackPortIsOutput)) == NO_PORT) {
+ jack_error ("ALSA: cannot register monitor port for %s", buf);
+ } else {
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(alsa_driver->frames_per_cycle);
+ fMonitorPortList[i] = port_index;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int JackAlsaDriver::Detach()
+{
+ JackLog("JackAlsaDriver::Detach\n");
+
+ for (int i = 0; i < fCaptureChannels; i++) {
+ fGraphManager->RemovePort(fClientControl->fRefNum, fCapturePortList[i]);
+ }
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ fGraphManager->RemovePort(fClientControl->fRefNum, fPlaybackPortList[i]);
+ if (fWithMonitorPorts)
+ fGraphManager->RemovePort(fClientControl->fRefNum, fMonitorPortList[i]);
+ }
+
+ return 0;
+}
+
+int JackAlsaDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t samplerate,
+ int hw_monitoring,
+ int hw_metering,
+ int capturing,
+ int playing,
+ DitherAlgorithm dither,
+ int soft_mode,
+ int monitor,
+ int inchannels,
+ int outchannels,
+ int shorts_first,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ // Generic JackAudioDriver Open
+ if (JackAudioDriver::Open(nframes, samplerate, capturing, playing,
+ inchannels, outchannels, monitor, capture_driver_name, playback_driver_name,
+ capture_latency, playback_latency) != 0) {
+ return -1;
+ }
+
+ fDriver = alsa_driver_new ("alsa_pcm", (char*)capture_driver_name, (char*)playback_driver_name,
+ NULL,
+ nframes,
+ user_nperiods,
+ samplerate,
+ hw_monitoring,
+ hw_metering,
+ capturing,
+ playing,
+ dither,
+ soft_mode,
+ monitor,
+ inchannels,
+ outchannels,
+ shorts_first,
+ capture_latency,
+ playback_latency);
+ if (fDriver) {
+ // ALSA driver may have changed the in/out values
+ fCaptureChannels = ((alsa_driver_t *)fDriver)->capture_nchannels;
+ fPlaybackChannels = ((alsa_driver_t *)fDriver)->playback_nchannels;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackAlsaDriver::Close()
+{
+ JackAudioDriver::Close();
+ alsa_driver_delete((alsa_driver_t*)fDriver);
+ return 0;
+}
+
+int JackAlsaDriver::Start()
+{
+ return alsa_driver_start((alsa_driver_t *)fDriver);
+}
+
+int JackAlsaDriver::Stop()
+{
+ return alsa_driver_stop((alsa_driver_t *)fDriver);
+}
+
+int JackAlsaDriver::Read()
+{
+ /* Taken from alsa_driver_run_cycle */
+
+ //jack_engine_t *engine = driver->engine;
+ int wait_status;
+ float delayed_usecs;
+ jack_nframes_t nframes;
+
+ //DEBUG ("alsa run cycle wait\n");
+ nframes = alsa_driver_wait((alsa_driver_t *)fDriver, -1, &wait_status, &delayed_usecs);
+ //DEBUG ("alsaback from wait, nframes = %lu", nframes);
+
+ if (wait_status < 0)
+ return -1; /* driver failed */
+
+ if (nframes == 0) {
+
+ /* we detected an xrun and restarted: notify
+ * clients about the delay.
+ */
+ //engine->delay (engine, delayed_usecs);
+ JackLog("ALSA XRun \n");
+ //NotifyXRun(jack_get_microseconds());
+ NotifyXRun(fLastWaitUst);
+ //return 0;
+ return -1;
+ }
+
+ //fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ if (nframes != fEngineControl->fBufferSize)
+ JackLog("JackAlsaDriver::Read nframes = %ld\n", nframes);
+
+ //return engine->run_cycle (engine, nframes, delayed_usecs);
+ fDelayedUst = (jack_time_t)delayed_usecs;
+ return alsa_driver_read((alsa_driver_t *)fDriver, fEngineControl->fBufferSize);
+}
+
+int JackAlsaDriver::Write()
+{
+ //JackLog("write\n");
+ 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");
+ NotifyXRun(write_time);
+ }
+ */
+ return res;
+}
+
+int JackAlsaDriver::SetBufferSize(jack_nframes_t nframes)
+{
+ JackLog("JackAlsaDriver::SetBufferSize %ld\n", nframes);
+ fEngineControl->fBufferSize = nframes;
+ fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // in microsec
+
+ return alsa_driver_reset_parameters ((alsa_driver_t *)fDriver, nframes,
+ ((alsa_driver_t *)fDriver)->user_nperiods,
+ ((alsa_driver_t *)fDriver)->frame_rate);
+}
+
+void
+JackAlsaDriver::alsa_driver_silence_untouched_channels (alsa_driver_t *driver,
+ jack_nframes_t nframes)
+{
+ channel_t chn;
+ jack_nframes_t buffer_frames =
+ driver->frames_per_cycle * driver->playback_nperiods;
+
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ if (bitset_contains (driver->channels_not_done, chn)) {
+ if (driver->silent[chn] < buffer_frames) {
+ alsa_driver_silence_on_channel_no_mark (
+ driver, chn, nframes);
+ driver->silent[chn] += nframes;
+ }
+ }
+ }
+}
+
+jack_nframes_t
+JackAlsaDriver::alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float
+ *delayed_usecs)
+{
+ snd_pcm_sframes_t avail = 0;
+ snd_pcm_sframes_t capture_avail = 0;
+ snd_pcm_sframes_t playback_avail = 0;
+ int xrun_detected = FALSE;
+ int need_capture;
+ int need_playback;
+ unsigned int i;
+ jack_time_t poll_enter;
+ jack_time_t poll_ret = 0;
+
+ *status = -1;
+ *delayed_usecs = 0;
+
+ need_capture = driver->capture_handle ? 1 : 0;
+
+ if (extra_fd >= 0) {
+ need_playback = 0;
+ } else {
+ need_playback = driver->playback_handle ? 1 : 0;
+ }
+
+ // steph
+ // again:
+
+ while (need_playback || need_capture) {
+
+ unsigned int p_timed_out, c_timed_out;
+ unsigned int ci = 0;
+ unsigned int nfds;
+
+ nfds = 0;
+
+ if (need_playback) {
+ snd_pcm_poll_descriptors (driver->playback_handle,
+ &driver->pfd[0],
+ driver->playback_nfds);
+ nfds += driver->playback_nfds;
+ }
+
+ if (need_capture) {
+ snd_pcm_poll_descriptors (driver->capture_handle,
+ &driver->pfd[nfds],
+ driver->capture_nfds);
+ ci = nfds;
+ nfds += driver->capture_nfds;
+ }
+
+ /* ALSA doesn't set POLLERR in some versions of 0.9.X */
+
+ for (i = 0; i < nfds; i++) {
+ driver->pfd[i].events |= POLLERR;
+ }
+
+ if (extra_fd >= 0) {
+ driver->pfd[nfds].fd = extra_fd;
+ driver->pfd[nfds].events =
+ POLLIN | POLLERR | POLLHUP | POLLNVAL;
+ nfds++;
+ }
+
+ poll_enter = jack_get_microseconds ();
+
+ if (poll_enter > driver->poll_next) {
+ /*
+ * This processing cycle was delayed past the
+ * next due interrupt! Do not account this as
+ * a wakeup delay:
+ */
+ driver->poll_next = 0;
+ driver->poll_late++;
+ }
+
+ if (poll (driver->pfd, nfds, driver->poll_timeout) < 0) {
+
+ if (errno == EINTR) {
+ printf ("poll interrupt\n");
+ // this happens mostly when run
+ // under gdb, or when exiting due to a signal
+ // steph
+ /*
+ if (under_gdb) {
+ goto again;
+ }
+ */
+ *status = -2;
+ return 0;
+ }
+
+ jack_error ("ALSA: poll call failed (%s)",
+ strerror (errno));
+ *status = -3;
+ return 0;
+
+ }
+
+ poll_ret = jack_get_microseconds ();
+ // steph
+ fLastWaitUst = poll_ret;
+
+ if (extra_fd < 0) {
+ if (driver->poll_next && poll_ret > driver->poll_next) {
+ *delayed_usecs = poll_ret - driver->poll_next;
+ }
+ driver->poll_last = poll_ret;
+ driver->poll_next = poll_ret + driver->period_usecs;
+
+ // steph
+ /*
+ driver->engine->transport_cycle_start (driver->engine,
+ poll_ret);
+ */
+
+ }
+
+#ifdef DEBUG_WAKEUP
+ fprintf (stderr, "%" PRIu64 ": checked %d fds, %" PRIu64
+ " usecs since poll entered\n", poll_ret, nfds,
+ poll_ret - poll_enter);
+#endif
+
+ /* check to see if it was the extra FD that caused us
+ * to return from poll */
+
+ if (extra_fd >= 0) {
+
+ if (driver->pfd[nfds - 1].revents == 0) {
+ /* we timed out on the extra fd */
+
+ *status = -4;
+
+ // steph (cannot return negative value....)
+ // return -1;
+ return 0;
+ }
+
+ /* if POLLIN was the only bit set, we're OK */
+
+ *status = 0;
+ return (driver->pfd[nfds - 1].revents == POLLIN) ? 0 : -1;
+ }
+
+ p_timed_out = 0;
+
+ if (need_playback) {
+ for (i = 0; i < driver->playback_nfds; i++) {
+ if (driver->pfd[i].revents & POLLERR) {
+ xrun_detected = TRUE;
+ }
+
+ if (driver->pfd[i].revents == 0) {
+ p_timed_out++;
+#ifdef DEBUG_WAKEUP
+
+ fprintf (stderr, "%" PRIu64
+ " playback stream timed out\n",
+ poll_ret);
+#endif
+
+ }
+ }
+
+ if (p_timed_out == 0) {
+ need_playback = 0;
+#ifdef DEBUG_WAKEUP
+
+ fprintf (stderr, "%" PRIu64
+ " playback stream ready\n",
+ poll_ret);
+#endif
+
+ }
+ }
+
+ c_timed_out = 0;
+
+ if (need_capture) {
+ for (i = ci; i < nfds; i++) {
+ if (driver->pfd[i].revents & POLLERR) {
+ xrun_detected = TRUE;
+ }
+
+ if (driver->pfd[i].revents == 0) {
+ c_timed_out++;
+#ifdef DEBUG_WAKEUP
+
+ fprintf (stderr, "%" PRIu64
+ " capture stream timed out\n",
+ poll_ret);
+#endif
+
+ }
+ }
+
+ if (c_timed_out == 0) {
+ need_capture = 0;
+#ifdef DEBUG_WAKEUP
+
+ fprintf (stderr, "%" PRIu64
+ " capture stream ready\n",
+ poll_ret);
+#endif
+
+ }
+ }
+
+ if ((p_timed_out && (p_timed_out == driver->playback_nfds)) &&
+ (c_timed_out && (c_timed_out == driver->capture_nfds))) {
+ // steph
+ /*
+ jack_error ("ALSA: poll time out, polled for %" PRIu64
+ " usecs",
+ poll_ret - poll_enter);
+ */
+ *status = -5;
+ return 0;
+ }
+
+ }
+
+ if (driver->capture_handle) {
+ if ((capture_avail = snd_pcm_avail_update (
+ driver->capture_handle)) < 0) {
+ if (capture_avail == -EPIPE) {
+ xrun_detected = TRUE;
+ } else {
+ jack_error ("unknown ALSA avail_update return"
+ " value (%u)", capture_avail);
+ }
+ }
+ } else {
+ /* odd, but see min() computation below */
+ capture_avail = INT_MAX;
+ }
+
+ if (driver->playback_handle) {
+ if ((playback_avail = snd_pcm_avail_update (
+ driver->playback_handle)) < 0) {
+ if (playback_avail == -EPIPE) {
+ xrun_detected = TRUE;
+ } else {
+ jack_error ("unknown ALSA avail_update return"
+ " value (%u)", playback_avail);
+ }
+ }
+ } else {
+ /* odd, but see min() computation below */
+ playback_avail = INT_MAX;
+ }
+
+ if (xrun_detected) {
+ *status = alsa_driver_xrun_recovery (driver, delayed_usecs);
+ return 0;
+ }
+
+ *status = 0;
+ driver->last_wait_ust = poll_ret;
+
+ avail = capture_avail < playback_avail ? capture_avail : playback_avail;
+
+#ifdef DEBUG_WAKEUP
+
+ fprintf (stderr, "wakeup complete, avail = %lu, pavail = %lu "
+ "cavail = %lu\n",
+ avail, playback_avail, capture_avail);
+#endif
+
+ /* mark all channels not done for now. read/write will change this */
+
+ bitset_copy (driver->channels_not_done, driver->channels_done);
+
+ /* constrain the available count to the nearest (round down) number of
+ periods.
+ */
+
+ return avail - (avail % driver->frames_per_cycle);
+}
+
+int
+JackAlsaDriver::alsa_driver_restart (alsa_driver_t *driver)
+{
+ // steph
+ /*
+ if (driver->nt_stop((struct _jack_driver_nt *) driver))
+ return -1;
+ return driver->nt_start((struct _jack_driver_nt *) driver);
+ */
+
+ if (Stop())
+ return -1;
+ return Start();
+}
+
+int
+JackAlsaDriver::alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs)
+{
+ snd_pcm_status_t *status;
+ int res;
+
+ jack_error("alsa_driver_xrun_recovery ");
+
+ snd_pcm_status_alloca(&status);
+
+ if (driver->capture_handle) {
+ if ((res = snd_pcm_status(driver->capture_handle, status))
+ < 0) {
+ jack_error("status error: %s", snd_strerror(res));
+ }
+ } else {
+ if ((res = snd_pcm_status(driver->playback_handle, status))
+ < 0) {
+ jack_error("status error: %s", snd_strerror(res));
+ }
+ }
+
+ if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN
+ // && driver->process_count > XRUN_REPORT_DELAY) { // steph
+ && driver->process_count > 10) {
+ struct timeval now, diff, tstamp;
+ driver->xrun_count++;
+ gettimeofday(&now, 0);
+ snd_pcm_status_get_trigger_tstamp(status, &tstamp);
+ timersub(&now, &tstamp, &diff);
+ *delayed_usecs = diff.tv_sec * 1000000.0 + diff.tv_usec;
+
+ // steph: utiliser une version TR
+ jack_error("\n\n**** alsa_pcm: xrun of at least %.3f msecs\n\n", *delayed_usecs / 1000.0);
+ }
+
+ if (alsa_driver_restart (driver)) {
+ return -1;
+ }
+ return 0;
+}
+
+void
+JackAlsaDriver::jack_driver_init (jack_driver_t *driver)
+{
+ memset (driver, 0, sizeof (*driver));
+
+ driver->attach = 0;
+ driver->detach = 0;
+ driver->write = 0;
+ driver->read = 0;
+ driver->null_cycle = 0;
+ driver->bufsize = 0;
+ driver->start = 0;
+ driver->stop = 0;
+}
+
+void
+JackAlsaDriver::jack_driver_nt_init (jack_driver_nt_t * driver)
+{
+ memset (driver, 0, sizeof (*driver));
+
+ jack_driver_init ((jack_driver_t *) driver);
+
+ driver->attach = 0;
+ driver->detach = 0;
+ driver->bufsize = 0;
+ driver->stop = 0;
+ driver->start = 0;
+
+ driver->nt_bufsize = 0;
+ driver->nt_start = 0;
+ driver->nt_stop = 0;
+ driver->nt_attach = 0;
+ driver->nt_detach = 0;
+ driver->nt_run_cycle = 0;
+
+ pthread_mutex_init (&driver->nt_run_lock, NULL);
+}
+
+void
+JackAlsaDriver::jack_driver_nt_finish(jack_driver_nt_t * driver)
+{
+ pthread_mutex_destroy (&driver->nt_run_lock);
+}
+
+void JackAlsaDriver::PrintState()
+{
+ std::cout << "JackAlsaDriver State" << std::endl;
+
+ int port_index;
+
+ std::cout << "Input ports" << std::endl;
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ //if (fGraphManager->IsConnected(port_index)) {}
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (int i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ //if (fGraphManager->IsConnected(port_index)) {}
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+}
+
+/*
+JackDriver* DriverInit(JackGraphManager* manager)
+{
+ return new JackAlsaDriver("ALSA", manager);
+}
+*/
+} // end of namespace
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ static int
+ dither_opt (char c, DitherAlgorithm* dither) {
+ switch (c) {
+ case '-':
+ case 'n':
+ *dither = None;
+ break;
+
+ case 'r':
+ *dither = Rectangular;
+ break;
+
+ case 's':
+ *dither = Shaped;
+ break;
+
+ case 't':
+ *dither = Triangular;
+ break;
+
+ default:
+ fprintf (stderr, "ALSA driver: illegal dithering mode %c\n", c);
+ return -1;
+ }
+ return 0;
+ }
+
+ const jack_driver_desc_t* driver_get_descriptor () {
+ jack_driver_desc_t * desc;
+ jack_driver_param_desc_t * params;
+ unsigned int i;
+
+ desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t));
+
+ strcpy (desc->name, "alsa");
+ desc->nparams = 17;
+
+ params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy (params[i].name, "capture");
+ params[i].character = 'C';
+ params[i].type = JackDriverParamString;
+ strcpy (params[i].value.str, "none");
+ strcpy (params[i].short_desc,
+ "Provide capture ports. Optionally set device");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "playback");
+ params[i].character = 'P';
+ params[i].type = JackDriverParamString;
+ strcpy (params[i].value.str, "none");
+ strcpy (params[i].short_desc,
+ "Provide playback ports. Optionally set device");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "device");
+ params[i].character = 'd';
+ params[i].type = JackDriverParamString;
+ strcpy (params[i].value.str, "hw:0");
+ strcpy (params[i].short_desc, "ALSA device name");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "rate");
+ params[i].character = 'r';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 48000U;
+ strcpy (params[i].short_desc, "Sample rate");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "period");
+ params[i].character = 'p';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 1024U;
+ strcpy (params[i].short_desc, "Frames per period");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "nperiods");
+ params[i].character = 'n';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.ui = 2U;
+ strcpy (params[i].short_desc, "Number of periods of playback latency");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "hwmon");
+ params[i].character = 'H';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Hardware monitoring, if available");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "hwmeter");
+ params[i].character = 'M';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Hardware metering, if available");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "duplex");
+ params[i].character = 'D';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = 1;
+ strcpy (params[i].short_desc,
+ "Provide both capture and playback ports");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "softmode");
+ params[i].character = 's';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Soft-mode, no xrun handling");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "monitor");
+ params[i].character = 'm';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Provide monitor ports for the output");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "dither");
+ params[i].character = 'z';
+ params[i].type = JackDriverParamChar;
+ params[i].value.c = 'n';
+ strcpy (params[i].short_desc, "Dithering mode");
+ strcpy (params[i].long_desc,
+ "Dithering mode:\n"
+ " n - none\n"
+ " r - rectangular\n"
+ " s - shaped\n"
+ " t - triangular");
+
+ i++;
+ strcpy (params[i].name, "inchannels");
+ params[i].character = 'i';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc,
+ "Number of capture channels (defaults to hardware max)");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "outchannels");
+ params[i].character = 'o';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc,
+ "Number of playback channels (defaults to hardware max)");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "shorts");
+ params[i].character = 'S';
+ params[i].type = JackDriverParamBool;
+ params[i].value.i = FALSE;
+ strcpy (params[i].short_desc, "Try 16-bit samples before 32-bit");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+
+ i++;
+ strcpy (params[i].name, "input-latency");
+ params[i].character = 'I';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Extra input latency");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ i++;
+ strcpy (params[i].name, "output-latency");
+ params[i].character = 'O';
+ params[i].type = JackDriverParamUInt;
+ params[i].value.i = 0;
+ strcpy (params[i].short_desc, "Extra output latency");
+ strcpy (params[i].long_desc, params[i].short_desc);
+
+ desc->params = params;
+
+ return desc;
+ }
+
+ Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params) {
+ jack_nframes_t srate = 48000;
+ jack_nframes_t frames_per_interrupt = 1024;
+ unsigned long user_nperiods = 2;
+ char *playback_pcm_name = "hw:0";
+ char *capture_pcm_name = "hw:0";
+ int hw_monitoring = FALSE;
+ int hw_metering = FALSE;
+ int capture = FALSE;
+ int playback = FALSE;
+ int soft_mode = FALSE;
+ int monitor = FALSE;
+ DitherAlgorithm dither = None;
+ int user_capture_nchnls = 0;
+ int user_playback_nchnls = 0;
+ int shorts_first = FALSE;
+ jack_nframes_t systemic_input_latency = 0;
+ jack_nframes_t systemic_output_latency = 0;
+ const JSList * node;
+ const jack_driver_param_t * param;
+
+ for (node = params; node; node = jack_slist_next (node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'C':
+ capture = TRUE;
+ if (strcmp (param->value.str, "none") != 0) {
+ capture_pcm_name = strdup (param->value.str);
+ }
+ break;
+
+ case 'P':
+ playback = TRUE;
+ if (strcmp (param->value.str, "none") != 0) {
+ playback_pcm_name = strdup (param->value.str);
+ }
+ break;
+
+ case 'D':
+ playback = TRUE;
+ capture = TRUE;
+ break;
+
+ case 'd':
+ playback_pcm_name = strdup (param->value.str);
+ capture_pcm_name = strdup (param->value.str);
+ break;
+
+ case 'H':
+ hw_monitoring = param->value.i;
+ break;
+
+ case 'm':
+ monitor = param->value.i;
+ break;
+
+ case 'M':
+ hw_metering = param->value.i;
+ break;
+
+ case 'r':
+ srate = param->value.ui;
+ fprintf (stderr, "apparent rate = %d\n", srate);
+ break;
+
+ case 'p':
+ frames_per_interrupt = param->value.ui;
+ break;
+
+ case 'n':
+ user_nperiods = param->value.ui;
+ if (user_nperiods < 2) /* enforce minimum value */
+ user_nperiods = 2;
+ break;
+
+ case 's':
+ soft_mode = param->value.i;
+ break;
+
+ case 'z':
+ if (dither_opt (param->value.c, &dither)) {
+ return NULL;
+ }
+ break;
+
+ case 'i':
+ user_capture_nchnls = param->value.ui;
+ break;
+
+ case 'o':
+ user_playback_nchnls = param->value.ui;
+ break;
+
+ case 'S':
+ shorts_first = param->value.i;
+ break;
+
+ case 'I':
+ systemic_input_latency = param->value.ui;
+ break;
+
+ case 'O':
+ systemic_output_latency = param->value.ui;
+ break;
+
+ }
+ }
+
+ /* duplex is the default */
+ if (!capture && !playback) {
+ capture = TRUE;
+ playback = TRUE;
+ }
+
+ Jack::JackAlsaDriver* alsa_driver = new Jack::JackAlsaDriver("alsa_pcm", engine, table);
+ Jack::JackDriverClientInterface* threaded_driver = new Jack::JackThreadedDriver(alsa_driver);
+ // Special open for ALSA driver...
+ if (alsa_driver->Open(frames_per_interrupt, user_nperiods, srate, hw_monitoring, hw_metering, capture, playback, dither, soft_mode, monitor,
+ user_capture_nchnls, user_playback_nchnls, shorts_first, capture_pcm_name, playback_pcm_name,
+ systemic_input_latency, systemic_output_latency) == 0) {
+ return threaded_driver;
+ } else {
+ delete threaded_driver; // Delete the decorated driver
+ return NULL;
+ }
+ }
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
diff --git a/linux/alsa/JackAlsaDriver.h b/linux/alsa/JackAlsaDriver.h
new file mode 100644
index 00000000..9ac95d9b
--- /dev/null
+++ b/linux/alsa/JackAlsaDriver.h
@@ -0,0 +1,161 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackAlsaDriver__
+#define __JackAlsaDriver__
+
+#include "JackAudioDriver.h"
+#include "JackThreadedDriver.h"
+#include "JackTime.h"
+
+#include "alsa_driver.h"
+
+namespace Jack
+{
+
+/*!
+\brief The ALSA driver.
+*/
+
+class JackAlsaDriver : public JackAudioDriver
+{
+
+ private:
+
+ jack_driver_t* fDriver;
+ jack_time_t fDelayedUst;
+
+ void alsa_driver_release_channel_dependent_memory (alsa_driver_t *driver);
+ int alsa_driver_check_capabilities (alsa_driver_t *driver);
+ int alsa_driver_check_card_type (alsa_driver_t *driver);
+ int alsa_driver_hammerfall_hardware (alsa_driver_t *driver);
+ int alsa_driver_hdsp_hardware (alsa_driver_t *driver);
+ int alsa_driver_ice1712_hardware (alsa_driver_t *driver);
+ int alsa_driver_usx2y_hardware (alsa_driver_t *driver);
+ 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_configure_stream (alsa_driver_t *driver, char *device_name,
+ const char *stream_name,
+ snd_pcm_t *handle,
+ snd_pcm_hw_params_t *hw_params,
+ snd_pcm_sw_params_t *sw_params,
+ unsigned int *nperiodsp,
+ unsigned long *nchns,
+ unsigned long sample_width);
+
+ int alsa_driver_set_parameters (alsa_driver_t *driver,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate);
+
+ int alsa_driver_reset_parameters (alsa_driver_t *driver,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate);
+
+ int alsa_driver_get_channel_addresses (alsa_driver_t *driver,
+ snd_pcm_uframes_t *capture_avail,
+ snd_pcm_uframes_t *playback_avail,
+ snd_pcm_uframes_t *capture_offset,
+ snd_pcm_uframes_t *playback_offset);
+
+ jack_driver_t * alsa_driver_new(char *name, char *playback_alsa_device,
+ char *capture_alsa_device,
+ jack_client_t *client,
+ jack_nframes_t frames_per_cycle,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t rate,
+ int hw_monitoring,
+ int hw_metering,
+ int capturing,
+ int playing,
+ DitherAlgorithm dither,
+ int soft_mode,
+ int monitor,
+ int user_capture_nchnls,
+ int user_playback_nchnls,
+ int shorts_first,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency
+ );
+
+ void alsa_driver_delete(alsa_driver_t *driver);
+ int alsa_driver_start(alsa_driver_t *driver);
+ int alsa_driver_stop(alsa_driver_t *driver);
+ int alsa_driver_read(alsa_driver_t *driver, jack_nframes_t nframes);
+ int alsa_driver_write(alsa_driver_t *driver, jack_nframes_t nframes);
+
+ jack_nframes_t alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float
+ *delayed_usecs);
+
+ void alsa_driver_silence_untouched_channels (alsa_driver_t *driver,
+ jack_nframes_t nframes);
+
+ int alsa_driver_restart (alsa_driver_t *driver);
+ int alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs);
+ void jack_driver_init (jack_driver_t *driver);
+ void jack_driver_nt_init (jack_driver_nt_t * driver);
+ void jack_driver_nt_finish(jack_driver_nt_t * driver);
+
+ public:
+
+ JackAlsaDriver(const char* name, JackEngine* engine, JackSynchro** table): JackAudioDriver(name, engine, table)
+ {}
+ virtual ~JackAlsaDriver()
+ {}
+
+ int Open(jack_nframes_t nframes,
+ jack_nframes_t user_nperiods,
+ jack_nframes_t samplerate,
+ int hw_monitoring,
+ int hw_metering,
+ int capturing,
+ int playing,
+ DitherAlgorithm dither,
+ int soft_mode,
+ int monitor,
+ int inchannels,
+ int outchannels,
+ int shorts_first,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Close();
+ int Attach();
+ int Detach();
+
+ int Start();
+ int Stop();
+
+ int Read();
+ int Write();
+
+ int SetBufferSize(jack_nframes_t nframes);
+
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/linux/alsa/alsa_driver.h b/linux/alsa/alsa_driver.h
new file mode 100644
index 00000000..dec42479
--- /dev/null
+++ b/linux/alsa/alsa_driver.h
@@ -0,0 +1,248 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __jack_alsa_driver_h__
+#define __jack_alsa_driver_h__
+
+#include <alsa/asoundlib.h>
+
+#include "bitset.h"
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define SND_PCM_FORMAT_S24_3 SND_PCM_FORMAT_S24_3LE
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ #define SND_PCM_FORMAT_S24_3 SND_PCM_FORMAT_S24_3BE
+#endif
+
+#include "types.h"
+#include "hardware.h"
+#include "driver.h"
+#include "memops.h"
+
+
+typedef void (*ReadCopyFunction) (jack_default_audio_sample_t *dst, char *src,
+ unsigned long src_bytes,
+ unsigned long src_skip_bytes);
+typedef void (*WriteCopyFunction) (char *dst, jack_default_audio_sample_t *src,
+ unsigned long src_bytes,
+ unsigned long dst_skip_bytes,
+ dither_state_t *state);
+typedef void (*CopyCopyFunction) (char *dst, char *src,
+ unsigned long src_bytes,
+ unsigned long dst_skip_bytes,
+ unsigned long src_skip_byte);
+
+typedef struct _alsa_driver
+{
+
+ JACK_DRIVER_NT_DECL
+
+ int poll_timeout;
+ jack_time_t poll_last;
+ jack_time_t poll_next;
+ char **playback_addr;
+ char **capture_addr;
+ const snd_pcm_channel_area_t *capture_areas;
+ const snd_pcm_channel_area_t *playback_areas;
+ struct pollfd *pfd;
+ unsigned int playback_nfds;
+ unsigned int capture_nfds;
+ unsigned long interleave_unit;
+ unsigned long* capture_interleave_skip;
+ unsigned long* playback_interleave_skip;
+ channel_t max_nchannels;
+ channel_t user_nchannels;
+ channel_t playback_nchannels;
+ channel_t capture_nchannels;
+ unsigned long playback_sample_bytes;
+ unsigned long capture_sample_bytes;
+
+ jack_nframes_t frame_rate;
+ jack_nframes_t frames_per_cycle;
+ jack_nframes_t capture_frame_latency;
+ jack_nframes_t playback_frame_latency;
+
+ unsigned long *silent;
+ char *alsa_name_playback;
+ char *alsa_name_capture;
+ char *alsa_driver;
+ bitset_t channels_not_done;
+ bitset_t channels_done;
+ snd_pcm_format_t playback_sample_format;
+ snd_pcm_format_t capture_sample_format;
+ float max_sample_val;
+ unsigned long user_nperiods;
+ unsigned int playback_nperiods;
+ unsigned int capture_nperiods;
+ unsigned long last_mask;
+ snd_ctl_t *ctl_handle;
+ snd_pcm_t *playback_handle;
+ snd_pcm_t *capture_handle;
+ snd_pcm_hw_params_t *playback_hw_params;
+ snd_pcm_sw_params_t *playback_sw_params;
+ snd_pcm_hw_params_t *capture_hw_params;
+ snd_pcm_sw_params_t *capture_sw_params;
+ jack_hardware_t *hw;
+ ClockSyncStatus *clock_sync_data;
+ jack_client_t *client;
+ JSList *capture_ports;
+ JSList *playback_ports;
+ JSList *monitor_ports;
+
+ unsigned long input_monitor_mask;
+
+char soft_mode :
+ 1;
+char hw_monitoring :
+ 1;
+char hw_metering :
+ 1;
+char all_monitor_in :
+ 1;
+char capture_and_playback_not_synced :
+ 1;
+char playback_interleaved :
+ 1;
+char capture_interleaved :
+ 1;
+char with_monitor_ports :
+ 1;
+
+ ReadCopyFunction read_via_copy;
+ WriteCopyFunction write_via_copy;
+ CopyCopyFunction channel_copy;
+
+ int dither;
+ dither_state_t *dither_state;
+
+ SampleClockMode clock_mode;
+ JSList *clock_sync_listeners;
+ pthread_mutex_t clock_sync_lock;
+ unsigned long next_clock_sync_listener_id;
+char has_clock_sync_reporting :
+ 1;
+char has_hw_monitoring :
+ 1;
+char has_hw_metering :
+ 1;
+
+ int running;
+ int run;
+
+ int poll_late;
+ int xrun_count;
+ int process_count;
+
+}
+alsa_driver_t;
+
+static inline void
+alsa_driver_mark_channel_done (alsa_driver_t *driver, channel_t chn)
+{
+ bitset_remove (driver->channels_not_done, chn);
+ driver->silent[chn] = 0;
+}
+
+static inline void
+alsa_driver_silence_on_channel (alsa_driver_t *driver, channel_t chn,
+ jack_nframes_t nframes)
+{
+ if (driver->playback_interleaved) {
+ memset_interleave
+ (driver->playback_addr[chn],
+ 0, nframes * driver->playback_sample_bytes,
+ driver->interleave_unit,
+ driver->playback_interleave_skip[chn]);
+ } else {
+ memset (driver->playback_addr[chn], 0,
+ nframes * driver->playback_sample_bytes);
+ }
+ alsa_driver_mark_channel_done (driver, chn);
+}
+
+static inline void
+alsa_driver_silence_on_channel_no_mark (alsa_driver_t *driver, channel_t chn,
+ jack_nframes_t nframes)
+{
+ if (driver->playback_interleaved) {
+ memset_interleave
+ (driver->playback_addr[chn],
+ 0, nframes * driver->playback_sample_bytes,
+ driver->interleave_unit,
+ driver->playback_interleave_skip[chn]);
+ } else {
+ memset (driver->playback_addr[chn], 0,
+ nframes * driver->playback_sample_bytes);
+ }
+}
+
+static inline void
+alsa_driver_read_from_channel (alsa_driver_t *driver,
+ channel_t channel,
+ jack_default_audio_sample_t *buf,
+ jack_nframes_t nsamples)
+{
+ driver->read_via_copy (buf,
+ driver->capture_addr[channel],
+ nsamples,
+ driver->capture_interleave_skip[channel]);
+}
+
+static inline void
+alsa_driver_write_to_channel (alsa_driver_t *driver,
+ channel_t channel,
+ jack_default_audio_sample_t *buf,
+ jack_nframes_t nsamples)
+{
+ driver->write_via_copy (driver->playback_addr[channel],
+ buf,
+ nsamples,
+ driver->playback_interleave_skip[channel],
+ driver->dither_state + channel);
+ alsa_driver_mark_channel_done (driver, channel);
+}
+
+static inline void
+alsa_driver_copy_channel (alsa_driver_t *driver,
+ channel_t input_channel,
+ channel_t output_channel,
+ jack_nframes_t nsamples)
+{
+
+ driver->channel_copy (driver->playback_addr[output_channel],
+ driver->capture_addr[input_channel],
+ nsamples * driver->playback_sample_bytes,
+ driver->playback_interleave_skip[output_channel],
+ driver->capture_interleave_skip[input_channel]);
+ alsa_driver_mark_channel_done (driver, output_channel);
+}
+
+void alsa_driver_silence_untouched_channels (alsa_driver_t *driver,
+ jack_nframes_t nframes);
+void alsa_driver_set_clock_sync_status (alsa_driver_t *driver, channel_t chn,
+ ClockSyncStatus status);
+int alsa_driver_listen_for_clock_sync_status (alsa_driver_t *,
+ ClockSyncListenerFunction,
+ void *arg);
+int alsa_driver_stop_listen_for_clock_sync_status (alsa_driver_t *,
+ unsigned int);
+void alsa_driver_clock_sync_notify (alsa_driver_t *, channel_t chn,
+ ClockSyncStatus);
+
+#endif /* __jack_alsa_driver_h__ */
diff --git a/linux/alsa/bitset.h b/linux/alsa/bitset.h
new file mode 100644
index 00000000..da0abef9
--- /dev/null
+++ b/linux/alsa/bitset.h
@@ -0,0 +1,132 @@
+/*
+* bitset.h -- some simple bit vector set operations.
+*
+* This is useful for sets of small non-negative integers. There are
+* some obvious set operations that are not implemented because I
+* don't need them right now.
+*
+* These functions represent sets as arrays of unsigned 32-bit
+* integers allocated on the heap. The first entry contains the set
+* cardinality (number of elements allowed), followed by one or more
+* words containing bit vectors.
+*
+* $Id: bitset.h,v 1.2 2005/11/23 11:24:29 letz Exp $
+*/
+
+/*
+ * Copyright (C) 2005 Jack O'Quin
+ *
+ * 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 (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __bitset_h__
+#define __bitset_h__
+
+#include <inttypes.h> /* POSIX standard fixed-size types */
+#include <assert.h> /* `#define NDEBUG' to disable */
+
+/* On some 64-bit machines, this implementation may be slightly
+ * inefficient, depending on how compilers allocate space for
+ * uint32_t. For the set sizes I currently need, this is acceptable.
+ * It should not be hard to pack the bits better, if that becomes
+ * worthwhile.
+ */
+typedef uint32_t _bitset_word_t;
+typedef _bitset_word_t *bitset_t;
+
+#define WORD_SIZE(cardinality) (1+((cardinality)+31)/32)
+#define BYTE_SIZE(cardinality) (WORD_SIZE(cardinality)*sizeof(_bitset_word_t))
+#define WORD_INDEX(element) (1+(element)/32)
+#define BIT_INDEX(element) ((element)&037)
+
+static inline void
+bitset_add(bitset_t set
+ , unsigned int element)
+{
+ assert(element < set
+ [0]);
+ set
+ [WORD_INDEX(element)] |= (1 << BIT_INDEX(element));
+}
+
+static inline void
+bitset_copy(bitset_t to_set, bitset_t from_set)
+{
+ assert(to_set[0] == from_set[0]);
+ memcpy(to_set, from_set, BYTE_SIZE(to_set[0]));
+}
+
+static inline void
+bitset_create(bitset_t *set
+ , unsigned int cardinality)
+{
+ *set
+ = (bitset_t) calloc(WORD_SIZE(cardinality),
+ sizeof(_bitset_word_t));
+ assert(*set
+ );
+ *set
+ [0] = cardinality;
+}
+
+static inline void
+bitset_destroy(bitset_t *set
+ )
+{
+ if (*set
+ ) {
+ free(*set
+ );
+ *set
+ = (bitset_t) 0;
+ }
+}
+
+static inline int
+bitset_empty(bitset_t set
+ )
+{
+ int i;
+ _bitset_word_t result = 0;
+ int nwords = WORD_SIZE(set
+ [0]);
+ for (i = 1; i < nwords; i++) {
+ result |= set
+ [i];
+ }
+ return (result == 0);
+}
+
+static inline int
+bitset_contains(bitset_t set
+ , unsigned int element)
+{
+ assert(element < set
+ [0]);
+ return (0 != (set
+ [WORD_INDEX(element)] & (1 << BIT_INDEX(element))));
+}
+
+static inline void
+bitset_remove(bitset_t set
+ , unsigned int element)
+{
+ assert(element < set
+ [0]);
+ set
+ [WORD_INDEX(element)] &= ~(1 << BIT_INDEX(element));
+}
+
+#endif /* __bitset_h__ */
diff --git a/linux/alsa/driver.h b/linux/alsa/driver.h
new file mode 100644
index 00000000..36f9408b
--- /dev/null
+++ b/linux/alsa/driver.h
@@ -0,0 +1,311 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: driver.h,v 1.2 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_driver_h__
+#define __jack_driver_h__
+
+#include <pthread.h>
+#include "types.h"
+#include "jslist.h"
+#include "driver_interface.h"
+
+typedef float gain_t;
+typedef long channel_t;
+
+typedef enum {
+ Lock = 0x1,
+ NoLock = 0x2,
+ Sync = 0x4,
+ NoSync = 0x8
+} ClockSyncStatus;
+
+typedef void (*ClockSyncListenerFunction)(channel_t, ClockSyncStatus, void*);
+
+typedef struct
+{
+ unsigned long id;
+ ClockSyncListenerFunction function;
+ void *arg;
+}
+ClockSyncListener;
+
+struct _jack_engine;
+struct _jack_driver;
+
+typedef int (*JackDriverAttachFunction)(struct _jack_driver *,
+ struct _jack_engine *);
+typedef int (*JackDriverDetachFunction)(struct _jack_driver *,
+ struct _jack_engine *);
+typedef int (*JackDriverReadFunction)(struct _jack_driver *,
+ jack_nframes_t nframes);
+typedef int (*JackDriverWriteFunction)(struct _jack_driver *,
+ jack_nframes_t nframes);
+typedef int (*JackDriverNullCycleFunction)(struct _jack_driver *,
+ jack_nframes_t nframes);
+typedef int (*JackDriverStopFunction)(struct _jack_driver *);
+typedef int (*JackDriverStartFunction)(struct _jack_driver *);
+typedef int (*JackDriverBufSizeFunction)(struct _jack_driver *,
+ jack_nframes_t nframes);
+/*
+ Call sequence summary:
+
+ 1) engine loads driver via runtime dynamic linking
+ - calls jack_driver_load
+ - we call dlsym for "driver_initialize" and execute it
+ 2) engine attaches to driver
+ 3) engine starts driver
+ 4) driver runs its own thread, calling
+ while () {
+ driver->wait ();
+ driver->engine->run_cycle ()
+ }
+ 5) engine stops driver
+ 6) engine detaches from driver
+ 7) engine calls driver `finish' routine
+
+ Note that stop/start may be called multiple times in the event of an
+ error return from the `wait' function.
+*/
+
+typedef struct _jack_driver
+{
+
+ /* The _jack_driver structure fields are included at the beginning of
+ each driver-specific structure using the JACK_DRIVER_DECL macro,
+ which is defined below. The comments that follow describe each
+ common field.
+
+ The driver should set this to be the interval it expects to elapse
+ between returning from the `wait' function. if set to zero, it
+ implies that the driver does not expect regular periodic wakeups.
+
+ jack_time_t period_usecs;
+
+
+ The driver should set this within its "wait" function to indicate
+ the UST of the most recent determination that the engine cycle
+ should run. it should not be set if the "extra_fd" argument of
+ the wait function is set to a non-zero value.
+
+ jack_time_t last_wait_ust;
+
+
+ These are not used by the driver. They should not be written to or
+ modified in any way
+
+ void *handle;
+ struct _jack_internal_client *internal_client;
+
+ This should perform any cleanup associated with the driver. it will
+ be called when jack server process decides to get rid of the
+ driver. in some systems, it may not be called at all, so the driver
+ should never rely on a call to this. it can set it to NULL if
+ it has nothing do do.
+
+ void (*finish)(struct _jack_driver *);
+
+
+ The JACK engine will call this when it wishes to attach itself to
+ the driver. the engine will pass a pointer to itself, which the driver
+ may use in anyway it wishes to. the driver may assume that this
+ is the same engine object that will make `wait' calls until a
+ `detach' call is made.
+
+ JackDriverAttachFunction attach;
+
+
+ The JACK engine will call this when it is finished using a driver.
+
+ JackDriverDetachFunction detach;
+
+
+ The JACK engine will call this when it wants to wait until the
+ driver decides that its time to process some data. the driver returns
+ a count of the number of audioframes that can be processed.
+
+ it should set the variable pointed to by `status' as follows:
+
+ zero: the wait completed normally, processing may begin
+ negative: the wait failed, and recovery is not possible
+ positive: the wait failed, and the driver stopped itself.
+ a call to `start' will return the driver to
+ a correct and known state.
+
+ the driver should also fill out the `delayed_usecs' variable to
+ indicate any delay in its expected periodic execution. for example,
+ if it discovers that its return from poll(2) is later than it
+ expects it to be, it would place an estimate of the delay
+ in this variable. the engine will use this to decide if it
+ plans to continue execution.
+
+ JackDriverWaitFunction wait;
+
+
+ The JACK engine will call this to ask the driver to move
+ data from its inputs to its output port buffers. it should
+ return 0 to indicate successful completion, negative otherwise.
+
+ This function will always be called after the wait function (above).
+
+ JackDriverReadFunction read;
+
+
+ The JACK engine will call this to ask the driver to move
+ data from its input port buffers to its outputs. it should
+ return 0 to indicate successful completion, negative otherwise.
+
+ this function will always be called after the read function (above).
+
+ JackDriverWriteFunction write;
+
+
+ The JACK engine will call this after the wait function (above) has
+ been called, but for some reason the engine is unable to execute
+ a full "cycle". the driver should do whatever is necessary to
+ keep itself running correctly, but cannot reference ports
+ or other JACK data structures in any way.
+
+ JackDriverNullCycleFunction null_cycle;
+
+
+ The engine will call this when it plans to stop calling the `wait'
+ function for some period of time. the driver should take
+ appropriate steps to handle this (possibly no steps at all).
+ NOTE: the driver must silence its capture buffers (if any)
+ from within this function or the function that actually
+ implements the change in state.
+
+ JackDriverStopFunction stop;
+
+
+ The engine will call this to let the driver know that it plans
+ to start calling the `wait' function on a regular basis. the driver
+ should take any appropriate steps to handle this (possibly no steps
+ at all). NOTE: The driver may wish to silence its playback buffers
+ (if any) from within this function or the function that actually
+ implements the change in state.
+
+ JackDriverStartFunction start;
+
+ The engine will call this to let the driver know that some client
+ has requested a new buffer size. The stop function will be called
+ prior to this, and the start function after this one has returned.
+
+ JackDriverBufSizeFunction bufsize;
+ */
+
+ /* define the fields here... */
+#define JACK_DRIVER_DECL \
+ jack_time_t period_usecs; \
+ jack_time_t last_wait_ust; \
+ void *handle; \
+ struct _jack_client_internal * internal_client; \
+ void (*finish)(struct _jack_driver *);\
+ JackDriverAttachFunction attach; \
+ JackDriverDetachFunction detach; \
+ JackDriverReadFunction read; \
+ JackDriverWriteFunction write; \
+ JackDriverNullCycleFunction null_cycle; \
+ JackDriverStopFunction stop; \
+ JackDriverStartFunction start; \
+ JackDriverBufSizeFunction bufsize;
+
+ JACK_DRIVER_DECL /* expand the macro */
+
+}
+jack_driver_t;
+
+
+typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
+
+void jack_driver_init (jack_driver_t *);
+void jack_driver_release (jack_driver_t *);
+
+jack_driver_t *jack_driver_load (int argc, char **argv);
+void jack_driver_unload (jack_driver_t *);
+
+
+/****************************
+ *** Non-Threaded Drivers ***
+ ****************************/
+
+/*
+ Call sequence summary:
+
+ 1) engine loads driver via runtime dynamic linking
+ - calls jack_driver_load
+ - we call dlsym for "driver_initialize" and execute it
+ - driver_initialize calls jack_driver_nt_init
+ 2) nt layer attaches to driver
+ 3) nt layer starts driver
+ 4) nt layer runs a thread, calling
+ while () {
+ driver->nt_run_ctcle();
+ }
+ 5) nt layer stops driver
+ 6) nt layer detaches driver
+ 7) engine calls driver `finish' routine which calls jack_driver_nt_finish
+
+ Note that stop/start may be called multiple times in the event of an
+ error return from the `wait' function.
+
+
+*/
+
+struct _jack_driver_nt;
+
+typedef int (*JackDriverNTAttachFunction)(struct _jack_driver_nt *);
+typedef int (*JackDriverNTDetachFunction)(struct _jack_driver_nt *);
+typedef int (*JackDriverNTStopFunction)(struct _jack_driver_nt *);
+typedef int (*JackDriverNTStartFunction)(struct _jack_driver_nt *);
+typedef int (*JackDriverNTBufSizeFunction)(struct _jack_driver_nt *,
+ jack_nframes_t nframes);
+typedef int (*JackDriverNTRunCycleFunction)(struct _jack_driver_nt *);
+
+typedef struct _jack_driver_nt
+{
+
+#define JACK_DRIVER_NT_DECL \
+ JACK_DRIVER_DECL \
+ struct _jack_engine * engine; \
+ volatile int nt_run; \
+ pthread_t nt_thread; \
+ pthread_mutex_t nt_run_lock; \
+ JackDriverNTAttachFunction nt_attach; \
+ JackDriverNTDetachFunction nt_detach; \
+ JackDriverNTStopFunction nt_stop; \
+ JackDriverNTStartFunction nt_start; \
+ JackDriverNTBufSizeFunction nt_bufsize; \
+ JackDriverNTRunCycleFunction nt_run_cycle;
+#define nt_read read
+#define nt_write write
+#define nt_null_cycle null_cycle
+
+ JACK_DRIVER_NT_DECL
+
+
+}
+jack_driver_nt_t;
+
+void jack_driver_nt_init (jack_driver_nt_t * driver);
+void jack_driver_nt_finish (jack_driver_nt_t * driver);
+
+
+#endif /* __jack_driver_h__ */
diff --git a/linux/alsa/generic.h b/linux/alsa/generic.h
new file mode 100644
index 00000000..ee906b31
--- /dev/null
+++ b/linux/alsa/generic.h
@@ -0,0 +1,37 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: generic.h,v 1.3 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_generic_h__
+#define __jack_generic_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_hardware_t *
+ jack_alsa_generic_hw_new (alsa_driver_t *driver);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __jack_generic_h__*/
diff --git a/linux/alsa/generic_hw.c b/linux/alsa/generic_hw.c
new file mode 100644
index 00000000..30e7f340
--- /dev/null
+++ b/linux/alsa/generic_hw.c
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: generic_hw.c,v 1.2 2005/08/29 10:36:28 letz Exp $
+*/
+
+#include "hardware.h"
+#include "alsa_driver.h"
+
+static int generic_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
+{
+ return -1;
+}
+
+static int generic_change_sample_clock (jack_hardware_t *hw, SampleClockMode mode)
+{
+ return -1;
+}
+
+static void
+generic_release (jack_hardware_t *hw)
+{
+ return;
+}
+
+jack_hardware_t *
+jack_alsa_generic_hw_new (alsa_driver_t *driver)
+
+{
+ jack_hardware_t *hw;
+
+ hw = (jack_hardware_t *) malloc (sizeof (jack_hardware_t));
+
+ hw->capabilities = 0;
+ hw->input_monitor_mask = 0;
+
+ hw->set_input_monitor_mask = generic_set_input_monitor_mask;
+ hw->change_sample_clock = generic_change_sample_clock;
+ hw->release = generic_release;
+
+ return hw;
+}
diff --git a/linux/alsa/hammerfall.c b/linux/alsa/hammerfall.c
new file mode 100644
index 00000000..55e189e9
--- /dev/null
+++ b/linux/alsa/hammerfall.c
@@ -0,0 +1,311 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: hammerfall.c,v 1.3 2005/09/29 14:51:59 letz Exp $
+*/
+
+//#include <jack/hardware.h>
+//#include <jack/internal.h>
+//#include "internal.h"
+
+#include "hardware.h"
+#include "alsa_driver.h"
+#include "hammerfall.h"
+
+#define FALSE 0
+#define TRUE 1
+
+
+/* Set this to 1 if you want this compile error:
+ * warning: `hammerfall_monitor_controls' defined but not used */
+#define HAMMERFALL_MONITOR_CONTROLS 0
+
+static void
+set_control_id (snd_ctl_elem_id_t *ctl, const char *name)
+{
+ snd_ctl_elem_id_set_name (ctl, name);
+ snd_ctl_elem_id_set_numid (ctl, 0);
+ snd_ctl_elem_id_set_interface (ctl, SND_CTL_ELEM_IFACE_PCM);
+ snd_ctl_elem_id_set_device (ctl, 0);
+ snd_ctl_elem_id_set_subdevice (ctl, 0);
+ snd_ctl_elem_id_set_index (ctl, 0);
+}
+
+#if HAMMERFALL_MONITOR_CONTROLS
+static void
+hammerfall_broadcast_channel_status_change (hammerfall_t *h, int lock, int sync, channel_t lowchn, channel_t highchn)
+
+{
+ channel_t chn;
+ ClockSyncStatus status = 0;
+
+ if (lock) {
+ status |= Lock;
+ } else {
+ status |= NoLock;
+ }
+
+ if (sync) {
+ status |= Sync;
+ } else {
+ status |= NoSync;
+ }
+
+ for (chn = lowchn; chn < highchn; chn++) {
+ alsa_driver_set_clock_sync_status (h->driver, chn, status);
+ }
+}
+
+static void
+hammerfall_check_sync_state (hammerfall_t *h, int val, int adat_id)
+
+{
+ int lock;
+ int sync;
+
+ /* S/PDIF channel is always locked and synced, but we only
+ need tell people once that this is TRUE.
+
+ XXX - maybe need to make sure that the rate matches our
+ idea of the current rate ?
+ */
+
+ if (!h->said_that_spdif_is_fine) {
+ ClockSyncStatus status;
+
+ status = Lock|Sync;
+
+ /* XXX broken! fix for hammerfall light ! */
+
+ alsa_driver_set_clock_sync_status (h->driver, 24, status);
+ alsa_driver_set_clock_sync_status (h->driver, 25, status);
+
+ h->said_that_spdif_is_fine = TRUE;
+ }
+
+ lock = (val & 0x1) ? TRUE : FALSE;
+ sync = (val & 0x2) ? TRUE : FALSE;
+
+ if (h->lock_status[adat_id] != lock ||
+ h->sync_status[adat_id] != sync) {
+ hammerfall_broadcast_channel_status_change (h, lock, sync, adat_id*8, (adat_id*8)+8);
+ }
+
+ h->lock_status[adat_id] = lock;
+ h->sync_status[adat_id] = sync;
+}
+
+static void
+hammerfall_check_sync (hammerfall_t *h, snd_ctl_elem_value_t *ctl)
+
+{
+ const char *name;
+ int val;
+ snd_ctl_elem_id_t *ctl_id;
+
+ printf ("check sync\n");
+
+ snd_ctl_elem_id_alloca (&ctl_id);
+ snd_ctl_elem_value_get_id (ctl, ctl_id);
+
+ name = snd_ctl_elem_id_get_name (ctl_id);
+
+ if (strcmp (name, "ADAT1 Sync Check") == 0) {
+ val = snd_ctl_elem_value_get_enumerated (ctl, 0);
+ hammerfall_check_sync_state (h, val, 0);
+ } else if (strcmp (name, "ADAT2 Sync Check") == 0) {
+ val = snd_ctl_elem_value_get_enumerated (ctl, 0);
+ hammerfall_check_sync_state (h, val, 1);
+ } else if (strcmp (name, "ADAT3 Sync Check") == 0) {
+ val = snd_ctl_elem_value_get_enumerated (ctl, 0);
+ hammerfall_check_sync_state (h, val, 2);
+ } else {
+ jack_error ("Hammerfall: unknown control \"%s\"", name);
+ }
+}
+#endif /* HAMMERFALL_MONITOR_CONTROLS */
+
+static int
+hammerfall_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
+{
+ hammerfall_t *h = (hammerfall_t *) hw->private_hw;
+ snd_ctl_elem_value_t *ctl;
+ snd_ctl_elem_id_t *ctl_id;
+ int err;
+ int i;
+
+ snd_ctl_elem_value_alloca (&ctl);
+ snd_ctl_elem_id_alloca (&ctl_id);
+ set_control_id (ctl_id, "Channels Thru");
+ snd_ctl_elem_value_set_id (ctl, ctl_id);
+
+ for (i = 0; i < 26; i++) {
+ snd_ctl_elem_value_set_integer (ctl, i, (mask & (1<<i)) ? 1 : 0);
+ }
+
+ if ((err = snd_ctl_elem_write (h->driver->ctl_handle, ctl)) != 0) {
+ jack_error ("ALSA/Hammerfall: cannot set input monitoring (%s)", snd_strerror (err));
+ return -1;
+ }
+
+ hw->input_monitor_mask = mask;
+
+ return 0;
+}
+
+static int
+hammerfall_change_sample_clock (jack_hardware_t *hw, SampleClockMode mode)
+{
+ hammerfall_t *h = (hammerfall_t *) hw->private_hw;
+ snd_ctl_elem_value_t *ctl;
+ snd_ctl_elem_id_t *ctl_id;
+ int err;
+
+ snd_ctl_elem_value_alloca (&ctl);
+ snd_ctl_elem_id_alloca (&ctl_id);
+ set_control_id (ctl_id, "Sync Mode");
+ snd_ctl_elem_value_set_id (ctl, ctl_id);
+
+ switch (mode) {
+ case AutoSync:
+ snd_ctl_elem_value_set_enumerated (ctl, 0, 0);
+ break;
+ case ClockMaster:
+ snd_ctl_elem_value_set_enumerated (ctl, 0, 1);
+ break;
+ case WordClock:
+ snd_ctl_elem_value_set_enumerated (ctl, 0, 2);
+ break;
+ }
+
+ if ((err = snd_ctl_elem_write (h->driver->ctl_handle, ctl)) < 0) {
+ jack_error ("ALSA-Hammerfall: cannot set clock mode");
+ }
+
+ return 0;
+}
+
+static void
+hammerfall_release (jack_hardware_t *hw)
+
+{
+ hammerfall_t *h = (hammerfall_t *) hw->private_hw;
+ void *status;
+
+ if (h == 0) {
+ return;
+ }
+
+ pthread_cancel (h->monitor_thread);
+ pthread_join (h->monitor_thread, &status);
+
+ free (h);
+}
+
+#if HAMMERFALL_MONITOR_CONTROLS
+static void *
+hammerfall_monitor_controls (void *arg)
+{
+ jack_hardware_t *hw = (jack_hardware_t *) arg;
+ hammerfall_t *h = (hammerfall_t *) hw->private_hw;
+ snd_ctl_elem_id_t *switch_id[3];
+ snd_ctl_elem_value_t *sw[3];
+
+ pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+
+ snd_ctl_elem_id_malloc (&switch_id[0]);
+ snd_ctl_elem_id_malloc (&switch_id[1]);
+ snd_ctl_elem_id_malloc (&switch_id[2]);
+
+ snd_ctl_elem_value_malloc (&sw[0]);
+ snd_ctl_elem_value_malloc (&sw[1]);
+ snd_ctl_elem_value_malloc (&sw[2]);
+
+ set_control_id (switch_id[0], "ADAT1 Sync Check");
+ set_control_id (switch_id[1], "ADAT2 Sync Check");
+ set_control_id (switch_id[2], "ADAT3 Sync Check");
+
+ snd_ctl_elem_value_set_id (sw[0], switch_id[0]);
+ snd_ctl_elem_value_set_id (sw[1], switch_id[1]);
+ snd_ctl_elem_value_set_id (sw[2], switch_id[2]);
+
+ while (1) {
+ if (snd_ctl_elem_read (h->driver->ctl_handle, sw[0])) {
+ jack_error ("cannot read control switch 0 ...");
+ }
+ hammerfall_check_sync (h, sw[0]);
+
+ if (snd_ctl_elem_read (h->driver->ctl_handle, sw[1])) {
+ jack_error ("cannot read control switch 0 ...");
+ }
+ hammerfall_check_sync (h, sw[1]);
+
+ if (snd_ctl_elem_read (h->driver->ctl_handle, sw[2])) {
+ jack_error ("cannot read control switch 0 ...");
+ }
+ hammerfall_check_sync (h, sw[2]);
+
+ if (nanosleep (&h->monitor_interval, 0)) {
+ break;
+ }
+ }
+
+ pthread_exit (0);
+}
+#endif /* HAMMERFALL_MONITOR_CONTROLS */
+
+jack_hardware_t *
+jack_alsa_hammerfall_hw_new (alsa_driver_t *driver)
+
+{
+ jack_hardware_t *hw;
+ hammerfall_t *h;
+
+ hw = (jack_hardware_t *) malloc (sizeof (jack_hardware_t));
+
+ hw->capabilities = Cap_HardwareMonitoring|Cap_AutoSync|Cap_WordClock|Cap_ClockMaster|Cap_ClockLockReporting;
+ hw->input_monitor_mask = 0;
+ hw->private_hw = 0;
+
+ hw->set_input_monitor_mask = hammerfall_set_input_monitor_mask;
+ hw->change_sample_clock = hammerfall_change_sample_clock;
+ hw->release = hammerfall_release;
+
+ h = (hammerfall_t *) malloc (sizeof (hammerfall_t));
+
+ h->lock_status[0] = FALSE;
+ h->sync_status[0] = FALSE;
+ h->lock_status[1] = FALSE;
+ h->sync_status[1] = FALSE;
+ h->lock_status[2] = FALSE;
+ h->sync_status[2] = FALSE;
+ h->said_that_spdif_is_fine = FALSE;
+ h->driver = driver;
+
+ h->monitor_interval.tv_sec = 1;
+ h->monitor_interval.tv_nsec = 0;
+
+ hw->private_hw = h;
+
+#if 0
+ if (pthread_create (&h->monitor_thread, 0, hammerfall_monitor_controls, hw)) {
+ jack_error ("ALSA/Hammerfall: cannot create sync monitor thread");
+ }
+#endif
+
+ return hw;
+}
diff --git a/linux/alsa/hammerfall.h b/linux/alsa/hammerfall.h
new file mode 100644
index 00000000..78a3f505
--- /dev/null
+++ b/linux/alsa/hammerfall.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: hammerfall.h,v 1.3 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_hammerfall_h__
+#define __jack_hammerfall_h__
+
+#include <sys/time.h>
+
+typedef struct
+{
+ int lock_status[3];
+ int sync_status[3];
+ int said_that_spdif_is_fine;
+ pthread_t monitor_thread;
+ alsa_driver_t *driver;
+ struct timespec monitor_interval;
+}
+hammerfall_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_hardware_t *jack_alsa_hammerfall_hw_new (alsa_driver_t *driver);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_hammerfall_h__*/
diff --git a/linux/alsa/hardware.h b/linux/alsa/hardware.h
new file mode 100644
index 00000000..a941bdff
--- /dev/null
+++ b/linux/alsa/hardware.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: hardware.h,v 1.3 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_hardware_h__
+#define __jack_hardware_h__
+
+//#include <jack/types.h>
+
+#include "types.h"
+
+typedef enum {
+ AutoSync,
+ WordClock,
+ ClockMaster
+} SampleClockMode;
+
+typedef enum {
+ Cap_HardwareMonitoring = 0x1,
+ Cap_AutoSync = 0x2,
+ Cap_WordClock = 0x4,
+ Cap_ClockMaster = 0x8,
+ Cap_ClockLockReporting = 0x10,
+ Cap_HardwareMetering = 0x20
+} Capabilities;
+
+struct _jack_hardware;
+
+typedef void (*JackHardwareReleaseFunction)(struct _jack_hardware *);
+typedef int (*JackHardwareSetInputMonitorMaskFunction)(struct _jack_hardware *, unsigned long);
+typedef int (*JackHardwareChangeSampleClockFunction)(struct _jack_hardware *, SampleClockMode);
+typedef double (*JackHardwareGetHardwarePeak)(jack_port_t *port, jack_nframes_t frames);
+typedef double (*JackHardwareGetHardwarePower)(jack_port_t *port, jack_nframes_t frames);
+
+
+typedef struct _jack_hardware
+{
+
+ unsigned long capabilities;
+ unsigned long input_monitor_mask;
+
+ JackHardwareChangeSampleClockFunction change_sample_clock;
+ JackHardwareSetInputMonitorMaskFunction set_input_monitor_mask;
+ JackHardwareReleaseFunction release;
+ JackHardwareGetHardwarePeak get_hardware_peak;
+ JackHardwareGetHardwarePower get_hardware_power;
+ void *private_hw;
+
+}
+jack_hardware_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_hardware_t * jack_hardware_new ();
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __jack_hardware_h__ */
diff --git a/linux/alsa/hdsp.c b/linux/alsa/hdsp.c
new file mode 100644
index 00000000..91ce856e
--- /dev/null
+++ b/linux/alsa/hdsp.c
@@ -0,0 +1,232 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2002 Dave LaRose
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: hdsp.c,v 1.3 2005/09/29 14:51:59 letz Exp $
+*/
+
+#include "hardware.h"
+#include "alsa_driver.h"
+#include "hdsp.h"
+
+/* Constants to make working with the hdsp matrix mixer easier */
+static const int HDSP_MINUS_INFINITY_GAIN = 0;
+static const int HDSP_UNITY_GAIN = 32768;
+static const int HDSP_MAX_GAIN = 65535;
+
+/*
+ * Use these two arrays to choose the value of the input_channel
+ * argument to hsdp_set_mixer_gain(). hdsp_physical_input_index[n]
+ * selects the nth optical/analog input. audio_stream_index[n]
+ * selects the nth channel being received from the host via pci/pccard.
+ */
+static const int hdsp_num_input_channels = 52;
+static const int hdsp_physical_input_index[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
+static const int hdsp_audio_stream_index[] = {
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
+
+/*
+ * Use this array to choose the value of the output_channel
+ * argument to hsdp_set_mixer_gain(). hdsp_physical_output_index[26]
+ * and hdsp_physical_output_index[27] refer to the two "line out"
+ * channels (1/4" phone jack on the front of digiface/multiface).
+ */
+static const int hdsp_num_output_channels = 28;
+static const int hdsp_physical_output_index[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27};
+
+
+/* Function for checking argument values */
+static int clamp_int(int value, int lower_bound, int upper_bound)
+{
+ if(value < lower_bound) {
+ return lower_bound;
+ }
+ if(value > upper_bound) {
+ return upper_bound;
+ }
+ return value;
+}
+
+/* Note(XXX): Maybe should share this code with hammerfall.c? */
+static void
+set_control_id (snd_ctl_elem_id_t *ctl, const char *name)
+{
+ snd_ctl_elem_id_set_name (ctl, name);
+ snd_ctl_elem_id_set_numid (ctl, 0);
+ snd_ctl_elem_id_set_interface (ctl, SND_CTL_ELEM_IFACE_HWDEP);
+ snd_ctl_elem_id_set_device (ctl, 0);
+ snd_ctl_elem_id_set_subdevice (ctl, 0);
+ snd_ctl_elem_id_set_index (ctl, 0);
+}
+
+/* The hdsp matrix mixer lets you connect pretty much any input to */
+/* any output with gain from -inf to about +2dB. Pretty slick. */
+/* This routine makes a convenient way to set the gain from */
+/* input_channel to output_channel (see hdsp_physical_input_index */
+/* etc. above. */
+/* gain is an int from 0 to 65535, with 0 being -inf gain, and */
+/* 65535 being about +2dB. */
+
+static int hdsp_set_mixer_gain(jack_hardware_t *hw, int input_channel,
+ int output_channel, int gain)
+{
+ hdsp_t *h = (hdsp_t *) hw->private_hw;
+ snd_ctl_elem_value_t *ctl;
+ snd_ctl_elem_id_t *ctl_id;
+ int err;
+
+ /* Check args */
+ input_channel = clamp_int(input_channel, 0, hdsp_num_input_channels);
+ output_channel = clamp_int(output_channel, 0, hdsp_num_output_channels);
+ gain = clamp_int(gain, HDSP_MINUS_INFINITY_GAIN, HDSP_MAX_GAIN);
+
+ /* Allocate control element and select "Mixer" control */
+ snd_ctl_elem_value_alloca (&ctl);
+ snd_ctl_elem_id_alloca (&ctl_id);
+ set_control_id (ctl_id, "Mixer");
+ snd_ctl_elem_value_set_id (ctl, ctl_id);
+
+ /* Apparently non-standard and unstable interface for the */
+ /* mixer control. */
+ snd_ctl_elem_value_set_integer (ctl, 0, input_channel);
+ snd_ctl_elem_value_set_integer (ctl, 1, output_channel);
+ snd_ctl_elem_value_set_integer (ctl, 2, gain);
+
+ /* Commit the mixer value and check for errors */
+ if ((err = snd_ctl_elem_write (h->driver->ctl_handle, ctl)) != 0) {
+ jack_error ("ALSA/HDSP: cannot set mixer gain (%s)", snd_strerror (err));
+ return -1;
+ }
+
+ /* Note (XXX): Perhaps we should maintain a cache of the current */
+ /* mixer values, since it's not clear how to query them from the */
+ /* hdsp hardware. We'll leave this out until a little later. */
+ return 0;
+}
+
+static int hdsp_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
+{
+ int i;
+
+ /* For each input channel */
+ for (i = 0; i < 26; i++) {
+ /* Monitoring requested for this channel? */
+ if(mask & (1<<i)) {
+ /* Yes. Connect physical input to output */
+
+ if(hdsp_set_mixer_gain (hw, hdsp_physical_input_index[i],
+ hdsp_physical_output_index[i],
+ HDSP_UNITY_GAIN) != 0) {
+ return -1;
+ }
+
+#ifdef CANNOT_HEAR_SOFTWARE_STREAM_WHEN_MONITORING
+ /* ...and disconnect the corresponding software */
+ /* channel */
+ if(hdsp_set_mixer_gain (hw, hdsp_audio_stream_index[i],
+ hdsp_physical_output_index[i],
+ HDSP_MINUS_INFINITY_GAIN) != 0) {
+ return -1;
+ }
+#endif
+
+ } else {
+ /* No. Disconnect physical input from output */
+ if(hdsp_set_mixer_gain (hw, hdsp_physical_input_index[i],
+ hdsp_physical_output_index[i],
+ HDSP_MINUS_INFINITY_GAIN) != 0) {
+ return -1;
+ }
+
+#ifdef CANNOT_HEAR_SOFTWARE_STREAM_WHEN_MONITORING
+ /* ...and connect the corresponding software */
+ /* channel */
+ if(hdsp_set_mixer_gain (hw, hdsp_audio_stream_index[i],
+ hdsp_physical_output_index[i],
+ HDSP_UNITY_GAIN) != 0) {
+ return -1;
+ }
+#endif
+ }
+ }
+ /* Cache the monitor mask */
+ hw->input_monitor_mask = mask;
+ return 0;
+}
+
+
+static int hdsp_change_sample_clock (jack_hardware_t *hw, SampleClockMode mode)
+{
+ // Empty for now, until Dave understands more about clock sync so
+ // he can test.
+ return -1;
+}
+
+static double hdsp_get_hardware_peak (jack_port_t *port, jack_nframes_t frame)
+{
+ return 0;
+}
+
+static double hdsp_get_hardware_power (jack_port_t *port, jack_nframes_t frame)
+{
+ return 0;
+}
+
+static void
+hdsp_release (jack_hardware_t *hw)
+{
+ hdsp_t *h = (hdsp_t *) hw->private_hw;
+
+ if (h != 0) {
+ free (h);
+ }
+}
+
+/* Mostly copied directly from hammerfall.c */
+jack_hardware_t *
+jack_alsa_hdsp_hw_new (alsa_driver_t *driver)
+
+{
+ jack_hardware_t *hw;
+ hdsp_t *h;
+
+ hw = (jack_hardware_t *) malloc (sizeof (jack_hardware_t));
+
+ /* Not using clock lock-sync-whatever in home hardware setup */
+ /* yet. Will write this code when can test it. */
+ /* hw->capabilities = Cap_HardwareMonitoring|Cap_AutoSync|Cap_WordClock|Cap_ClockMaster|Cap_ClockLockReporting; */
+ hw->capabilities = Cap_HardwareMonitoring | Cap_HardwareMetering;
+ hw->input_monitor_mask = 0;
+ hw->private_hw = 0;
+
+ hw->set_input_monitor_mask = hdsp_set_input_monitor_mask;
+ hw->change_sample_clock = hdsp_change_sample_clock;
+ hw->release = hdsp_release;
+ hw->get_hardware_peak = hdsp_get_hardware_peak;
+ hw->get_hardware_power = hdsp_get_hardware_power;
+
+ h = (hdsp_t *) malloc (sizeof (hdsp_t));
+ h->driver = driver;
+ hw->private_hw = h;
+
+ return hw;
+}
diff --git a/linux/alsa/hdsp.h b/linux/alsa/hdsp.h
new file mode 100644
index 00000000..79e56364
--- /dev/null
+++ b/linux/alsa/hdsp.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2001 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: hdsp.h,v 1.3 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_hdsp_h__
+#define __jack_hdsp_h__
+
+#include <sys/time.h>
+
+typedef struct
+{
+ alsa_driver_t *driver;
+}
+hdsp_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_hardware_t *
+ jack_alsa_hdsp_hw_new (alsa_driver_t *driver);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __jack_hdsp_h__*/
diff --git a/linux/alsa/ice1712.c b/linux/alsa/ice1712.c
new file mode 100644
index 00000000..500bce00
--- /dev/null
+++ b/linux/alsa/ice1712.c
@@ -0,0 +1,161 @@
+/*
+ Copyright (C) 2002 Anthony Van Groningen
+
+ Parts based on source code taken from the
+ "Env24 chipset (ICE1712) control utility" that is
+
+ Copyright (C) 2000 by Jaroslav Kysela <perex@suse.cz>
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+//#include <jack/hardware.h>
+
+#include "hardware.h"
+#include "alsa_driver.h"
+#include "ice1712.h"
+//#include <jack/internal.h>
+
+
+
+static int
+ice1712_hw_monitor_toggle(jack_hardware_t *hw, int idx, int onoff)
+
+{
+ ice1712_t *h = (ice1712_t *) hw->private_hw;
+ snd_ctl_elem_value_t *val;
+ int err;
+
+ snd_ctl_elem_value_alloca (&val);
+ snd_ctl_elem_value_set_interface (val, SND_CTL_ELEM_IFACE_MIXER);
+ if (idx >= 8) {
+ snd_ctl_elem_value_set_name (val, SPDIF_PLAYBACK_ROUTE_NAME);
+ snd_ctl_elem_value_set_index (val, idx - 8);
+ } else {
+ snd_ctl_elem_value_set_name (val, ANALOG_PLAYBACK_ROUTE_NAME);
+ snd_ctl_elem_value_set_index (val, idx);
+ }
+ if (onoff) {
+ snd_ctl_elem_value_set_enumerated (val, 0, idx + 1);
+ } else {
+ snd_ctl_elem_value_set_enumerated (val, 0, 0);
+ }
+ if ((err = snd_ctl_elem_write (h->driver->ctl_handle, val)) != 0) {
+ jack_error ("ALSA/ICE1712: (%d) cannot set input monitoring (%s)",
+ idx,snd_strerror (err));
+ return -1;
+ }
+
+ return 0;
+}
+
+static int
+ice1712_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
+
+{
+ int idx;
+ ice1712_t *h = (ice1712_t *) hw->private_hw;
+
+ for (idx = 0; idx < 10; idx++) {
+ if (h->active_channels & (1<<idx)) {
+ ice1712_hw_monitor_toggle (hw, idx, mask & (1<<idx) ? 1 : 0);
+ }
+ }
+ hw->input_monitor_mask = mask;
+
+ return 0;
+}
+
+static int
+ice1712_change_sample_clock (jack_hardware_t *hw, SampleClockMode mode)
+
+{
+ return -1;
+}
+
+static void
+ice1712_release (jack_hardware_t *hw)
+{
+ ice1712_t *h = (ice1712_t *) hw->private_hw;
+
+ if (h == 0)
+ return;
+
+ if (h->eeprom)
+ free(h->eeprom);
+
+ free(h);
+}
+
+
+jack_hardware_t *
+jack_alsa_ice1712_hw_new (alsa_driver_t *driver)
+
+{
+ jack_hardware_t *hw;
+ ice1712_t *h;
+ snd_ctl_elem_value_t *val;
+ int err;
+
+ hw = (jack_hardware_t *) malloc (sizeof (jack_hardware_t));
+
+ hw->capabilities = Cap_HardwareMonitoring;
+ hw->input_monitor_mask = 0;
+ hw->private_hw = 0;
+
+ hw->set_input_monitor_mask = ice1712_set_input_monitor_mask;
+ hw->change_sample_clock = ice1712_change_sample_clock;
+ hw->release = ice1712_release;
+
+ h = (ice1712_t *) malloc (sizeof (ice1712_t));
+
+ h->driver = driver;
+
+ /* Get the EEPROM (adopted from envy24control) */
+ h->eeprom = (ice1712_eeprom_t *) malloc (sizeof (ice1712_eeprom_t));
+ snd_ctl_elem_value_alloca (&val);
+ snd_ctl_elem_value_set_interface (val, SND_CTL_ELEM_IFACE_CARD);
+ snd_ctl_elem_value_set_name (val, "ICE1712 EEPROM");
+ if ((err = snd_ctl_elem_read (driver->ctl_handle, val)) < 0) {
+ jack_error( "ALSA/ICE1712: Unable to read EEPROM contents (%s)\n", snd_strerror (err));
+ /* Recover? */
+ }
+ memcpy(h->eeprom, snd_ctl_elem_value_get_bytes(val), 32);
+
+ /* determine number of pro ADC's. We're asumming that there is at least one stereo pair.
+ Should check this first, but how? */
+ switch((h->eeprom->codec & 0xCU) >> 2) {
+ case 0:
+ h->active_channels = 0x3U;
+ break;
+ case 1:
+ h->active_channels = 0xfU;
+ break;
+ case 2:
+ h->active_channels = 0x3fU;
+ break;
+ case 3:
+ h->active_channels = 0xffU;
+ break;
+ }
+ /* check for SPDIF In's */
+ if (h->eeprom->spdif & 0x1U) {
+ h->active_channels |= 0x300U;
+ }
+
+ hw->private_hw = h;
+
+ return hw;
+}
diff --git a/linux/alsa/ice1712.h b/linux/alsa/ice1712.h
new file mode 100644
index 00000000..e32804e1
--- /dev/null
+++ b/linux/alsa/ice1712.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2002 Anthony Van Groningen
+
+ Parts based on source code taken from the
+ "Env24 chipset (ICE1712) control utility" that is
+
+ Copyright (C) 2000 by Jaroslav Kysela <perex@suse.cz>
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __jack_ice1712_h__
+#define __jack_ice1712_h__
+
+#define ICE1712_SUBDEVICE_DELTA44 0x121433d6
+#define ICE1712_SUBDEVICE_DELTA66 0x121432d6
+#define ICE1712_SUBDEVICE_DELTA1010 0x121430d6
+#define ICE1712_SUBDEVICE_DELTADIO2496 0x121431d6
+#define ICE1712_SUBDEVICE_AUDIOPHILE 0x121434d6
+
+#define SPDIF_PLAYBACK_ROUTE_NAME "IEC958 Playback Route"
+#define ANALOG_PLAYBACK_ROUTE_NAME "H/W Playback Route"
+#define MULTITRACK_PEAK_NAME "Multi Track Peak"
+
+typedef struct
+{
+ unsigned int subvendor; /* PCI[2c-2f] */
+ unsigned char size; /* size of EEPROM image in bytes */
+ unsigned char version; /* must be 1 */
+ unsigned char codec; /* codec configuration PCI[60] */
+ unsigned char aclink; /* ACLink configuration PCI[61] */
+ unsigned char i2sID; /* PCI[62] */
+ unsigned char spdif; /* S/PDIF configuration PCI[63] */
+ unsigned char gpiomask; /* GPIO initial mask, 0 = write, 1 = don't */
+ unsigned char gpiostate; /* GPIO initial state */
+ unsigned char gpiodir; /* GPIO direction state */
+ unsigned short ac97main;
+ unsigned short ac97pcm;
+ unsigned short ac97rec;
+ unsigned char ac97recsrc;
+ unsigned char dacID[4]; /* I2S IDs for DACs */
+ unsigned char adcID[4]; /* I2S IDs for ADCs */
+ unsigned char extra[4];
+}
+ice1712_eeprom_t;
+
+typedef struct
+{
+ alsa_driver_t *driver;
+ ice1712_eeprom_t *eeprom;
+ unsigned long active_channels;
+}
+ice1712_t;
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_hardware_t *jack_alsa_ice1712_hw_new (alsa_driver_t *driver);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __jack_ice1712_h__*/
diff --git a/linux/alsa/jslist.h b/linux/alsa/jslist.h
new file mode 100644
index 00000000..9b547fc0
--- /dev/null
+++ b/linux/alsa/jslist.h
@@ -0,0 +1,286 @@
+/*
+ Based on gslist.c from glib-1.2.9 (LGPL).
+
+ Adaption to JACK, Copyright (C) 2002 Kai Vehmanen.
+ - replaced use of gtypes with normal ANSI C types
+ - glib's memery allocation routines replaced with
+ malloc/free calls
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: jslist.h,v 1.2 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_jslist_h__
+#define __jack_jslist_h__
+
+#include <stdlib.h>
+
+typedef struct _JSList JSList;
+
+typedef int (*JCompareFunc) (void* a,
+ void* b);
+struct _JSList
+{
+ void *data;
+ JSList *next;
+};
+
+static __inline__
+JSList*
+jack_slist_alloc (void)
+{
+ JSList *new_list;
+
+ new_list = (JSList*)malloc(sizeof(JSList));
+ new_list->data = NULL;
+ new_list->next = NULL;
+
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_prepend (JSList *list,
+ void *data)
+{
+ JSList *new_list;
+
+ new_list = (JSList*)malloc(sizeof(JSList));
+ new_list->data = data;
+ new_list->next = list;
+
+ return new_list;
+}
+
+#define jack_slist_next(slist) ((slist) ? (((JSList *)(slist))->next) : NULL)
+static __inline__
+JSList*
+jack_slist_last (JSList *list)
+{
+ if (list) {
+ while (list->next)
+ list = list->next;
+ }
+
+ return list;
+}
+
+static __inline__
+JSList*
+jack_slist_remove_link (JSList *list,
+ JSList *link)
+{
+ JSList *tmp;
+ JSList *prev;
+
+ prev = NULL;
+ tmp = list;
+
+ while (tmp) {
+ if (tmp == link) {
+ if (prev)
+ prev->next = tmp->next;
+ if (list == tmp)
+ list = list->next;
+
+ tmp->next = NULL;
+ break;
+ }
+
+ prev = tmp;
+ tmp = tmp->next;
+ }
+
+ return list;
+}
+
+static __inline__
+void
+jack_slist_free (JSList *list)
+{
+ while (list) {
+ JSList *next = list->next;
+ free(list);
+ list = next;
+ }
+}
+
+static __inline__
+void
+jack_slist_free_1 (JSList *list)
+{
+ if (list) {
+ free(list);
+ }
+}
+
+static __inline__
+JSList*
+jack_slist_remove (JSList *list,
+ void *data)
+{
+ JSList *tmp;
+ JSList *prev;
+
+ prev = NULL;
+ tmp = list;
+
+ while (tmp) {
+ if (tmp->data == data) {
+ if (prev)
+ prev->next = tmp->next;
+ if (list == tmp)
+ list = list->next;
+
+ tmp->next = NULL;
+ jack_slist_free (tmp);
+
+ break;
+ }
+
+ prev = tmp;
+ tmp = tmp->next;
+ }
+
+ return list;
+}
+
+static __inline__
+unsigned int
+jack_slist_length (JSList *list)
+{
+ unsigned int length;
+
+ length = 0;
+ while (list) {
+ length++;
+ list = list->next;
+ }
+
+ return length;
+}
+
+static __inline__
+JSList*
+jack_slist_find (JSList *list,
+ void *data)
+{
+ while (list) {
+ if (list->data == data)
+ break;
+ list = list->next;
+ }
+
+ return list;
+}
+
+static __inline__
+JSList*
+jack_slist_copy (JSList *list)
+{
+ JSList *new_list = NULL;
+
+ if (list) {
+ JSList *last;
+
+ new_list = jack_slist_alloc ();
+ new_list->data = list->data;
+ last = new_list;
+ list = list->next;
+ while (list) {
+ last->next = jack_slist_alloc ();
+ last = last->next;
+ last->data = list->data;
+ list = list->next;
+ }
+ }
+
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_append (JSList *list,
+ void *data)
+{
+ JSList *new_list;
+ JSList *last;
+
+ new_list = jack_slist_alloc ();
+ new_list->data = data;
+
+ if (list) {
+ last = jack_slist_last (list);
+ last->next = new_list;
+
+ return list;
+ } else
+ return new_list;
+}
+
+static __inline__
+JSList*
+jack_slist_sort_merge (JSList *l1,
+ JSList *l2,
+ JCompareFunc compare_func)
+{
+ JSList list, *l;
+
+ l = &list;
+
+ while (l1 && l2) {
+ if (compare_func(l1->data, l2->data) < 0) {
+ l = l->next = l1;
+ l1 = l1->next;
+ } else {
+ l = l->next = l2;
+ l2 = l2->next;
+ }
+ }
+ l->next = l1 ? l1 : l2;
+
+ return list.next;
+}
+
+static __inline__
+JSList*
+jack_slist_sort (JSList *list,
+ JCompareFunc compare_func)
+{
+ JSList *l1, *l2;
+
+ if (!list)
+ return NULL;
+ if (!list->next)
+ return list;
+
+ l1 = list;
+ l2 = list->next;
+
+ while ((l2 = l2->next) != NULL) {
+ if ((l2 = l2->next) == NULL)
+ break;
+ l1 = l1->next;
+ }
+ l2 = l1->next;
+ l1->next = NULL;
+
+ return jack_slist_sort_merge (jack_slist_sort (list, compare_func),
+ jack_slist_sort (l2, compare_func),
+ compare_func);
+}
+
+#endif /* __jack_jslist_h__ */
diff --git a/linux/alsa/memops.c b/linux/alsa/memops.c
new file mode 100644
index 00000000..694df6d2
--- /dev/null
+++ b/linux/alsa/memops.c
@@ -0,0 +1,651 @@
+/*
+ Copyright (C) 2000 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: memops.c,v 1.2 2005/08/29 10:36:28 letz Exp $
+*/
+
+#define _ISOC9X_SOURCE 1
+#define _ISOC99_SOURCE 1
+
+#define __USE_ISOC9X 1
+#define __USE_ISOC99 1
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <memory.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#include "memops.h"
+
+
+#define SAMPLE_MAX_24BIT 8388608.0f
+#define SAMPLE_MAX_16BIT 32768.0f
+
+#define f_round(f) lrintf(f)
+
+/* Linear Congruential noise generator. From the music-dsp list
+ * less random than rand(), but good enough and 10x faster */
+inline unsigned int fast_rand();
+
+inline unsigned int fast_rand() {
+ static unsigned int seed = 22222;
+ seed = (seed * 96314165) + 907633515;
+
+ return seed;
+}
+
+void sample_move_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ long long y;
+
+ while (nsamples--) {
+ y = (long long)(*src * SAMPLE_MAX_24BIT) << 8;
+ if (y > INT_MAX) {
+ *((int *) dst) = INT_MAX;
+ } else if (y < INT_MIN) {
+ *((int *) dst) = INT_MIN;
+ } else {
+ *((int *) dst) = (int)y;
+ }
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dS_s32u24 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip)
+{
+ /* ALERT: signed sign-extension portability !!! */
+
+ while (nsamples--) {
+ *dst = (*((int *) src) >> 8) / SAMPLE_MAX_24BIT;
+ dst++;
+ src += src_skip;
+ }
+}
+
+void sample_move_dither_rect_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ /* ALERT: signed sign-extension portability !!! */
+ jack_default_audio_sample_t x;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * SAMPLE_MAX_16BIT;
+ x -= (float)fast_rand() / (float)INT_MAX;
+ y = (long long)f_round(x);
+ y <<= 16;
+ if (y > INT_MAX) {
+ *((int *) dst) = INT_MAX;
+ } else if (y < INT_MIN) {
+ *((int *) dst) = INT_MIN;
+ } else {
+ *((int *) dst) = (int)y;
+ }
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dither_tri_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ float r;
+ float rm1 = state->rm1;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ x += r - rm1;
+ rm1 = r;
+ y = (long long)f_round(x);
+ y <<= 16;
+
+ if (y > INT_MAX) {
+ *((int *) dst) = INT_MAX;
+ } else if (y < INT_MIN) {
+ *((int *) dst) = INT_MIN;
+ } else {
+ *((int *) dst) = (int)y;
+ }
+
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+}
+
+void sample_move_dither_shaped_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ jack_default_audio_sample_t xe; /* the innput sample - filtered error */
+ jack_default_audio_sample_t xp; /* x' */
+ float r;
+ float rm1 = state->rm1;
+ unsigned int idx = state->idx;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ /* Filter the error with Lipshitz's minimally audible FIR:
+ [2.033 -2.165 1.959 -1.590 0.6149] */
+ xe = x
+ - state->e[idx] * 2.033f
+ + state->e[(idx - 1) & DITHER_BUF_MASK] * 2.165f
+ - state->e[(idx - 2) & DITHER_BUF_MASK] * 1.959f
+ + state->e[(idx - 3) & DITHER_BUF_MASK] * 1.590f
+ - state->e[(idx - 4) & DITHER_BUF_MASK] * 0.6149f;
+ xp = xe + r - rm1;
+ rm1 = r;
+
+ /* This could be some inline asm on x86 */
+ y = (long long)f_round(xp);
+
+ /* Intrinsic z^-1 delay */
+ idx = (idx + 1) & DITHER_BUF_MASK;
+ state->e[idx] = y - xe;
+
+ y <<= 16;
+
+ if (y > INT_MAX) {
+ *((int *) dst) = INT_MAX;
+ } else if (y < INT_MIN) {
+ *((int *) dst) = INT_MIN;
+ } else {
+ *((int *) dst) = y;
+ }
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+ state->idx = idx;
+}
+
+void sample_move_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ long long y;
+
+ while (nsamples--) {
+ y = (long long)(*src * SAMPLE_MAX_24BIT);
+
+ if (y > (INT_MAX >> 8 )) {
+ y = (INT_MAX >> 8);
+ } else if (y < (INT_MIN >> 8 )) {
+ y = (INT_MIN >> 8 );
+ }
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ memcpy (dst, &y, 3);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ memcpy (dst, (char *)&y + 5, 3);
+#endif
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dS_s24 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip)
+{
+ /* ALERT: signed sign-extension portability !!! */
+
+ while (nsamples--) {
+ int x;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ memcpy((char*)&x + 1, src, 3);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ memcpy(&x, src, 3);
+#endif
+ x >>= 8;
+ *dst = x / SAMPLE_MAX_24BIT;
+ dst++;
+ src += src_skip;
+ }
+}
+
+void sample_move_dither_rect_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ /* ALERT: signed sign-extension portability !!! */
+ jack_default_audio_sample_t x;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * SAMPLE_MAX_16BIT;
+ x -= (float)fast_rand() / (float)INT_MAX;
+ y = (long long)f_round(x);
+
+ y <<= 8;
+
+ if (y > (INT_MAX >> 8)) {
+ y = (INT_MAX >> 8);
+ } else if (y < (INT_MIN >> 8)) {
+ y = (INT_MIN >> 8);
+ }
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ memcpy (dst, &y, 3);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ memcpy (dst, (char *)&y + 5, 3);
+#endif
+
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dither_tri_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ float r;
+ float rm1 = state->rm1;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ x += r - rm1;
+ rm1 = r;
+ y = (long long)f_round(x);
+
+ y <<= 8;
+
+ if (y > (INT_MAX >> 8)) {
+ y = (INT_MAX >> 8);
+ } else if (y < (INT_MIN >> 8)) {
+ y = (INT_MIN >> 8);
+ }
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ memcpy (dst, &y, 3);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ memcpy (dst, (char *)&y + 5, 3);
+#endif
+
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+}
+
+void sample_move_dither_shaped_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ jack_default_audio_sample_t xe; /* the innput sample - filtered error */
+ jack_default_audio_sample_t xp; /* x' */
+ float r;
+ float rm1 = state->rm1;
+ unsigned int idx = state->idx;
+ long long y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ /* Filter the error with Lipshitz's minimally audible FIR:
+ [2.033 -2.165 1.959 -1.590 0.6149] */
+ xe = x
+ - state->e[idx] * 2.033f
+ + state->e[(idx - 1) & DITHER_BUF_MASK] * 2.165f
+ - state->e[(idx - 2) & DITHER_BUF_MASK] * 1.959f
+ + state->e[(idx - 3) & DITHER_BUF_MASK] * 1.590f
+ - state->e[(idx - 4) & DITHER_BUF_MASK] * 0.6149f;
+ xp = xe + r - rm1;
+ rm1 = r;
+
+ /* This could be some inline asm on x86 */
+ y = (long long)f_round(xp);
+
+ /* Intrinsic z^-1 delay */
+ idx = (idx + 1) & DITHER_BUF_MASK;
+ state->e[idx] = y - xe;
+
+ y <<= 8;
+
+ if (y > (INT_MAX >> 8)) {
+ y = (INT_MAX >> 8);
+ } else if (y < (INT_MIN >> 8)) {
+ y = (INT_MIN >> 8);
+ }
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ memcpy (dst, &y, 3);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ memcpy (dst, (char *)&y + 5, 3);
+#endif
+
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+ state->idx = idx;
+}
+
+void sample_move_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ int tmp;
+
+ /* ALERT: signed sign-extension portability !!! */
+
+ while (nsamples--) {
+ tmp = f_round(*src * SAMPLE_MAX_16BIT);
+ if (tmp > SHRT_MAX) {
+ *((short *)dst) = SHRT_MAX;
+ } else if (tmp < SHRT_MIN) {
+ *((short *)dst) = SHRT_MIN;
+ } else {
+ *((short *) dst) = (short) tmp;
+ }
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dither_rect_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t val;
+ int tmp;
+
+ while (nsamples--) {
+ val = *src * (float)SAMPLE_MAX_16BIT;
+ val -= (float)fast_rand() / (float)INT_MAX;
+ tmp = f_round(val);
+ if (tmp > SHRT_MAX) {
+ *((short *)dst) = SHRT_MAX;
+ } else if (tmp < SHRT_MIN) {
+ *((short *)dst) = SHRT_MIN;
+ } else {
+ *((short *) dst) = (short)tmp;
+ }
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_move_dither_tri_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ float r;
+ float rm1 = state->rm1;
+ int y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ x += r - rm1;
+ rm1 = r;
+ y = f_round(x);
+
+ if (y > SHRT_MAX) {
+ *((short *)dst) = SHRT_MAX;
+ } else if (y < SHRT_MIN) {
+ *((short *)dst) = SHRT_MIN;
+ } else {
+ *((short *) dst) = (short)y;
+ }
+
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+}
+
+void sample_move_dither_shaped_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ jack_default_audio_sample_t x;
+ jack_default_audio_sample_t xe; /* the innput sample - filtered error */
+ jack_default_audio_sample_t xp; /* x' */
+ float r;
+ float rm1 = state->rm1;
+ unsigned int idx = state->idx;
+ int y;
+
+ while (nsamples--) {
+ x = *src * (float)SAMPLE_MAX_16BIT;
+ r = 2.0f * (float)fast_rand() / (float)INT_MAX - 1.0f;
+ /* Filter the error with Lipshitz's minimally audible FIR:
+ [2.033 -2.165 1.959 -1.590 0.6149] */
+ xe = x
+ - state->e[idx] * 2.033f
+ + state->e[(idx - 1) & DITHER_BUF_MASK] * 2.165f
+ - state->e[(idx - 2) & DITHER_BUF_MASK] * 1.959f
+ + state->e[(idx - 3) & DITHER_BUF_MASK] * 1.590f
+ - state->e[(idx - 4) & DITHER_BUF_MASK] * 0.6149f;
+ xp = xe + r - rm1;
+ rm1 = r;
+
+ /* This could be some inline asm on x86 */
+ y = f_round(xp);
+
+ /* Intrinsic z^-1 delay */
+ idx = (idx + 1) & DITHER_BUF_MASK;
+ state->e[idx] = y - xe;
+
+ if (y > SHRT_MAX) {
+ *((short *)dst) = SHRT_MAX;
+ } else if (y < SHRT_MIN) {
+ *((short *)dst) = SHRT_MIN;
+ } else {
+ *((short *) dst) = (short)y;
+ }
+ dst += dst_skip;
+ src++;
+ }
+ state->rm1 = rm1;
+ state->idx = idx;
+}
+
+void sample_move_dS_s16 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip)
+
+{
+ /* ALERT: signed sign-extension portability !!! */
+ while (nsamples--) {
+ *dst = (*((short *) src)) / SAMPLE_MAX_16BIT;
+ dst++;
+ src += src_skip;
+ }
+}
+
+void sample_merge_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+{
+ short val;
+
+ /* ALERT: signed sign-extension portability !!! */
+
+ while (nsamples--) {
+ val = (short) (*src * SAMPLE_MAX_16BIT);
+
+ if (val > SHRT_MAX - *((short *) dst)) {
+ *((short *)dst) = SHRT_MAX;
+ } else if (val < SHRT_MIN - *((short *) dst)) {
+ *((short *)dst) = SHRT_MIN;
+ } else {
+ *((short *) dst) += val;
+ }
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void sample_merge_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state)
+
+{
+ /* ALERT: signed sign-extension portability !!! */
+
+ while (nsamples--) {
+ *((int *) dst) += (((int) (*src * SAMPLE_MAX_24BIT)) << 8);
+ dst += dst_skip;
+ src++;
+ }
+}
+
+void memset_interleave (char *dst, char val, unsigned long bytes,
+ unsigned long unit_bytes,
+ unsigned long skip_bytes)
+{
+ switch (unit_bytes) {
+ case 1:
+ while (bytes--) {
+ *dst = val;
+ dst += skip_bytes;
+ }
+ break;
+ case 2:
+ while (bytes) {
+ *((short *) dst) = (short) val;
+ dst += skip_bytes;
+ bytes -= 2;
+ }
+ break;
+ case 4:
+ while (bytes) {
+ *((int *) dst) = (int) val;
+ dst += skip_bytes;
+ bytes -= 4;
+ }
+ break;
+ default:
+ while (bytes) {
+ memset(dst, val, unit_bytes);
+ dst += skip_bytes;
+ bytes -= unit_bytes;
+ }
+ break;
+ }
+}
+
+/* COPY FUNCTIONS: used to move data from an input channel to an
+ output channel. Note that we assume that the skip distance
+ is the same for both channels. This is completely fine
+ unless the input and output were on different audio interfaces that
+ were interleaved differently. We don't try to handle that.
+*/
+
+void
+memcpy_fake (char *dst, char *src, unsigned long src_bytes, unsigned long foo, unsigned long bar)
+{
+ memcpy (dst, src, src_bytes);
+}
+
+void
+merge_memcpy_d16_s16 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+{
+ while (src_bytes) {
+ *((short *) dst) += *((short *) src);
+ dst += 2;
+ src += 2;
+ src_bytes -= 2;
+ }
+}
+
+void
+merge_memcpy_d32_s32 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+
+{
+ while (src_bytes) {
+ *((int *) dst) += *((int *) src);
+ dst += 4;
+ src += 4;
+ src_bytes -= 4;
+ }
+}
+
+void
+merge_memcpy_interleave_d16_s16 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+
+{
+ while (src_bytes) {
+ *((short *) dst) += *((short *) src);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 2;
+ }
+}
+
+void
+merge_memcpy_interleave_d32_s32 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+{
+ while (src_bytes) {
+ *((int *) dst) += *((int *) src);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 4;
+ }
+}
+
+void
+merge_memcpy_interleave_d24_s24 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+{
+ while (src_bytes) {
+ int acc = (*(int *)dst & 0xFFFFFF) + (*(int *)src & 0xFFFFFF);
+ memcpy(dst, &acc, 3);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 3;
+ }
+}
+
+void
+memcpy_interleave_d16_s16 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+{
+ while (src_bytes) {
+ *((short *) dst) = *((short *) src);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 2;
+ }
+}
+
+void
+memcpy_interleave_d24_s24 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+
+{
+ while (src_bytes) {
+ memcpy(dst, src, 3);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 3;
+ }
+}
+
+void
+memcpy_interleave_d32_s32 (char *dst, char *src, unsigned long src_bytes,
+ unsigned long dst_skip_bytes, unsigned long src_skip_bytes)
+
+{
+ while (src_bytes) {
+ *((int *) dst) = *((int *) src);
+ dst += dst_skip_bytes;
+ src += src_skip_bytes;
+ src_bytes -= 4;
+ }
+}
diff --git a/linux/alsa/memops.h b/linux/alsa/memops.h
new file mode 100644
index 00000000..d10903c6
--- /dev/null
+++ b/linux/alsa/memops.h
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 1999-2000 Paul Davis
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: memops.h,v 1.3 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_memops_h__
+#define __jack_memops_h__
+
+#include "types.h"
+
+typedef enum {
+ None,
+ Rectangular,
+ Triangular,
+ Shaped
+} DitherAlgorithm;
+
+#define DITHER_BUF_SIZE 8
+#define DITHER_BUF_MASK 7
+
+typedef struct
+{
+ unsigned int depth;
+ float rm1;
+ unsigned int idx;
+ float e[DITHER_BUF_SIZE];
+}
+dither_state_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ void sample_move_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+
+ void sample_move_dither_rect_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_tri_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_shaped_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_rect_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_tri_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_shaped_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_rect_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_tri_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_move_dither_shaped_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+
+ void sample_move_dS_s32u24 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip);
+ void sample_move_dS_s24 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip);
+ void sample_move_dS_s16 (jack_default_audio_sample_t *dst, char *src, unsigned long nsamples, unsigned long src_skip);
+
+ void sample_merge_d16_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+ void sample_merge_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state);
+
+ static __inline__ void
+ sample_merge (jack_default_audio_sample_t *dst, jack_default_audio_sample_t *src, unsigned long cnt)
+ {
+ while (cnt--) {
+ *dst += *src;
+ dst++;
+ src++;
+ }
+ }
+
+ static __inline__ void
+ sample_memcpy (jack_default_audio_sample_t *dst, jack_default_audio_sample_t *src, unsigned long cnt)
+ {
+ memcpy (dst, src, cnt * sizeof (jack_default_audio_sample_t));
+ }
+
+ void memset_interleave (char *dst, char val, unsigned long bytes, unsigned long unit_bytes, unsigned long skip_bytes);
+ void memcpy_fake (char *dst, char *src, unsigned long src_bytes, unsigned long foo, unsigned long bar);
+
+ void memcpy_interleave_d16_s16 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+ void memcpy_interleave_d24_s24 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+ void memcpy_interleave_d32_s32 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+
+ void merge_memcpy_interleave_d16_s16 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+ void merge_memcpy_interleave_d24_s24 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+ void merge_memcpy_interleave_d32_s32 (char *dst, char *src, unsigned long src_bytes, unsigned long dst_skip_bytes, unsigned long src_skip_bytes);
+
+ void merge_memcpy_d16_s16 (char *dst, char *src, unsigned long src_bytes, unsigned long foo, unsigned long bar);
+ void merge_memcpy_d32_s32 (char *dst, char *src, unsigned long src_bytes, unsigned long foo, unsigned long bar);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __jack_memops_h__ */
diff --git a/linux/alsa/usx2y.c b/linux/alsa/usx2y.c
new file mode 100644
index 00000000..74dd45c4
--- /dev/null
+++ b/linux/alsa/usx2y.c
@@ -0,0 +1,708 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004 Karsten Wiese, Rui Nuno Capela
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: usx2y.c,v 1.2 2005/09/29 14:51:59 letz Exp $
+*/
+
+//#include <jack/hardware.h>
+#include "hardware.h"
+#include "alsa_driver.h"
+#include "usx2y.h"
+
+//#include <jack/internal.h>
+//#include <jack/engine.h>
+#include <jack/messagebuffer.h>
+#include <sys/mman.h>
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
+
+static
+int usx2y_set_input_monitor_mask (jack_hardware_t *hw, unsigned long mask)
+{
+ return -1;
+}
+
+static
+int usx2y_change_sample_clock (jack_hardware_t *hw, SampleClockMode mode)
+{
+ return -1;
+}
+
+static void
+usx2y_release (jack_hardware_t *hw)
+{
+ usx2y_t *h = (usx2y_t *) hw->private;
+
+ if (h == 0)
+ return;
+
+ if (h->hwdep_handle)
+ snd_hwdep_close(h->hwdep_handle);
+
+ free(h);
+}
+
+static int
+usx2y_driver_get_channel_addresses_playback (alsa_driver_t *driver,
+ snd_pcm_uframes_t *playback_avail)
+{
+ channel_t chn;
+ int iso;
+ snd_pcm_uframes_t playback_iso_avail;
+ char *playback;
+
+ usx2y_t *h = (usx2y_t *) driver->hw->private;
+
+ if (0 > h->playback_iso_start) {
+ int bytes = driver->playback_sample_bytes * 2 * driver->frames_per_cycle *
+ driver->user_nperiods;
+ iso = h->hwdep_pcm_shm->playback_iso_start;
+ if (0 > iso)
+ return 0; /* FIXME: return -1; */
+ if (++iso >= ARRAY_SIZE(h->hwdep_pcm_shm->captured_iso))
+ iso = 0;
+ while((bytes -= h->hwdep_pcm_shm->captured_iso[iso].length) > 0)
+ if (++iso >= ARRAY_SIZE(h->hwdep_pcm_shm->captured_iso))
+ iso = 0;
+ h->playback_iso_bytes_done = h->hwdep_pcm_shm->captured_iso[iso].length + bytes;
+#ifdef DBGHWDEP
+ dbg_offset = sprintf(dbg_buffer, "first iso = %i %i@%p:%i\n",
+ iso, h->hwdep_pcm_shm->captured_iso[iso].length,
+ h->hwdep_pcm_shm->playback,
+ h->hwdep_pcm_shm->captured_iso[iso].offset);
+#endif
+ } else {
+ iso = h->playback_iso_start;
+ }
+#ifdef DBGHWDEP
+ dbg_offset += sprintf(dbg_buffer + dbg_offset, "iso = %i(%i;%i); ", iso,
+ h->hwdep_pcm_shm->captured_iso[iso].offset,
+ h->hwdep_pcm_shm->captured_iso[iso].frame);
+#endif
+ playback = h->hwdep_pcm_shm->playback +
+ h->hwdep_pcm_shm->captured_iso[iso].offset +
+ h->playback_iso_bytes_done;
+ playback_iso_avail = (h->hwdep_pcm_shm->captured_iso[iso].length -
+ h->playback_iso_bytes_done) /
+ (driver->playback_sample_bytes * 2);
+ if (*playback_avail >= playback_iso_avail) {
+ *playback_avail = playback_iso_avail;
+ if (++iso >= ARRAY_SIZE(h->hwdep_pcm_shm->captured_iso))
+ iso = 0;
+ h->playback_iso_bytes_done = 0;
+ } else
+ h->playback_iso_bytes_done =
+ *playback_avail * (driver->playback_sample_bytes * 2);
+ h->playback_iso_start = iso;
+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
+ const snd_pcm_channel_area_t *a = &driver->playback_areas[chn];
+ driver->playback_addr[chn] = playback + a->first / 8;
+ }
+#ifdef DBGHWDEP
+ if (dbg_offset < (sizeof(dbg_buffer) - 256))
+ dbg_offset += sprintf(dbg_buffer + dbg_offset, "avail %li@%p\n", *playback_avail, driver->playback_addr[0]);
+ else {
+ jack_error(dbg_buffer);
+ return -1;
+ }
+#endif
+
+ return 0;
+}
+
+static int
+usx2y_driver_get_channel_addresses_capture (alsa_driver_t *driver,
+ snd_pcm_uframes_t *capture_avail)
+{
+ channel_t chn;
+ int iso;
+ snd_pcm_uframes_t capture_iso_avail;
+ int capture_offset;
+
+ usx2y_t *h = (usx2y_t *) driver->hw->private;
+
+ if (0 > h->capture_iso_start) {
+ iso = h->hwdep_pcm_shm->capture_iso_start;
+ if (0 > iso)
+ return 0; /* FIXME: return -1; */
+ h->capture_iso_bytes_done = 0;
+#ifdef DBGHWDEP
+ dbg_offset = sprintf(dbg_buffer, "first iso = %i %i@%p:%i\n",
+ iso, h->hwdep_pcm_shm->captured_iso[iso].length,
+ h->hwdep_pcm_shm->capture0x8,
+ h->hwdep_pcm_shm->captured_iso[iso].offset);
+#endif
+ } else {
+ iso = h->capture_iso_start;
+ }
+#ifdef DBGHWDEP
+ dbg_offset += sprintf(dbg_buffer + dbg_offset, "iso = %i(%i;%i); ", iso,
+ h->hwdep_pcm_shm->captured_iso[iso].offset,
+ h->hwdep_pcm_shm->captured_iso[iso].frame);
+#endif
+ capture_offset =
+ h->hwdep_pcm_shm->captured_iso[iso].offset +
+ h->capture_iso_bytes_done;
+ capture_iso_avail = (h->hwdep_pcm_shm->captured_iso[iso].length -
+ h->capture_iso_bytes_done) /
+ (driver->capture_sample_bytes * 2);
+ if (*capture_avail >= capture_iso_avail) {
+ *capture_avail = capture_iso_avail;
+ if (++iso >= ARRAY_SIZE(h->hwdep_pcm_shm->captured_iso))
+ iso = 0;
+ h->capture_iso_bytes_done = 0;
+ } else
+ h->capture_iso_bytes_done =
+ *capture_avail * (driver->capture_sample_bytes * 2);
+ h->capture_iso_start = iso;
+ for (chn = 0; chn < driver->capture_nchannels; chn++) {
+ driver->capture_addr[chn] =
+ (chn < 2 ? h->hwdep_pcm_shm->capture0x8 : h->hwdep_pcm_shm->capture0xA)
+ + capture_offset +
+ ((chn & 1) ? driver->capture_sample_bytes : 0);
+ }
+#ifdef DBGHWDEP
+ if (dbg_offset < (sizeof(dbg_buffer) - 256))
+ dbg_offset += sprintf(dbg_buffer + dbg_offset, "avail %li@%p\n", *capture_avail, driver->capture_addr[0]);
+ else {
+ jack_error(dbg_buffer);
+ return -1;
+ }
+#endif
+
+ return 0;
+}
+
+static int
+usx2y_driver_start (alsa_driver_t *driver)
+{
+ int err;
+ snd_pcm_uframes_t poffset, pavail;
+
+ usx2y_t *h = (usx2y_t *) driver->hw->private;
+
+ driver->poll_last = 0;
+ driver->poll_next = 0;
+
+ if ((err = snd_pcm_prepare (driver->playback_handle)) < 0) {
+ jack_error ("ALSA/USX2Y: prepare error for playback: %s", snd_strerror(err));
+ return -1;
+ }
+
+ if (driver->playback_handle) {
+/* int i, j; */
+/* char buffer[2000]; */
+ h->playback_iso_start =
+ h->capture_iso_start = -1;
+ snd_hwdep_poll_descriptors(h->hwdep_handle, &h->pfds, 1);
+ h->hwdep_pcm_shm = (snd_usX2Y_hwdep_pcm_shm_t*)
+ mmap(NULL, sizeof(snd_usX2Y_hwdep_pcm_shm_t),
+ PROT_READ,
+ MAP_SHARED, h->pfds.fd,
+ 0);
+ if (MAP_FAILED == h->hwdep_pcm_shm) {
+ perror("ALSA/USX2Y: mmap");
+ return -1;
+ }
+ if (mprotect(h->hwdep_pcm_shm->playback,
+ sizeof(h->hwdep_pcm_shm->playback),
+ PROT_READ|PROT_WRITE)) {
+ perror("ALSA/USX2Y: mprotect");
+ return -1;
+ }
+ memset(h->hwdep_pcm_shm->playback, 0, sizeof(h->hwdep_pcm_shm->playback));
+/* for (i = 0, j = 0; i < 2000;) { */
+/* j += sprintf(buffer + j, "%04hX ", */
+/* *(unsigned short*)(h->hwdep_pcm_shm->capture + i)); */
+/* if (((i += 2) % 32) == 0) { */
+/* jack_error(buffer); */
+/* j = 0; */
+/* } */
+/* } */
+ }
+
+ if (driver->hw_monitoring) {
+ driver->hw->set_input_monitor_mask (driver->hw,
+ driver->input_monitor_mask);
+ }
+
+ if (driver->playback_handle) {
+ /* fill playback buffer with zeroes, and mark
+ all fragments as having data.
+ */
+
+ pavail = snd_pcm_avail_update (driver->playback_handle);
+
+ if (pavail != driver->frames_per_cycle * driver->playback_nperiods) {
+ jack_error ("ALSA/USX2Y: full buffer not available at start");
+ return -1;
+ }
+
+ if (snd_pcm_mmap_begin(
+ driver->playback_handle,
+ &driver->playback_areas,
+ &poffset, &pavail) < 0) {
+ return -1;
+ }
+
+ /* XXX this is cheating. ALSA offers no guarantee that
+ we can access the entire buffer at any one time. It
+ works on most hardware tested so far, however, buts
+ its a liability in the long run. I think that
+ alsa-lib may have a better function for doing this
+ here, where the goal is to silence the entire
+ buffer.
+ */
+ {
+/* snd_pcm_uframes_t frag, nframes = driver->buffer_frames; */
+/* while (nframes) { */
+/* frag = nframes; */
+/* if (usx2y_driver_get_channel_addresses_playback(driver, &frag) < 0) */
+/* return -1; */
+
+/* for (chn = 0; chn < driver->playback_nchannels; chn++) */
+/* alsa_driver_silence_on_channel (driver, chn, frag); */
+/* nframes -= frag; */
+/* } */
+ }
+
+ snd_pcm_mmap_commit (driver->playback_handle, poffset,
+ driver->user_nperiods * driver->frames_per_cycle);
+
+ if ((err = snd_pcm_start (driver->playback_handle)) < 0) {
+ jack_error ("ALSA/USX2Y: could not start playback (%s)",
+ snd_strerror (err));
+ return -1;
+ }
+ }
+
+ if (driver->hw_monitoring &&
+ (driver->input_monitor_mask || driver->all_monitor_in)) {
+ if (driver->all_monitor_in) {
+ driver->hw->set_input_monitor_mask (driver->hw, ~0U);
+ } else {
+ driver->hw->set_input_monitor_mask (
+ driver->hw, driver->input_monitor_mask);
+ }
+ }
+
+ driver->playback_nfds = snd_pcm_poll_descriptors_count (driver->playback_handle);
+ driver->capture_nfds = snd_pcm_poll_descriptors_count (driver->capture_handle);
+
+ if (driver->pfd) {
+ free (driver->pfd);
+ }
+
+ driver->pfd = (struct pollfd *)
+ malloc (sizeof (struct pollfd) *
+ (driver->playback_nfds + driver->capture_nfds + 2));
+
+ return 0;
+}
+
+static int
+usx2y_driver_stop (alsa_driver_t *driver)
+{
+ int err;
+ JSList* node;
+ int chn;
+
+ usx2y_t *h = (usx2y_t *) driver->hw->private;
+
+ /* silence all capture port buffers, because we might
+ be entering offline mode.
+ */
+
+ for (chn = 0, node = driver->capture_ports; node;
+ node = jack_slist_next (node), chn++) {
+
+ jack_port_t* port;
+ char* buf;
+ jack_nframes_t nframes = driver->engine->control->buffer_size;
+
+ port = (jack_port_t *) node->data;
+ buf = jack_port_get_buffer (port, nframes);
+ memset (buf, 0, sizeof (jack_default_audio_sample_t) * nframes);
+ }
+
+ if (driver->playback_handle) {
+ if ((err = snd_pcm_drop (driver->playback_handle)) < 0) {
+ jack_error ("ALSA/USX2Y: channel flush for playback "
+ "failed (%s)", snd_strerror (err));
+ return -1;
+ }
+ }
+
+ if (driver->hw_monitoring) {
+ driver->hw->set_input_monitor_mask (driver->hw, 0);
+ }
+
+ munmap(h->hwdep_pcm_shm, sizeof(snd_usX2Y_hwdep_pcm_shm_t));
+
+ return 0;
+}
+
+static int
+usx2y_driver_null_cycle (alsa_driver_t* driver, jack_nframes_t nframes)
+{
+ jack_nframes_t nf;
+ snd_pcm_uframes_t offset;
+ snd_pcm_uframes_t contiguous, contiguous_;
+ int chn;
+
+ VERBOSE(driver->engine,
+ "usx2y_driver_null_cycle (%p, %i)\n", driver, nframes);
+
+ if (driver->capture_handle) {
+ nf = nframes;
+ offset = 0;
+ while (nf) {
+
+ contiguous = (nf > driver->frames_per_cycle) ?
+ driver->frames_per_cycle : nf;
+
+ if (snd_pcm_mmap_begin (
+ driver->capture_handle,
+ &driver->capture_areas,
+ (snd_pcm_uframes_t *) &offset,
+ (snd_pcm_uframes_t *) &contiguous)) {
+ return -1;
+ }
+ contiguous_ = contiguous;
+ while (contiguous_) {
+ snd_pcm_uframes_t frag = contiguous_;
+ if (usx2y_driver_get_channel_addresses_capture(driver, &frag) < 0)
+ return -1;
+ contiguous_ -= frag;
+ }
+
+ if (snd_pcm_mmap_commit (driver->capture_handle,
+ offset, contiguous) < 0) {
+ return -1;
+ }
+
+ nf -= contiguous;
+ }
+ }
+
+ if (driver->playback_handle) {
+ nf = nframes;
+ offset = 0;
+ while (nf) {
+ contiguous = (nf > driver->frames_per_cycle) ?
+ driver->frames_per_cycle : nf;
+
+ if (snd_pcm_mmap_begin (
+ driver->playback_handle,
+ &driver->playback_areas,
+ (snd_pcm_uframes_t *) &offset,
+ (snd_pcm_uframes_t *) &contiguous)) {
+ return -1;
+ }
+
+ {
+ snd_pcm_uframes_t frag, nframes = contiguous;
+ while (nframes) {
+ frag = nframes;
+ if (usx2y_driver_get_channel_addresses_playback(driver, &frag) < 0)
+ return -1;
+ for (chn = 0; chn < driver->playback_nchannels; chn++)
+ alsa_driver_silence_on_channel (driver, chn, frag);
+ nframes -= frag;
+ }
+ }
+
+ if (snd_pcm_mmap_commit (driver->playback_handle,
+ offset, contiguous) < 0) {
+ return -1;
+ }
+
+ nf -= contiguous;
+ }
+ }
+
+ return 0;
+}
+
+static int
+usx2y_driver_read (alsa_driver_t *driver, jack_nframes_t nframes)
+{
+ snd_pcm_sframes_t contiguous;
+ snd_pcm_sframes_t nread;
+ snd_pcm_sframes_t offset;
+ jack_default_audio_sample_t* buf[4];
+ channel_t chn;
+ JSList *node;
+ jack_port_t* port;
+ int err;
+ snd_pcm_uframes_t nframes_ = nframes;
+
+ if (!driver->capture_handle || driver->engine->freewheeling) {
+ return 0;
+ }
+
+ nread = 0;
+ contiguous = 0;
+
+ while (nframes) {
+
+ contiguous = (nframes > driver->frames_per_cycle) ?
+ driver->frames_per_cycle : nframes;
+
+ if (snd_pcm_mmap_begin (
+ driver->capture_handle, &driver->capture_areas,
+ (snd_pcm_uframes_t *) &offset,
+ (snd_pcm_uframes_t *) &nframes_) < 0) {
+ jack_error ("ALSA/USX2Y: %s: mmap areas info error",
+ driver->alsa_name_capture);
+ return -1;
+ }
+
+ for (chn = 0, node = driver->capture_ports;
+ node && chn < 4;
+ node = jack_slist_next (node), chn++) {
+ port = (jack_port_t *) node->data;
+ if (!jack_port_connected (port)) {
+ continue;
+ }
+ buf[chn] = jack_port_get_buffer (port, nframes_);
+ }
+
+ while (nframes) {
+ contiguous = nframes;
+ if (usx2y_driver_get_channel_addresses_capture (
+ driver, &contiguous) < 0) {
+ return -1;
+ }
+ for (chn = 0, node = driver->capture_ports;
+ node && chn < 4;
+ node = jack_slist_next (node), chn++) {
+ port = (jack_port_t *) node->data;
+ if (!jack_port_connected (port)) {
+ /* no-copy optimization */
+ continue;
+ }
+ alsa_driver_read_from_channel (driver, chn,
+ buf[chn] + nread, contiguous);
+ }
+ nread += contiguous;
+ nframes -= contiguous;
+ }
+
+ if ((err = snd_pcm_mmap_commit (driver->capture_handle,
+ offset, nframes_)) < 0) {
+ jack_error ("ALSA/USX2Y: could not complete read of %"
+ PRIu32 " frames: error = %d", nframes_, err);
+ return -1;
+ }
+
+// nframes -= contiguous;
+ }
+
+ return 0;
+}
+
+static int
+usx2y_driver_write (alsa_driver_t* driver, jack_nframes_t nframes)
+{
+ channel_t chn;
+ JSList *node;
+ jack_default_audio_sample_t* buf[2];
+ snd_pcm_sframes_t nwritten;
+ snd_pcm_sframes_t contiguous;
+ snd_pcm_sframes_t offset;
+ jack_port_t *port;
+ int err;
+ int dbg_loops = 1;
+ snd_pcm_uframes_t nframes_ = nframes;
+
+ driver->process_count++;
+
+ if (!driver->playback_handle || driver->engine->freewheeling) {
+ return 0;
+ }
+
+ nwritten = 0;
+ contiguous = 0;
+
+ /* check current input monitor request status */
+
+ driver->input_monitor_mask = 0;
+
+ for (chn = 0, node = driver->capture_ports; node;
+ node = jack_slist_next (node), chn++) {
+ if (((jack_port_t *) node->data)->shared->monitor_requests) {
+ driver->input_monitor_mask |= (1<<chn);
+ }
+ }
+
+ if (driver->hw_monitoring) {
+ if ((driver->hw->input_monitor_mask
+ != driver->input_monitor_mask)
+ && !driver->all_monitor_in) {
+ driver->hw->set_input_monitor_mask (
+ driver->hw, driver->input_monitor_mask);
+ }
+ }
+
+ while (nframes) {
+
+ if (--dbg_loops)
+ return dbg_loops;
+
+ contiguous = (nframes > driver->frames_per_cycle) ?
+ driver->frames_per_cycle : nframes;
+
+ if (snd_pcm_mmap_begin(
+ driver->playback_handle, &driver->playback_areas,
+ &offset, &nframes_) < 0) {
+ jack_error ("ALSA/USX2Y: %s: mmap areas info error",
+ driver->alsa_name_capture);
+ return -1;
+ }
+
+ for (chn = 0, node = driver->playback_ports;
+ node && chn < 2;
+ node = jack_slist_next (node), chn++) {
+ port = (jack_port_t *) node->data;
+ if (!jack_port_connected (port)) {
+ continue;
+ }
+ buf[chn] = jack_port_get_buffer (port, nframes_);
+ }
+
+ while (nframes) {
+ contiguous = nframes;
+ if (usx2y_driver_get_channel_addresses_playback (
+ driver, &contiguous) < 0) {
+ return -1;
+ }
+ for (chn = 0, node = driver->playback_ports;
+ node && chn < 2;
+ node = jack_slist_next (node), chn++) {
+ port = (jack_port_t *) node->data;
+ if (!jack_port_connected (port)) {
+ continue;
+ }
+ alsa_driver_write_to_channel (driver, chn,
+ buf[chn] + nwritten,
+ contiguous);
+ }
+ nwritten += contiguous;
+ if (driver->channels_not_done) {
+ alsa_driver_silence_untouched_channels (driver,
+ contiguous);
+ }
+ nframes -= contiguous;
+ }
+
+ if ((err = snd_pcm_mmap_commit (driver->playback_handle,
+ offset, nframes_)) < 0) {
+ jack_error ("ALSA/USX2Y: could not complete playback of %"
+ PRIu32 " frames: error = %d", nframes_, err);
+ if (err != EPIPE && err != ESTRPIPE)
+ return -1;
+ }
+// nframes -= contiguous;
+ }
+
+/* { */
+/* usx2y_t *h = (usx2y_t *) driver->hw->private; */
+/* unsigned *pu = (unsigned *)h->hwdep_pcm_shm->playback; */
+/* int i = sizeof(h->hwdep_pcm_shm->playback) / sizeof(*pu); */
+
+/* while (i) { */
+/* if (*(pu)) { */
+/* jack_error("%p;error %u(=0x%X)@%p", */
+/* h->hwdep_pcm_shm->playback, */
+/* *pu, *pu, pu); */
+/* return -1; */
+/* } */
+/* --i; */
+/* ++pu; */
+/* } */
+/* } */
+
+ return 0;
+}
+
+static void
+usx2y_driver_setup (alsa_driver_t *driver)
+{
+ driver->nt_start = (JackDriverNTStartFunction) usx2y_driver_start;
+ driver->nt_stop = (JackDriverNTStopFunction) usx2y_driver_stop;
+ driver->read = (JackDriverReadFunction) usx2y_driver_read;
+ driver->write = (JackDriverReadFunction) usx2y_driver_write;
+ driver->null_cycle =
+ (JackDriverNullCycleFunction) usx2y_driver_null_cycle;
+}
+
+
+jack_hardware_t *
+jack_alsa_usx2y_hw_new (alsa_driver_t *driver)
+{
+ jack_hardware_t *hw;
+ usx2y_t *h;
+
+ int hwdep_cardno;
+ int hwdep_devno;
+ char *hwdep_colon;
+ char hwdep_name[9];
+ snd_hwdep_t *hwdep_handle;
+
+ hw = (jack_hardware_t *) malloc (sizeof (jack_hardware_t));
+
+ hw->capabilities = 0;
+ hw->input_monitor_mask = 0;
+ hw->private = 0;
+
+ hw->set_input_monitor_mask = usx2y_set_input_monitor_mask;
+ hw->change_sample_clock = usx2y_change_sample_clock;
+ hw->release = usx2y_release;
+
+ /* Derive the special USB US-X2Y hwdep pcm device name from
+ * the playback one, thus allowing the use of the "rawusb"
+ * experimental stuff if, and only if, the "hw:n,2" device
+ * name is specified. Otherwise, fallback to generic backend.
+ */
+ hwdep_handle = NULL;
+ hwdep_cardno = hwdep_devno = 0;
+ if ((hwdep_colon = strrchr(driver->alsa_name_playback, ':')) != NULL)
+ sscanf(hwdep_colon, ":%d,%d", &hwdep_cardno, &hwdep_devno);
+ if (hwdep_devno == 2) {
+ snprintf(hwdep_name, sizeof(hwdep_name), "hw:%d,1", hwdep_cardno);
+ if (snd_hwdep_open (&hwdep_handle, hwdep_name, O_RDWR) < 0) {
+ jack_error ("ALSA/USX2Y: Cannot open hwdep device \"%s\"", hwdep_name);
+ } else {
+ /* Allocate specific USX2Y hwdep pcm struct. */
+ h = (usx2y_t *) malloc (sizeof (usx2y_t));
+ h->driver = driver;
+ h->hwdep_handle = hwdep_handle;
+ hw->private = h;
+ /* Set our own operational function pointers. */
+ usx2y_driver_setup(driver);
+ printf("ALSA/USX2Y: EXPERIMENTAL hwdep pcm device %s"
+ " (aka \"rawusb\")\n", driver->alsa_name_playback);
+ }
+ }
+
+ return hw;
+}
diff --git a/linux/alsa/usx2y.h b/linux/alsa/usx2y.h
new file mode 100644
index 00000000..9fa7594e
--- /dev/null
+++ b/linux/alsa/usx2y.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001 Paul Davis
+ Copyright (C) 2004 Karsten Wiese, Rui Nuno Capela
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: usx2y.h,v 1.2 2005/11/23 11:24:29 letz Exp $
+*/
+
+#ifndef __jack_usx2y_h__
+#define __jack_usx2y_h__
+
+#define USX2Y_MAXPACK 50
+#define USX2Y_MAXBUFFERMS 100
+#define USX2Y_MAXSTRIDE 3
+
+#define USX2Y_SSS (((USX2Y_MAXPACK * USX2Y_MAXBUFFERMS * USX2Y_MAXSTRIDE + 4096) / 4096) * 4096)
+
+struct snd_usX2Y_hwdep_pcm_shm
+{
+ char playback[USX2Y_SSS];
+ char capture0x8[USX2Y_SSS];
+ char capture0xA[USX2Y_SSS];
+ volatile int playback_iso_head;
+ int playback_iso_start;
+ struct
+ {
+ int frame,
+ offset,
+ length;
+ }
+ captured_iso[128];
+ volatile int captured_iso_head;
+ volatile unsigned captured_iso_frames;
+ int capture_iso_start;
+};
+typedef struct snd_usX2Y_hwdep_pcm_shm snd_usX2Y_hwdep_pcm_shm_t;
+
+typedef struct
+{
+ alsa_driver_t *driver;
+ snd_hwdep_t *hwdep_handle;
+ struct pollfd pfds;
+ struct snd_usX2Y_hwdep_pcm_shm *hwdep_pcm_shm;
+ int playback_iso_start;
+ int playback_iso_bytes_done;
+ int capture_iso_start;
+ int capture_iso_bytes_done;
+}
+usx2y_t;
+
+jack_hardware_t *
+jack_alsa_usx2y_hw_new (alsa_driver_t *driver);
+
+#endif /* __jack_usx2y_h__*/
diff --git a/macosx/Jack-Info.plist b/macosx/Jack-Info.plist
new file mode 100644
index 00000000..901cd072
--- /dev/null
+++ b/macosx/Jack-Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>Jackmp</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Jackdmp 0.5b, @03-05 Paul Davis, Grame</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.grame.Jackmp</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string></string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+</dict>
+</plist>
diff --git a/macosx/JackCoreAudioDriver.cpp b/macosx/JackCoreAudioDriver.cpp
new file mode 100644
index 00000000..4424ed0a
--- /dev/null
+++ b/macosx/JackCoreAudioDriver.cpp
@@ -0,0 +1,1187 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackCoreAudioDriver.h"
+#include "JackEngineControl.h"
+#include "JackMachThread.h"
+#include "JackGraphManager.h"
+#include "JackError.h"
+#include "JackClientControl.h"
+#include "JackDriverLoader.h"
+#include "JackGlobals.h"
+#include "driver_interface.h"
+#include <iostream>
+
+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");
+}
+
+static void printError(OSStatus err)
+{
+ switch (err) {
+ case kAudioHardwareNoError:
+ JackLog("error code : kAudioHardwareNoError\n");
+ break;
+ case kAudioConverterErr_FormatNotSupported:
+ JackLog("error code : kAudioConverterErr_FormatNotSupported\n");
+ break;
+ case kAudioConverterErr_OperationNotSupported:
+ JackLog("error code : kAudioConverterErr_OperationNotSupported\n");
+ break;
+ case kAudioConverterErr_PropertyNotSupported:
+ JackLog("error code : kAudioConverterErr_PropertyNotSupported\n");
+ break;
+ case kAudioConverterErr_InvalidInputSize:
+ JackLog("error code : kAudioConverterErr_InvalidInputSize\n");
+ break;
+ case kAudioConverterErr_InvalidOutputSize:
+ JackLog("error code : kAudioConverterErr_InvalidOutputSize\n");
+ break;
+ case kAudioConverterErr_UnspecifiedError:
+ JackLog("error code : kAudioConverterErr_UnspecifiedError\n");
+ break;
+ case kAudioConverterErr_BadPropertySizeError:
+ JackLog("error code : kAudioConverterErr_BadPropertySizeError\n");
+ break;
+ case kAudioConverterErr_RequiresPacketDescriptionsError:
+ JackLog("error code : kAudioConverterErr_RequiresPacketDescriptionsError\n");
+ break;
+ case kAudioConverterErr_InputSampleRateOutOfRange:
+ JackLog("error code : kAudioConverterErr_InputSampleRateOutOfRange\n");
+ break;
+ case kAudioConverterErr_OutputSampleRateOutOfRange:
+ JackLog("error code : kAudioConverterErr_OutputSampleRateOutOfRange\n");
+ break;
+ case kAudioHardwareNotRunningError:
+ JackLog("error code : kAudioHardwareNotRunningError\n");
+ break;
+ case kAudioHardwareUnknownPropertyError:
+ JackLog("error code : kAudioHardwareUnknownPropertyError\n");
+ break;
+ case kAudioHardwareIllegalOperationError:
+ JackLog("error code : kAudioHardwareIllegalOperationError\n");
+ break;
+ case kAudioHardwareBadDeviceError:
+ JackLog("error code : kAudioHardwareBadDeviceError\n");
+ break;
+ case kAudioHardwareBadStreamError:
+ JackLog("error code : kAudioHardwareBadStreamError\n");
+ break;
+ case kAudioDeviceUnsupportedFormatError:
+ JackLog("error code : kAudioDeviceUnsupportedFormatError\n");
+ break;
+ case kAudioDevicePermissionsError:
+ JackLog("error code : kAudioDevicePermissionsError\n");
+ break;
+ default:
+ JackLog("error code : unknown\n");
+ break;
+ }
+}
+
+static OSStatus DisplayDeviceNames()
+{
+ UInt32 size;
+ Boolean isWritable;
+ int i, deviceNum;
+ OSStatus err;
+ CFStringRef UIname;
+
+ err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &size, &isWritable);
+ if (err != noErr)
+ return err;
+
+ deviceNum = size / sizeof(AudioDeviceID);
+ AudioDeviceID devices[deviceNum];
+
+ err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &size, devices);
+ if (err != noErr)
+ return err;
+
+ for (i = 0; i < deviceNum; i++) {
+ char device_name[256];
+ char internal_name[256];
+
+ size = sizeof(CFStringRef);
+ UIname = NULL;
+ err = AudioDeviceGetProperty(devices[i], 0, false, kAudioDevicePropertyDeviceUID, &size, &UIname);
+ if (err == noErr) {
+ CFStringGetCString(UIname, internal_name, 256, CFStringGetSystemEncoding());
+ } else {
+ goto error;
+ }
+
+ size = 256;
+ err = AudioDeviceGetProperty(devices[i], 0, false, kAudioDevicePropertyDeviceName, &size, device_name);
+ if (err != noErr)
+ return err;
+
+ printf("Device name = \'%s\', internal_name = \'%s\' (to be used as -C, -P, or -d parameter)\n", device_name, internal_name);
+ }
+
+ return noErr;
+
+error:
+ if (UIname != NULL)
+ CFRelease(UIname);
+ return err;
+}
+
+#if IO_CPU
+
+OSStatus JackCoreAudioDriver::Render(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData)
+{
+ JackCoreAudioDriver* driver = (JackCoreAudioDriver*)inRefCon;
+ driver->fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ memcpy(&driver->fActionFags, ioActionFlags, sizeof(AudioUnitRenderActionFlags));
+ memcpy(&driver->fCurrentTime, inTimeStamp, sizeof(AudioTimeStamp));
+ driver->fDriverOutputData = ioData;
+ float delta;
+ OSStatus res = driver->Process();
+ if ((delta = float(GetMicroSeconds() - driver->fLastWaitUst) / float(driver->fEngineControl->fPeriodUsecs)) > 0.1) {
+ JackLog("IO CPU %f\n", delta);
+ }
+ return res;
+}
+
+#else
+
+OSStatus JackCoreAudioDriver::Render(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData)
+{
+ JackCoreAudioDriver* driver = (JackCoreAudioDriver*)inRefCon;
+ driver->fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ memcpy(&driver->fActionFags, ioActionFlags, sizeof(AudioUnitRenderActionFlags));
+ memcpy(&driver->fCurrentTime, inTimeStamp, sizeof(AudioTimeStamp));
+ driver->fDriverOutputData = ioData;
+ return driver->Process();
+}
+
+#endif
+
+int JackCoreAudioDriver::Read()
+{
+ AudioUnitRender(fAUHAL, &fActionFags, &fCurrentTime, 1, fEngineControl->fBufferSize, fJackInputData);
+ return 0;
+}
+
+int JackCoreAudioDriver::Write()
+{
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ if (fGraphManager->GetConnectionsNum(fPlaybackPortList[i]) > 0) {
+ float* buffer = GetOutputBuffer(i);
+ int size = sizeof(float) * fEngineControl->fBufferSize;
+ memcpy((float*)fDriverOutputData->mBuffers[i].mData, buffer, size);
+ // Monitor ports
+ if (fWithMonitorPorts && fGraphManager->GetConnectionsNum(fMonitorPortList[i]) > 0)
+ memcpy(GetMonitorBuffer(i), buffer, size);
+ } else {
+ memset((float*)fDriverOutputData->mBuffers[i].mData, 0, sizeof(float) * fEngineControl->fBufferSize);
+ }
+ }
+ return 0;
+}
+
+// Will run only once
+OSStatus JackCoreAudioDriver::MeasureCallback(AudioDeviceID inDevice,
+ const AudioTimeStamp* inNow,
+ const AudioBufferList* inInputData,
+ const AudioTimeStamp* inInputTime,
+ AudioBufferList* outOutputData,
+ const AudioTimeStamp* inOutputTime,
+ void* inClientData)
+{
+ JackCoreAudioDriver* driver = (JackCoreAudioDriver*)inClientData;
+ AudioDeviceStop(driver->fDeviceID, MeasureCallback);
+ AudioDeviceRemoveIOProc(driver->fDeviceID, MeasureCallback);
+ JackLog("JackCoreAudioDriver::MeasureCallback called\n");
+ JackMachThread::GetParams(&driver->fEngineControl->fPeriod, &driver->fEngineControl->fComputation, &driver->fEngineControl->fConstraint);
+ return noErr;
+}
+
+OSStatus JackCoreAudioDriver::DeviceNotificationCallback(AudioDeviceID inDevice,
+ UInt32 inChannel,
+ Boolean isInput,
+ AudioDevicePropertyID inPropertyID,
+ void* inClientData)
+{
+ JackCoreAudioDriver* driver = (JackCoreAudioDriver*)inClientData;
+ if (inPropertyID == kAudioDeviceProcessorOverload) {
+ JackLog("JackCoreAudioDriver::NotificationCallback kAudioDeviceProcessorOverload\n");
+#ifdef DEBUG
+ //driver->fLogFile->Capture(AudioGetCurrentHostTime() - AudioConvertNanosToHostTime(LOG_SAMPLE_DURATION * 1000000), AudioGetCurrentHostTime(), true, "Captured Latency Log for I/O Cycle Overload\n");
+#endif
+
+ driver->NotifyXRun(GetMicroSeconds());
+ }
+ return noErr;
+}
+
+OSStatus JackCoreAudioDriver::GetDeviceIDFromUID(const char* UID, AudioDeviceID* id)
+{
+ UInt32 size = sizeof(AudioValueTranslation);
+ CFStringRef inIUD = CFStringCreateWithCString(NULL, UID, CFStringGetSystemEncoding());
+ AudioValueTranslation value = { &inIUD, sizeof(CFStringRef), id, sizeof(AudioDeviceID) };
+
+ if (inIUD == NULL) {
+ return kAudioHardwareUnspecifiedError;
+ } else {
+ OSStatus res = AudioHardwareGetProperty(kAudioHardwarePropertyDeviceForUID, &size, &value);
+ CFRelease(inIUD);
+ JackLog("get_device_id_from_uid %s %ld \n", UID, *id);
+ return (*id == kAudioDeviceUnknown) ? kAudioHardwareBadDeviceError : res;
+ }
+}
+
+OSStatus JackCoreAudioDriver::GetDefaultDevice(AudioDeviceID* id)
+{
+ OSStatus res;
+ UInt32 theSize = sizeof(UInt32);
+ AudioDeviceID inDefault;
+ AudioDeviceID outDefault;
+
+ if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
+ &theSize, &inDefault)) != noErr)
+ return res;
+
+ if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
+ &theSize, &outDefault)) != noErr)
+ return res;
+
+ JackLog("GetDefaultDevice: input = %ld output = %ld\n", inDefault, outDefault);
+
+ // Get the device only if default input and ouput are the same
+ if (inDefault == outDefault) {
+ *id = inDefault;
+ return noErr;
+ } else {
+ jack_error("Default input and output devices are not the same !!");
+ return kAudioHardwareBadDeviceError;
+ }
+}
+
+OSStatus JackCoreAudioDriver::GetDefaultInputDevice(AudioDeviceID* id)
+{
+ OSStatus res;
+ UInt32 theSize = sizeof(UInt32);
+ AudioDeviceID inDefault;
+
+ if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
+ &theSize, &inDefault)) != noErr)
+ return res;
+
+ JackLog("GetDefaultInputDevice: input = %ld \n", inDefault);
+ *id = inDefault;
+ return noErr;
+}
+
+OSStatus JackCoreAudioDriver::GetDefaultOutputDevice(AudioDeviceID* id)
+{
+ OSStatus res;
+ UInt32 theSize = sizeof(UInt32);
+ AudioDeviceID outDefault;
+
+ if ((res = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
+ &theSize, &outDefault)) != noErr)
+ return res;
+
+ JackLog("GetDefaultOutputDevice: output = %ld\n", outDefault);
+ *id = outDefault;
+ return noErr;
+}
+
+OSStatus JackCoreAudioDriver::GetDeviceNameFromID(AudioDeviceID id, char* name)
+{
+ UInt32 size = 256;
+ return AudioDeviceGetProperty(id, 0, false, kAudioDevicePropertyDeviceName, &size, name);
+}
+
+OSStatus JackCoreAudioDriver::GetTotalChannels(AudioDeviceID device, long* channelCount, bool isInput)
+{
+ OSStatus err = noErr;
+ UInt32 outSize;
+ Boolean outWritable;
+ AudioBufferList* bufferList = 0;
+ AudioStreamID* streamList = 0;
+ int i, numStream;
+
+ err = AudioDeviceGetPropertyInfo(device, 0, isInput, kAudioDevicePropertyStreams, &outSize, &outWritable);
+ if (err == noErr) {
+ streamList = (AudioStreamID*)malloc(outSize);
+ numStream = outSize / sizeof(AudioStreamID);
+ JackLog("GetTotalChannels device stream number = %ld numStream = %ld\n", device, numStream);
+ err = AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyStreams, &outSize, streamList);
+ if (err == noErr) {
+ AudioStreamBasicDescription streamDesc;
+ outSize = sizeof(AudioStreamBasicDescription);
+ for (i = 0; i < numStream; i++) {
+ err = AudioStreamGetProperty(streamList[i], 0, kAudioDevicePropertyStreamFormat, &outSize, &streamDesc);
+ JackLog("GetTotalChannels streamDesc mFormatFlags = %ld mChannelsPerFrame = %ld\n", streamDesc.mFormatFlags, streamDesc.mChannelsPerFrame);
+ }
+ }
+ }
+
+ *channelCount = 0;
+ err = AudioDeviceGetPropertyInfo(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, &outWritable);
+ if (err == noErr) {
+ bufferList = (AudioBufferList*)malloc(outSize);
+ err = AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, bufferList);
+ if (err == noErr) {
+ for (i = 0; i < bufferList->mNumberBuffers; i++)
+ *channelCount += bufferList->mBuffers[i].mNumberChannels;
+ }
+ }
+
+ if (streamList)
+ free(streamList);
+ if (bufferList)
+ free(bufferList);
+
+ return err;
+}
+
+JackCoreAudioDriver::JackCoreAudioDriver(const char* name, JackEngine* engine, JackSynchro** table)
+ : JackAudioDriver(name, engine, table), fJackInputData(NULL), fDriverOutputData(NULL)
+{
+#ifdef DEBUG
+ //fLogFile = new CALatencyLog("jackmp_latency", ".txt");
+#endif
+}
+
+JackCoreAudioDriver::~JackCoreAudioDriver()
+{
+#ifdef DEBUG
+ //delete fLogFile;
+#endif
+}
+
+int JackCoreAudioDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_uid,
+ const char* playback_driver_uid,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ OSStatus err = noErr;
+ ComponentResult err1;
+ UInt32 outSize;
+ UInt32 enableIO;
+ AudioStreamBasicDescription srcFormat, dstFormat, sampleRate;
+ long in_nChannels = 0;
+ long out_nChannels = 0;
+ char capture_driver_name[256];
+ char playback_driver_name[256];
+ float iousage;
+
+ capture_driver_name[0] = 0;
+ playback_driver_name[0] = 0;
+
+ JackLog("JackCoreAudioDriver::Open nframes = %ld in = %ld out = %ld capture name = %s playback name = %s\n",
+ nframes, inchannels, outchannels, capture_driver_uid, playback_driver_uid);
+
+ // Duplex
+ if (capture_driver_uid != NULL && playback_driver_uid != NULL) {
+ JackLog("JackCoreAudioDriver::Open duplex \n");
+ if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) {
+ if (GetDefaultDevice(&fDeviceID) != noErr) {
+ jack_error("Cannot open default device");
+ return -1;
+ }
+ }
+ if (GetDeviceNameFromID(fDeviceID, capture_driver_name) != noErr || GetDeviceNameFromID(fDeviceID, playback_driver_name) != noErr) {
+ jack_error("Cannot get device name from device ID");
+ return -1;
+ }
+
+ // Capture only
+ } else if (capture_driver_uid != NULL) {
+ JackLog("JackCoreAudioDriver::Open capture only \n");
+ if (GetDeviceIDFromUID(capture_driver_uid, &fDeviceID) != noErr) {
+ if (GetDefaultInputDevice(&fDeviceID) != noErr) {
+ jack_error("Cannot open default device");
+ return -1;
+ }
+ }
+ if (GetDeviceNameFromID(fDeviceID, capture_driver_name) != noErr) {
+ jack_error("Cannot get device name from device ID");
+ return -1;
+ }
+
+ // Playback only
+ } else if (playback_driver_uid != NULL) {
+ JackLog("JackCoreAudioDriver::Open playback only \n");
+ if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) {
+ if (GetDefaultOutputDevice(&fDeviceID) != noErr) {
+ jack_error("Cannot open default device");
+ return -1;
+ }
+ }
+ if (GetDeviceNameFromID(fDeviceID, playback_driver_name) != noErr) {
+ jack_error("Cannot get device name from device ID");
+ return -1;
+ }
+
+ // Use default driver in duplex mode
+ } else {
+ JackLog("JackCoreAudioDriver::Open default driver \n");
+ if (GetDefaultDevice(&fDeviceID) != noErr) {
+ jack_error("Cannot open default device");
+ return -1;
+ }
+ if (GetDeviceNameFromID(fDeviceID, capture_driver_name) != noErr || GetDeviceNameFromID(fDeviceID, playback_driver_name) != noErr) {
+ jack_error("Cannot get device name from device ID");
+ return -1;
+ }
+ }
+
+ // Generic JackAudioDriver Open
+ if (JackAudioDriver::Open(nframes, samplerate, capturing, playing, inchannels, outchannels, monitor, capture_driver_name, playback_driver_name, capture_latency, playback_latency) != 0) {
+ return -1;
+ }
+
+ if (capturing) {
+ err = GetTotalChannels(fDeviceID, &in_nChannels, true);
+ if (err != noErr) {
+ jack_error("Cannot get input channel number");
+ printError(err);
+ return -1;
+ }
+ }
+
+ if (playing) {
+ err = GetTotalChannels(fDeviceID, &out_nChannels, false);
+ if (err != noErr) {
+ jack_error("Cannot get output channel number");
+ printError(err);
+ return -1;
+ }
+ }
+
+ if (inchannels > in_nChannels) {
+ jack_error("This device hasn't required input channels inchannels = %ld in_nChannels = %ld", inchannels, in_nChannels);
+ return -1;
+ }
+
+ if (outchannels > out_nChannels) {
+ jack_error("This device hasn't required output channels outchannels = %ld out_nChannels = %ld", outchannels, out_nChannels);
+ return -1;
+ }
+
+ if (inchannels == 0) {
+ JackLog("Setup max in channels = %ld\n", in_nChannels);
+ inchannels = in_nChannels;
+ }
+
+ if (outchannels == 0) {
+ JackLog("Setup max out channels = %ld\n", out_nChannels);
+ outchannels = out_nChannels;
+ }
+
+ // Setting buffer size
+ outSize = sizeof(UInt32);
+ err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyBufferFrameSize, outSize, &fEngineControl->fBufferSize);
+ if (err != noErr) {
+ jack_error("Cannot set buffer size %ld", nframes);
+ printError(err);
+ return -1;
+ }
+
+ // Set sample rate
+ if (capturing && inchannels > 0) {
+ outSize = sizeof(AudioStreamBasicDescription);
+ err = AudioDeviceGetProperty(fDeviceID, 0, true, kAudioDevicePropertyStreamFormat, &outSize, &sampleRate);
+ if (err != noErr) {
+ jack_error("Cannot get current sample rate");
+ printError(err);
+ return -1;
+ }
+
+ if (samplerate != (unsigned long)sampleRate.mSampleRate) {
+ sampleRate.mSampleRate = (Float64)samplerate;
+ err = AudioDeviceSetProperty(fDeviceID, NULL, 0, true, kAudioDevicePropertyStreamFormat, outSize, &sampleRate);
+ if (err != noErr) {
+ jack_error("Cannot set sample rate = %ld", samplerate);
+ printError(err);
+ return -1;
+ }
+ }
+ }
+
+ if (playing && outchannels > 0) {
+ outSize = sizeof(AudioStreamBasicDescription);
+ err = AudioDeviceGetProperty(fDeviceID, 0, false, kAudioDevicePropertyStreamFormat, &outSize, &sampleRate);
+ if (err != noErr) {
+ jack_error("Cannot get current sample rate");
+ printError(err);
+ return -1;
+ }
+
+ if (samplerate != (unsigned long)sampleRate.mSampleRate) {
+ sampleRate.mSampleRate = (Float64)samplerate;
+ err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyStreamFormat, outSize, &sampleRate);
+ if (err != noErr) {
+ jack_error("Cannot set sample rate = %ld", samplerate);
+ printError(err);
+ return -1;
+ }
+ }
+ }
+
+ // AUHAL
+ ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
+ Component HALOutput = FindNextComponent(NULL, &cd);
+
+ err1 = OpenAComponent(HALOutput, &fAUHAL);
+ if (err1 != noErr) {
+ jack_error("Error calling OpenAComponent");
+ printError(err1);
+ goto error;
+ }
+
+ err1 = AudioUnitInitialize(fAUHAL);
+ if (err1 != noErr) {
+ jack_error("Cannot initialize AUHAL unit");
+ printError(err1);
+ goto error;
+ }
+
+ // Start I/O
+ enableIO = 1;
+ if (capturing && inchannels > 0) {
+ JackLog("Setup AUHAL input\n");
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &enableIO, sizeof(enableIO));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input");
+ printError(err1);
+ goto error;
+ }
+ }
+
+ if (playing && outchannels > 0) {
+ JackLog("Setup AUHAL output\n");
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, 0, &enableIO, sizeof(enableIO));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO,kAudioUnitScope_Output");
+ printError(err1);
+ goto error;
+ }
+ }
+
+ // Setup up choosen device, in both input and output cases
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &fDeviceID, sizeof(AudioDeviceID));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_CurrentDevice");
+ printError(err1);
+ goto error;
+ }
+
+ // Set buffer size
+ if (capturing && inchannels > 0) {
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 1, (UInt32*) & nframes, sizeof(UInt32));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_MaximumFramesPerSlice");
+ printError(err1);
+ goto error;
+ }
+ }
+
+ if (playing && outchannels > 0) {
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, (UInt32*) & nframes, sizeof(UInt32));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_MaximumFramesPerSlice");
+ printError(err1);
+ goto error;
+ }
+ }
+
+ // Setup channel map
+ if (capturing && inchannels > 0 && inchannels < in_nChannels) {
+ SInt32 chanArr[in_nChannels];
+ for (int i = 0; i < in_nChannels; i++) {
+ chanArr[i] = -1;
+ }
+ for (int i = 0; i < inchannels; i++) {
+ chanArr[i] = i;
+ }
+ AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_ChannelMap , kAudioUnitScope_Input, 1, chanArr, sizeof(SInt32) * in_nChannels);
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_ChannelMap 1");
+ printError(err1);
+ }
+ }
+
+ if (playing && outchannels > 0 && outchannels < out_nChannels) {
+ SInt32 chanArr[out_nChannels];
+ for (int i = 0; i < out_nChannels; i++) {
+ chanArr[i] = -1;
+ }
+ for (int i = 0; i < outchannels; i++) {
+ chanArr[i] = i;
+ }
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_ChannelMap, kAudioUnitScope_Output, 0, chanArr, sizeof(SInt32) * out_nChannels);
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_ChannelMap 0");
+ printError(err1);
+ }
+ }
+
+ // Setup stream converters
+ if (capturing && inchannels > 0) {
+ srcFormat.mSampleRate = samplerate;
+ srcFormat.mFormatID = kAudioFormatLinearPCM;
+ srcFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved;
+ srcFormat.mBytesPerPacket = sizeof(float);
+ srcFormat.mFramesPerPacket = 1;
+ srcFormat.mBytesPerFrame = sizeof(float);
+ srcFormat.mChannelsPerFrame = outchannels;
+ srcFormat.mBitsPerChannel = 32;
+
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &srcFormat, sizeof(AudioStreamBasicDescription));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Input");
+ printError(err1);
+ }
+ }
+
+ if (playing && outchannels > 0) {
+ dstFormat.mSampleRate = samplerate;
+ dstFormat.mFormatID = kAudioFormatLinearPCM;
+ dstFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved;
+ dstFormat.mBytesPerPacket = sizeof(float);
+ dstFormat.mFramesPerPacket = 1;
+ dstFormat.mBytesPerFrame = sizeof(float);
+ dstFormat.mChannelsPerFrame = inchannels;
+ dstFormat.mBitsPerChannel = 32;
+
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &dstFormat, sizeof(AudioStreamBasicDescription));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Output");
+ printError(err1);
+ }
+ }
+
+ // Setup callbacks
+ if (inchannels > 0 && outchannels == 0) {
+ AURenderCallbackStruct output;
+ output.inputProc = Render;
+ output.inputProcRefCon = this;
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global, 0, &output, sizeof(output));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_SetRenderCallback 1");
+ printError(err1);
+ goto error;
+ }
+ } else {
+ AURenderCallbackStruct output;
+ output.inputProc = Render;
+ output.inputProcRefCon = this;
+ err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &output, sizeof(output));
+ if (err1 != noErr) {
+ jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_SetRenderCallback 0");
+ printError(err1);
+ goto error;
+ }
+ }
+
+ // Prepare buffers
+ if (capturing && inchannels > 0) {
+ fJackInputData = (AudioBufferList*)malloc(sizeof(UInt32) + inchannels * sizeof(AudioBuffer));
+ if (fJackInputData == 0) {
+ jack_error("Cannot allocate memory for input buffers");
+ goto error;
+ }
+ fJackInputData->mNumberBuffers = inchannels;
+ for (int i = 0; i < fCaptureChannels; i++) {
+ fJackInputData->mBuffers[i].mNumberChannels = 1;
+ fJackInputData->mBuffers[i].mDataByteSize = fEngineControl->fBufferSize * sizeof(float);
+ }
+ }
+
+ // Add listeners
+ err = AudioDeviceAddPropertyListener(fDeviceID, 0, true, kAudioDeviceProcessorOverload, DeviceNotificationCallback, this);
+ if (err != noErr) {
+ jack_error("Error calling AudioDeviceAddPropertyListener with kAudioDeviceProcessorOverload");
+ printError(err1);
+ goto error;
+ }
+
+ err = AudioDeviceAddPropertyListener(fDeviceID, 0, true, kAudioHardwarePropertyDevices, DeviceNotificationCallback, this);
+ if (err != noErr) {
+ jack_error("Error calling AudioDeviceAddPropertyListener with kAudioHardwarePropertyDevices");
+ printError(err1);
+ goto error;
+ }
+
+ fDriverOutputData = 0;
+
+#if IO_CPU
+
+ outSize = sizeof(float);
+ iousage = 0.4f;
+ err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyIOCycleUsage, outSize, &iousage);
+ if (err != noErr) {
+ jack_error("Error calling AudioDeviceSetProperty kAudioDevicePropertyIOCycleUsage");
+ printError(err);
+ }
+#endif
+
+ // Core driver may have changed the in/out values
+ fCaptureChannels = inchannels;
+ fPlaybackChannels = outchannels;
+ return 0;
+
+error:
+ AudioUnitUninitialize(fAUHAL);
+ CloseComponent(fAUHAL);
+ return -1;
+}
+
+int JackCoreAudioDriver::Close()
+{
+ JackAudioDriver::Close();
+ // Possibly (if MeasureCallback has not been called)
+ AudioDeviceStop(fDeviceID, MeasureCallback);
+ AudioDeviceRemoveIOProc(fDeviceID, MeasureCallback);
+ AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioDeviceProcessorOverload, DeviceNotificationCallback);
+ free(fJackInputData);
+ AudioUnitUninitialize(fAUHAL);
+ CloseComponent(fAUHAL);
+ return 0;
+}
+
+int JackCoreAudioDriver::Attach()
+{
+ OSStatus err;
+ JackPort* port;
+ jack_port_id_t port_index;
+ UInt32 size;
+ Boolean isWritable;
+ char channel_name[64];
+ char buf[JACK_PORT_NAME_SIZE];
+ unsigned long port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal;
+
+ JackLog("JackCoreAudioDriver::Attach fBufferSize %ld fSampleRate %ld\n", 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");
+ if (err == noErr && size > 0) {
+ err = AudioDeviceGetProperty(fDeviceID, i + 1, true, kAudioDevicePropertyChannelName, &size, channel_name);
+ if (err != noErr)
+ JackLog("AudioDeviceGetProperty kAudioDevicePropertyChannelName error \n");
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:out_%s%u", fClientControl->fName, fCaptureDriverName, channel_name, i + 1);
+ } else {
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:out%u", fClientControl->fName, fCaptureDriverName, i + 1);
+ }
+
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("Cannot register port for %s", buf);
+ return -1;
+ }
+
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize + fCaptureLatency);
+ fCapturePortList[i] = port_index;
+ }
+
+ port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal;
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+
+ err = AudioDeviceGetPropertyInfo(fDeviceID, i + 1, false, kAudioDevicePropertyChannelName, &size, &isWritable);
+ if (err != noErr)
+ JackLog("AudioDeviceGetPropertyInfo kAudioDevicePropertyChannelName error \n");
+ if (err == noErr && size > 0) {
+ err = AudioDeviceGetProperty(fDeviceID, i + 1, false, kAudioDevicePropertyChannelName, &size, channel_name);
+ if (err != noErr)
+ JackLog("AudioDeviceGetProperty kAudioDevicePropertyChannelName error \n");
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:in_%s%u", fClientControl->fName, fPlaybackDriverName, channel_name, i + 1);
+ } else {
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:in%u", fClientControl->fName, fPlaybackDriverName, i + 1);
+ }
+
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, (JackPortFlags)port_flags)) == NO_PORT) {
+ jack_error("Cannot register port for %s", buf);
+ return -1;
+ }
+
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize + fPlaybackLatency);
+ fPlaybackPortList[i] = port_index;
+
+ // Monitor ports
+ if (fWithMonitorPorts) {
+ JackLog("Create monitor port \n");
+ snprintf(buf, sizeof(buf) - 1, "%s:%s:monitor_%u", fClientControl->fName, fPlaybackDriverName, i + 1);
+ if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, buf, JackPortIsOutput)) == NO_PORT) {
+ jack_error("Cannot register monitor port for %s", buf);
+ return -1;
+ } else {
+ port = fGraphManager->GetPort(port_index);
+ port->SetLatency(fEngineControl->fBufferSize);
+ fMonitorPortList[i] = port_index;
+ }
+ }
+ }
+
+ // Input buffers do no change : prepare them only once
+ for (int i = 0; i < fCaptureChannels; i++) {
+ fJackInputData->mBuffers[i].mData = GetOutputBuffer(i);
+ }
+
+ return 0;
+}
+
+int JackCoreAudioDriver::Start()
+{
+ OSStatus err;
+ JackLog("JackCoreAudioDriver::Start\n");
+ JackAudioDriver::Start();
+
+ err = AudioDeviceAddIOProc(fDeviceID, MeasureCallback, this);
+ if (err != noErr)
+ return -1;
+
+ err = AudioOutputUnitStart(fAUHAL);
+ if (err != noErr)
+ return -1;
+
+ if ((err = AudioDeviceStart(fDeviceID, MeasureCallback)) != noErr) {
+ jack_error("Cannot start MeasureCallback");
+ printError(err);
+ return -1;
+ }
+
+ return 0;
+}
+
+int JackCoreAudioDriver::Stop()
+{
+ AudioDeviceStop(fDeviceID, MeasureCallback);
+ AudioDeviceRemoveIOProc(fDeviceID, MeasureCallback);
+ JackLog("JackCoreAudioDriver::Stop\n");
+ return (AudioOutputUnitStop(fAUHAL) == noErr) ? 0 : -1;
+}
+
+int JackCoreAudioDriver::SetBufferSize(jack_nframes_t nframes)
+{
+ OSStatus err;
+ UInt32 outSize = sizeof(UInt32);
+
+ err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyBufferFrameSize, outSize, &nframes);
+ if (err != noErr) {
+ jack_error("Cannot set buffer size %ld\n", nframes);
+ printError(err);
+ return -1;
+ }
+
+ fEngineControl->fBufferSize = nframes;
+ fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // In microsec
+
+ // Prepare buffers
+ for (int i = 0; i < fCaptureChannels; i++) {
+ fJackInputData->mBuffers[i].mNumberChannels = 1;
+ fJackInputData->mBuffers[i].mDataByteSize = fEngineControl->fBufferSize * sizeof(float);
+ fJackInputData->mBuffers[i].mData = GetOutputBuffer(i);
+ }
+
+ return 0;
+}
+
+void JackCoreAudioDriver::PrintState()
+{
+ std::cout << "JackCoreAudioDriver state" << std::endl;
+
+ jack_port_id_t port_index;
+
+ std::cout << "Input ports" << std::endl;
+
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (int i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+}
+
+} // end of namespace
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ jack_driver_desc_t* driver_get_descriptor() {
+ jack_driver_desc_t *desc;
+ unsigned int i;
+ desc = (jack_driver_desc_t*)calloc(1, sizeof(jack_driver_desc_t));
+
+ strcpy(desc->name, "coreaudio");
+ desc->nparams = 13;
+ desc->params = (jack_driver_param_desc_t*)calloc(desc->nparams, sizeof(jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy(desc->params[i].name, "channels");
+ desc->params[i].character = 'c';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "inchannels");
+ desc->params[i].character = 'i';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of input channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "outchannels");
+ desc->params[i].character = 'o';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of output channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "capture");
+ desc->params[i].character = 'C';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default CoreAudio input device");
+ strcpy(desc->params[i].short_desc, "Provide capture ports. Optionally set CoreAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "playback");
+ desc->params[i].character = 'P';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default CoreAudio output device");
+ strcpy(desc->params[i].short_desc, "Provide playback ports. Optionally set CoreAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy (desc->params[i].name, "monitor");
+ desc->params[i].character = 'm';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Provide monitor ports for the output");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "duplex");
+ desc->params[i].character = 'D';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Provide both capture and playback ports");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "rate");
+ desc->params[i].character = 'r';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 44100U;
+ strcpy(desc->params[i].short_desc, "Sample rate");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "period");
+ desc->params[i].character = 'p';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].short_desc, "Frames per period");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "device");
+ desc->params[i].character = 'd';
+ desc->params[i].type = JackDriverParamString;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].value.str, "will take default CoreAudio device name");
+ strcpy(desc->params[i].short_desc, "CoreAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "input-latency");
+ desc->params[i].character = 'I';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra input latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "output-latency");
+ desc->params[i].character = 'O';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra output latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "list-devices");
+ desc->params[i].character = 'l';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Display available CoreAudio devices");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ return desc;
+ }
+
+ Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params) {
+ jack_nframes_t srate = 44100;
+ jack_nframes_t frames_per_interrupt = 128;
+ int capture = FALSE;
+ int playback = FALSE;
+ int chan_in = 0;
+ int chan_out = 0;
+ bool monitor = false;
+ char* capture_pcm_name = "";
+ char* playback_pcm_name = "";
+ const JSList *node;
+ const jack_driver_param_t *param;
+ jack_nframes_t systemic_input_latency = 0;
+ jack_nframes_t systemic_output_latency = 0;
+
+ for (node = params; node; node = jack_slist_next(node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'd':
+ capture_pcm_name = strdup(param->value.str);
+ playback_pcm_name = strdup(param->value.str);
+ break;
+
+ case 'D':
+ capture = TRUE;
+ playback = TRUE;
+ break;
+
+ case 'c':
+ chan_in = chan_out = (int) param->value.ui;
+ break;
+
+ case 'i':
+ chan_in = (int) param->value.ui;
+ break;
+
+ case 'o':
+ chan_out = (int) param->value.ui;
+ break;
+
+ case 'C':
+ capture = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ capture_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'P':
+ playback = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ playback_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'm':
+ monitor = param->value.i;
+ break;
+
+ case 'r':
+ srate = param->value.ui;
+ break;
+
+ case 'p':
+ frames_per_interrupt = (unsigned int) param->value.ui;
+ break;
+
+ case 'I':
+ systemic_input_latency = param->value.ui;
+ break;
+
+ case 'O':
+ systemic_output_latency = param->value.ui;
+ break;
+
+ case 'l':
+ Jack::DisplayDeviceNames();
+ break;
+ }
+ }
+
+ /* duplex is the default */
+ if (!capture && !playback) {
+ capture = TRUE;
+ playback = TRUE;
+ }
+
+ Jack::JackDriverClientInterface* driver = new Jack::JackCoreAudioDriver("coreaudio", engine, table);
+ if (driver->Open(frames_per_interrupt, srate, capture, playback, chan_in, chan_out, monitor, capture_pcm_name, playback_pcm_name, systemic_input_latency, systemic_output_latency) == 0) {
+ return driver;
+ } else {
+ delete driver;
+ return NULL;
+ }
+ }
+
+#ifdef __cplusplus
+}
+#endif
+
+
diff --git a/macosx/JackCoreAudioDriver.h b/macosx/JackCoreAudioDriver.h
new file mode 100644
index 00000000..24b6c44e
--- /dev/null
+++ b/macosx/JackCoreAudioDriver.h
@@ -0,0 +1,125 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackCoreAudioDriver__
+#define __JackCoreAudioDriver__
+
+#include <AudioToolbox/AudioConverter.h>
+#include <CoreAudio/CoreAudio.h>
+#include <AudioUnit/AudioUnit.h>
+#include "JackAudioDriver.h"
+#include "JackTime.h"
+
+#include "/Developer/Examples/CoreAudio/PublicUtility/CALatencyLog.h"
+
+namespace Jack
+{
+
+#define kVersion 102
+#define LOG_SAMPLE_DURATION 3 // in millisecond
+
+//#define IO_CPU 1
+
+/*!
+\brief The CoreAudio driver.
+
+\todo hardware monitoring
+*/
+
+class JackCoreAudioDriver : public JackAudioDriver
+{
+
+ private:
+#ifdef DEBUG
+ //CALatencyLog* fLogFile;
+#endif
+
+ AudioUnit fAUHAL;
+
+ AudioBufferList* fJackInputData;
+ AudioBufferList* fDriverOutputData;
+
+ AudioDeviceID fDeviceID;
+
+ AudioUnitRenderActionFlags fActionFags;
+ AudioTimeStamp fCurrentTime;
+
+ static OSStatus Render(void *inRefCon,
+ AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList *ioData);
+
+ static OSStatus MeasureCallback(AudioDeviceID inDevice,
+ const AudioTimeStamp* inNow,
+ const AudioBufferList* inInputData,
+ const AudioTimeStamp* inInputTime,
+ AudioBufferList* outOutputData,
+ const AudioTimeStamp* inOutputTime,
+ void* inClientData);
+
+ static OSStatus DeviceNotificationCallback(AudioDeviceID inDevice,
+ UInt32 inChannel,
+ Boolean isInput,
+ AudioDevicePropertyID inPropertyID,
+ void* inClientData);
+
+ OSStatus GetDeviceIDFromUID(const char* UID, AudioDeviceID* id);
+ OSStatus GetDefaultDevice(AudioDeviceID* id);
+ OSStatus GetDefaultInputDevice(AudioDeviceID* id);
+ OSStatus GetDefaultOutputDevice(AudioDeviceID* id);
+ OSStatus GetDeviceNameFromID(AudioDeviceID id, char* name);
+ OSStatus GetTotalChannels(AudioDeviceID device, long* channelCount, bool isInput);
+
+ public:
+
+ JackCoreAudioDriver(const char* name, JackEngine* engine, JackSynchro** table);
+ virtual ~JackCoreAudioDriver();
+
+ int Open(jack_nframes_t frames_per_cycle,
+ jack_nframes_t rate,
+ int capturing,
+ int playing,
+ int chan_in,
+ int chan_out,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Close();
+
+ int Attach();
+
+ int Start();
+ int Stop();
+
+ int Read();
+ int Write();
+
+ int SetBufferSize(jack_nframes_t nframes);
+
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/macosx/JackMacEngineRPC.cpp b/macosx/JackMacEngineRPC.cpp
new file mode 100644
index 00000000..695c4b08
--- /dev/null
+++ b/macosx/JackMacEngineRPC.cpp
@@ -0,0 +1,185 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackServer.h"
+#include "JackEngine.h"
+#include "JackRPCEngine.h"
+#include "JackMachServerChannel.h"
+#include <assert.h>
+
+using namespace Jack;
+
+//-------------------
+// Client management
+//-------------------
+
+#define rpc_type kern_return_t // for astyle
+
+rpc_type server_rpc_jack_client_new(mach_port_t server_port, client_name_t name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ JackLog("rpc_jack_client_new %s\n", name);
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[server_port];
+ assert(channel);
+ channel->AddClient((char*)name, private_port, shared_engine, shared_client, shared_ports, result);
+ return KERN_SUCCESS;
+}
+
+rpc_type server_rpc_jack_client_close(mach_port_t private_port, int refnum, int* result)
+{
+ JackLog("rpc_jack_client_close\n");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ channel->RemoveClient(private_port, refnum);
+ *result = 0;
+ return KERN_SUCCESS;
+}
+
+rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int* result)
+{
+ JackLog("rpc_jack_client_activate\n");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->Activate(refnum);
+ return KERN_SUCCESS;
+}
+
+rpc_type server_rpc_jack_client_deactivate(mach_port_t private_port, int refnum, int* result)
+{
+ JackLog("rpc_jack_client_deactivate\n");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->Deactivate(refnum);
+ return KERN_SUCCESS;
+}
+
+//-----------------
+// Port management
+//-----------------
+
+rpc_type server_rpc_jack_port_register(mach_port_t private_port, int refnum, client_port_name_t name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+{
+ JackLog("rpc_jack_port_register %ld %s\n", refnum, name);
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortRegister(refnum, name, flags, buffer_size, port_index);
+ return KERN_SUCCESS;
+}
+
+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);
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortUnRegister(refnum, port);
+ return KERN_SUCCESS;
+}
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortConnect(refnum, src, dst);
+ return KERN_SUCCESS;
+}
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortDisconnect(refnum, src, dst);
+ return KERN_SUCCESS;
+}
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortConnect(refnum, src, dst);
+ return KERN_SUCCESS;
+}
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetEngine()->PortDisconnect(refnum, src, dst);
+ return KERN_SUCCESS;
+}
+
+//------------------------
+// Buffer size, freewheel
+//------------------------
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->SetBufferSize(buffer_size);
+ return KERN_SUCCESS;
+}
+
+rpc_type server_rpc_jack_set_freewheel(mach_port_t private_port, int onoff, int* result)
+{
+ JackLog("server_rpc_jack_set_freewheel\n");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->SetFreewheel(onoff);
+ return KERN_SUCCESS;
+}
+
+//----------------------
+// Transport management
+//----------------------
+
+rpc_type server_rpc_jack_release_timebase(mach_port_t private_port, int refnum, int* result)
+{
+ JackLog("server_rpc_jack_release_timebase\n");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->GetEngine()->ReleaseTimebase(refnum);
+ return KERN_SUCCESS;
+}
+
+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");
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
+ assert(channel);
+ *result = channel->GetServer()->GetEngine()->SetTimebaseCallback(refnum, conditional);
+ return KERN_SUCCESS;
+}
+
+//-----------------
+// RT notification
+//-----------------
+
+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);
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[server_port];
+ assert(channel);
+ assert(channel->GetServer());
+ channel->GetServer()->Notify(refnum, notify, value);
+ return KERN_SUCCESS;
+}
diff --git a/macosx/JackMacLibClientRPC.cpp b/macosx/JackMacLibClientRPC.cpp
new file mode 100644
index 00000000..7a94a494
--- /dev/null
+++ b/macosx/JackMacLibClientRPC.cpp
@@ -0,0 +1,47 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackLibClient.h"
+#include "JackMachClientChannel.h"
+#include "JackRPCEngine.h"
+#include "JackLibGlobals.h"
+#include <assert.h>
+
+using namespace Jack;
+
+#define rpc_type kern_return_t // for astyle
+
+rpc_type rpc_jack_client_sync_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, int value, int* result)
+{
+ JackLog("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld value = %ld \n", refnum, name, notify, value);
+ JackClient* client = JackLibGlobals::fGlobals->fClientTable[client_port];
+ assert(client);
+ *result = client->ClientNotify(refnum, name, notify, true, value);
+ return KERN_SUCCESS;
+}
+
+rpc_type rpc_jack_client_async_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, int value)
+{
+ JackLog("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld value = %ld \n", refnum, name, notify, value);
+ JackClient* client = JackLibGlobals::fGlobals->fClientTable[client_port];
+ assert(client);
+ client->ClientNotify(refnum, name, notify, false, value);
+ return KERN_SUCCESS;
+}
+
diff --git a/macosx/JackMachClientChannel.cpp b/macosx/JackMachClientChannel.cpp
new file mode 100644
index 00000000..1cfac5ea
--- /dev/null
+++ b/macosx/JackMachClientChannel.cpp
@@ -0,0 +1,237 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachClientChannel.h"
+#include "JackRPCEngine.h"
+#include "JackRPCClientServer.c"
+#include "JackError.h"
+#include "JackLibClient.h"
+#include "JackLibGlobals.h"
+#include "JackMachThread.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+JackMachClientChannel::JackMachClientChannel()
+{
+ fThread = new JackMachThread(this);
+}
+
+JackMachClientChannel::~JackMachClientChannel()
+{
+ delete fThread;
+}
+
+// Server <===> client
+
+int JackMachClientChannel::Open(const char* name, JackClient* obj)
+{
+ JackLog("JackMachClientChannel::Open name = %s\n", name);
+
+ // Connect to server
+ if (!fServerPort.ConnectPort(jack_server_entry)) {
+ jack_error("Cannot connect to server Mach port");
+ return -1;
+ }
+
+ // Prepare local port using client name
+ char buf[256];
+ snprintf(buf, sizeof(buf) - 1, "%s:%s", jack_client_entry, name);
+
+ if (!fClientPort.AllocatePort(buf, 16)) {
+ jack_error("Cannot allocate client Mach port");
+ return -1;
+ }
+
+ JackLibGlobals::fGlobals->fClientTable[fClientPort.GetPort()] = obj;
+ return 0;
+}
+
+void JackMachClientChannel::Close()
+{
+ JackLog("JackMachClientChannel::Close\n");
+ JackLibGlobals::fGlobals->fClientTable.erase(fClientPort.GetPort());
+ fServerPort.DisconnectPort();
+ fClientPort.DestroyPort();
+
+ // TO CHECK
+ kern_return_t res;
+ if ((res = mach_port_destroy(mach_task_self(), fPrivatePort)) != KERN_SUCCESS) {
+ jack_error("JackMachClientChannel::Close err = %s", mach_error_string(res));
+ }
+}
+
+int JackMachClientChannel::Start()
+{
+ JackLog("JackMachClientChannel::Start\n");
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack client listener");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackMachClientChannel::Stop()
+{
+ JackLog("JackMachClientChannel::Stop\n");
+ fThread->Kill();
+}
+
+void JackMachClientChannel::ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ kern_return_t res = rpc_jack_client_new(fServerPort.GetPort(), (char*)name, &fPrivatePort, shared_engine, shared_client, shared_ports, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::ClientNew err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::ClientClose(int refnum, int* result)
+{
+ kern_return_t res = rpc_jack_client_close(fPrivatePort, refnum, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::ClientClose err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::ClientActivate(int refnum, int* result)
+{
+ kern_return_t res = rpc_jack_client_activate(fPrivatePort, refnum, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::ClientActivate err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::ClientDeactivate(int refnum, int* result)
+{
+ kern_return_t res = rpc_jack_client_deactivate(fPrivatePort, refnum, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::ClientDeactivate err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+{
+ kern_return_t res = rpc_jack_port_register(fPrivatePort, refnum, (char*)name, flags, buffer_size, port_index, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::PortRegister err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
+{
+ kern_return_t res = rpc_jack_port_unregister(fPrivatePort, refnum, port_index, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::PortUnRegister err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortConnect(int refnum, const char* src, const char* dst, int* result)
+{
+ kern_return_t res = rpc_jack_port_connect_name(fPrivatePort, refnum, (char*)src, (char*)dst, result);
+ if (res != KERN_SUCCESS) {
+ jack_error("JackMachClientChannel::PortConnect err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortDisconnect(int refnum, const char* src, const char* dst, int* result)
+{
+ kern_return_t res = rpc_jack_port_disconnect_name(fPrivatePort, refnum, (char*)src, (char*)dst, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::PortDisconnect err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ kern_return_t res = rpc_jack_port_connect(fPrivatePort, refnum, src, dst, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::PortConnect err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ kern_return_t res = rpc_jack_port_disconnect(fPrivatePort, refnum, src, dst, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::PortDisconnect err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::SetBufferSize(jack_nframes_t nframes, int* result)
+{
+ kern_return_t res = rpc_jack_set_buffer_size(fPrivatePort, nframes, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::SetBufferSize err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::SetFreewheel(int onoff, int* result)
+{
+ kern_return_t res = rpc_jack_set_freewheel(fPrivatePort, onoff, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::SetFreewheel err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::ReleaseTimebase(int refnum, int* result)
+{
+ kern_return_t res = rpc_jack_release_timebase(fPrivatePort, refnum, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::ReleaseTimebase err = %s", mach_error_string(res));
+ }
+}
+
+void JackMachClientChannel::SetTimebaseCallback(int refnum, int conditional, int* result)
+{
+ kern_return_t res = rpc_jack_set_timebase_callback(fPrivatePort, refnum, conditional, result);
+ if (res != KERN_SUCCESS) {
+ *result = -1;
+ jack_error("JackMachClientChannel::SetTimebaseCallback err = %s", mach_error_string(res));
+ }
+}
+
+bool JackMachClientChannel::Execute()
+{
+ kern_return_t res;
+ if ((res = mach_msg_server(JackRPCClient_server, 1024, fClientPort.GetPort(), 0)) != KERN_SUCCESS) {
+ jack_error("JackMachClientChannel::Execute err = %s", mach_error_string(res));
+ //fClient->ShutDown();
+ return false;
+ } else {
+ return true;
+ }
+}
+
+} // end of namespace
+
+
diff --git a/macosx/JackMachClientChannel.h b/macosx/JackMachClientChannel.h
new file mode 100644
index 00000000..8b3057a7
--- /dev/null
+++ b/macosx/JackMachClientChannel.h
@@ -0,0 +1,85 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMachClientChannel__
+#define __JackMachClientChannel__
+
+#include "JackChannel.h"
+#include "JackMachPort.h"
+#include "JackThread.h"
+
+namespace Jack
+{
+
+class JackLibClient;
+
+/*!
+\brief JackClientChannel using Mach IPC.
+*/
+
+class JackMachClientChannel : public JackClientChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackMachPort fClientPort; /*! Mach port to communicate with the server : from server to client */
+ JackMachPort fServerPort; /*! Mach port to communicate with the server : from client to server */
+ mach_port_t fPrivatePort;
+ JackThread* fThread; /*! Thread to execute the event loop */
+
+ public:
+
+ JackMachClientChannel();
+ virtual ~JackMachClientChannel();
+
+ int Open(const char* name, JackClient* obj);
+ void Close();
+
+ int Start();
+ void Stop();
+
+ void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void ClientClose(int refnum, int* result);
+
+ void ClientActivate(int refnum, int* result);
+ void ClientDeactivate(int refnum, int* result);
+
+ void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
+ void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
+
+ void PortConnect(int refnum, const char* src, const char* dst, int* result);
+ void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
+
+ void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+ void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+
+ void SetBufferSize(jack_nframes_t nframes, int* result);
+ void SetFreewheel(int onoff, int* result);
+
+ void ReleaseTimebase(int refnum, int* result);
+ void SetTimebaseCallback(int refnum, int conditional, int* result);
+
+ bool Execute();
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/macosx/JackMachNotifyChannel.cpp b/macosx/JackMachNotifyChannel.cpp
new file mode 100644
index 00000000..68b686e9
--- /dev/null
+++ b/macosx/JackMachNotifyChannel.cpp
@@ -0,0 +1,64 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachNotifyChannel.h"
+#include "JackRPCClient.h"
+#include "JackError.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+// Server side : server to client
+
+int JackMachNotifyChannel::Open(const char* name)
+{
+ JackLog("JackMachNotifyChannel::Open name = %s\n", name);
+
+ char buf[256];
+ snprintf(buf, sizeof(buf) - 1, "%s:%s", jack_client_entry, name);
+
+ // Connect to client notification port using client name
+ if (!fClientPort.ConnectPort(buf)) {
+ jack_error("Cannot connect client port");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackMachNotifyChannel::Close()
+{
+ fClientPort.DisconnectPort();
+}
+
+void JackMachNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result)
+{
+ *result = 0;
+ kern_return_t res = (sync)
+ ? rpc_jack_client_sync_notify(fClientPort.GetPort(), refnum, (char*)name, notify, value, result)
+ : rpc_jack_client_async_notify(fClientPort.GetPort(), refnum, (char*)name, notify, value);
+ if (res != KERN_SUCCESS) {
+ jack_error("JackMachNotifyChannel::ClientNotify: name = %s notify = %ld err = %s", name, notify, mach_error_string(res));
+ }
+}
+
+} // end of namespace
+
+
diff --git a/macosx/JackMachNotifyChannel.h b/macosx/JackMachNotifyChannel.h
new file mode 100644
index 00000000..f24406f4
--- /dev/null
+++ b/macosx/JackMachNotifyChannel.h
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMachNotifyChannel__
+#define __JackMachNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackMachPort.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackNotifyChannel using Mach IPC.
+*/
+
+class JackMachNotifyChannel : public JackNotifyChannelInterface
+{
+
+ private:
+
+ JackMachPort fClientPort; /*! Mach port to communicate with the client : from server to client */
+
+ public:
+
+ JackMachNotifyChannel()
+ {}
+ virtual ~JackMachNotifyChannel()
+ {}
+
+ int Open(const char* name); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ void ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/macosx/JackMachPort.cpp b/macosx/JackMachPort.cpp
new file mode 100644
index 00000000..e511bc27
--- /dev/null
+++ b/macosx/JackMachPort.cpp
@@ -0,0 +1,279 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachPort.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+// Server side : port is published to be accessible from other processes (clients)
+
+bool JackMachPort::AllocatePort(const char* name, int queue)
+{
+ mach_port_t task = mach_task_self();
+ kern_return_t res;
+
+ 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));
+ return false;
+ }
+
+ if ((res = mach_port_allocate(task, MACH_PORT_RIGHT_RECEIVE, &fServerPort)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: can't allocate mach port err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = mach_port_insert_right(task, fServerPort, fServerPort, MACH_MSG_TYPE_MAKE_SEND)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: error inserting mach rights err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = bootstrap_register(fBootPort, (char*)name, fServerPort)) != KERN_SUCCESS) {
+ jack_error("Allocate: can't check in mach port name = %s err = %s", name, mach_error_string(res));
+ return false;
+ }
+
+ mach_port_limits_t qlimits;
+ mach_msg_type_number_t info_cnt = MACH_PORT_LIMITS_INFO_COUNT;
+ if ((res = mach_port_get_attributes(task, fServerPort, MACH_PORT_LIMITS_INFO, (mach_port_info_t) & qlimits, &info_cnt)) != KERN_SUCCESS) {
+ jack_error("Allocate: mach_port_get_attributes error err = %s", name, mach_error_string(res));
+ }
+
+ JackLog("AllocatePort: queue limit %ld\n", qlimits.mpl_qlimit);
+
+ if (queue > 0 ) {
+ qlimits.mpl_qlimit = queue;
+ if ((res = mach_port_set_attributes(task, fServerPort, MACH_PORT_LIMITS_INFO, (mach_port_info_t) & qlimits, MACH_PORT_LIMITS_INFO_COUNT)) != KERN_SUCCESS) {
+ jack_error("Allocate: mach_port_set_attributes error name = %s err = %s", name, mach_error_string(res));
+ }
+ }
+
+ return true;
+}
+
+// Server side : port is published to be accessible from other processes (clients)
+
+bool JackMachPort::AllocatePort(const char* name)
+{
+ return AllocatePort(name, -1);
+}
+
+// Client side : get the published port from server
+
+bool JackMachPort::ConnectPort(const char* name)
+{
+ kern_return_t res;
+
+ JackLog("JackMachPort::ConnectPort %s\n", 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));
+ return false;
+ }
+
+ if ((res = bootstrap_look_up(fBootPort, (char*)name, &fServerPort)) != KERN_SUCCESS) {
+ jack_error("ConnectPort: can't find mach server port name = %s err = %s", name, mach_error_string(res));
+ return false;
+ }
+
+ return true;
+}
+
+bool JackMachPort::DisconnectPort()
+{
+ JackLog("JackMacRPC::DisconnectPort\n");
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+
+ if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) {
+ jack_error("JackMacRPC::DisconnectPort mach_port_deallocate fBootPort err = %s", mach_error_string(res));
+ }
+
+ if ((res = mach_port_deallocate(task, fServerPort)) != KERN_SUCCESS) {
+ jack_error("JackMacRPC::DisconnectPort mach_port_deallocate fServerPort err = %s", mach_error_string(res));
+ }
+
+ return true;
+}
+
+bool JackMachPort::DestroyPort()
+{
+ JackLog("JackMacRPC::DisconnectPort\n");
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+
+ if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) {
+ jack_error("JackMacRPC::DisconnectPort mach_port_deallocate fBootPort err = %s", mach_error_string(res));
+ }
+
+ if ((res = mach_port_destroy(task, fServerPort)) != KERN_SUCCESS) {
+ jack_error("JackMacRPC::DisconnectPort mach_port_destroy fServerPort err = %s", mach_error_string(res));
+ }
+
+ return true;
+}
+
+mach_port_t JackMachPort::GetPort()
+{
+ return fServerPort;
+}
+
+bool JackMachPortSet::AllocatePort(const char* name, int queue)
+{
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+
+ JackLog("JackMachPortSet::AllocatePort\n");
+
+ 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));
+ return false;
+ }
+
+ if ((res = mach_port_allocate(task, MACH_PORT_RIGHT_RECEIVE, &fServerPort)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: can't allocate mach port err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = mach_port_insert_right(task, fServerPort, fServerPort, MACH_MSG_TYPE_MAKE_SEND)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: error inserting mach rights err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = mach_port_allocate(task, MACH_PORT_RIGHT_PORT_SET, &fPortSet)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: can't allocate mach port err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = mach_port_move_member(task, fServerPort, fPortSet)) != KERN_SUCCESS) {
+ jack_error("AllocatePort: error in mach_port_move_member err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = bootstrap_register(fBootPort, (char*)name, fServerPort)) != KERN_SUCCESS) {
+ jack_error("Allocate: can't check in mach port name = %s err = %s", name, mach_error_string(res));
+ return false;
+ }
+
+ mach_port_limits_t qlimits;
+ mach_msg_type_number_t info_cnt = MACH_PORT_LIMITS_INFO_COUNT;
+ if ((res = mach_port_get_attributes(task, fServerPort, MACH_PORT_LIMITS_INFO, (mach_port_info_t) & qlimits, &info_cnt)) != KERN_SUCCESS) {
+ 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);
+
+ if (queue > 0 ) {
+ qlimits.mpl_qlimit = queue;
+
+ if ((res = mach_port_set_attributes(task, fServerPort, MACH_PORT_LIMITS_INFO, (mach_port_info_t) & qlimits, MACH_PORT_LIMITS_INFO_COUNT)) != KERN_SUCCESS) {
+ jack_error("Allocate: mach_port_set_attributes error name = %s err = %s", name, mach_error_string(res));
+ }
+ }
+
+ return true;
+}
+
+// Server side : port is published to be accessible from other processes (clients)
+
+bool JackMachPortSet::AllocatePort(const char* name)
+{
+ return AllocatePort(name, -1);
+}
+
+bool JackMachPortSet::DisconnectPort()
+{
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+
+ JackLog("JackMachPortSet::DisconnectPort\n");
+
+ if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) {
+ jack_error("JackMachPortSet::DisconnectPort mach_port_deallocate fBootPort err = %s", mach_error_string(res));
+ }
+
+ if ((res = mach_port_deallocate(task, fServerPort)) != KERN_SUCCESS) {
+ jack_error("JackMachPortSet::DisconnectPort mach_port_deallocate fServerPort err = %s", mach_error_string(res));
+ }
+
+ return true;
+}
+
+bool JackMachPortSet::DestroyPort()
+{
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+
+ JackLog("JackMachPortSet::DisconnectPort\n");
+
+ if ((res = mach_port_deallocate(task, fBootPort)) != KERN_SUCCESS) {
+ jack_error("JackMachPortSet::DisconnectPort mach_port_deallocate err = %s", mach_error_string(res));
+ }
+
+ if ((res = mach_port_destroy(task, fServerPort)) != KERN_SUCCESS) {
+ jack_error("JackMachPortSet::DisconnectPort mach_port_destroy fServerPort err = %s", mach_error_string(res));
+ }
+
+ return true;
+}
+
+mach_port_t JackMachPortSet::GetPortSet()
+{
+ return fPortSet;
+}
+
+mach_port_t JackMachPortSet::AddPort()
+{
+ kern_return_t res;
+ mach_port_t task = mach_task_self();
+ mach_port_t old_port, result = 0;
+
+ JackLog("JackMachPortSet::AddPort\n");
+
+ 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));
+ goto error;
+ }
+
+ if ((res = mach_port_request_notification(task, result, MACH_NOTIFY_NO_SENDERS,
+ 1, result, MACH_MSG_TYPE_MAKE_SEND_ONCE, &old_port)) != KERN_SUCCESS) {
+ jack_error("AddPort: error in mach_port_request_notification err = %s", mach_error_string(res));
+ goto error;
+ }
+
+ if ((res = mach_port_move_member(task, result, fPortSet)) != KERN_SUCCESS) {
+ jack_error("AddPort: error in mach_port_move_member err = %s", mach_error_string(res));
+ goto error;
+ }
+
+ return result;
+
+error:
+ if (result) {
+ if ((res = mach_port_destroy(task, result)) != KERN_SUCCESS) {
+ jack_error("JackMacRPC::DisconnectPort mach_port_destroy err = %s", mach_error_string(res));
+ }
+ }
+ return 0;
+}
+
+
+} // end of namespace
+
diff --git a/macosx/JackMachPort.h b/macosx/JackMachPort.h
new file mode 100644
index 00000000..993f02a5
--- /dev/null
+++ b/macosx/JackMachPort.h
@@ -0,0 +1,88 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMachPort__
+#define __JackMachPort__
+
+#include <mach/mach.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mach_error.h>
+#include <servers/bootstrap.h>
+
+namespace Jack
+{
+
+/*!
+\brief Mach port.
+*/
+
+class JackMachPort
+{
+
+ protected:
+
+ mach_port_t fBootPort;
+ mach_port_t fServerPort;
+
+ public:
+
+ JackMachPort()
+ {}
+ virtual ~JackMachPort()
+ {}
+
+ virtual bool AllocatePort(const char* name);
+ virtual bool AllocatePort(const char* name, int queue);
+ virtual bool ConnectPort(const char* name);
+ virtual bool DisconnectPort();
+ virtual bool DestroyPort();
+ virtual mach_port_t GetPort();
+};
+
+/*!
+\brief Mach port set.
+*/
+
+class JackMachPortSet : public JackMachPort
+{
+
+ private:
+
+ mach_port_t fPortSet;
+
+ public:
+
+ JackMachPortSet()
+ {}
+ virtual ~JackMachPortSet()
+ {}
+
+ bool AllocatePort(const char* name);
+ bool AllocatePort(const char* name, int queue);
+ bool DisconnectPort();
+ bool DestroyPort();
+ mach_port_t GetPortSet();
+ mach_port_t AddPort();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/macosx/JackMachSemaphore.cpp b/macosx/JackMachSemaphore.cpp
new file mode 100644
index 00000000..abcfc788
--- /dev/null
+++ b/macosx/JackMachSemaphore.cpp
@@ -0,0 +1,196 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachSemaphore.h"
+#include "JackError.h"
+#include <stdio.h>
+#include <assert.h>
+
+namespace Jack
+{
+
+mach_port_t JackMachSemaphore::fBootPort = 0;
+
+void JackMachSemaphore::BuildName(const char* name, char* res)
+{
+ sprintf(res, "jack_mach_sem.%s", name);
+}
+
+bool JackMachSemaphore::Signal()
+{
+ kern_return_t res;
+ assert(fSemaphore > 0);
+
+ if (fFlush)
+ return true;
+
+ if ((res = semaphore_signal(fSemaphore)) != KERN_SUCCESS) {
+ jack_error("JackMachSemaphore::Signal name = %s err = %s", fName, mach_error_string(res));
+ }
+ return (res == KERN_SUCCESS);
+}
+
+bool JackMachSemaphore::SignalAll()
+{
+ kern_return_t res;
+ assert(fSemaphore > 0);
+
+ if (fFlush)
+ return true;
+ // When signaled several times, do not accumulate signals...
+ if ((res = semaphore_signal_all(fSemaphore)) != KERN_SUCCESS) {
+ jack_error("JackMachSemaphore::SignalAll name = %s err = %s", fName, mach_error_string(res));
+ }
+ return (res == KERN_SUCCESS);
+}
+
+bool JackMachSemaphore::Wait()
+{
+ kern_return_t res;
+ assert(fSemaphore > 0);
+ if ((res = semaphore_wait(fSemaphore)) != KERN_SUCCESS) {
+ jack_error("JackMachSemaphore::Wait name = %s err = %s", fName, mach_error_string(res));
+ }
+ return (res == KERN_SUCCESS);
+}
+
+bool JackMachSemaphore::TimedWait(long usec)
+{
+ kern_return_t res;
+ mach_timespec time;
+ time.tv_sec = usec / 1000000;
+ time.tv_nsec = (usec % 1000000) * 1000;
+ assert(fSemaphore > 0);
+ if ((res = semaphore_timedwait(fSemaphore, time)) != KERN_SUCCESS) {
+ jack_error("JackMachSemaphore::TimedWait name = %s err = %s", fName, mach_error_string(res));
+ }
+ return (res == KERN_SUCCESS);
+}
+
+// Server side : publish the semaphore in the global namespace
+bool JackMachSemaphore::Allocate(const char* name, int value)
+{
+ BuildName(name, fName);
+ mach_port_t task = mach_task_self();
+ kern_return_t res;
+
+ if (fBootPort == 0) {
+ if ((res = task_get_bootstrap_port(task, &fBootPort)) != KERN_SUCCESS) {
+ jack_error("Allocate: Can't find bootstrap mach port err = %s", mach_error_string(res));
+ return false;
+ }
+ }
+
+ if ((res = semaphore_create(task, &fSemaphore, SYNC_POLICY_FIFO, value)) != KERN_SUCCESS) {
+ jack_error("Allocate: can create semaphore err = %s", mach_error_string(res));
+ return false;
+ }
+
+ if ((res = bootstrap_register(fBootPort, fName, fSemaphore)) != KERN_SUCCESS) {
+ jack_error("Allocate: can't check in mach semaphore name = %s err = %s", fName, mach_error_string(res));
+
+ switch (res) {
+ case BOOTSTRAP_SUCCESS :
+ /* service not currently registered, "a good thing" (tm) */
+ break;
+ case BOOTSTRAP_NOT_PRIVILEGED :
+ JackLog("bootstrap_register(): bootstrap not privileged\n");
+ break;
+ case BOOTSTRAP_SERVICE_ACTIVE :
+ JackLog("bootstrap_register(): bootstrap service active\n");
+ break;
+ default :
+ JackLog("bootstrap_register() err = %s\n", mach_error_string(res));
+ break;
+ }
+
+ return false;
+ }
+
+ JackLog("JackMachSemaphore::Allocate name = %s\n", fName);
+ return true;
+}
+
+// Client side : get the published semaphore from server
+bool JackMachSemaphore::ConnectInput(const char* name)
+{
+ BuildName(name, fName);
+ kern_return_t res;
+
+ // Temporary... A REVOIR
+ /*
+ if (fSemaphore > 0) {
+ JackLog("Already connected name = %s\n", name);
+ return true;
+ }
+ */
+
+ if (fBootPort == 0) {
+ if ((res = task_get_bootstrap_port(mach_task_self(), &fBootPort)) != KERN_SUCCESS) {
+ jack_error("Connect: can't find bootstrap port err = %s", mach_error_string(res));
+ return false;
+ }
+ }
+
+ if ((res = bootstrap_look_up(fBootPort, fName, &fSemaphore)) != KERN_SUCCESS) {
+ jack_error("Connect: can't find mach semaphore name = %s err = %s", fName, mach_error_string(res));
+ return false;
+ }
+
+ JackLog("JackMachSemaphore::Connect name = %s \n", fName);
+ return true;
+}
+
+bool JackMachSemaphore::Connect(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackMachSemaphore::ConnectOutput(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackMachSemaphore::Disconnect()
+{
+ if (fSemaphore > 0) {
+ JackLog("JackMachSemaphore::Disconnect name = %s\n", fName);
+ }
+ // Nothing to do
+ return true;
+}
+
+// Server side : destroy the JackGlobals
+void JackMachSemaphore::Destroy()
+{
+ kern_return_t res;
+
+ if (fSemaphore > 0) {
+ JackLog("JackMachSemaphore::Destroy\n");
+ if ((res = semaphore_destroy(mach_task_self(), fSemaphore)) != KERN_SUCCESS) {
+ jack_error("JackMachSemaphore::Destroy can't destroy semaphore err = %s", mach_error_string(res));
+ }
+ fSemaphore = 0;
+ } else {
+ jack_error("JackMachSemaphore::Destroy semaphore < 0");
+ }
+}
+
+} // end of namespace
+
diff --git a/macosx/JackMachSemaphore.h b/macosx/JackMachSemaphore.h
new file mode 100644
index 00000000..465d4b0f
--- /dev/null
+++ b/macosx/JackMachSemaphore.h
@@ -0,0 +1,75 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMacSemaphore__
+#define __JackMacSemaphore__
+
+#include "JackSynchro.h"
+#include <mach/mach.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mach_error.h>
+#include <servers/bootstrap.h>
+#include <mach/semaphore.h>
+
+namespace Jack
+{
+
+/*!
+\brief Inter process synchronization using using Mach semaphore.
+*/
+
+class JackMachSemaphore : public JackSynchro
+{
+
+ private:
+
+ semaphore_t fSemaphore;
+ static mach_port_t fBootPort;
+
+ protected:
+
+ void BuildName(const char* name, char* res);
+
+ public:
+
+ JackMachSemaphore(): JackSynchro(), fSemaphore(0)
+ {}
+ virtual ~JackMachSemaphore()
+ {}
+
+ bool Signal();
+ bool SignalAll();
+ bool Wait();
+ bool TimedWait(long usec);
+
+ bool Allocate(const char* name, int value);
+ bool Connect(const char* name);
+ bool ConnectInput(const char* name);
+ bool ConnectOutput(const char* name);
+ bool Disconnect();
+ void Destroy();
+};
+
+
+} // end of namespace
+
+
+#endif
+
diff --git a/macosx/JackMachServerChannel.cpp b/macosx/JackMachServerChannel.cpp
new file mode 100644
index 00000000..57d4578a
--- /dev/null
+++ b/macosx/JackMachServerChannel.cpp
@@ -0,0 +1,152 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachServerChannel.h"
+#include "JackRPCEngineServer.c"
+#include "JackError.h"
+#include "JackServer.h"
+#include "JackMachThread.h"
+#include "JackEngine.h"
+
+using namespace std;
+
+namespace Jack
+{
+
+map<mach_port_t, JackMachServerChannel*> JackMachServerChannel::fPortTable;
+
+JackMachServerChannel::JackMachServerChannel()
+{
+ fThread = new JackMachThread(this);
+}
+
+JackMachServerChannel::~JackMachServerChannel()
+{
+ delete fThread;
+}
+
+int JackMachServerChannel::Open(JackServer* server)
+{
+ JackLog("JackMachServerChannel::Open\n");
+
+ if (!fServerPort.AllocatePort(jack_server_entry, 16)) { // 16 is the max possible value
+ jack_error("Cannot check in Jack server");
+ return -1;
+ }
+
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack server listener");
+ return -1;
+ }
+
+ fServer = server;
+ fPortTable[fServerPort.GetPort()] = this;
+ return 0;
+}
+
+void JackMachServerChannel::Close()
+{
+ JackLog("JackMachServerChannel::Close\n");
+ fThread->Kill();
+ fServerPort.DestroyPort();
+}
+
+JackEngine* JackMachServerChannel::GetEngine()
+{
+ return fServer->GetEngine();
+}
+
+JackServer* JackMachServerChannel::GetServer()
+{
+ return fServer;
+}
+
+void JackMachServerChannel::AddClient(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ int refnum = -1;
+ *result = GetEngine()->ClientNew(name, &refnum, shared_engine, shared_client, shared_ports);
+
+ if (*result == 0) {
+ mach_port_t port = fServerPort.AddPort();
+ if (port != 0) {
+ fClientTable[port] = refnum;
+ fPortTable[port] = this;
+ *private_port = port;
+ } else {
+ jack_error("Cannot create private client mach port");
+ *result = -1;
+ }
+ } else {
+ jack_error("Cannot create new client");
+ }
+}
+
+void JackMachServerChannel::RemoveClient(mach_port_t private_port, int refnum)
+{
+ GetEngine()->ClientClose(refnum);
+ fClientTable.erase(private_port);
+
+ // Hum, hum....
+ kern_return_t res;
+ if ((res = mach_port_destroy(mach_task_self(), private_port)) != KERN_SUCCESS) {
+ jack_error("server_rpc_jack_client_close mach_port_destroy %s", mach_error_string(res));
+ }
+}
+
+void JackMachServerChannel::KillClient(mach_port_t private_port)
+{
+ JackLog("JackMachServerChannel::KillClient\n");
+ int refnum = fClientTable[private_port];
+ assert(refnum > 0);
+ fServer->Notify(refnum, JackNotifyChannelInterface::kDeadClient, 0);
+ fClientTable.erase(private_port);
+
+ // Hum, hum....
+ kern_return_t res;
+ if ((res = mach_port_destroy(mach_task_self(), private_port)) != KERN_SUCCESS) {
+ jack_error("server_rpc_jack_client_close mach_port_destroy %s", mach_error_string(res));
+ }
+}
+
+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);
+ JackMachServerChannel* channel = JackMachServerChannel::fPortTable[Request->msgh_local_port];
+ assert(channel);
+ channel->KillClient(Request->msgh_local_port);
+ } else {
+ JackRPCEngine_server(Request, Reply);
+ }
+ return true;
+}
+
+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));
+ }
+ //return (res == KERN_SUCCESS); mach_msg_server can fail if the client reply port is not valid anymore (crashed client)
+ return true;
+}
+
+} // end of namespace
+
+
diff --git a/macosx/JackMachServerChannel.h b/macosx/JackMachServerChannel.h
new file mode 100644
index 00000000..b88a360a
--- /dev/null
+++ b/macosx/JackMachServerChannel.h
@@ -0,0 +1,73 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMachServerChannel__
+#define __JackMachServerChannel__
+
+#include "JackChannel.h"
+#include "JackThread.h"
+#include "JackMachPort.h"
+#include <map>
+
+namespace Jack
+{
+
+class JackServer;
+class JackEngine;
+
+/*!
+\brief JackServerChannel using Mach IPC.
+*/
+
+class JackMachServerChannel : public JackServerChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackMachPortSet fServerPort; /*! Mach port to communicate with the server : from client to server */
+ JackThread* fThread; /*! Thread to execute the event loop */
+ JackServer* fServer;
+ std::map<mach_port_t, int> fClientTable;
+
+ static boolean_t MessageHandler(mach_msg_header_t* Request, mach_msg_header_t* Reply);
+
+ public:
+
+ JackMachServerChannel();
+ virtual ~JackMachServerChannel();
+
+ int Open(JackServer* server); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ JackEngine* GetEngine();
+ JackServer* GetServer();
+
+ void AddClient(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void RemoveClient(mach_port_t private_port, int refnum);
+ void KillClient(mach_port_t private_port);
+
+ bool Execute();
+
+ static std::map<mach_port_t, JackMachServerChannel*> fPortTable;
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/macosx/JackMachServerNotifyChannel.cpp b/macosx/JackMachServerNotifyChannel.cpp
new file mode 100644
index 00000000..94ac3aa3
--- /dev/null
+++ b/macosx/JackMachServerNotifyChannel.cpp
@@ -0,0 +1,54 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachServerNotifyChannel.h"
+#include "JackRPCEngineUser.c"
+#include "JackError.h"
+
+namespace Jack
+{
+
+int JackMachServerNotifyChannel::Open()
+{
+ JackLog("JackMachServerChannel::Open\n");
+
+ if (!fClientPort.ConnectPort(jack_server_entry)) {
+ jack_error("Cannot connect to server port");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackMachServerNotifyChannel::Close()
+{
+ //fClientPort.DisconnectPort(); pas nŽcessaire car le JackMachServerChannel a dŽja disparu?
+}
+
+void JackMachServerNotifyChannel::ClientNotify(int refnum, int notify, int value)
+{
+ kern_return_t res = rpc_jack_client_rt_notify(fClientPort.GetPort(), refnum, notify, value, 0);
+ if (res != KERN_SUCCESS) {
+ jack_error("JackMachServerNotifyChannel::ClientNotify: ref = %ld notify = %ld err = %s", refnum, notify, mach_error_string(res));
+ }
+}
+
+} // end of namespace
+
+
diff --git a/macosx/JackMachServerNotifyChannel.h b/macosx/JackMachServerNotifyChannel.h
new file mode 100644
index 00000000..44d31a2d
--- /dev/null
+++ b/macosx/JackMachServerNotifyChannel.h
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackMachServerNotifyChannel__
+#define __JackMachServerNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackMachPort.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackServerNotifyChannel using Mach IPC.
+*/
+
+class JackMachServerNotifyChannel : public JackServerNotifyChannelInterface
+{
+
+ private:
+
+ JackMachPort fClientPort; /*! Mach port to communicate with the server : from client to server */
+
+ public:
+
+ JackMachServerNotifyChannel()
+ {}
+ virtual ~JackMachServerNotifyChannel()
+ {}
+
+ int Open(); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ void ClientNotify(int refnum, int notify, int value);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/macosx/JackMachThread.cpp b/macosx/JackMachThread.cpp
new file mode 100644
index 00000000..00733c1f
--- /dev/null
+++ b/macosx/JackMachThread.cpp
@@ -0,0 +1,193 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackMachThread.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+int JackMachThread::SetThreadToPriority(pthread_t thread, UInt32 inPriority, Boolean inIsFixed, UInt64 period, UInt64 computation, UInt64 constraint)
+{
+ if (inPriority == 96) {
+ // REAL-TIME / TIME-CONSTRAINT THREAD
+ thread_time_constraint_policy_data_t theTCPolicy;
+
+ theTCPolicy.period = AudioConvertNanosToHostTime(period);
+ theTCPolicy.computation = AudioConvertNanosToHostTime(computation);
+ 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);
+ return (res == KERN_SUCCESS) ? 0 : -1;
+ } else {
+ // OTHER THREADS
+ thread_extended_policy_data_t theFixedPolicy;
+ thread_precedence_policy_data_t thePrecedencePolicy;
+ SInt32 relativePriority;
+
+ // [1] SET FIXED / NOT FIXED
+ theFixedPolicy.timeshare = !inIsFixed;
+ thread_policy_set(pthread_mach_thread_np(thread), THREAD_EXTENDED_POLICY, (thread_policy_t)&theFixedPolicy, THREAD_EXTENDED_POLICY_COUNT);
+
+ // [2] SET PRECEDENCE
+ // N.B.: We expect that if thread A created thread B, and the program wishes to change
+ // the priority of thread B, then the call to change the priority of thread B must be
+ // made by thread A.
+ // This assumption allows us to use pthread_self() to correctly calculate the priority
+ // of the feeder thread (since precedency policy's importance is relative to the
+ // spawning thread's priority.)
+ relativePriority = inPriority - GetThreadSetPriority(pthread_self());
+
+ 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);
+ return (res == KERN_SUCCESS) ? 0 : -1;
+ }
+}
+
+// returns the thread's priority as it was last set by the API
+UInt32 JackMachThread::GetThreadSetPriority(pthread_t thread)
+{
+ return GetThreadPriority(thread, THREAD_SET_PRIORITY);
+}
+
+// returns the thread's priority as it was last scheduled by the Kernel
+UInt32 JackMachThread::GetThreadScheduledPriority(pthread_t thread)
+{
+ return GetThreadPriority(thread, THREAD_SCHEDULED_PRIORITY);
+}
+
+UInt32 JackMachThread::GetThreadPriority(pthread_t thread, int inWhichPriority)
+{
+ thread_basic_info_data_t threadInfo;
+ policy_info_data_t thePolicyInfo;
+ unsigned int count;
+
+ // get basic info
+ count = THREAD_BASIC_INFO_COUNT;
+ thread_info(pthread_mach_thread_np(thread), THREAD_BASIC_INFO, (thread_info_t)&threadInfo, &count);
+
+ switch (threadInfo.policy) {
+ case POLICY_TIMESHARE:
+ count = POLICY_TIMESHARE_INFO_COUNT;
+ thread_info(pthread_mach_thread_np(thread), THREAD_SCHED_TIMESHARE_INFO, (thread_info_t)&(thePolicyInfo.ts), &count);
+ if (inWhichPriority == THREAD_SCHEDULED_PRIORITY) {
+ return thePolicyInfo.ts.cur_priority;
+ } else {
+ return thePolicyInfo.ts.base_priority;
+ }
+ break;
+
+ case POLICY_FIFO:
+ count = POLICY_FIFO_INFO_COUNT;
+ thread_info(pthread_mach_thread_np(thread), THREAD_SCHED_FIFO_INFO, (thread_info_t)&(thePolicyInfo.fifo), &count);
+ if ( (thePolicyInfo.fifo.depressed) && (inWhichPriority == THREAD_SCHEDULED_PRIORITY) ) {
+ return thePolicyInfo.fifo.depress_priority;
+ }
+ return thePolicyInfo.fifo.base_priority;
+ break;
+
+ case POLICY_RR:
+ count = POLICY_RR_INFO_COUNT;
+ thread_info(pthread_mach_thread_np(thread), THREAD_SCHED_RR_INFO, (thread_info_t)&(thePolicyInfo.rr), &count);
+ if ( (thePolicyInfo.rr.depressed) && (inWhichPriority == THREAD_SCHEDULED_PRIORITY) ) {
+ return thePolicyInfo.rr.depress_priority;
+ }
+ return thePolicyInfo.rr.base_priority;
+ break;
+ }
+
+ return 0;
+}
+
+int JackMachThread::GetParams(UInt64* period, UInt64* computation, UInt64* constraint)
+{
+ thread_time_constraint_policy_data_t theTCPolicy;
+ mach_msg_type_number_t count = THREAD_TIME_CONSTRAINT_POLICY_COUNT;
+ boolean_t get_default = false;
+
+ kern_return_t res = thread_policy_get(pthread_mach_thread_np(pthread_self()),
+ THREAD_TIME_CONSTRAINT_POLICY,
+ (thread_policy_t) & theTCPolicy,
+ &count,
+ &get_default);
+ if (res == KERN_SUCCESS) {
+ *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));
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackMachThread::Kill()
+{
+ // pthread_cancel still not yet implemented in Darwin (TO CHECK ON TIGER)
+
+ if (fThread) { // If thread has been started
+ mach_port_t machThread = pthread_mach_thread_np(fThread);
+ return (thread_terminate(machThread) == KERN_SUCCESS) ? 0 : -1;
+ } else {
+ return -1;
+ }
+}
+
+/*
+int JackMachThread::AcquireRealTime()
+{
+ JackLog("JackMachThread::AcquireRealTime fPeriod = %ld fComputation = %ld fConstraint = %ld\n",
+ long(fPeriod / 1000), long(fComputation / 1000), long(fConstraint / 1000));
+ return (fThread) ? SetThreadToPriority(fThread, 96, true, fPeriod, fComputation, fConstraint) : -1;
+}
+*/
+
+int JackMachThread::AcquireRealTime()
+{
+ JackLog("JackMachThread::AcquireRealTime fPeriod = %ld fComputation = %ld fConstraint = %ld\n",
+ long(fPeriod / 1000), long(fComputation / 1000), long(fConstraint / 1000));
+ if (fThread) {
+ SetThreadToPriority(fThread, 96, true, fPeriod, fComputation, fConstraint);
+ UInt64 fPeriod;
+ UInt64 fComputation;
+ UInt64 fConstraint;
+ GetParams(&fPeriod, &fComputation, &fConstraint);
+ return 0;
+ } else
+ return -1;
+}
+
+int JackMachThread::DropRealTime()
+{
+ //return (fThread) ? SetThreadToPriority(fThread, 31, false, 0, 0, 0) : -1;
+ return (fThread) ? SetThreadToPriority(fThread, 63, false, 0, 0, 0) : -1;
+}
+
+void JackMachThread::SetParams(UInt64 period, UInt64 computation, UInt64 constraint)
+{
+ fPeriod = period;
+ fComputation = computation;
+ fConstraint = constraint;
+}
+
+} // end of namespace
+
diff --git a/macosx/JackMachThread.h b/macosx/JackMachThread.h
new file mode 100644
index 00000000..77d76142
--- /dev/null
+++ b/macosx/JackMachThread.h
@@ -0,0 +1,121 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+/*
+ Copyright: © Copyright 2002 Apple Computer, Inc. All rights reserved.
+
+ Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
+ ("Apple") in consideration of your agreement to the following terms, and your
+ use, installation, modification or redistribution of this Apple software
+ constitutes acceptance of these terms. If you do not agree with these terms,
+ please do not use, install, modify or redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject
+ to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
+ copyrights in this original Apple software (the "Apple Software"), to use,
+ reproduce, modify and redistribute the Apple Software, with or without
+ modifications, in source and/or binary forms; provided that if you redistribute
+ the Apple Software in its entirety and without modifications, you must retain
+ this notice and the following text and disclaimers in all such redistributions of
+ the Apple Software. Neither the name, trademarks, service marks or logos of
+ Apple Computer, Inc. may be used to endorse or promote products derived from the
+ Apple Software without specific prior written permission from Apple. Except as
+ expressly stated in this notice, no other rights or licenses, express or implied,
+ are granted by Apple herein, including but not limited to any patent rights that
+ may be infringed by your derivative works or by other works in which the Apple
+ Software may be incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+ WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+ COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+ OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
+ (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef __JackMachThread__
+#define __JackMachThread__
+
+#include "JackPosixThread.h"
+#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
+
+#include <mach/thread_policy.h>
+#include <mach/thread_act.h>
+#include <CoreAudio/HostTime.h>
+
+#define THREAD_SET_PRIORITY 0
+#define THREAD_SCHEDULED_PRIORITY 1
+
+namespace Jack
+{
+
+/*!
+\brief Darwin threads. Real-time threads are actually "time constraint" threads.
+*/
+
+class JackMachThread : public JackPosixThread
+{
+
+ private:
+
+ UInt64 fPeriod;
+ UInt64 fComputation;
+ UInt64 fConstraint;
+
+ static UInt32 GetThreadSetPriority(pthread_t thread);
+ static UInt32 GetThreadScheduledPriority(pthread_t thread);
+ static UInt32 GetThreadPriority(pthread_t thread, int inWhichPriority);
+
+ public:
+
+ JackMachThread(JackRunnableInterface* runnable, UInt64 period, UInt64 computation, UInt64 constraint)
+ : JackPosixThread(runnable), fPeriod(period), fComputation(computation), fConstraint(constraint)
+ {}
+
+ JackMachThread(JackRunnableInterface* runnable)
+ : JackPosixThread(runnable), fPeriod(0), fComputation(0), fConstraint(0)
+ {}
+ JackMachThread(JackRunnableInterface* runnable, int cancellation)
+ : JackPosixThread(runnable, cancellation), fPeriod(0), fComputation(0), fConstraint(0)
+ {}
+
+ virtual ~JackMachThread()
+ {}
+
+ int Kill();
+
+ int AcquireRealTime();
+ int DropRealTime();
+ void SetParams(UInt64 period, UInt64 computation, UInt64 constraint);
+ static int GetParams(UInt64* period, UInt64* computation, UInt64* constraint);
+ static int SetThreadToPriority(pthread_t thread, UInt32 inPriority, Boolean inIsFixed, UInt64 period, UInt64 computation, UInt64 constraint);
+};
+
+} // end of namespace
+
+#endif
diff --git a/macosx/Jackdmp.xcode/project.pbxproj b/macosx/Jackdmp.xcode/project.pbxproj
new file mode 100644
index 00000000..f070c190
--- /dev/null
+++ b/macosx/Jackdmp.xcode/project.pbxproj
@@ -0,0 +1,5103 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 39;
+ objects = {
+ 014CEA460018CE2711CA2923 = {
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ ZERO_LINK = YES;
+ };
+ isa = PBXBuildStyle;
+ name = Development;
+ };
+ 014CEA470018CE2711CA2923 = {
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ ZERO_LINK = NO;
+ };
+ isa = PBXBuildStyle;
+ name = Deployment;
+ };
+//010
+//011
+//012
+//013
+//014
+//020
+//021
+//022
+//023
+//024
+ 0249A662FF388D9811CA2CEA = {
+ children = (
+ 0249A663FF388D9811CA2CEA,
+ );
+ isa = PBXGroup;
+ name = "External Frameworks and Libraries";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 0249A663FF388D9811CA2CEA = {
+ isa = PBXFileReference;
+ lastKnownFileType = archive.ar;
+ name = "libstdc++.a";
+ path = "/usr/lib/libstdc++.a";
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+//020
+//021
+//022
+//023
+//024
+//080
+//081
+//082
+//083
+//084
+ 08FB7793FE84155DC02AAC07 = {
+ buildSettings = {
+ };
+ buildStyles = (
+ 014CEA460018CE2711CA2923,
+ 014CEA470018CE2711CA2923,
+ );
+ hasScannedForEncodings = 1;
+ isa = PBXProject;
+ mainGroup = 08FB7794FE84155DC02AAC07;
+ projectDirPath = "";
+ targets = (
+ 4BF2955B08BC475500F2602F,
+ 4BF393190626B68F00CC67FA,
+ 4BF2124508DADBB5008D17F1,
+ 4B646BED0636CC42003B5396,
+ 4BF5925D08F13D81005B1F5F,
+ 4B646C310636CEE6003B5396,
+ 4B7D792E0637B848001E7115,
+ 4B89C81506382F5800464BF4,
+ 4B9686230771CA08002D75D5,
+ 4B1CBE2607994C6F0096ABE0,
+ 4BD81C7F07ACD3DE00ACB953,
+ 4B420C8107733D7C00DDA57E,
+ 4B1CBD7B0799484F0096ABE0,
+ 4B50A111080917BA003F4C95,
+ 4BA577B308BF8BAB00F82DE1,
+ 4BA577D908BF8E0600F82DE1,
+ 4BBD13AA08C71A480079F7FF,
+ 4B2C28D008DACC6B00249230,
+ 4B0C911D08DAF32100AE19BE,
+ );
+ };
+ 08FB7794FE84155DC02AAC07 = {
+ children = (
+ 08FB7795FE84155DC02AAC07,
+ C6859E8C029090F304C91782,
+ 0249A662FF388D9811CA2CEA,
+ 1AB674ADFE9D54B511CA2CBB,
+ 4B464301076CAC7700E5077C,
+ );
+ isa = PBXGroup;
+ name = JackServer;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 08FB7795FE84155DC02AAC07 = {
+ children = (
+ 4B6BEB4A07A6CCDC00A5DBDA,
+ 4B37C20006DF1F900016E567,
+ 4B03383E0797E19900686131,
+ 4B765CC805ECE17900571F78,
+ 4BA550FC05E2421400569492,
+ 4BA33DF905EDFD8C000CCD5F,
+ 4BA3874007947A46008D8992,
+ 4BA550FF05E2423600569492,
+ 4BA550F605E241B800569492,
+ 4BA3873B079479C2008D8992,
+ 4BA550FA05E241F200569492,
+ 4BD56D74079687D7006D44F9,
+ 4BA550FB05E2420000569492,
+ 4B9B627005E60A9E001E19AA,
+ );
+ isa = PBXGroup;
+ name = Source;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+//080
+//081
+//082
+//083
+//084
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+ 1AB674ADFE9D54B511CA2CBB = {
+ children = (
+ 4BF3931A0626B68F00CC67FA,
+ 4B646BEE0636CC42003B5396,
+ 4B646C320636CEE6003B5396,
+ 4B7D792F0637B848001E7115,
+ 4B89C81606382F5800464BF4,
+ 4B9686240771CA08002D75D5,
+ 4B420C8207733D7C00DDA57E,
+ 4B1CBD7C0799484F0096ABE0,
+ 4B1CBE2707994C6F0096ABE0,
+ 4BD81C8507ACD3DE00ACB953,
+ 4B50A112080917BA003F4C95,
+ 4BA577B408BF8BAB00F82DE1,
+ 4BA577E508BF8E0600F82DE1,
+ 4BBD13B608C71A480079F7FF,
+ 4B2C28D108DACC6B00249230,
+ 4BF212A808DADBB5008D17F1,
+ 4B0C912308DAF32100AE19BE,
+ 4BF592A008F13D81005B1F5F,
+ );
+ isa = PBXGroup;
+ name = Products;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+//4B0
+//4B1
+//4B2
+//4B3
+//4B4
+ 4B003A6008E2A87A0060EFDC = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = JackError.c;
+ path = ../common/JackError.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B003A6108E2A87A0060EFDC = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B003A6308E2A87A0060EFDC = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B003AB008E2B2BA0060EFDC = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = ringbuffer.c;
+ path = ../common/ringbuffer.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B003AB108E2B2BA0060EFDC = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = ringbuffer.h;
+ path = ../common/ringbuffer.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B003AB408E2B2BA0060EFDC = {
+ fileRef = 4B003AB008E2B2BA0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B003AB508E2B2BA0060EFDC = {
+ fileRef = 4B003AB108E2B2BA0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B03383E0797E19900686131 = {
+ children = (
+ 4BF8D1670834EDD900C94B91,
+ 4BF8D1690834EDE600C94B91,
+ 4BF8D16B0834EDF000C94B91,
+ 4BF8D16D0834EDFF00C94B91,
+ 4BF8D1710834EE0F00C94B91,
+ 4BF8D1730834EE2800C94B91,
+ 4BF8D1750834EE3600C94B91,
+ );
+ isa = PBXGroup;
+ name = "Simple clients";
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B0C911D08DAF32100AE19BE = {
+ buildPhases = (
+ 4B0C911E08DAF32100AE19BE,
+ 4B0C912008DAF32100AE19BE,
+ 4B0C912208DAF32100AE19BE,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackdmp -framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXNativeTarget;
+ name = jack_dummy;
+ productName = jack_coreaudio;
+ productReference = 4B0C912308DAF32100AE19BE;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B0C911E08DAF32100AE19BE = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B0C912708DAF34400AE19BE,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B0C912008DAF32100AE19BE = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B0C912608DAF34400AE19BE,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B0C912208DAF32100AE19BE = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B0C912308DAF32100AE19BE = {
+ explicitFileType = "compiled.mach-o.dylib";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_dummy.so;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B0C912608DAF34400AE19BE = {
+ fileRef = 4BC3988908B3CF6C00B6F371;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B0C912708DAF34400AE19BE = {
+ fileRef = 4BC3988A08B3CF6C00B6F371;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B0C912808DAF35900AE19BE = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4B0C911D08DAF32100AE19BE;
+ remoteInfo = jack_dummy;
+ };
+ 4B0C912908DAF35900AE19BE = {
+ isa = PBXTargetDependency;
+ target = 4B0C911D08DAF32100AE19BE;
+ targetProxy = 4B0C912808DAF35900AE19BE;
+ };
+ 4B123D3308B3954300540632 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackGlobalsClient.cpp;
+ path = ../common/JackGlobalsClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B123D3508B3954300540632 = {
+ fileRef = 4B123D3308B3954300540632;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B123D3608B3954A00540632 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackGlobalsServer.cpp;
+ path = ../common/JackGlobalsServer.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B123D3708B3954A00540632 = {
+ fileRef = 4B123D3608B3954A00540632;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B168CA3076A5319005B2802 = {
+ children = (
+ 4B89B759076B731100D170DE,
+ 4B4259E5076B635E00C1ECE1,
+ );
+ isa = PBXGroup;
+ name = MIG_RPC;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B168CA4076A5333005B2802 = {
+ children = (
+ 4B89B769076B74D200D170DE,
+ 4BF3937C0626BF3600CC67FA,
+ );
+ isa = PBXGroup;
+ name = MIG_RPC;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B1880CB09A1DDF100154099 = {
+ fileRef = 4B3B987C09A1DD2500BF62ED;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B1880CC09A1DDF100154099 = {
+ fileRef = 4B3B987D09A1DD2500BF62ED;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B1CBD770799484F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D24A0834F21300C94B91,
+ 4BF8D24C0834F21E00C94B91,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD780799484F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D2480834F20600C94B91,
+ 4BF8D24B0834F21E00C94B91,
+ 4BBD140A08C739A10079F7FF,
+ 4BBD140B08C739A60079F7FF,
+ 4BBD140C08C739B00079F7FF,
+ 4BBD140D08C739B60079F7FF,
+ 4B283863093607430079C47F,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD790799484F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD7A0799484F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD7B0799484F0096ABE0 = {
+ buildPhases = (
+ 4B1CBD770799484F0096ABE0,
+ 4B1CBD780799484F0096ABE0,
+ 4B1CBD790799484F0096ABE0,
+ 4B1CBD7A0799484F0096ABE0,
+ );
+ buildSettings = {
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework AudioToolBox -framework CoreAudio";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = testSem;
+ productInstallPath = /usr/local/bin;
+ productName = testSem;
+ productReference = 4B1CBD7C0799484F0096ABE0;
+ };
+ 4B1CBD7C0799484F0096ABE0 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = testSem;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B1CBE2207994C6F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2307994C6F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1720834EE0F00C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2407994C6F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2507994C6F0096ABE0 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2607994C6F0096ABE0 = {
+ buildPhases = (
+ 4B1CBE2207994C6F0096ABE0,
+ 4B1CBE2307994C6F0096ABE0,
+ 4B1CBE2407994C6F0096ABE0,
+ 4B1CBE2507994C6F0096ABE0,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp -framework CoreFoundation";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ 4BA88D9508BE632C000095BE,
+ );
+ isa = PBXToolTarget;
+ name = jack_freewheel;
+ productInstallPath = /usr/local/bin;
+ productName = jack_freewheel;
+ productReference = 4B1CBE2707994C6F0096ABE0;
+ };
+ 4B1CBE2707994C6F0096ABE0 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_freewheel;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B283863093607430079C47F = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B2C28BF08DACA8200249230 = {
+ fileRef = 4B869D7F08C9CB00001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B2C28CD08DACC6B00249230 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF2124408DADA90008D17F1,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28CE08DACC6B00249230 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B2C28D208DACC9B00249230,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28CF08DACC6B00249230 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28D008DACC6B00249230 = {
+ buildPhases = (
+ 4B2C28CD08DACC6B00249230,
+ 4B2C28CE08DACC6B00249230,
+ 4B2C28CF08DACC6B00249230,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = "-framework Jackdmp -framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXNativeTarget;
+ name = jack_coreaudio;
+ productName = jack_coreaudio;
+ productReference = 4B2C28D108DACC6B00249230;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B2C28D108DACC6B00249230 = {
+ explicitFileType = "compiled.mach-o.dylib";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_coreaudio.so;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B2C28D208DACC9B00249230 = {
+ fileRef = 4B395C9606AEF53800923527;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B2C28F908DAD01E00249230 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackGlobals.cpp;
+ path = ../common/JackGlobals.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B2C28FA08DAD01E00249230 = {
+ fileRef = 4B2C28F908DAD01E00249230;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B2C28FC08DAD01E00249230 = {
+ fileRef = 4B2C28F908DAD01E00249230;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B37C20006DF1F900016E567 = {
+ children = (
+ 4B37C20906DF1FE20016E567,
+ 4B37C20A06DF1FE20016E567,
+ 4B37C20306DF1FBE0016E567,
+ 4B37C20406DF1FBE0016E567,
+ );
+ isa = PBXGroup;
+ name = Latency;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B37C20306DF1FBE0016E567 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = CALatencyLog.cpp;
+ path = /Developer/Examples/CoreAudio/PublicUtility/CALatencyLog.cpp;
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+ 4B37C20406DF1FBE0016E567 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = CALatencyLog.h;
+ path = /Developer/Examples/CoreAudio/PublicUtility/CALatencyLog.h;
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+ 4B37C20906DF1FE20016E567 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = latency.c;
+ path = /Developer/Examples/CoreAudio/PublicUtility/latency.c;
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+ 4B37C20A06DF1FE20016E567 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = latency.h;
+ path = /Developer/Examples/CoreAudio/PublicUtility/latency.h;
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+ 4B395C9606AEF53800923527 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackCoreAudioDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B395C9706AEF53800923527 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackCoreAudioDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B3B987A09A1DD0400BF62ED = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackAtomicArrayState.h;
+ path = ../common/JackAtomicArrayState.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B3B987B09A1DD0400BF62ED = {
+ fileRef = 4B3B987A09A1DD0400BF62ED;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B3B987C09A1DD2500BF62ED = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackTransportEngine.cpp;
+ path = ../common/JackTransportEngine.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B3B987D09A1DD2500BF62ED = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackTransportEngine.h;
+ path = ../common/JackTransportEngine.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B3B987E09A1DD2500BF62ED = {
+ fileRef = 4B3B987C09A1DD2500BF62ED;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B3B987F09A1DD2500BF62ED = {
+ fileRef = 4B3B987D09A1DD2500BF62ED;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B420C7D07733D7C00DDA57E = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D2410834F1DD00C94B91,
+ 4BF8D2430834F1E400C94B91,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C7E07733D7C00DDA57E = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D23F0834F1C300C94B91,
+ 4BF8D2400834F1DC00C94B91,
+ 4BFC8139090E1F56007BAE60,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C7F07733D7C00DDA57E = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C8007733D7C00DDA57E = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C8107733D7C00DDA57E = {
+ buildPhases = (
+ 4B420C7D07733D7C00DDA57E,
+ 4B420C7E07733D7C00DDA57E,
+ 4B420C7F07733D7C00DDA57E,
+ 4B420C8007733D7C00DDA57E,
+ );
+ buildSettings = {
+ HEADER_SEARCH_PATHS = RPC;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework CoreAudio -framework CoreServices";
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = testAtomic;
+ productInstallPath = /usr/local/bin;
+ productName = testAtomic;
+ productReference = 4B420C8207733D7C00DDA57E;
+ };
+ 4B420C8207733D7C00DDA57E = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = testAtomic;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B4259E5076B635E00C1ECE1 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMacEngineRPC.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B4259E6076B635E00C1ECE1 = {
+ fileRef = 4B4259E5076B635E00C1ECE1;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B464301076CAC7700E5077C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text.xml;
+ path = "Jack-Info.plist";
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B50A10D080917BA003F4C95 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A10E080917BA003F4C95 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1680834EDD900C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A10F080917BA003F4C95 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A110080917BA003F4C95 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A111080917BA003F4C95 = {
+ buildPhases = (
+ 4B50A10D080917BA003F4C95,
+ 4B50A10E080917BA003F4C95,
+ 4B50A10F080917BA003F4C95,
+ 4B50A110080917BA003F4C95,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp";
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = zombie;
+ productInstallPath = /usr/local/bin;
+ productName = zombie;
+ productReference = 4B50A112080917BA003F4C95;
+ };
+ 4B50A112080917BA003F4C95 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = zombie;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B56880F08B5C8620022B32D = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackFifo.cpp;
+ path = ../common/JackFifo.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B56881008B5C8620022B32D = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackFifo.h;
+ path = ../common/JackFifo.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B56881108B5C8620022B32D = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B56881208B5C8620022B32D = {
+ fileRef = 4B56881008B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B56881508B5C8620022B32D = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B56881608B5C8620022B32D = {
+ fileRef = 4B56881008B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B646BE80636CC42003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B799ADB07899652003F3F15,
+ 4BF8D17D0834EE4800C94B91,
+ 4BF8D1860834EE5800C94B91,
+ 4BF8D18D0834EE7900C94B91,
+ 4BF8D1950834EE8400C94B91,
+ 4BF8D19D0834EE9700C94B91,
+ 4BF8D1A20834EE9E00C94B91,
+ 4BF8D1AD0834EEB400C94B91,
+ 4BF8D1B20834EEC400C94B91,
+ 4BF8D1CD0834EF2200C94B91,
+ 4BF8D1D50834EF2F00C94B91,
+ 4BF8D1DC0834EF4500C94B91,
+ 4BF8D1E00834EF4D00C94B91,
+ 4BF8D1E40834EF5500C94B91,
+ 4BF8D1F40834EF9200C94B91,
+ 4BF8D2030834EFD100C94B91,
+ 4BF8D2040834EFD100C94B91,
+ 4BF8D2360834F14400C94B91,
+ 4BF8FB1408AC88EF00D1A344,
+ 4BEE0B3308ACBB9F00D22B43,
+ 4BF6C1DC08ACE64C001E2013,
+ 4BFB73F908AD291A00DB99B8,
+ 4BFB742508AD2B9900DB99B8,
+ 4BFB299308AF450200D450D4,
+ 4B97441308AF54590094983C,
+ 4B97441808AF546F0094983C,
+ 4B97441E08AF54930094983C,
+ 4B97441F08AF54930094983C,
+ 4B56881608B5C8620022B32D,
+ 4B003AB508E2B2BA0060EFDC,
+ 4BD561C808EEB910006BBC2A,
+ 4B98AE050931D30C0091932A,
+ 4B66A85C0934964500A89560,
+ 4B1880CC09A1DDF100154099,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BE90636CC42003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXResourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEA0636CC42003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B646C210636CDFF003B5396,
+ 4B89B76A076B74D200D170DE,
+ 4B799ADA07899652003F3F15,
+ 4BF8D18E0834EE7900C94B91,
+ 4BF8D1960834EE8400C94B91,
+ 4BF8D19E0834EE9700C94B91,
+ 4BF8D1AE0834EEB400C94B91,
+ 4BF8D1CE0834EF2200C94B91,
+ 4BF8D1D60834EF2F00C94B91,
+ 4BF8D1E80834EF6700C94B91,
+ 4BF8D1EC0834EF7500C94B91,
+ 4BF8D2050834EFD100C94B91,
+ 4BF8D2060834EFD100C94B91,
+ 4BF8D2350834F14400C94B91,
+ 4BF8FB1308AC88EF00D1A344,
+ 4BEE0B3208ACBB9F00D22B43,
+ 4BF6C1DB08ACE64C001E2013,
+ 4BFB742408AD2B9900DB99B8,
+ 4BB8789008AF4E5100AF4ABD,
+ 4B97441208AF54590094983C,
+ 4B97441908AF546F0094983C,
+ 4BF773AD08B3414500149912,
+ 4B123D3508B3954300540632,
+ 4B56881508B5C8620022B32D,
+ 4B2C28FC08DAD01E00249230,
+ 4B003A6308E2A87A0060EFDC,
+ 4B003AB408E2B2BA0060EFDC,
+ 4B98AE040931D30C0091932A,
+ 4B1880CB09A1DDF100154099,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEB0636CC42003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEC0636CC42003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BED0636CC42003B5396 = {
+ buildPhases = (
+ 4B646BE80636CC42003B5396,
+ 4B646BE90636CC42003B5396,
+ 4B646BEA0636CC42003B5396,
+ 4B646BEB0636CC42003B5396,
+ 4B646BEC0636CC42003B5396,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = "-framework Carbon -framework AudioToolBox -framework CoreAudio";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ dependencies = (
+ );
+ isa = PBXNativeTarget;
+ name = Jackmp.framework;
+ productName = Jack;
+ productReference = 4B646BEE0636CC42003B5396;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>Jack</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.MySoftwareCompany.Jack</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string></string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0.0d1</string>
+</dict>
+</plist>
+";
+ productType = "com.apple.product-type.framework";
+ };
+ 4B646BEE0636CC42003B5396 = {
+ explicitFileType = wrapper.framework;
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = Jackmp.framework;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B646C210636CDFF003B5396 = {
+ fileRef = 4BF3937C0626BF3600CC67FA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B646C2D0636CEE6003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C2E0636CEE6003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D16C0834EDF000C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C2F0636CEE6003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C300636CEE6003B5396 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C310636CEE6003B5396 = {
+ buildPhases = (
+ 4B646C2D0636CEE6003B5396,
+ 4B646C2E0636CEE6003B5396,
+ 4B646C2F0636CEE6003B5396,
+ 4B646C300636CEE6003B5396,
+ );
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp -framework CoreFoundation";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = jack_metro;
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4B646C320636CEE6003B5396;
+ };
+ 4B646C320636CEE6003B5396 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_metro;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B66A8580934964500A89560 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackConstants.h;
+ path = ../common/JackConstants.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B66A85C0934964500A89560 = {
+ fileRef = 4B66A8580934964500A89560;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A85E0934964500A89560 = {
+ fileRef = 4B66A8580934964500A89560;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8610934966F00A89560 = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8620934967000A89560 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8640934967200A89560 = {
+ fileRef = 4B66A8580934964500A89560;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8650934968E00A89560 = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8660934968E00A89560 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8680934969100A89560 = {
+ fileRef = 4B66A8580934964500A89560;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A8690934969700A89560 = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A86A0934969700A89560 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B66A86C0934969E00A89560 = {
+ fileRef = 4B66A8580934964500A89560;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B67272108E4447D00CB805D = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4BF2124508DADBB5008D17F1;
+ remoteInfo = "jackdmp framework";
+ };
+ 4B67272208E4447D00CB805D = {
+ isa = PBXTargetDependency;
+ target = 4BF2124508DADBB5008D17F1;
+ targetProxy = 4B67272108E4447D00CB805D;
+ };
+ 4B6BEB4A07A6CCDC00A5DBDA = {
+ children = (
+ 4BF8D23E0834F1C300C94B91,
+ 4BF8D2470834F20600C94B91,
+ 4BA577BC08BF8BE200F82DE1,
+ 4BA577FB08BF8E4600F82DE1,
+ 4BBD13CC08C71EB40079F7FF,
+ );
+ isa = PBXGroup;
+ name = Tests;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B74519307A2AEB1003529A4 = {
+ fileRef = 4B89B759076B731100D170DE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B765CC805ECE17900571F78 = {
+ children = (
+ 4B003AB008E2B2BA0060EFDC,
+ 4B003AB108E2B2BA0060EFDC,
+ 4B003A6008E2A87A0060EFDC,
+ 4BF8D1770834EE4800C94B91,
+ 4BF8D1830834EE5800C94B91,
+ 4BF773AA08B3414500149912,
+ );
+ isa = PBXGroup;
+ name = Tools;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B799AD607899652003F3F15 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachPort.cpp;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B799AD707899652003F3F15 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachPort.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B799ADA07899652003F3F15 = {
+ fileRef = 4B799AD607899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B799ADB07899652003F3F15 = {
+ fileRef = 4B799AD707899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B799ADE07899652003F3F15 = {
+ fileRef = 4B799AD607899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B799ADF07899652003F3F15 = {
+ fileRef = 4B799AD707899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B7D792A0637B848001E7115 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792B0637B848001E7115 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D16A0834EDE600C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792C0637B848001E7115 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792D0637B848001E7115 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792E0637B848001E7115 = {
+ buildPhases = (
+ 4B7D792A0637B848001E7115,
+ 4B7D792B0637B848001E7115,
+ 4B7D792C0637B848001E7115,
+ 4B7D792D0637B848001E7115,
+ );
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = jack_lsp;
+ productInstallPath = /usr/local/bin;
+ productName = jack_lsp;
+ productReference = 4B7D792F0637B848001E7115;
+ };
+ 4B7D792F0637B848001E7115 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_lsp;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B869B3D08C8D21C001CF041 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = driver_interface.h;
+ path = ../common/driver_interface.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B869B3E08C8D21C001CF041 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = driver_parse.h;
+ path = ../common/driver_parse.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B869B3F08C8D21C001CF041 = {
+ fileRef = 4B869B3D08C8D21C001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B869B4008C8D21C001CF041 = {
+ fileRef = 4B869B3E08C8D21C001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B869B4208C8D22F001CF041 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackDriverLoader.h;
+ path = ../common/JackDriverLoader.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B869B4408C8D22F001CF041 = {
+ fileRef = 4B869B4208C8D22F001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B869B6408C8D76B001CF041 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = jslist.h;
+ path = ../common/jslist.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B869B6508C8D76B001CF041 = {
+ fileRef = 4B869B6408C8D76B001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B869D7F08C9CB00001CF041 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackDriverLoader.cpp;
+ path = ../common/JackDriverLoader.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B89B759076B731100D170DE = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = JackRPCClientUser.c;
+ path = RPC/JackRPCClientUser.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B89B769076B74D200D170DE = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = JackRPCEngineUser.c;
+ path = RPC/JackRPCEngineUser.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B89B76A076B74D200D170DE = {
+ fileRef = 4B89B769076B74D200D170DE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B89C81106382F5800464BF4 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81206382F5800464BF4 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D16F0834EDFF00C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81306382F5800464BF4 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81406382F5800464BF4 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81506382F5800464BF4 = {
+ buildPhases = (
+ 4B89C81106382F5800464BF4,
+ 4B89C81206382F5800464BF4,
+ 4B89C81306382F5800464BF4,
+ 4B89C81406382F5800464BF4,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = jack_connect;
+ productInstallPath = /usr/local/bin;
+ productName = jack_connect;
+ productReference = 4B89C81606382F5800464BF4;
+ };
+ 4B89C81606382F5800464BF4 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_connect;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B940B9B06DDDE5B00D77F60 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = AudioHardware.h;
+ path = /System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/AudioHardware.h;
+ refType = 0;
+ sourceTree = "<absolute>";
+ };
+ 4B940B9C06DDDE5B00D77F60 = {
+ fileRef = 4B940B9B06DDDE5B00D77F60;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B96861F0771CA08002D75D5 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686200771CA08002D75D5 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1700834EDFF00C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686210771CA08002D75D5 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686220771CA08002D75D5 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686230771CA08002D75D5 = {
+ buildPhases = (
+ 4B96861F0771CA08002D75D5,
+ 4B9686200771CA08002D75D5,
+ 4B9686210771CA08002D75D5,
+ 4B9686220771CA08002D75D5,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = jack_disconnect;
+ productInstallPath = /usr/local/bin;
+ productName = jack_disconnect;
+ productReference = 4B9686240771CA08002D75D5;
+ };
+ 4B9686240771CA08002D75D5 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_disconnect;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4B97440C08AF54590094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackSocket.cpp;
+ path = ../common/JackSocket.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97440D08AF54590094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSocket.h;
+ path = ../common/JackSocket.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97440E08AF54590094983C = {
+ fileRef = 4B97440C08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97440F08AF54590094983C = {
+ fileRef = 4B97440D08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441208AF54590094983C = {
+ fileRef = 4B97440C08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441308AF54590094983C = {
+ fileRef = 4B97440D08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441408AF546F0094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSocketClientChannel.h;
+ path = ../common/JackSocketClientChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97441508AF546F0094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackSocketClientChannel.cpp;
+ path = ../common/JackSocketClientChannel.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97441808AF546F0094983C = {
+ fileRef = 4B97441408AF546F0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441908AF546F0094983C = {
+ fileRef = 4B97441508AF546F0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441A08AF54930094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSocketNotifyChannel.h;
+ path = ../common/JackSocketNotifyChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97441B08AF54930094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSocketServerChannel.h;
+ path = ../common/JackSocketServerChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97441E08AF54930094983C = {
+ fileRef = 4B97441A08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97441F08AF54930094983C = {
+ fileRef = 4B97441B08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97452B08AF6D4B0094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackSocketServerChannel.cpp;
+ path = ../common/JackSocketServerChannel.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B97452C08AF6D4B0094983C = {
+ fileRef = 4B97452B08AF6D4B0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B97458708AF74FF0094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackSocketNotifyChannel.cpp;
+ path = ../common/JackSocketNotifyChannel.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B9745A808AF761F0094983C = {
+ fileRef = 4B97458708AF74FF0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B9745CB08AF771B0094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSocketServerNotifyChannel.h;
+ path = ../common/JackSocketServerNotifyChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B9745CC08AF771B0094983C = {
+ fileRef = 4B9745CB08AF771B0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B9745D908AF78200094983C = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackSocketServerNotifyChannel.cpp;
+ path = ../common/JackSocketServerNotifyChannel.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B9745DA08AF78200094983C = {
+ fileRef = 4B9745D908AF78200094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B98AE000931D30C0091932A = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackDebugClient.cpp;
+ path = ../common/JackDebugClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B98AE010931D30C0091932A = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackDebugClient.h;
+ path = ../common/JackDebugClient.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B98AE040931D30C0091932A = {
+ fileRef = 4B98AE000931D30C0091932A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B98AE050931D30C0091932A = {
+ fileRef = 4B98AE010931D30C0091932A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4B9B627005E60A9E001E19AA = {
+ children = (
+ 4BF8D2170834F03500C94B91,
+ 4BF8D21B0834F04800C94B91,
+ 4BF8D21C0834F04800C94B91,
+ 4B66A8580934964500A89560,
+ 4BFB73F608AD291A00DB99B8,
+ 4B2C28F908DAD01E00249230,
+ 4B123D3308B3954300540632,
+ 4B123D3608B3954A00540632,
+ 4BF8D2190834F03D00C94B91,
+ 4BF8D2220834F05C00C94B91,
+ 4BF8D2210834F05C00C94B91,
+ 4BF8D2250834F06A00C94B91,
+ );
+ isa = PBXGroup;
+ name = Server;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4B9B815C08AFA45000D05A28 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackRequest.h;
+ path = ../common/JackRequest.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4B9B815D08AFA45000D05A28 = {
+ fileRef = 4B9B815C08AFA45000D05A28;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA33DF905EDFD8C000CCD5F = {
+ children = (
+ 4BF8D19F0834EE9E00C94B91,
+ 4BF8D1970834EE9700C94B91,
+ 4BF8D1980834EE9700C94B91,
+ 4BFB741F08AD2B9900DB99B8,
+ 4BFB741E08AD2B9900DB99B8,
+ );
+ isa = PBXGroup;
+ name = Thread;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA3873B079479C2008D8992 = {
+ children = (
+ 4BF772FD08B3330F00149912,
+ 4BF8D1C10834EF0800C94B91,
+ 4BF8D1C30834EF1400C94B91,
+ 4BF8D1C40834EF1400C94B91,
+ 4BF8D1C70834EF2200C94B91,
+ 4BF8D1C80834EF2200C94B91,
+ );
+ isa = PBXGroup;
+ name = Graph;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA3874007947A46008D8992 = {
+ children = (
+ 4BF8D1A70834EEB400C94B91,
+ 4BF8D1A80834EEB400C94B91,
+ 4BD561C708EEB910006BBC2A,
+ 4B56881008B5C8620022B32D,
+ 4B56880F08B5C8620022B32D,
+ 4BF6C1D608ACE64C001E2013,
+ 4BF6C1D508ACE64C001E2013,
+ 4BEE0B2D08ACBB9F00D22B43,
+ 4BEE0B2C08ACBB9F00D22B43,
+ );
+ isa = PBXGroup;
+ name = Synchro;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550F605E241B800569492 = {
+ children = (
+ 4B869B6408C8D76B001CF041,
+ 4B869B3D08C8D21C001CF041,
+ 4B869B3E08C8D21C001CF041,
+ 4B869B4208C8D22F001CF041,
+ 4B869D7F08C9CB00001CF041,
+ 4BF8D1B50834EEE400C94B91,
+ 4BF8D1B60834EEE400C94B91,
+ 4BF70ACB0908EE95008B75AD,
+ 4BF70ACA0908EE95008B75AD,
+ 4BC3988A08B3CF6C00B6F371,
+ 4BC3988908B3CF6C00B6F371,
+ 4BD56D8707968982006D44F9,
+ 4BD56D8607968979006D44F9,
+ );
+ isa = PBXGroup;
+ name = Driver;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550F905E241D900569492 = {
+ children = (
+ 4B168CA4076A5333005B2802,
+ 4BF8D1FB0834EFD100C94B91,
+ 4BF8D1FC0834EFD100C94B91,
+ 4BF8D1FD0834EFD100C94B91,
+ 4BF8D1FE0834EFD100C94B91,
+ );
+ isa = PBXGroup;
+ name = Library;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550FA05E241F200569492 = {
+ children = (
+ 4BF8D1CF0834EF2F00C94B91,
+ 4BF8D1D00834EF2F00C94B91,
+ );
+ isa = PBXGroup;
+ name = Ports;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550FB05E2420000569492 = {
+ children = (
+ 4B168CA3076A5319005B2802,
+ 4BF8D2130834F02800C94B91,
+ 4BF8D2140834F02800C94B91,
+ 4BF8FB0E08AC88EF00D1A344,
+ 4BF8FB0D08AC88EF00D1A344,
+ 4BF8D2100834F01C00C94B91,
+ 4BF8D20F0834F01C00C94B91,
+ 4B3B987A09A1DD0400BF62ED,
+ 4B3B987D09A1DD2500BF62ED,
+ 4B3B987C09A1DD2500BF62ED,
+ );
+ isa = PBXGroup;
+ name = Engine;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550FC05E2421400569492 = {
+ children = (
+ 4BF8D18F0834EE8400C94B91,
+ 4BF8D1900834EE8400C94B91,
+ 4BF8D1870834EE7900C94B91,
+ 4BF8D1880834EE7900C94B91,
+ );
+ isa = PBXGroup;
+ name = Shm;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA550FF05E2423600569492 = {
+ children = (
+ 4BF8D1AF0834EEC400C94B91,
+ 4BF8D1B30834EED500C94B91,
+ 4BFB299908AF452300D450D4,
+ 4BFB299808AF451200D450D4,
+ );
+ isa = PBXGroup;
+ name = Channels;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BA577AF08BF8BAB00F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A8620934967000A89560,
+ 4B66A8640934967200A89560,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B008BF8BAB00F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BA577BE08BF8BFB00F82DE1,
+ 4BA577BF08BF8BFD00F82DE1,
+ 4BA577C008BF8C0000F82DE1,
+ 4BA577C108BF8C0500F82DE1,
+ 4BA577C208BF8C0700F82DE1,
+ 4BA577FC08BF8E4600F82DE1,
+ 4B66A8610934966F00A89560,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B108BF8BAB00F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B208BF8BAB00F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B308BF8BAB00F82DE1 = {
+ buildPhases = (
+ 4BA577AF08BF8BAB00F82DE1,
+ 4BA577B008BF8BAB00F82DE1,
+ 4BA577B108BF8BAB00F82DE1,
+ 4BA577B208BF8BAB00F82DE1,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = synchroServer;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BA577B408BF8BAB00F82DE1;
+ };
+ 4BA577B408BF8BAB00F82DE1 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = synchroServer;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BA577BC08BF8BE200F82DE1 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = testSynchroClient.cpp;
+ path = ../common/testSynchroClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BA577BE08BF8BFB00F82DE1 = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577BF08BF8BFD00F82DE1 = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577C008BF8C0000F82DE1 = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577C108BF8C0500F82DE1 = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577C208BF8C0700F82DE1 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577D908BF8E0600F82DE1 = {
+ buildPhases = (
+ 4BA577DA08BF8E0600F82DE1,
+ 4BA577DB08BF8E0600F82DE1,
+ 4BA577E308BF8E0600F82DE1,
+ 4BA577E408BF8E0600F82DE1,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = synchroClient;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BA577E508BF8E0600F82DE1;
+ };
+ 4BA577DA08BF8E0600F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A8660934968E00A89560,
+ 4B66A8680934969100A89560,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577DB08BF8E0600F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BA577DD08BF8E0600F82DE1,
+ 4BA577DE08BF8E0600F82DE1,
+ 4BA577DF08BF8E0600F82DE1,
+ 4BA577E008BF8E0600F82DE1,
+ 4BA577E108BF8E0600F82DE1,
+ 4BA577FD08BF8E6100F82DE1,
+ 4B66A8650934968E00A89560,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577DD08BF8E0600F82DE1 = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577DE08BF8E0600F82DE1 = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577DF08BF8E0600F82DE1 = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577E008BF8E0600F82DE1 = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577E108BF8E0600F82DE1 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577E308BF8E0600F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577E408BF8E0600F82DE1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577E508BF8E0600F82DE1 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = synchroClient;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BA577FB08BF8E4600F82DE1 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = testSynchroServer.cpp;
+ path = ../common/testSynchroServer.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BA577FC08BF8E4600F82DE1 = {
+ fileRef = 4BA577FB08BF8E4600F82DE1;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA577FD08BF8E6100F82DE1 = {
+ fileRef = 4BA577BC08BF8BE200F82DE1;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BA88D9408BE632C000095BE = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4BD81C7F07ACD3DE00ACB953;
+ remoteInfo = jack_external_metro;
+ };
+ 4BA88D9508BE632C000095BE = {
+ isa = PBXTargetDependency;
+ target = 4BD81C7F07ACD3DE00ACB953;
+ targetProxy = 4BA88D9408BE632C000095BE;
+ };
+ 4BAB18CA08F13ECF00F0CE8B = {
+ fileRef = 4BF8D1ED0834EF9200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18CF08F13EFF00F0CE8B = {
+ fileRef = 4B89B759076B731100D170DE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18D008F13F5500F0CE8B = {
+ fileRef = 4B123D3608B3954A00540632;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18D108F13F5800F0CE8B = {
+ fileRef = 4BF8D2210834F05C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18D208F13F5900F0CE8B = {
+ fileRef = 4BF8D2220834F05C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18D608F13F7A00F0CE8B = {
+ fileRef = 4B97452B08AF6D4B0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18DD08F13F8300F0CE8B = {
+ fileRef = 4B9745D908AF78200094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18DE08F13F8400F0CE8B = {
+ fileRef = 4B9745CB08AF771B0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18DF08F13F8900F0CE8B = {
+ fileRef = 4B97458708AF74FF0094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E008F13FA300F0CE8B = {
+ fileRef = 4B9B815C08AFA45000D05A28;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E208F13FBC00F0CE8B = {
+ fileRef = 4B4259E5076B635E00C1ECE1;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E308F13FD600F0CE8B = {
+ fileRef = 4BFB298808AF450200D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E408F13FD600F0CE8B = {
+ fileRef = 4BFB298908AF450200D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E508F13FD700F0CE8B = {
+ fileRef = 4BFB297908AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E608F13FD700F0CE8B = {
+ fileRef = 4BFB297808AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E708F13FD700F0CE8B = {
+ fileRef = 4BFB297708AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BAB18E808F13FD800F0CE8B = {
+ fileRef = 4BFB297A08AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BB47F880904138400890555 = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4BF5925D08F13D81005B1F5F;
+ remoteInfo = Jackdmp.framework;
+ };
+ 4BB47F890904138400890555 = {
+ isa = PBXTargetDependency;
+ target = 4BF5925D08F13D81005B1F5F;
+ targetProxy = 4BB47F880904138400890555;
+ };
+ 4BB8789008AF4E5100AF4ABD = {
+ fileRef = 4BFB29AE08AF45FD00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13AA08C71A480079F7FF = {
+ buildPhases = (
+ 4BBD13AB08C71A480079F7FF,
+ 4BBD13AC08C71A480079F7FF,
+ 4BBD13B408C71A480079F7FF,
+ 4BBD13B508C71A480079F7FF,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = synchroServerClient;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BBD13B608C71A480079F7FF;
+ };
+ 4BBD13AB08C71A480079F7FF = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A86A0934969700A89560,
+ 4B66A86C0934969E00A89560,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13AC08C71A480079F7FF = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BBD13AD08C71A480079F7FF,
+ 4BBD13AE08C71A480079F7FF,
+ 4BBD13AF08C71A480079F7FF,
+ 4BBD13B008C71A480079F7FF,
+ 4BBD13B108C71A480079F7FF,
+ 4BBD13CD08C71EB40079F7FF,
+ 4B66A8690934969700A89560,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13AD08C71A480079F7FF = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13AE08C71A480079F7FF = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13AF08C71A480079F7FF = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13B008C71A480079F7FF = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13B108C71A480079F7FF = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD13B408C71A480079F7FF = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13B508C71A480079F7FF = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13B608C71A480079F7FF = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = synchroServerClient;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BBD13CC08C71EB40079F7FF = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = testSynchroServerClient.cpp;
+ path = ../common/testSynchroServerClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BBD13CD08C71EB40079F7FF = {
+ fileRef = 4BBD13CC08C71EB40079F7FF;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD140A08C739A10079F7FF = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD140B08C739A60079F7FF = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD140C08C739B00079F7FF = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BBD140D08C739B60079F7FF = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BC3988908B3CF6C00B6F371 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackDummyDriver.cpp;
+ path = ../common/JackDummyDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BC3988A08B3CF6C00B6F371 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackDummyDriver.h;
+ path = ../common/JackDummyDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BD561C708EEB910006BBC2A = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackSynchro.h;
+ path = ../common/JackSynchro.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BD561C808EEB910006BBC2A = {
+ fileRef = 4BD561C708EEB910006BBC2A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BD56D73079687AD006D44F9 = {
+ children = (
+ 4BF8D1F70834EFBD00C94B91,
+ 4BF8D1F80834EFBD00C94B91,
+ );
+ isa = PBXGroup;
+ name = External;
+ path = "";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BD56D74079687D7006D44F9 = {
+ children = (
+ 4BF8D1D90834EF4500C94B91,
+ 4BF8D1DD0834EF4D00C94B91,
+ 4BF8D1E10834EF5500C94B91,
+ 4BF8D1E50834EF6700C94B91,
+ 4B98AE010931D30C0091932A,
+ 4B98AE000931D30C0091932A,
+ 4BF8D1E90834EF7500C94B91,
+ 4BD56D75079687EB006D44F9,
+ 4BD56D73079687AD006D44F9,
+ 4BA550F905E241D900569492,
+ );
+ isa = PBXGroup;
+ name = Client;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BD56D75079687EB006D44F9 = {
+ children = (
+ 4BF8D1EE0834EF9200C94B91,
+ 4BF8D1ED0834EF9200C94B91,
+ 4BF8D1F50834EFB000C94B91,
+ );
+ isa = PBXGroup;
+ name = "Internal ";
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BD56D8607968979006D44F9 = {
+ children = (
+ 4B940B9B06DDDE5B00D77F60,
+ 4BF8D2290834F07D00C94B91,
+ 4BF8D22A0834F07D00C94B91,
+ 4B395C9706AEF53800923527,
+ 4B395C9606AEF53800923527,
+ );
+ isa = PBXGroup;
+ name = Audio;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BD56D8707968982006D44F9 = {
+ children = (
+ 4BF8D1BD0834EEFC00C94B91,
+ 4BF8D1BE0834EEFC00C94B91,
+ 4BF8D1B90834EEF100C94B91,
+ 4BF8D1BA0834EEF100C94B91,
+ );
+ isa = PBXGroup;
+ name = Threaded;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BD81C7F07ACD3DE00ACB953 = {
+ buildPhases = (
+ 4BD81C8007ACD3DE00ACB953,
+ 4BD81C8107ACD3DE00ACB953,
+ 4BD81C8307ACD3DE00ACB953,
+ 4BD81C8407ACD3DE00ACB953,
+ );
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-framework Jackmp -framework CoreFoundation";
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = jack_external_metro;
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4BD81C8507ACD3DE00ACB953;
+ };
+ 4BD81C8007ACD3DE00ACB953 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8107ACD3DE00ACB953 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1760834EE3600C94B91,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8307ACD3DE00ACB953 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8407ACD3DE00ACB953 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8507ACD3DE00ACB953 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jack_external_metro;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BEE0B2C08ACBB9F00D22B43 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackPosixSemaphore.cpp;
+ path = ../common/JackPosixSemaphore.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BEE0B2D08ACBB9F00D22B43 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackPosixSemaphore.h;
+ path = ../common/JackPosixSemaphore.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BEE0B2E08ACBB9F00D22B43 = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BEE0B2F08ACBB9F00D22B43 = {
+ fileRef = 4BEE0B2D08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BEE0B3208ACBB9F00D22B43 = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BEE0B3308ACBB9F00D22B43 = {
+ fileRef = 4BEE0B2D08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF2122D08DAD8FD008D17F1 = {
+ fileRef = 4B97441A08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF2122E08DAD900008D17F1 = {
+ fileRef = 4B97441B08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF2124408DADA90008D17F1 = {
+ fileRef = 4B395C9706AEF53800923527;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF2124508DADBB5008D17F1 = {
+ buildPhases = (
+ 4BF2124608DADBB5008D17F1,
+ 4BF2127C08DADBB5008D17F1,
+ 4BF212A608DADBB5008D17F1,
+ 4BF212A708DADBB5008D17F1,
+ );
+ buildSettings = {
+ DEBUGGING_SYMBOLS = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ HEADER_SEARCH_PATHS = "../common RPC";
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = "-framework Jackdmp -framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ );
+ isa = PBXToolTarget;
+ name = "jackdmp framework";
+ productInstallPath = /usr/local/bin;
+ productName = TestMacEngine;
+ productReference = 4BF212A808DADBB5008D17F1;
+ };
+ 4BF2124608DADBB5008D17F1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF2127C08DADBB5008D17F1 = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF2129408DADBB5008D17F1,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF2129408DADBB5008D17F1 = {
+ fileRef = 4BF8D2250834F06A00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF212A608DADBB5008D17F1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF212A708DADBB5008D17F1 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF212A808DADBB5008D17F1 = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jackdmp;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BF212AE08DADC73008D17F1 = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4BF2124508DADBB5008D17F1;
+ remoteInfo = "jackdmp framework";
+ };
+ 4BF212AF08DADC73008D17F1 = {
+ isa = PBXTargetDependency;
+ target = 4BF2124508DADBB5008D17F1;
+ targetProxy = 4BF212AE08DADC73008D17F1;
+ };
+ 4BF2955B08BC475500F2602F = {
+ buildPhases = (
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ 4BB47F890904138400890555,
+ 4BF2956108BC475E00F2602F,
+ 4BF212AF08DADC73008D17F1,
+ 4BFD0E2208DADFB000D838B8,
+ 4B0C912908DAF35900AE19BE,
+ );
+ isa = PBXAggregateTarget;
+ name = All;
+ productName = All;
+ };
+ 4BF2956008BC475E00F2602F = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4B646BED0636CC42003B5396;
+ remoteInfo = Jackmp.framework;
+ };
+ 4BF2956108BC475E00F2602F = {
+ isa = PBXTargetDependency;
+ target = 4B646BED0636CC42003B5396;
+ targetProxy = 4BF2956008BC475E00F2602F;
+ };
+ 4BF393150626B68F00CC67FA = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B940B9C06DDDE5B00D77F60,
+ 4B799ADF07899652003F3F15,
+ 4BF8D1790834EE4800C94B91,
+ 4BF8D1840834EE5800C94B91,
+ 4BF8D1890834EE7900C94B91,
+ 4BF8D1910834EE8400C94B91,
+ 4BF8D1990834EE9700C94B91,
+ 4BF8D1A00834EE9E00C94B91,
+ 4BF8D1A90834EEB400C94B91,
+ 4BF8D1B00834EEC400C94B91,
+ 4BF8D1B40834EED500C94B91,
+ 4BF8D1B70834EEE400C94B91,
+ 4BF8D1BB0834EEF100C94B91,
+ 4BF8D1BF0834EEFC00C94B91,
+ 4BF8D1C20834EF0800C94B91,
+ 4BF8D1C50834EF1400C94B91,
+ 4BF8D1C90834EF2200C94B91,
+ 4BF8D1D10834EF2F00C94B91,
+ 4BF8D1DA0834EF4500C94B91,
+ 4BF8D1DE0834EF4D00C94B91,
+ 4BF8D1E20834EF5500C94B91,
+ 4BF8D1F00834EF9200C94B91,
+ 4BF8D1F90834EFBD00C94B91,
+ 4BF8D2120834F01C00C94B91,
+ 4BF8D2150834F02800C94B91,
+ 4BF8D2180834F03500C94B91,
+ 4BF8D21A0834F03D00C94B91,
+ 4BF8D21D0834F04800C94B91,
+ 4BF8D21E0834F04800C94B91,
+ 4BF8D2240834F05C00C94B91,
+ 4BF8D22B0834F07D00C94B91,
+ 4BF8FB1008AC88EF00D1A344,
+ 4BEE0B2F08ACBB9F00D22B43,
+ 4BF6C1D808ACE64C001E2013,
+ 4BFB73F708AD291A00DB99B8,
+ 4BFB742108AD2B9900DB99B8,
+ 4BFB297C08AF44ED00D450D4,
+ 4BFB297E08AF44ED00D450D4,
+ 4BFB298D08AF450200D450D4,
+ 4B97440F08AF54590094983C,
+ 4B9745CC08AF771B0094983C,
+ 4B9B815D08AFA45000D05A28,
+ 4BF772FE08B3330F00149912,
+ 4B56881208B5C8620022B32D,
+ 4B869B3F08C8D21C001CF041,
+ 4B869B4008C8D21C001CF041,
+ 4B869B4408C8D22F001CF041,
+ 4B869B6508C8D76B001CF041,
+ 4BF2122D08DAD8FD008D17F1,
+ 4BF2122E08DAD900008D17F1,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF393160626B68F00CC67FA = {
+ buildActionMask = 2147483647;
+ files = (
+ 4B4259E6076B635E00C1ECE1,
+ 4B799ADE07899652003F3F15,
+ 4B74519307A2AEB1003529A4,
+ 4BF8D1740834EE2800C94B91,
+ 4BF8D18A0834EE7900C94B91,
+ 4BF8D1920834EE8400C94B91,
+ 4BF8D19A0834EE9700C94B91,
+ 4BF8D1AA0834EEB400C94B91,
+ 4BF8D1B80834EEE400C94B91,
+ 4BF8D1BC0834EEF100C94B91,
+ 4BF8D1C00834EEFC00C94B91,
+ 4BF8D1C60834EF1400C94B91,
+ 4BF8D1CA0834EF2200C94B91,
+ 4BF8D1D20834EF2F00C94B91,
+ 4BF8D1E60834EF6700C94B91,
+ 4BF8D1EA0834EF7500C94B91,
+ 4BF8D1EF0834EF9200C94B91,
+ 4BF8D1F60834EFB000C94B91,
+ 4BF8D1FA0834EFBD00C94B91,
+ 4BF8D2110834F01C00C94B91,
+ 4BF8D2160834F02800C94B91,
+ 4BF8D2230834F05C00C94B91,
+ 4BF8D2260834F06A00C94B91,
+ 4BF8D22C0834F07D00C94B91,
+ 4BF8FB0F08AC88EF00D1A344,
+ 4BEE0B2E08ACBB9F00D22B43,
+ 4BF6C1D708ACE64C001E2013,
+ 4BFB742008AD2B9900DB99B8,
+ 4BFB297B08AF44ED00D450D4,
+ 4BFB297D08AF44ED00D450D4,
+ 4BFB298C08AF450200D450D4,
+ 4B97440E08AF54590094983C,
+ 4B97452C08AF6D4B0094983C,
+ 4B9745A808AF761F0094983C,
+ 4B9745DA08AF78200094983C,
+ 4BF773AB08B3414500149912,
+ 4B123D3708B3954A00540632,
+ 4B56881108B5C8620022B32D,
+ 4B2C28BF08DACA8200249230,
+ 4B2C28FA08DAD01E00249230,
+ 4B003A6108E2A87A0060EFDC,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF393170626B68F00CC67FA = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF393180626B68F00CC67FA = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF393190626B68F00CC67FA = {
+ buildPhases = (
+ 4BF393150626B68F00CC67FA,
+ 4BF393160626B68F00CC67FA,
+ 4BF393170626B68F00CC67FA,
+ 4BF393180626B68F00CC67FA,
+ );
+ buildSettings = {
+ DEBUGGING_SYMBOLS = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ HEADER_SEARCH_PATHS = "../common RPC";
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = "-framework AudioToolBox -framework CoreAudio -framework CoreServices -framework AudioUnit ";
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ };
+ dependencies = (
+ 4B67272208E4447D00CB805D,
+ );
+ isa = PBXToolTarget;
+ name = jackdmp;
+ productInstallPath = /usr/local/bin;
+ productName = TestMacEngine;
+ productReference = 4BF3931A0626B68F00CC67FA;
+ };
+ 4BF3931A0626B68F00CC67FA = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = jackdmp;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BF3937C0626BF3600CC67FA = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMacLibClientRPC.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF5925D08F13D81005B1F5F = {
+ buildPhases = (
+ 4BF5925E08F13D81005B1F5F,
+ 4BF5928008F13D81005B1F5F,
+ 4BF5928208F13D81005B1F5F,
+ 4BF5929E08F13D81005B1F5F,
+ 4BF5929F08F13D81005B1F5F,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = "-framework Carbon -framework AudioToolBox -framework CoreAudio";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ dependencies = (
+ );
+ isa = PBXNativeTarget;
+ name = Jackdmp.framework;
+ productName = Jack;
+ productReference = 4BF592A008F13D81005B1F5F;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>Jack</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.MySoftwareCompany.Jack</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string></string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0.0d1</string>
+</dict>
+</plist>
+";
+ productType = "com.apple.product-type.framework";
+ };
+ 4BF5925E08F13D81005B1F5F = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF5925F08F13D81005B1F5F,
+ 4BF5926008F13D81005B1F5F,
+ 4BF5926108F13D81005B1F5F,
+ 4BF5926208F13D81005B1F5F,
+ 4BF5926308F13D81005B1F5F,
+ 4BF5926408F13D81005B1F5F,
+ 4BF5926508F13D81005B1F5F,
+ 4BF5926608F13D81005B1F5F,
+ 4BF5926708F13D81005B1F5F,
+ 4BF5926808F13D81005B1F5F,
+ 4BF5926908F13D81005B1F5F,
+ 4BF5926A08F13D81005B1F5F,
+ 4BF5926B08F13D81005B1F5F,
+ 4BF5926C08F13D81005B1F5F,
+ 4BF5926D08F13D81005B1F5F,
+ 4BF5927008F13D81005B1F5F,
+ 4BF5927108F13D81005B1F5F,
+ 4BF5927208F13D81005B1F5F,
+ 4BF5927308F13D81005B1F5F,
+ 4BF5927508F13D81005B1F5F,
+ 4BF5927608F13D81005B1F5F,
+ 4BF5927808F13D81005B1F5F,
+ 4BF5927A08F13D81005B1F5F,
+ 4BF5927B08F13D81005B1F5F,
+ 4BF5927C08F13D81005B1F5F,
+ 4BF5927E08F13D81005B1F5F,
+ 4BF5927F08F13D81005B1F5F,
+ 4BF592AF08F13E40005B1F5F,
+ 4BF592B108F13E4C005B1F5F,
+ 4BF592B308F13E4D005B1F5F,
+ 4BF592B508F13E5A005B1F5F,
+ 4BF592B608F13E5F005B1F5F,
+ 4BF592B708F13E5F005B1F5F,
+ 4BF592B908F13E61005B1F5F,
+ 4BF592BA08F13E61005B1F5F,
+ 4BF592BC08F13E76005B1F5F,
+ 4BF592BE08F13E7A005B1F5F,
+ 4BF592BF08F13E8B005B1F5F,
+ 4BAB18D208F13F5900F0CE8B,
+ 4BAB18DE08F13F8400F0CE8B,
+ 4BAB18E008F13FA300F0CE8B,
+ 4BAB18E408F13FD600F0CE8B,
+ 4BAB18E608F13FD700F0CE8B,
+ 4BAB18E808F13FD800F0CE8B,
+ 4BF70ACD0908EE95008B75AD,
+ 4B66A85E0934964500A89560,
+ 4B3B987B09A1DD0400BF62ED,
+ 4B3B987F09A1DD2500BF62ED,
+ );
+ isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5925F08F13D81005B1F5F = {
+ fileRef = 4B799AD707899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926008F13D81005B1F5F = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926108F13D81005B1F5F = {
+ fileRef = 4BF8D1830834EE5800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926208F13D81005B1F5F = {
+ fileRef = 4BF8D1870834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926308F13D81005B1F5F = {
+ fileRef = 4BF8D18F0834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926408F13D81005B1F5F = {
+ fileRef = 4BF8D1970834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926508F13D81005B1F5F = {
+ fileRef = 4BF8D19F0834EE9E00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926608F13D81005B1F5F = {
+ fileRef = 4BF8D1A70834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926708F13D81005B1F5F = {
+ fileRef = 4BF8D1AF0834EEC400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926808F13D81005B1F5F = {
+ fileRef = 4BF8D1C70834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926908F13D81005B1F5F = {
+ fileRef = 4BF8D1CF0834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926A08F13D81005B1F5F = {
+ fileRef = 4BF8D1D90834EF4500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926B08F13D81005B1F5F = {
+ fileRef = 4BF8D1DD0834EF4D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926C08F13D81005B1F5F = {
+ fileRef = 4BF8D1E10834EF5500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5926D08F13D81005B1F5F = {
+ fileRef = 4BF8D1EE0834EF9200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927008F13D81005B1F5F = {
+ fileRef = 4BF8D1C30834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927108F13D81005B1F5F = {
+ fileRef = 4BF8FB0E08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927208F13D81005B1F5F = {
+ fileRef = 4BEE0B2D08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927308F13D81005B1F5F = {
+ fileRef = 4BF6C1D608ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927508F13D81005B1F5F = {
+ fileRef = 4BFB73F608AD291A00DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927608F13D81005B1F5F = {
+ fileRef = 4BFB741F08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927808F13D81005B1F5F = {
+ fileRef = 4B97440D08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927A08F13D81005B1F5F = {
+ fileRef = 4B97441A08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927B08F13D81005B1F5F = {
+ fileRef = 4B97441B08AF54930094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927C08F13D81005B1F5F = {
+ fileRef = 4B56881008B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927E08F13D81005B1F5F = {
+ fileRef = 4B003AB108E2B2BA0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5927F08F13D81005B1F5F = {
+ fileRef = 4BD561C708EEB910006BBC2A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928008F13D81005B1F5F = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXResourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5928208F13D81005B1F5F = {
+ buildActionMask = 2147483647;
+ files = (
+ 4BF5928508F13D81005B1F5F,
+ 4BF5928608F13D81005B1F5F,
+ 4BF5928708F13D81005B1F5F,
+ 4BF5928808F13D81005B1F5F,
+ 4BF5928908F13D81005B1F5F,
+ 4BF5928A08F13D81005B1F5F,
+ 4BF5928B08F13D81005B1F5F,
+ 4BF5928C08F13D81005B1F5F,
+ 4BF5928D08F13D81005B1F5F,
+ 4BF5929008F13D81005B1F5F,
+ 4BF5929108F13D81005B1F5F,
+ 4BF5929208F13D81005B1F5F,
+ 4BF5929308F13D81005B1F5F,
+ 4BF5929408F13D81005B1F5F,
+ 4BF5929608F13D81005B1F5F,
+ 4BF5929808F13D81005B1F5F,
+ 4BF5929A08F13D81005B1F5F,
+ 4BF5929B08F13D81005B1F5F,
+ 4BF5929C08F13D81005B1F5F,
+ 4BF5929D08F13D81005B1F5F,
+ 4BF592AE08F13E40005B1F5F,
+ 4BF592B008F13E4B005B1F5F,
+ 4BF592B208F13E4C005B1F5F,
+ 4BF592B408F13E5A005B1F5F,
+ 4BF592B808F13E60005B1F5F,
+ 4BF592BB08F13E76005B1F5F,
+ 4BF592BD08F13E7A005B1F5F,
+ 4BF592C008F13E8C005B1F5F,
+ 4BAB18CA08F13ECF00F0CE8B,
+ 4BAB18CF08F13EFF00F0CE8B,
+ 4BAB18D008F13F5500F0CE8B,
+ 4BAB18D108F13F5800F0CE8B,
+ 4BAB18D608F13F7A00F0CE8B,
+ 4BAB18DD08F13F8300F0CE8B,
+ 4BAB18DF08F13F8900F0CE8B,
+ 4BAB18E208F13FBC00F0CE8B,
+ 4BAB18E308F13FD600F0CE8B,
+ 4BAB18E508F13FD700F0CE8B,
+ 4BAB18E708F13FD700F0CE8B,
+ 4BF70ACC0908EE95008B75AD,
+ 4B3B987E09A1DD2500BF62ED,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5928508F13D81005B1F5F = {
+ fileRef = 4B799AD607899652003F3F15;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928608F13D81005B1F5F = {
+ fileRef = 4BF8D1880834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928708F13D81005B1F5F = {
+ fileRef = 4BF8D1900834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928808F13D81005B1F5F = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928908F13D81005B1F5F = {
+ fileRef = 4BF8D1A80834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928A08F13D81005B1F5F = {
+ fileRef = 4BF8D1C80834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928B08F13D81005B1F5F = {
+ fileRef = 4BF8D1D00834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928C08F13D81005B1F5F = {
+ fileRef = 4BF8D1E50834EF6700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5928D08F13D81005B1F5F = {
+ fileRef = 4BF8D1E90834EF7500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929008F13D81005B1F5F = {
+ fileRef = 4BF8D1C40834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929108F13D81005B1F5F = {
+ fileRef = 4BF8FB0D08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929208F13D81005B1F5F = {
+ fileRef = 4BEE0B2C08ACBB9F00D22B43;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929308F13D81005B1F5F = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929408F13D81005B1F5F = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929608F13D81005B1F5F = {
+ fileRef = 4B97440C08AF54590094983C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929808F13D81005B1F5F = {
+ fileRef = 4BF773AA08B3414500149912;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929A08F13D81005B1F5F = {
+ fileRef = 4B56880F08B5C8620022B32D;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929B08F13D81005B1F5F = {
+ fileRef = 4B2C28F908DAD01E00249230;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929C08F13D81005B1F5F = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929D08F13D81005B1F5F = {
+ fileRef = 4B003AB008E2B2BA0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF5929E08F13D81005B1F5F = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5929F08F13D81005B1F5F = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF592A008F13D81005B1F5F = {
+ explicitFileType = wrapper.framework;
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = Jackdmp.framework;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 4BF592AE08F13E40005B1F5F = {
+ fileRef = 4BF8D22A0834F07D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592AF08F13E40005B1F5F = {
+ fileRef = 4BF8D2290834F07D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B008F13E4B005B1F5F = {
+ fileRef = 4BF8D1BA0834EEF100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B108F13E4C005B1F5F = {
+ fileRef = 4BF8D1B90834EEF100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B208F13E4C005B1F5F = {
+ fileRef = 4BF8D1BE0834EEFC00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B308F13E4D005B1F5F = {
+ fileRef = 4BF8D1BD0834EEFC00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B408F13E5A005B1F5F = {
+ fileRef = 4BF8D1B60834EEE400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B508F13E5A005B1F5F = {
+ fileRef = 4BF8D1B50834EEE400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B608F13E5F005B1F5F = {
+ fileRef = 4B869B3D08C8D21C001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B708F13E5F005B1F5F = {
+ fileRef = 4B869B3E08C8D21C001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B808F13E60005B1F5F = {
+ fileRef = 4B869D7F08C9CB00001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592B908F13E61005B1F5F = {
+ fileRef = 4B869B4208C8D22F001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BA08F13E61005B1F5F = {
+ fileRef = 4B869B6408C8D76B001CF041;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BB08F13E76005B1F5F = {
+ fileRef = 4BF8D2140834F02800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BC08F13E76005B1F5F = {
+ fileRef = 4BF8D2130834F02800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BD08F13E7A005B1F5F = {
+ fileRef = 4BF8D20F0834F01C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BE08F13E7A005B1F5F = {
+ fileRef = 4BF8D2100834F01C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592BF08F13E8B005B1F5F = {
+ fileRef = 4BF8D1F70834EFBD00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF592C008F13E8C005B1F5F = {
+ fileRef = 4BF8D1F80834EFBD00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF6C1D508ACE64C001E2013 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachSemaphore.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF6C1D608ACE64C001E2013 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachSemaphore.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF6C1D708ACE64C001E2013 = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF6C1D808ACE64C001E2013 = {
+ fileRef = 4BF6C1D608ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF6C1DB08ACE64C001E2013 = {
+ fileRef = 4BF6C1D508ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF6C1DC08ACE64C001E2013 = {
+ fileRef = 4BF6C1D608ACE64C001E2013;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF70ACA0908EE95008B75AD = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackLoopbackDriver.cpp;
+ path = ../common/JackLoopbackDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF70ACB0908EE95008B75AD = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackLoopbackDriver.h;
+ path = ../common/JackLoopbackDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF70ACC0908EE95008B75AD = {
+ fileRef = 4BF70ACA0908EE95008B75AD;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF70ACD0908EE95008B75AD = {
+ fileRef = 4BF70ACB0908EE95008B75AD;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF772FD08B3330F00149912 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackAtomic.h;
+ path = ../common/JackAtomic.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF772FE08B3330F00149912 = {
+ fileRef = 4BF772FD08B3330F00149912;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF773AA08B3414500149912 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = JackTime.c;
+ path = ../common/JackTime.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF773AB08B3414500149912 = {
+ fileRef = 4BF773AA08B3414500149912;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF773AD08B3414500149912 = {
+ fileRef = 4BF773AA08B3414500149912;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1670834EDD900C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = zombie.c;
+ path = ../common/zombie.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1680834EDD900C94B91 = {
+ fileRef = 4BF8D1670834EDD900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1690834EDE600C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = lsp.c;
+ path = ../common/lsp.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D16A0834EDE600C94B91 = {
+ fileRef = 4BF8D1690834EDE600C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D16B0834EDF000C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = metro.c;
+ path = ../common/metro.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D16C0834EDF000C94B91 = {
+ fileRef = 4BF8D16B0834EDF000C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D16D0834EDFF00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = connect.c;
+ path = ../common/connect.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D16F0834EDFF00C94B91 = {
+ fileRef = 4BF8D16D0834EDFF00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1700834EDFF00C94B91 = {
+ fileRef = 4BF8D16D0834EDFF00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1710834EE0F00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = freewheel.c;
+ path = ../common/freewheel.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1720834EE0F00C94B91 = {
+ fileRef = 4BF8D1710834EE0F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1730834EE2800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = internal_metro.cpp;
+ path = ../common/internal_metro.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1740834EE2800C94B91 = {
+ fileRef = 4BF8D1730834EE2800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1750834EE3600C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = external_metro.cpp;
+ path = ../common/external_metro.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1760834EE3600C94B91 = {
+ fileRef = 4BF8D1750834EE3600C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1770834EE4800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackError.h;
+ path = ../common/JackError.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1790834EE4800C94B91 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D17D0834EE4800C94B91 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1830834EE5800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackTime.h;
+ path = ../common/JackTime.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1840834EE5800C94B91 = {
+ fileRef = 4BF8D1830834EE5800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1860834EE5800C94B91 = {
+ fileRef = 4BF8D1830834EE5800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1870834EE7900C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackShmMem.h;
+ path = ../common/JackShmMem.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1880834EE7900C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackShmMem.cpp;
+ path = ../common/JackShmMem.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1890834EE7900C94B91 = {
+ fileRef = 4BF8D1870834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D18A0834EE7900C94B91 = {
+ fileRef = 4BF8D1880834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D18D0834EE7900C94B91 = {
+ fileRef = 4BF8D1870834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D18E0834EE7900C94B91 = {
+ fileRef = 4BF8D1880834EE7900C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D18F0834EE8400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = shm.h;
+ path = ../common/shm.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1900834EE8400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = shm.c;
+ path = ../common/shm.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1910834EE8400C94B91 = {
+ fileRef = 4BF8D18F0834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1920834EE8400C94B91 = {
+ fileRef = 4BF8D1900834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1950834EE8400C94B91 = {
+ fileRef = 4BF8D18F0834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1960834EE8400C94B91 = {
+ fileRef = 4BF8D1900834EE8400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1970834EE9700C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackPosixThread.h;
+ path = ../common/JackPosixThread.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1980834EE9700C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackPosixThread.cpp;
+ path = ../common/JackPosixThread.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1990834EE9700C94B91 = {
+ fileRef = 4BF8D1970834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D19A0834EE9700C94B91 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D19D0834EE9700C94B91 = {
+ fileRef = 4BF8D1970834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D19E0834EE9700C94B91 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D19F0834EE9E00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackThread.h;
+ path = ../common/JackThread.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1A00834EE9E00C94B91 = {
+ fileRef = 4BF8D19F0834EE9E00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1A20834EE9E00C94B91 = {
+ fileRef = 4BF8D19F0834EE9E00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1A70834EEB400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackActivationCount.h;
+ path = ../common/JackActivationCount.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1A80834EEB400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackActivationCount.cpp;
+ path = ../common/JackActivationCount.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1A90834EEB400C94B91 = {
+ fileRef = 4BF8D1A70834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1AA0834EEB400C94B91 = {
+ fileRef = 4BF8D1A80834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1AD0834EEB400C94B91 = {
+ fileRef = 4BF8D1A70834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1AE0834EEB400C94B91 = {
+ fileRef = 4BF8D1A80834EEB400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1AF0834EEC400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackChannel.h;
+ path = ../common/JackChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1B00834EEC400C94B91 = {
+ fileRef = 4BF8D1AF0834EEC400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1B20834EEC400C94B91 = {
+ fileRef = 4BF8D1AF0834EEC400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1B30834EED500C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackInternalClientChannel.h;
+ path = ../common/JackInternalClientChannel.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1B40834EED500C94B91 = {
+ fileRef = 4BF8D1B30834EED500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1B50834EEE400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackDriver.h;
+ path = ../common/JackDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1B60834EEE400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackDriver.cpp;
+ path = ../common/JackDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1B70834EEE400C94B91 = {
+ fileRef = 4BF8D1B50834EEE400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1B80834EEE400C94B91 = {
+ fileRef = 4BF8D1B60834EEE400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1B90834EEF100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackFreewheelDriver.h;
+ path = ../common/JackFreewheelDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1BA0834EEF100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackFreewheelDriver.cpp;
+ path = ../common/JackFreewheelDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1BB0834EEF100C94B91 = {
+ fileRef = 4BF8D1B90834EEF100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1BC0834EEF100C94B91 = {
+ fileRef = 4BF8D1BA0834EEF100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1BD0834EEFC00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackThreadedDriver.h;
+ path = ../common/JackThreadedDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1BE0834EEFC00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackThreadedDriver.cpp;
+ path = ../common/JackThreadedDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1BF0834EEFC00C94B91 = {
+ fileRef = 4BF8D1BD0834EEFC00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1C00834EEFC00C94B91 = {
+ fileRef = 4BF8D1BE0834EEFC00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1C10834EF0800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackAtomicState.h;
+ path = ../common/JackAtomicState.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1C20834EF0800C94B91 = {
+ fileRef = 4BF8D1C10834EF0800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1C30834EF1400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackConnectionManager.h;
+ path = ../common/JackConnectionManager.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1C40834EF1400C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackConnectionManager.cpp;
+ path = ../common/JackConnectionManager.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1C50834EF1400C94B91 = {
+ fileRef = 4BF8D1C30834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1C60834EF1400C94B91 = {
+ fileRef = 4BF8D1C40834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1C70834EF2200C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackGraphManager.h;
+ path = ../common/JackGraphManager.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1C80834EF2200C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackGraphManager.cpp;
+ path = ../common/JackGraphManager.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1C90834EF2200C94B91 = {
+ fileRef = 4BF8D1C70834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1CA0834EF2200C94B91 = {
+ fileRef = 4BF8D1C80834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1CD0834EF2200C94B91 = {
+ fileRef = 4BF8D1C70834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1CE0834EF2200C94B91 = {
+ fileRef = 4BF8D1C80834EF2200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1CF0834EF2F00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackPort.h;
+ path = ../common/JackPort.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1D00834EF2F00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackPort.cpp;
+ path = ../common/JackPort.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1D10834EF2F00C94B91 = {
+ fileRef = 4BF8D1CF0834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1D20834EF2F00C94B91 = {
+ fileRef = 4BF8D1D00834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1D50834EF2F00C94B91 = {
+ fileRef = 4BF8D1CF0834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1D60834EF2F00C94B91 = {
+ fileRef = 4BF8D1D00834EF2F00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1D90834EF4500C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackClientInterface.h;
+ path = ../common/JackClientInterface.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1DA0834EF4500C94B91 = {
+ fileRef = 4BF8D1D90834EF4500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1DC0834EF4500C94B91 = {
+ fileRef = 4BF8D1D90834EF4500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1DD0834EF4D00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackClientControl.h;
+ path = ../common/JackClientControl.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1DE0834EF4D00C94B91 = {
+ fileRef = 4BF8D1DD0834EF4D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E00834EF4D00C94B91 = {
+ fileRef = 4BF8D1DD0834EF4D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E10834EF5500C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackClient.h;
+ path = ../common/JackClient.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1E20834EF5500C94B91 = {
+ fileRef = 4BF8D1E10834EF5500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E40834EF5500C94B91 = {
+ fileRef = 4BF8D1E10834EF5500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E50834EF6700C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackClient.cpp;
+ path = ../common/JackClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1E60834EF6700C94B91 = {
+ fileRef = 4BF8D1E50834EF6700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E80834EF6700C94B91 = {
+ fileRef = 4BF8D1E50834EF6700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1E90834EF7500C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackAPI.cpp;
+ path = ../common/JackAPI.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1EA0834EF7500C94B91 = {
+ fileRef = 4BF8D1E90834EF7500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1EC0834EF7500C94B91 = {
+ fileRef = 4BF8D1E90834EF7500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1ED0834EF9200C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackInternalClient.cpp;
+ path = ../common/JackInternalClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1EE0834EF9200C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackInternalClient.h;
+ path = ../common/JackInternalClient.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1EF0834EF9200C94B91 = {
+ fileRef = 4BF8D1ED0834EF9200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1F00834EF9200C94B91 = {
+ fileRef = 4BF8D1EE0834EF9200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1F40834EF9200C94B91 = {
+ fileRef = 4BF8D1EE0834EF9200C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1F50834EFB000C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackServerAPI.cpp;
+ path = ../common/JackServerAPI.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1F60834EFB000C94B91 = {
+ fileRef = 4BF8D1F50834EFB000C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1F70834EFBD00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackExternalClient.h;
+ path = ../common/JackExternalClient.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1F80834EFBD00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackExternalClient.cpp;
+ path = ../common/JackExternalClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1F90834EFBD00C94B91 = {
+ fileRef = 4BF8D1F70834EFBD00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1FA0834EFBD00C94B91 = {
+ fileRef = 4BF8D1F80834EFBD00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D1FB0834EFD100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackLibGlobals.h;
+ path = ../common/JackLibGlobals.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1FC0834EFD100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackLibClient.h;
+ path = ../common/JackLibClient.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1FD0834EFD100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackLibClient.cpp;
+ path = ../common/JackLibClient.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D1FE0834EFD100C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackLibAPI.cpp;
+ path = ../common/JackLibAPI.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2030834EFD100C94B91 = {
+ fileRef = 4BF8D1FB0834EFD100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2040834EFD100C94B91 = {
+ fileRef = 4BF8D1FC0834EFD100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2050834EFD100C94B91 = {
+ fileRef = 4BF8D1FD0834EFD100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2060834EFD100C94B91 = {
+ fileRef = 4BF8D1FE0834EFD100C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D20F0834F01C00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackEngineTiming.cpp;
+ path = ../common/JackEngineTiming.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2100834F01C00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackEngineTiming.h;
+ path = ../common/JackEngineTiming.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2110834F01C00C94B91 = {
+ fileRef = 4BF8D20F0834F01C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2120834F01C00C94B91 = {
+ fileRef = 4BF8D2100834F01C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2130834F02800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackEngine.h;
+ path = ../common/JackEngine.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2140834F02800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackEngine.cpp;
+ path = ../common/JackEngine.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2150834F02800C94B91 = {
+ fileRef = 4BF8D2130834F02800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2160834F02800C94B91 = {
+ fileRef = 4BF8D2140834F02800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2170834F03500C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = jack.h;
+ path = ../common/jack.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2180834F03500C94B91 = {
+ fileRef = 4BF8D2170834F03500C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2190834F03D00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackEngineControl.h;
+ path = ../common/JackEngineControl.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D21A0834F03D00C94B91 = {
+ fileRef = 4BF8D2190834F03D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D21B0834F04800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = types.h;
+ path = ../common/types.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D21C0834F04800C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = transport.h;
+ path = ../common/transport.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D21D0834F04800C94B91 = {
+ fileRef = 4BF8D21B0834F04800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D21E0834F04800C94B91 = {
+ fileRef = 4BF8D21C0834F04800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2210834F05C00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackServer.cpp;
+ path = ../common/JackServer.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2220834F05C00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackServer.h;
+ path = ../common/JackServer.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2230834F05C00C94B91 = {
+ fileRef = 4BF8D2210834F05C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2240834F05C00C94B91 = {
+ fileRef = 4BF8D2220834F05C00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2250834F06A00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = Jackdmp.cpp;
+ path = ../common/Jackdmp.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2260834F06A00C94B91 = {
+ fileRef = 4BF8D2250834F06A00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2290834F07D00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackAudioDriver.h;
+ path = ../common/JackAudioDriver.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D22A0834F07D00C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackAudioDriver.cpp;
+ path = ../common/JackAudioDriver.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D22B0834F07D00C94B91 = {
+ fileRef = 4BF8D2290834F07D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D22C0834F07D00C94B91 = {
+ fileRef = 4BF8D22A0834F07D00C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2350834F14400C94B91 = {
+ fileRef = 4BF8D1C40834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2360834F14400C94B91 = {
+ fileRef = 4BF8D1C30834EF1400C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D23E0834F1C300C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = testAtomic.cpp;
+ path = ../common/test/testAtomic.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D23F0834F1C300C94B91 = {
+ fileRef = 4BF8D23E0834F1C300C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2400834F1DC00C94B91 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2410834F1DD00C94B91 = {
+ fileRef = 4BF8D1970834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2430834F1E400C94B91 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D2470834F20600C94B91 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = testSem.cpp;
+ path = ../common/test/testSem.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8D2480834F20600C94B91 = {
+ fileRef = 4BF8D2470834F20600C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D24A0834F21300C94B91 = {
+ fileRef = 4BF8D1770834EE4800C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D24B0834F21E00C94B91 = {
+ fileRef = 4BF8D1980834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8D24C0834F21E00C94B91 = {
+ fileRef = 4BF8D1970834EE9700C94B91;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8FB0D08AC88EF00D1A344 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackFrameTimer.cpp;
+ path = ../common/JackFrameTimer.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8FB0E08AC88EF00D1A344 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackFrameTimer.h;
+ path = ../common/JackFrameTimer.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BF8FB0F08AC88EF00D1A344 = {
+ fileRef = 4BF8FB0D08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8FB1008AC88EF00D1A344 = {
+ fileRef = 4BF8FB0E08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8FB1308AC88EF00D1A344 = {
+ fileRef = 4BF8FB0D08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BF8FB1408AC88EF00D1A344 = {
+ fileRef = 4BF8FB0E08AC88EF00D1A344;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB297708AF44ED00D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachServerNotifyChannel.cpp;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB297808AF44ED00D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachServerChannel.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB297908AF44ED00D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachServerChannel.cpp;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB297A08AF44ED00D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachServerNotifyChannel.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB297B08AF44ED00D450D4 = {
+ fileRef = 4BFB297708AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB297C08AF44ED00D450D4 = {
+ fileRef = 4BFB297808AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB297D08AF44ED00D450D4 = {
+ fileRef = 4BFB297908AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB297E08AF44ED00D450D4 = {
+ fileRef = 4BFB297A08AF44ED00D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB298708AF450200D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachClientChannel.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB298808AF450200D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachNotifyChannel.cpp;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB298908AF450200D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachNotifyChannel.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB298C08AF450200D450D4 = {
+ fileRef = 4BFB298808AF450200D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB298D08AF450200D450D4 = {
+ fileRef = 4BFB298908AF450200D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB299308AF450200D450D4 = {
+ fileRef = 4BFB298708AF450200D450D4;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB299808AF451200D450D4 = {
+ children = (
+ 4B799AD707899652003F3F15,
+ 4B799AD607899652003F3F15,
+ 4BFB298708AF450200D450D4,
+ 4BFB29AE08AF45FD00D450D4,
+ 4BFB297808AF44ED00D450D4,
+ 4BFB297908AF44ED00D450D4,
+ 4BFB297A08AF44ED00D450D4,
+ 4BFB297708AF44ED00D450D4,
+ 4BFB298908AF450200D450D4,
+ 4BFB298808AF450200D450D4,
+ );
+ isa = PBXGroup;
+ name = Mach;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB299908AF452300D450D4 = {
+ children = (
+ 4B9B815C08AFA45000D05A28,
+ 4B97440D08AF54590094983C,
+ 4B97440C08AF54590094983C,
+ 4B97441408AF546F0094983C,
+ 4B97441508AF546F0094983C,
+ 4B97441B08AF54930094983C,
+ 4B97452B08AF6D4B0094983C,
+ 4B9745CB08AF771B0094983C,
+ 4B9745D908AF78200094983C,
+ 4B97441A08AF54930094983C,
+ 4B97458708AF74FF0094983C,
+ );
+ isa = PBXGroup;
+ name = Socket;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 4BFB29AE08AF45FD00D450D4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachClientChannel.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BFB73F608AD291A00DB99B8 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackGlobals.h;
+ path = ../common/JackGlobals.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BFB73F708AD291A00DB99B8 = {
+ fileRef = 4BFB73F608AD291A00DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB73F908AD291A00DB99B8 = {
+ fileRef = 4BFB73F608AD291A00DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB741E08AD2B9900DB99B8 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = JackMachThread.cpp;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BFB741F08AD2B9900DB99B8 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = JackMachThread.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 4BFB742008AD2B9900DB99B8 = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB742108AD2B9900DB99B8 = {
+ fileRef = 4BFB741F08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB742408AD2B9900DB99B8 = {
+ fileRef = 4BFB741E08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFB742508AD2B9900DB99B8 = {
+ fileRef = 4BFB741F08AD2B9900DB99B8;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFC8139090E1F56007BAE60 = {
+ fileRef = 4B003A6008E2A87A0060EFDC;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 4BFD0E2108DADFB000D838B8 = {
+ containerPortal = 08FB7793FE84155DC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 4B2C28D008DACC6B00249230;
+ remoteInfo = jack_coreaudio;
+ };
+ 4BFD0E2208DADFB000D838B8 = {
+ isa = PBXTargetDependency;
+ target = 4B2C28D008DACC6B00249230;
+ targetProxy = 4BFD0E2108DADFB000D838B8;
+ };
+//4B0
+//4B1
+//4B2
+//4B3
+//4B4
+//C60
+//C61
+//C62
+//C63
+//C64
+ C6859E8B029090EE04C91782 = {
+ isa = PBXFileReference;
+ lastKnownFileType = text.man;
+ path = JackServer.1;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ C6859E8C029090F304C91782 = {
+ children = (
+ C6859E8B029090EE04C91782,
+ );
+ isa = PBXGroup;
+ name = Documentation;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ };
+ rootObject = 08FB7793FE84155DC02AAC07;
+}
diff --git a/macosx/Jackdmp.xcodeproj/letz.mode1 b/macosx/Jackdmp.xcodeproj/letz.mode1
new file mode 100644
index 00000000..946faf0a
--- /dev/null
+++ b/macosx/Jackdmp.xcodeproj/letz.mode1
@@ -0,0 +1,1334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Project</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXRunSessionModule</string>
+ <key>Name</key>
+ <string>Run Log</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ </array>
+ <key>Description</key>
+ <string>DefaultDescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>mode1</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>4B0137430A2B988600D54320</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.mode1</string>
+ <key>MajorVersion</key>
+ <integer>31</integer>
+ <key>MinorVersion</key>
+ <integer>1</integer>
+ <key>Name</key>
+ <string>Default</string>
+ <key>Notifications</key>
+ <array/>
+ <key>OpenEditors</key>
+ <array/>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>-1</integer>
+ <integer>-1</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>active-target-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>buildOrClean</string>
+ <string>build-and-runOrDebug</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>toggle-editor</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProjectWithEditor</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>316</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>08FB7794FE84155DC02AAC07</string>
+ <string>08FB7795FE84155DC02AAC07</string>
+ <string>4B6BEB4A07A6CCDC00A5DBDA</string>
+ <string>4B03383E0797E19900686131</string>
+ <string>4B765CC805ECE17900571F78</string>
+ <string>4BA3873B079479C2008D8992</string>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>3</integer>
+ <integer>2</integer>
+ <integer>1</integer>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {316, 718}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {333, 736}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>316</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>386 86 1171 777 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>333pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20306471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>MyNewFile14.java</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20406471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>MyNewFile14.java</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {833, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>386 86 1171 777 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20506471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 5}, {833, 731}}</string>
+ <key>RubberWindowFrame</key>
+ <string>386 86 1171 777 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>731pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>833pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>4B60CF040AAABD9A004956AA</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>4B60CF050AAABD9A004956AA</string>
+ <string>1CE0B20306471E060097A5F4</string>
+ <string>1CE0B20506471E060097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default</string>
+ </dict>
+ <dict>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.morph</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 337}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>1</integer>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 355}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>373 269 690 397 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Morph</string>
+ <key>PreferredWidth</key>
+ <integer>300</integer>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default.short</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <false/>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>0.0</real>
+ <key>ToolbarDisplayMode</key>
+ <integer>1</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>4B0137440A2B988600D54320</string>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>/Volumes/Documents/jackmp-svn/trunk/jackmp/macosx/Jackdmp.xcodeproj</string>
+ </array>
+ <key>WindowString</key>
+ <string>386 86 1171 777 0 0 1440 938 </string>
+ <key>WindowTools</key>
+ <array>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Jackdmp.cpp</string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1129, 246}}</string>
+ <key>RubberWindowFrame</key>
+ <string>262 360 1129 578 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>246pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBuildLogShowsTranscriptDefaultKey</key>
+ <string>{{0, 158}, {1129, 128}}</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1011</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 251}, {1129, 286}}</string>
+ <key>RubberWindowFrame</key>
+ <string>262 360 1129 578 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>286pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>537pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Build Results</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>4B0137440A2B988600D54320</string>
+ <string>4B60CF000AAABD98004956AA</string>
+ <string>1CD0528F0623707200166675</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.build</string>
+ <key>WindowString</key>
+ <string>262 360 1129 578 0 0 1440 938 </string>
+ <key>WindowToolGUID</key>
+ <string>4B0137440A2B988600D54320</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {317, 164}}</string>
+ <string>{{317, 0}, {377, 164}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 164}}</string>
+ <string>{{0, 164}, {694, 216}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleDrawerSize</key>
+ <string>{100, 120}</string>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 380}}</string>
+ <key>RubberWindowFrame</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>1C0AD2AB069F1E9B00FABCE6</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>1C0AD2AC069F1E9B00FABCE6</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debug</string>
+ <key>WindowString</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.find</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CDD528C0622207200134675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {833, 216}}</string>
+ <key>RubberWindowFrame</key>
+ <string>433 136 833 802 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>833pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>216pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528E0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 221}, {833, 540}}</string>
+ <key>RubberWindowFrame</key>
+ <string>433 136 833 802 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Proportion</key>
+ <string>540pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>761pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Find</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXProjectFindModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>4B60CF020AAABD98004956AA</string>
+ <string>4B60CF030AAABD98004956AA</string>
+ <string>1CDD528C0622207200134675</string>
+ <string>1CD0528E0623707200166675</string>
+ </array>
+ <key>WindowString</key>
+ <string>433 136 833 802 0 0 1440 938 </string>
+ <key>WindowToolGUID</key>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <key>WindowToolIsVisible</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>MENUSEPARATOR</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debuggerConsole</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAAC065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {440, 358}}</string>
+ <key>RubberWindowFrame</key>
+ <string>650 41 440 400 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>358pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>358pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger Console</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugCLIModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAAD065D492600B07095</string>
+ <string>1C78EAAE065D492600B07095</string>
+ <string>1C78EAAC065D492600B07095</string>
+ </array>
+ <key>WindowString</key>
+ <string>650 41 440 400 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.run</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>LauncherConfigVersion</key>
+ <string>3</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528B0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Run</string>
+ <key>Runner</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {493, 167}}</string>
+ <string>{{0, 176}, {493, 267}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {405, 443}}</string>
+ <string>{{414, 0}, {514, 443}}</string>
+ </array>
+ </dict>
+ </dict>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {757, 436}}</string>
+ <key>RubberWindowFrame</key>
+ <string>481 172 757 477 0 0 1440 938 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXRunSessionModule</string>
+ <key>Proportion</key>
+ <string>436pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>436pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Run Log</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXRunSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2B3069F1EA900FABCE6</string>
+ <string>4BE6C6B40A3E0B15005A203A</string>
+ <string>1CD0528B0623707200166675</string>
+ <string>4BE6C6B50A3E0B15005A203A</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.run</string>
+ <key>WindowString</key>
+ <string>481 172 757 477 0 0 1440 938 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2B3069F1EA900FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.scm</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB2065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB3065D492600B07095</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {452, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052920623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ConsoleFrame</key>
+ <string>{{0, 259}, {452, 0}}</string>
+ <key>Frame</key>
+ <string>{{0, 7}, {452, 259}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ <key>TableConfiguration</key>
+ <array>
+ <string>Status</string>
+ <real>30</real>
+ <string>FileName</string>
+ <real>199</real>
+ <string>Path</string>
+ <real>197.09500122070312</real>
+ </array>
+ <key>TableFrame</key>
+ <string>{{0, 0}, {452, 250}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Proportion</key>
+ <string>262pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>266pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>SCM</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXCVSModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAB4065D492600B07095</string>
+ <string>1C78EAB5065D492600B07095</string>
+ <string>1C78EAB2065D492600B07095</string>
+ <string>1CD052920623707200166675</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.scm</string>
+ <key>WindowString</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.breakpoints</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>no</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>168</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {168, 350}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>0</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {185, 368}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>168</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>185pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA1AED706398EBD00589147</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{190, 0}, {554, 368}}</string>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>554pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>368pt</string>
+ </dict>
+ </array>
+ <key>MajorVersion</key>
+ <integer>2</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Breakpoints</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <string>1CDDB66907F98D9800BB5817</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CA1AED706398EBD00589147</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.breakpoints</string>
+ <key>WindowString</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <key>WindowToolIsVisible</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugAnimator</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug Visualizer</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugAnimator</string>
+ <key>WindowString</key>
+ <string>100 100 700 500 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.bookmarks</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Bookmarks</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBookmarksModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowString</key>
+ <string>538 42 401 187 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.classBrowser</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>OptionsSetName</key>
+ <string>Hierarchy, all classes</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA6456E063B45B4001379D8</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Class Browser - NSObject</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ClassesFrame</key>
+ <string>{{0, 0}, {374, 96}}</string>
+ <key>ClassesTreeTableConfiguration</key>
+ <array>
+ <string>PBXClassNameColumnIdentifier</string>
+ <real>208</real>
+ <string>PBXClassBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>Frame</key>
+ <string>{{0, 0}, {630, 331}}</string>
+ <key>MembersFrame</key>
+ <string>{{0, 105}, {374, 395}}</string>
+ <key>MembersTreeTableConfiguration</key>
+ <array>
+ <string>PBXMemberTypeIconColumnIdentifier</string>
+ <real>22</real>
+ <string>PBXMemberNameColumnIdentifier</string>
+ <real>216</real>
+ <string>PBXMemberTypeColumnIdentifier</string>
+ <real>97</real>
+ <string>PBXMemberBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <integer>1</integer>
+ <key>RubberWindowFrame</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Class Browser</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXClassBrowserModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <string>1C0AD2B0069F1E9B00FABCE6</string>
+ <string>1CA6456E063B45B4001379D8</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.classbrowser</string>
+ <key>WindowString</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/macosx/Jackdmp.xcodeproj/letz.pbxuser b/macosx/Jackdmp.xcodeproj/letz.pbxuser
new file mode 100644
index 00000000..362be9a9
--- /dev/null
+++ b/macosx/Jackdmp.xcodeproj/letz.pbxuser
@@ -0,0 +1,2032 @@
+// !$*UTF8*$!
+{
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ activeBuildConfigurationName = Deployment;
+ activeExecutable = 4BE6C6A40A3E096F005A203A /* jack_test Universal */;
+ activeTarget = 4B699B26097D421600A18468 /* All Universal */;
+ addToTargets = (
+ 4B699CD1097D421600A18468 /* jack_connect Universal */,
+ 4B699CE1097D421600A18468 /* jack_disconnect Universal */,
+ 4B89C81506382F5800464BF4 /* jack_connect */,
+ 4B9686230771CA08002D75D5 /* jack_disconnect */,
+ );
+ breakpoints = (
+ 4B978EDE0A31DDD3009E2DD1 /* JackPortAudioDriver.cpp:128 */,
+ 4BA9D8BB0A3AECFE004F3D2C /* JackWinNamedPipeServerChannel.cpp:363 */,
+ 4BA9D9EB0A3B0281004F3D2C /* JackWinNamedPipe.h:91 */,
+ 4BA9DA280A3B0A26004F3D2C /* JackWinNamedPipeServerChannel.h:113 */,
+ 4B98C8F60A3B6AFE00DBA3B2 /* JackDriver.cpp:79 */,
+ 4BEBFBC50A45374400A23185 /* jack_test.c:1656 */,
+ 4B3F9C220AAA1B2D000B2579 /* JackConnectionManager.h:394 */,
+ );
+ breakpointsGroup = 4B978DEA0A31D077009E2DD1 /* XCBreakpointsBucket */;
+ codeSenseManager = 4B0137400A2B977800D54320 /* Code sense */;
+ executables = (
+ 4B0137200A2B975500D54320 /* jackdmp framework Universal */,
+ 4B0137210A2B975500D54320 /* jack_metro Universal */,
+ 4B0137220A2B975500D54320 /* jack_lsp Universal */,
+ 4B0137230A2B975500D54320 /* jack_connect Universal */,
+ 4B0137240A2B975500D54320 /* jack_disconnect Universal */,
+ 4B0137250A2B975500D54320 /* jack_freewheel Universal */,
+ 4B0137260A2B975500D54320 /* jack_external_metro Universal */,
+ 4B0137270A2B975500D54320 /* testAtomic Universal */,
+ 4B0137280A2B975500D54320 /* testSem Universal */,
+ 4B0137290A2B975500D54320 /* zombie Universal */,
+ 4B01372A0A2B975500D54320 /* synchroServer Universal */,
+ 4B01372B0A2B975500D54320 /* synchroClient Universal */,
+ 4B01372C0A2B975500D54320 /* synchroServerClient Universal */,
+ 4B01372D0A2B975500D54320 /* jackdmp framework */,
+ 4B01372E0A2B975500D54320 /* jack_metro */,
+ 4B01372F0A2B975500D54320 /* jack_lsp */,
+ 4B0137300A2B975500D54320 /* jack_connect */,
+ 4B0137310A2B975500D54320 /* jack_disconnect */,
+ 4B0137320A2B975500D54320 /* jack_freewheel */,
+ 4B0137330A2B975500D54320 /* jack_external_metro */,
+ 4B0137340A2B975500D54320 /* testAtomic */,
+ 4B0137350A2B975500D54320 /* testSem */,
+ 4B0137360A2B975500D54320 /* zombie */,
+ 4B0137370A2B975500D54320 /* synchroServer */,
+ 4B0137380A2B975500D54320 /* synchroClient */,
+ 4B0137390A2B975500D54320 /* synchroServerClient */,
+ 4BE6C6A40A3E096F005A203A /* jack_test Universal */,
+ );
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 200,
+ 200,
+ 403.5835,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXBookmarksDataSource_LocationID,
+ PBXBookmarksDataSource_NameID,
+ PBXBookmarksDataSource_CommentsID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 594,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 443,
+ 365,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFindDataSource_MessageID,
+ PBXFindDataSource_LocationID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 16,
+ 200,
+ 50,
+ 534.2085,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXSymbolsDataSource_SymbolTypeIconID,
+ PBXSymbolsDataSource_SymbolNameID,
+ PBXSymbolsDataSource_SymbolTypeID,
+ PBXSymbolsDataSource_ReferenceNameID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 20,
+ 570,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_SCM_ColumnID,
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 200,
+ 414,
+ 20,
+ 48,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 178961747;
+ PBXWorkspaceStateSaveDate = 178961747;
+ };
+ sourceControlManager = 4B01373F0A2B977800D54320 /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 4B0137200A2B975500D54320 /* jackdmp framework Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jackdmp framework Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137210A2B975500D54320 /* jack_metro Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_metro Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137220A2B975500D54320 /* jack_lsp Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_lsp Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137230A2B975500D54320 /* jack_connect Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_connect Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137240A2B975500D54320 /* jack_disconnect Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_disconnect Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137250A2B975500D54320 /* jack_freewheel Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_freewheel Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137260A2B975500D54320 /* jack_external_metro Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_external_metro Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137270A2B975500D54320 /* testAtomic Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "testAtomic Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137280A2B975500D54320 /* testSem Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "testSem Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B0137290A2B975500D54320 /* zombie Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "zombie Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B01372A0A2B975500D54320 /* synchroServer Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "synchroServer Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B01372B0A2B975500D54320 /* synchroClient Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "synchroClient Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B01372C0A2B975500D54320 /* synchroServerClient Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "synchroServerClient Universal";
+ sourceDirectories = (
+ );
+ };
+ 4B01372D0A2B975500D54320 /* jackdmp framework */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jackdmp framework";
+ sourceDirectories = (
+ );
+ };
+ 4B01372E0A2B975500D54320 /* jack_metro */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_metro;
+ sourceDirectories = (
+ );
+ };
+ 4B01372F0A2B975500D54320 /* jack_lsp */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_lsp;
+ sourceDirectories = (
+ );
+ };
+ 4B0137300A2B975500D54320 /* jack_connect */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_connect;
+ sourceDirectories = (
+ );
+ };
+ 4B0137310A2B975500D54320 /* jack_disconnect */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_disconnect;
+ sourceDirectories = (
+ );
+ };
+ 4B0137320A2B975500D54320 /* jack_freewheel */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_freewheel;
+ sourceDirectories = (
+ );
+ };
+ 4B0137330A2B975500D54320 /* jack_external_metro */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = jack_external_metro;
+ sourceDirectories = (
+ );
+ };
+ 4B0137340A2B975500D54320 /* testAtomic */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = testAtomic;
+ sourceDirectories = (
+ );
+ };
+ 4B0137350A2B975500D54320 /* testSem */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = testSem;
+ sourceDirectories = (
+ );
+ };
+ 4B0137360A2B975500D54320 /* zombie */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = zombie;
+ sourceDirectories = (
+ );
+ };
+ 4B0137370A2B975500D54320 /* synchroServer */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = synchroServer;
+ sourceDirectories = (
+ );
+ };
+ 4B0137380A2B975500D54320 /* synchroClient */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = synchroClient;
+ sourceDirectories = (
+ );
+ };
+ 4B0137390A2B975500D54320 /* synchroServerClient */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = synchroServerClient;
+ sourceDirectories = (
+ );
+ };
+ 4B01373F0A2B977800D54320 /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ };
+ scmType = "";
+ };
+ 4B0137400A2B977800D54320 /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 4B0C911D08DAF32100AE19BE /* jack_dummy */ = {
+ activeExec = 0;
+ };
+ 4B123D3308B3954300540632 /* JackGlobalsClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 6454}}";
+ sepNavSelRange = "{10493, 0}";
+ sepNavVisRect = "{{0, 5819}, {842, 635}}";
+ sepNavWindowFrame = "{{276, 50}, {881, 764}}";
+ };
+ };
+ 4B123D3608B3954A00540632 /* JackGlobalsServer.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 6454}}";
+ sepNavSelRange = "{5552, 0}";
+ sepNavVisRect = "{{0, 5819}, {842, 635}}";
+ sepNavWindowFrame = "{{494, 137}, {881, 764}}";
+ };
+ };
+ 4B1CBD7B0799484F0096ABE0 /* testSem */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137350A2B975500D54320 /* testSem */,
+ );
+ };
+ 4B1CBE2607994C6F0096ABE0 /* jack_freewheel */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137320A2B975500D54320 /* jack_freewheel */,
+ );
+ };
+ 4B2C28D008DACC6B00249230 /* jack_coreaudio */ = {
+ activeExec = 0;
+ };
+ 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 737}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {925, 737}}";
+ sepNavWindowFrame = "{{61, 25}, {964, 866}}";
+ };
+ };
+ 4B395C9606AEF53800923527 /* JackCoreAudioDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1256, 16618}}";
+ sepNavSelRange = "{1764, 0}";
+ sepNavVisRect = "{{0, 407}, {1051, 783}}";
+ sepNavWindowFrame = "{{303, -45}, {1090, 912}}";
+ };
+ };
+ 4B395C9706AEF53800923527 /* JackCoreAudioDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1010, 1764}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 736}, {1010, 760}}";
+ sepNavWindowFrame = "{{15, 44}, {1049, 889}}";
+ };
+ };
+ 4B3F9C220AAA1B2D000B2579 /* JackConnectionManager.h:394 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */;
+ hitCount = 0;
+ lineNumber = 394;
+ modificationTime = 178920237.678636;
+ state = 1;
+ };
+ 4B420C8107733D7C00DDA57E /* testAtomic */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137340A2B975500D54320 /* testAtomic */,
+ );
+ };
+ 4B4259E5076B635E00C1ECE1 /* JackMacEngineRPC.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1148, 2604}}";
+ sepNavSelRange = "{1346, 9}";
+ sepNavVisRect = "{{0, 163}, {941, 696}}";
+ sepNavWindowFrame = "{{427, 97}, {980, 825}}";
+ };
+ };
+ 4B50A111080917BA003F4C95 /* zombie */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137360A2B975500D54320 /* zombie */,
+ );
+ };
+ 4B56880F08B5C8620022B32D /* JackFifo.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2940}}";
+ sepNavSelRange = "{731, 10}";
+ sepNavVisRect = "{{0, 2203}, {925, 737}}";
+ sepNavWindowFrame = "{{394, 48}, {964, 866}}";
+ };
+ };
+ 4B56881008B5C8620022B32D /* JackFifo.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1036}}";
+ sepNavSelRange = "{774, 13}";
+ sepNavVisRect = "{{0, 299}, {925, 737}}";
+ sepNavWindowFrame = "{{10, 72}, {964, 866}}";
+ };
+ };
+ 4B646BED0636CC42003B5396 /* Jackmp.framework */ = {
+ activeExec = 0;
+ };
+ 4B646C310636CEE6003B5396 /* jack_metro */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372E0A2B975500D54320 /* jack_metro */,
+ );
+ };
+ 4B66A8580934964500A89560 /* JackConstants.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {853, 910}}";
+ sepNavSelRange = "{752, 0}";
+ sepNavVisRect = "{{0, 0}, {853, 799}}";
+ sepNavWindowFrame = "{{15, 5}, {892, 928}}";
+ };
+ };
+ 4B699B26097D421600A18468 /* All Universal */ = {
+ activeExec = 0;
+ };
+ 4B699BA7097D421600A18468 /* jackdmp framework Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137200A2B975500D54320 /* jackdmp framework Universal */,
+ );
+ };
+ 4B699C00097D421600A18468 /* Jackmp.framework Universal */ = {
+ activeExec = 0;
+ };
+ 4B699C4C097D421600A18468 /* Jackdmp.framework Universal */ = {
+ activeExec = 0;
+ };
+ 4B699CB1097D421600A18468 /* jack_metro Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137210A2B975500D54320 /* jack_metro Universal */,
+ );
+ };
+ 4B699CC1097D421600A18468 /* jack_lsp Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137220A2B975500D54320 /* jack_lsp Universal */,
+ );
+ };
+ 4B699CD1097D421600A18468 /* jack_connect Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137230A2B975500D54320 /* jack_connect Universal */,
+ );
+ };
+ 4B699CE1097D421600A18468 /* jack_disconnect Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137240A2B975500D54320 /* jack_disconnect Universal */,
+ );
+ };
+ 4B699CF1097D421600A18468 /* jack_freewheel Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137250A2B975500D54320 /* jack_freewheel Universal */,
+ );
+ };
+ 4B699D03097D421600A18468 /* jack_external_metro Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137260A2B975500D54320 /* jack_external_metro Universal */,
+ );
+ };
+ 4B699D13097D421600A18468 /* testAtomic Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137270A2B975500D54320 /* testAtomic Universal */,
+ );
+ };
+ 4B699D27097D421600A18468 /* testSem Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137280A2B975500D54320 /* testSem Universal */,
+ );
+ };
+ 4B699D3F097D421600A18468 /* zombie Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137290A2B975500D54320 /* zombie Universal */,
+ );
+ };
+ 4B699D4F097D421600A18468 /* synchroServer Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372A0A2B975500D54320 /* synchroServer Universal */,
+ );
+ };
+ 4B699D67097D421600A18468 /* synchroClient Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372B0A2B975500D54320 /* synchroClient Universal */,
+ );
+ };
+ 4B699D7F097D421700A18468 /* synchroServerClient Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372C0A2B975500D54320 /* synchroServerClient Universal */,
+ );
+ };
+ 4B699D97097D421700A18468 /* jack_coreaudio Universal */ = {
+ activeExec = 0;
+ };
+ 4B699DA6097D421700A18468 /* jack_dummy Universal */ = {
+ activeExec = 0;
+ };
+ 4B799AD607899652003F3F15 /* JackMachPort.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1004, 3920}}";
+ sepNavSelRange = "{1698, 18}";
+ sepNavVisRect = "{{0, 3066}, {853, 799}}";
+ sepNavWindowFrame = "{{464, -77}, {892, 928}}";
+ };
+ };
+ 4B7D792E0637B848001E7115 /* jack_lsp */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372F0A2B975500D54320 /* jack_lsp */,
+ );
+ };
+ 4B869B4208C8D22F001CF041 /* JackDriverLoader.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 938}}";
+ sepNavSelRange = "{500, 0}";
+ sepNavVisRect = "{{0, 155}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B869B6408C8D76B001CF041 /* jslist.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 4032}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 3295}, {925, 737}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4B869D7F08C9CB00001CF041 /* JackDriverLoader.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {853, 6986}}";
+ sepNavSelRange = "{817, 5}";
+ sepNavVisRect = "{{0, 6187}, {853, 799}}";
+ sepNavWindowFrame = "{{330, 4}, {892, 928}}";
+ };
+ };
+ 4B89B759076B731100D170DE /* JackRPCClientUser.c */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1442, 6286}}";
+ sepNavSelRange = "{2133, 40}";
+ sepNavVisRect = "{{0, 838}, {997, 607}}";
+ sepNavWindowFrame = "{{84, 134}, {1036, 736}}";
+ };
+ };
+ 4B89C81506382F5800464BF4 /* jack_connect */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137300A2B975500D54320 /* jack_connect */,
+ );
+ };
+ 4B9686230771CA08002D75D5 /* jack_disconnect */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137310A2B975500D54320 /* jack_disconnect */,
+ );
+ };
+ 4B97440C08AF54590094983C /* JackSocket.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 4382}}";
+ sepNavSelRange = "{5522, 5}";
+ sepNavVisRect = "{{0, 460}, {1051, 783}}";
+ sepNavWindowFrame = "{{293, 6}, {1090, 912}}";
+ };
+ };
+ 4B97440D08AF54590094983C /* JackSocket.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 1470}}";
+ sepNavSelRange = "{1861, 5}";
+ sepNavVisRect = "{{0, 244}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B97441408AF546F0094983C /* JackSocketClientChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 1260}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B97441508AF546F0094983C /* JackSocketClientChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 3710}}";
+ sepNavSelRange = "{6547, 6}";
+ sepNavVisRect = "{{0, 2927}, {1051, 783}}";
+ sepNavWindowFrame = "{{353, 26}, {1090, 912}}";
+ };
+ };
+ 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 798}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {1051, 783}}";
+ sepNavWindowFrame = "{{290, 9}, {1090, 912}}";
+ };
+ };
+ 4B97441B08AF54930094983C /* JackSocketServerChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 994}}";
+ sepNavSelRange = "{1317, 11}";
+ sepNavVisRect = "{{0, 197}, {1051, 783}}";
+ sepNavWindowFrame = "{{536, -46}, {1090, 912}}";
+ };
+ };
+ 4B97452B08AF6D4B0094983C /* JackSocketServerChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 5264}}";
+ sepNavSelRange = "{11338, 10}";
+ sepNavVisRect = "{{0, 3655}, {1051, 783}}";
+ sepNavWindowFrame = "{{306, 26}, {1090, 912}}";
+ };
+ };
+ 4B97458708AF74FF0094983C /* JackSocketNotifyChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 1120}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B9745CB08AF771B0094983C /* JackSocketServerNotifyChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 784}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B9745D908AF78200094983C /* JackSocketServerNotifyChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 840}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 56}, {1051, 783}}";
+ sepNavWindowFrame = "{{15, 21}, {1090, 912}}";
+ };
+ };
+ 4B978DB10A31CF4A009E2DD1 /* jack_portaudio Universal */ = {
+ activeExec = 0;
+ };
+ 4B978DEA0A31D077009E2DD1 /* XCBreakpointsBucket */ = {
+ isa = XCBreakpointsBucket;
+ name = "Project Breakpoints";
+ objects = (
+ 4B978EDE0A31DDD3009E2DD1 /* JackPortAudioDriver.cpp:128 */,
+ 4BA9D8BB0A3AECFE004F3D2C /* JackWinNamedPipeServerChannel.cpp:363 */,
+ 4BA9D9EB0A3B0281004F3D2C /* JackWinNamedPipe.h:91 */,
+ 4BA9DA280A3B0A26004F3D2C /* JackWinNamedPipeServerChannel.h:113 */,
+ 4B98C8F60A3B6AFE00DBA3B2 /* JackDriver.cpp:79 */,
+ 4BEBFBC50A45374400A23185 /* jack_test.c:1656 */,
+ 4B3F9C220AAA1B2D000B2579 /* JackConnectionManager.h:394 */,
+ );
+ };
+ 4B978DEB0A31D099009E2DD1 /* JackPortAudioDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1149, 1288}}";
+ sepNavSelRange = "{1374, 0}";
+ sepNavVisRect = "{{0, 0}, {1149, 762}}";
+ sepNavWindowFrame = "{{30, 9}, {1188, 891}}";
+ };
+ };
+ 4B978DEC0A31D099009E2DD1 /* JackPortAudioDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1184, 9758}}";
+ sepNavSelRange = "{13356, 131}";
+ sepNavVisRect = "{{0, 4372}, {917, 720}}";
+ sepNavWindowFrame = "{{156, 85}, {956, 849}}";
+ };
+ };
+ 4B978EDE0A31DDD3009E2DD1 /* JackPortAudioDriver.cpp:128 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4B978DEC0A31D099009E2DD1 /* JackPortAudioDriver.cpp */;
+ functionName = "JackPortAudioDriver::Open()";
+ hitCount = 0;
+ lineNumber = 128;
+ modificationTime = 171040211.473648;
+ state = 1;
+ };
+ 4B98AE000931D30C0091932A /* JackDebugClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1028, 6412}}";
+ sepNavSelRange = "{17036, 0}";
+ sepNavVisRect = "{{0, 5848}, {845, 564}}";
+ sepNavWindowFrame = "{{222, 51}, {884, 693}}";
+ };
+ };
+ 4B98AE010931D30C0091932A /* JackDebugClient.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1149, 1792}}";
+ sepNavSelRange = "{3959, 0}";
+ sepNavVisRect = "{{0, 0}, {1149, 762}}";
+ sepNavWindowFrame = "{{38, 21}, {1188, 891}}";
+ };
+ };
+ 4B98C8F60A3B6AFE00DBA3B2 /* JackDriver.cpp:79 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */;
+ functionName = "JackDriver::Open()";
+ hitCount = 0;
+ lineNumber = 79;
+ modificationTime = 171666174.644441;
+ state = 1;
+ };
+ 4B9B815C08AFA45000D05A28 /* JackRequest.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 8582}}";
+ sepNavSelRange = "{2020, 0}";
+ sepNavVisRect = "{{0, 7799}, {1051, 783}}";
+ sepNavWindowFrame = "{{295, 26}, {1090, 912}}";
+ };
+ };
+ 4BA577B308BF8BAB00F82DE1 /* synchroServer */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137370A2B975500D54320 /* synchroServer */,
+ );
+ };
+ 4BA577D908BF8E0600F82DE1 /* synchroClient */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137380A2B975500D54320 /* synchroClient */,
+ );
+ };
+ 4BA9D8B90A3AECFE004F3D2C /* JackWinNamedPipeServerChannel.cpp */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ name = JackWinNamedPipeServerChannel.cpp;
+ path = /Volumes/Documents/Jackdmp/src_win32/windows/JackWinNamedPipeServerChannel.cpp;
+ sourceTree = "<absolute>";
+ };
+ 4BA9D8BB0A3AECFE004F3D2C /* JackWinNamedPipeServerChannel.cpp:363 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BA9D8B90A3AECFE004F3D2C /* JackWinNamedPipeServerChannel.cpp */;
+ functionName = "JackWinNamedPipeServerChannel1::JackWinNamedPipeServerChannel1()";
+ hitCount = 0;
+ lineNumber = 363;
+ modificationTime = 174550331.948546;
+ state = 1;
+ };
+ 4BA9D9E90A3B0281004F3D2C /* JackWinNamedPipe.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackWinNamedPipe.h;
+ path = /Volumes/Documents/Jackdmp/src_win32/windows/JackWinNamedPipe.h;
+ sourceTree = "<group>";
+ };
+ 4BA9D9EB0A3B0281004F3D2C /* JackWinNamedPipe.h:91 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BA9D9E90A3B0281004F3D2C /* JackWinNamedPipe.h */;
+ hitCount = 0;
+ lineNumber = 91;
+ modificationTime = 171639427.137253;
+ state = 2;
+ };
+ 4BA9DA260A3B0A26004F3D2C /* JackWinNamedPipeServerChannel.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = JackWinNamedPipeServerChannel.h;
+ path = /Volumes/Documents/Jackdmp/src_win32/windows/JackWinNamedPipeServerChannel.h;
+ sourceTree = "<group>";
+ };
+ 4BA9DA280A3B0A26004F3D2C /* JackWinNamedPipeServerChannel.h:113 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BA9DA260A3B0A26004F3D2C /* JackWinNamedPipeServerChannel.h */;
+ hitCount = 0;
+ lineNumber = 113;
+ modificationTime = 171641384.020329;
+ state = 2;
+ };
+ 4BBD13AA08C71A480079F7FF /* synchroServerClient */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137390A2B975500D54320 /* synchroServerClient */,
+ );
+ };
+ 4BC216880A444BDE00BDA09F /* JackServerGlobals.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1004, 5460}}";
+ sepNavSelRange = "{10717, 0}";
+ sepNavVisRect = "{{0, 4723}, {925, 737}}";
+ sepNavWindowFrame = "{{378, 21}, {964, 866}}";
+ };
+ };
+ 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {962, 826}}";
+ sepNavSelRange = "{1475, 0}";
+ sepNavVisRect = "{{0, 89}, {925, 737}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {890, 3150}}";
+ sepNavSelRange = "{2767, 13}";
+ sepNavVisRect = "{{0, 2322}, {853, 799}}";
+ sepNavWindowFrame = "{{15, 5}, {892, 928}}";
+ };
+ };
+ 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 966}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 229}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+ 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1010, 1932}}";
+ sepNavSelRange = "{3339, 0}";
+ sepNavVisRect = "{{0, 1167}, {1010, 760}}";
+ sepNavWindowFrame = "{{15, 44}, {1049, 889}}";
+ };
+ };
+ 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 3640}}";
+ sepNavSelRange = "{8183, 0}";
+ sepNavVisRect = "{{0, 2719}, {925, 737}}";
+ sepNavWindowFrame = "{{284, 31}, {964, 866}}";
+ };
+ };
+ 4BD561C708EEB910006BBC2A /* JackSynchro.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1442}}";
+ sepNavSelRange = "{843, 0}";
+ sepNavVisRect = "{{0, 705}, {925, 737}}";
+ sepNavWindowFrame = "{{146, 0}, {964, 866}}";
+ };
+ };
+ 4BD81C7F07ACD3DE00ACB953 /* jack_external_metro */ = {
+ activeExec = 0;
+ executables = (
+ 4B0137330A2B975500D54320 /* jack_external_metro */,
+ );
+ };
+ 4BE6C6910A3E096F005A203A /* jack_test Universal */ = {
+ activeExec = 0;
+ executables = (
+ 4BE6C6A40A3E096F005A203A /* jack_test Universal */,
+ );
+ };
+ 4BE6C6A40A3E096F005A203A /* jack_test Universal */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = "jack_test Universal";
+ sourceDirectories = (
+ );
+ };
+ 4BE6C6AC0A3E0A65005A203A /* jack_test.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1280, 25382}}";
+ sepNavSelRange = "{39845, 4}";
+ sepNavVisRect = "{{0, 14965}, {792, 184}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4BEBFBC30A45374400A23185 /* jack_test.c */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = jack_test.c;
+ path = /Volumes/Documents/JackTools/jack_test/jack_test.c;
+ sourceTree = "<absolute>";
+ };
+ 4BEBFBC50A45374400A23185 /* jack_test.c:1656 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ delayBeforeContinue = 0;
+ fileReference = 4BEBFBC30A45374400A23185 /* jack_test.c */;
+ functionName = "main()";
+ hitCount = 0;
+ lineNumber = 1656;
+ modificationTime = 172308292.440516;
+ state = 1;
+ };
+ 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2884}}";
+ sepNavSelRange = "{4774, 0}";
+ sepNavVisRect = "{{0, 0}, {925, 737}}";
+ sepNavWindowFrame = "{{369, 30}, {964, 866}}";
+ };
+ };
+ 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1008}}";
+ sepNavSelRange = "{1081, 0}";
+ sepNavVisRect = "{{0, 425}, {845, 564}}";
+ sepNavWindowFrame = "{{84, 177}, {884, 693}}";
+ };
+ };
+ 4BF2124508DADBB5008D17F1 /* jackdmp framework */ = {
+ activeExec = 0;
+ executables = (
+ 4B01372D0A2B975500D54320 /* jackdmp framework */,
+ );
+ };
+ 4BF2955B08BC475500F2602F /* All */ = {
+ activeExec = 0;
+ };
+ 4BF5925D08F13D81005B1F5F /* Jackdmp.framework */ = {
+ activeExec = 0;
+ };
+ 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2758}}";
+ sepNavSelRange = "{4414, 9}";
+ sepNavVisRect = "{{0, 1643}, {925, 737}}";
+ sepNavWindowFrame = "{{108, 72}, {964, 866}}";
+ };
+ };
+ 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1064}}";
+ sepNavSelRange = "{1184, 9}";
+ sepNavVisRect = "{{0, 462}, {845, 564}}";
+ sepNavWindowFrame = "{{199, 72}, {884, 693}}";
+ };
+ };
+ 4BF70ACA0908EE95008B75AD /* JackLoopbackDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2940}}";
+ sepNavSelRange = "{823, 0}";
+ sepNavVisRect = "{{0, 2203}, {925, 737}}";
+ sepNavWindowFrame = "{{247, 6}, {964, 866}}";
+ };
+ };
+ 4BF70ACB0908EE95008B75AD /* JackLoopbackDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 896}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 159}, {925, 737}}";
+ sepNavWindowFrame = "{{61, 25}, {964, 866}}";
+ };
+ };
+ 4BF772FD08B3330F00149912 /* JackAtomic.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 2744}}";
+ sepNavSelRange = "{837, 5}";
+ sepNavVisRect = "{{0, 2109}, {842, 635}}";
+ sepNavWindowFrame = "{{38, 148}, {881, 764}}";
+ };
+ };
+ 4BF773AA08B3414500149912 /* JackTime.c */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {838, 1708}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {838, 756}}";
+ sepNavWindowFrame = "{{38, 27}, {877, 885}}";
+ };
+ };
+ 4BF8D1670834EDD900C94B91 /* zombie.c */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {936, 1260}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {936, 591}}";
+ sepNavWindowFrame = "{{107, 129}, {975, 720}}";
+ };
+ };
+ 4BF8D16B0834EDF000C94B91 /* metro.c */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 4004}}";
+ sepNavSelRange = "{867, 8}";
+ sepNavVisRect = "{{0, 0}, {842, 635}}";
+ sepNavWindowFrame = "{{130, 64}, {881, 764}}";
+ };
+ };
+ 4BF8D1750834EE3600C94B91 /* external_metro.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {936, 2170}}";
+ sepNavSelRange = "{750, 0}";
+ sepNavVisRect = "{{0, 0}, {936, 591}}";
+ sepNavWindowFrame = "{{130, 108}, {975, 720}}";
+ };
+ };
+ 4BF8D1770834EE4800C94B91 /* JackError.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {792, 658}}";
+ sepNavSelRange = "{866, 5}";
+ sepNavVisRect = "{{0, 364}, {792, 184}}";
+ sepNavWindowFrame = "{{15, 48}, {877, 885}}";
+ };
+ };
+ 4BF8D1830834EE5800C94B91 /* JackTime.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1010, 1568}}";
+ sepNavSelRange = "{317, 0}";
+ sepNavVisRect = "{{0, 0}, {1010, 760}}";
+ sepNavWindowFrame = "{{15, 44}, {1049, 889}}";
+ };
+ };
+ 4BF8D1870834EE7900C94B91 /* JackShmMem.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 4326}}";
+ sepNavSelRange = "{1326, 21}";
+ sepNavVisRect = "{{0, 368}, {925, 737}}";
+ sepNavWindowFrame = "{{402, 16}, {964, 866}}";
+ };
+ };
+ 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1302}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 565}, {925, 737}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4BF8D18F0834EE8400C94B91 /* shm.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1010, 2058}}";
+ sepNavSelRange = "{879, 5}";
+ sepNavVisRect = "{{0, 0}, {1010, 760}}";
+ sepNavWindowFrame = "{{38, 23}, {1049, 889}}";
+ };
+ };
+ 4BF8D1900834EE8400C94B91 /* shm.c */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {838, 16562}}";
+ sepNavSelRange = "{10436, 5}";
+ sepNavVisRect = "{{0, 15806}, {838, 756}}";
+ sepNavWindowFrame = "{{384, 13}, {877, 885}}";
+ };
+ };
+ 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1036}}";
+ sepNavSelRange = "{796, 12}";
+ sepNavVisRect = "{{0, 294}, {925, 737}}";
+ sepNavWindowFrame = "{{358, 57}, {964, 866}}";
+ };
+ };
+ 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2940}}";
+ sepNavSelRange = "{1917, 0}";
+ sepNavVisRect = "{{0, 2203}, {925, 737}}";
+ sepNavWindowFrame = "{{83, 15}, {964, 866}}";
+ };
+ };
+ 4BF8D19F0834EE9E00C94B91 /* JackThread.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {860, 1372}}";
+ sepNavSelRange = "{783, 5}";
+ sepNavVisRect = "{{0, 616}, {838, 756}}";
+ sepNavWindowFrame = "{{120, 53}, {877, 885}}";
+ };
+ };
+ 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1176}}";
+ sepNavSelRange = "{1531, 0}";
+ sepNavVisRect = "{{0, 439}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+ 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1149, 762}}";
+ sepNavSelRange = "{1267, 0}";
+ sepNavVisRect = "{{0, 0}, {1149, 762}}";
+ sepNavWindowFrame = "{{232, 12}, {1188, 891}}";
+ };
+ };
+ 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1040, 2954}}";
+ sepNavSelRange = "{4813, 2}";
+ sepNavVisRect = "{{0, 1166}, {925, 737}}";
+ sepNavWindowFrame = "{{396, 57}, {964, 866}}";
+ };
+ };
+ 4BF8D1B30834EED500C94B91 /* JackInternalClientChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {992, 1638}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 901}, {925, 737}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4BF8D1B50834EEE400C94B91 /* JackDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 3024}}";
+ sepNavSelRange = "{3161, 0}";
+ sepNavVisRect = "{{0, 2109}, {1051, 783}}";
+ sepNavWindowFrame = "{{291, -46}, {1090, 912}}";
+ };
+ };
+ 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 2870}}";
+ sepNavSelRange = "{5600, 0}";
+ sepNavVisRect = "{{0, 1654}, {1051, 783}}";
+ sepNavWindowFrame = "{{169, 10}, {1090, 912}}";
+ };
+ };
+ 4BF8D1B90834EEF100C94B91 /* JackFreewheelDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {936, 770}}";
+ sepNavSelRange = "{1195, 0}";
+ sepNavVisRect = "{{0, 169}, {936, 591}}";
+ sepNavWindowFrame = "{{15, 213}, {975, 720}}";
+ };
+ };
+ 4BF8D1BA0834EEF100C94B91 /* JackFreewheelDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1015, 672}}";
+ sepNavSelRange = "{1228, 0}";
+ sepNavVisRect = "{{0, 0}, {1015, 667}}";
+ sepNavWindowFrame = "{{38, 116}, {1054, 796}}";
+ };
+ };
+ 4BF8D1BD0834EEFC00C94B91 /* JackThreadedDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1136, 2170}}";
+ sepNavSelRange = "{3637, 16}";
+ sepNavVisRect = "{{0, 1791}, {792, 184}}";
+ sepNavWindowFrame = "{{347, 72}, {964, 866}}";
+ };
+ };
+ 4BF8D1BE0834EEFC00C94B91 /* JackThreadedDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1260}}";
+ sepNavSelRange = "{1845, 0}";
+ sepNavVisRect = "{{0, 523}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+ 4BF8D1C10834EF0800C94B91 /* JackAtomicState.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {962, 3374}}";
+ sepNavSelRange = "{3177, 0}";
+ sepNavVisRect = "{{0, 1340}, {941, 696}}";
+ sepNavWindowFrame = "{{210, 2}, {980, 825}}";
+ };
+ };
+ 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1028, 6566}}";
+ sepNavSelRange = "{10526, 0}";
+ sepNavVisRect = "{{0, 5286}, {853, 799}}";
+ sepNavWindowFrame = "{{127, 10}, {892, 928}}";
+ };
+ };
+ 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {853, 6342}}";
+ sepNavSelRange = "{1406, 0}";
+ sepNavVisRect = "{{0, 336}, {853, 799}}";
+ sepNavWindowFrame = "{{416, 10}, {892, 928}}";
+ };
+ };
+ 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {902, 1708}}";
+ sepNavSelRange = "{3873, 0}";
+ sepNavVisRect = "{{0, 909}, {853, 799}}";
+ sepNavWindowFrame = "{{15, 5}, {892, 928}}";
+ };
+ };
+ 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1088, 10892}}";
+ sepNavSelRange = "{5029, 67}";
+ sepNavVisRect = "{{0, 2378}, {1088, 214}}";
+ sepNavWindowFrame = "{{454, -26}, {892, 928}}";
+ };
+ };
+ 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1386}}";
+ sepNavSelRange = "{2135, 0}";
+ sepNavVisRect = "{{0, 758}, {845, 564}}";
+ sepNavWindowFrame = "{{268, 9}, {884, 693}}";
+ };
+ };
+ 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 3220}}";
+ sepNavSelRange = "{1522, 29}";
+ sepNavVisRect = "{{0, 607}, {845, 564}}";
+ sepNavWindowFrame = "{{471, 177}, {884, 693}}";
+ };
+ };
+ 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 798}}";
+ sepNavSelRange = "{1228, 7}";
+ sepNavVisRect = "{{0, 0}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+ 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1078}}";
+ sepNavSelRange = "{907, 0}";
+ sepNavVisRect = "{{0, 126}, {845, 564}}";
+ sepNavWindowFrame = "{{144, 245}, {884, 693}}";
+ };
+ };
+ 4BF8D1E10834EF5500C94B91 /* JackClient.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {915, 2282}}";
+ sepNavSelRange = "{2886, 63}";
+ sepNavVisRect = "{{0, 1305}, {915, 232}}";
+ sepNavWindowFrame = "{{380, 49}, {1049, 889}}";
+ };
+ };
+ 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 10752}}";
+ sepNavSelRange = "{7820, 6}";
+ sepNavVisRect = "{{0, 3256}, {1051, 783}}";
+ sepNavWindowFrame = "{{40, 26}, {1090, 912}}";
+ };
+ };
+ 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1010, 15610}}";
+ sepNavSelRange = "{10351, 0}";
+ sepNavVisRect = "{{0, 14850}, {1010, 760}}";
+ sepNavWindowFrame = "{{291, 27}, {1049, 889}}";
+ };
+ };
+ 4BF8D1ED0834EF9200C94B91 /* JackInternalClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1484}}";
+ sepNavSelRange = "{2549, 0}";
+ sepNavVisRect = "{{0, 920}, {845, 564}}";
+ sepNavWindowFrame = "{{352, 122}, {884, 693}}";
+ };
+ };
+ 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 854}}";
+ sepNavSelRange = "{1390, 0}";
+ sepNavVisRect = "{{0, 290}, {845, 564}}";
+ sepNavWindowFrame = "{{15, 240}, {884, 693}}";
+ };
+ };
+ 4BF8D1F50834EFB000C94B91 /* JackServerAPI.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {902, 2450}}";
+ sepNavSelRange = "{4508, 108}";
+ sepNavVisRect = "{{0, 1706}, {842, 635}}";
+ sepNavWindowFrame = "{{531, 130}, {881, 764}}";
+ };
+ };
+ 4BF8D1F70834EFBD00C94B91 /* JackExternalClient.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 854}}";
+ sepNavSelRange = "{1534, 0}";
+ sepNavVisRect = "{{0, 117}, {925, 737}}";
+ sepNavWindowFrame = "{{61, 25}, {964, 866}}";
+ };
+ };
+ 4BF8D1F80834EFBD00C94B91 /* JackExternalClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {908, 1176}}";
+ sepNavSelRange = "{2243, 16}";
+ sepNavVisRect = "{{0, 992}, {792, 184}}";
+ sepNavWindowFrame = "{{38, 46}, {964, 866}}";
+ };
+ };
+ 4BF8D1FB0834EFD100C94B91 /* JackLibGlobals.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1372}}";
+ sepNavSelRange = "{1407, 0}";
+ sepNavVisRect = "{{0, 808}, {845, 564}}";
+ sepNavWindowFrame = "{{61, 198}, {884, 693}}";
+ };
+ };
+ 4BF8D1FC0834EFD100C94B91 /* JackLibClient.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 854}}";
+ sepNavSelRange = "{1474, 0}";
+ sepNavVisRect = "{{0, 290}, {845, 564}}";
+ sepNavWindowFrame = "{{84, 177}, {884, 693}}";
+ };
+ };
+ 4BF8D1FD0834EFD100C94B91 /* JackLibClient.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 2282}}";
+ sepNavSelRange = "{4586, 0}";
+ sepNavVisRect = "{{0, 1545}, {925, 737}}";
+ sepNavWindowFrame = "{{402, 52}, {964, 866}}";
+ };
+ };
+ 4BF8D1FE0834EFD100C94B91 /* JackLibAPI.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 1876}}";
+ sepNavSelRange = "{991, 5}";
+ sepNavVisRect = "{{0, 1241}, {842, 635}}";
+ sepNavWindowFrame = "{{473, 63}, {881, 764}}";
+ };
+ };
+ 4BF8D20F0834F01C00C94B91 /* JackEngineTiming.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {853, 3220}}";
+ sepNavSelRange = "{4084, 0}";
+ sepNavVisRect = "{{0, 1359}, {853, 799}}";
+ sepNavWindowFrame = "{{485, 10}, {892, 928}}";
+ };
+ };
+ 4BF8D2100834F01C00C94B91 /* JackEngineTiming.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {724, 1484}}";
+ sepNavSelRange = "{1170, 19}";
+ sepNavVisRect = "{{0, 790}, {724, 694}}";
+ sepNavWindowFrame = "{{600, 27}, {763, 823}}";
+ };
+ };
+ 4BF8D2130834F02800C94B91 /* JackEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1154, 1680}}";
+ sepNavSelRange = "{1085, 0}";
+ sepNavVisRect = "{{0, 950}, {724, 694}}";
+ sepNavWindowFrame = "{{518, 10}, {763, 823}}";
+ };
+ };
+ 4BF8D2140834F02800C94B91 /* JackEngine.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1142, 9030}}";
+ sepNavSelRange = "{17117, 45}";
+ sepNavVisRect = "{{0, 725}, {941, 696}}";
+ sepNavWindowFrame = "{{109, 113}, {980, 825}}";
+ };
+ };
+ 4BF8D2170834F03500C94B91 /* jack.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {838, 11284}}";
+ sepNavSelRange = "{961, 5}";
+ sepNavVisRect = "{{0, 0}, {838, 756}}";
+ sepNavWindowFrame = "{{507, 14}, {877, 885}}";
+ };
+ };
+ 4BF8D2190834F03D00C94B91 /* JackEngineControl.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {724, 826}}";
+ sepNavSelRange = "{1366, 0}";
+ sepNavVisRect = "{{0, 122}, {724, 694}}";
+ sepNavWindowFrame = "{{15, 110}, {763, 823}}";
+ };
+ };
+ 4BF8D21B0834F04800C94B91 /* types.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 5544}}";
+ sepNavSelRange = "{2664, 0}";
+ sepNavVisRect = "{{0, 4909}, {842, 635}}";
+ sepNavWindowFrame = "{{485, 108}, {881, 764}}";
+ };
+ };
+ 4BF8D21C0834F04800C94B91 /* transport.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 6034}}";
+ sepNavSelRange = "{2618, 65}";
+ sepNavVisRect = "{{0, 5399}, {842, 635}}";
+ sepNavWindowFrame = "{{176, 22}, {881, 764}}";
+ };
+ };
+ 4BF8D2210834F05C00C94B91 /* JackServer.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1014, 5082}}";
+ sepNavSelRange = "{6016, 16}";
+ sepNavVisRect = "{{0, 2585}, {1014, 764}}";
+ sepNavWindowFrame = "{{291, 32}, {1053, 893}}";
+ };
+ };
+ 4BF8D2220834F05C00C94B91 /* JackServer.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 1358}}";
+ sepNavSelRange = "{776, 0}";
+ sepNavVisRect = "{{0, 575}, {1051, 783}}";
+ sepNavWindowFrame = "{{339, 26}, {1090, 912}}";
+ };
+ };
+ 4BF8D2250834F06A00C94B91 /* Jackdmp.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1088, 7980}}";
+ sepNavSelRange = "{9477, 69}";
+ sepNavVisRect = "{{0, 4016}, {1088, 214}}";
+ sepNavWindowFrame = "{{185, 26}, {1090, 912}}";
+ };
+ };
+ 4BF8D2290834F07D00C94B91 /* JackAudioDriver.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {853, 1246}}";
+ sepNavSelRange = "{1446, 0}";
+ sepNavVisRect = "{{0, 447}, {853, 799}}";
+ sepNavWindowFrame = "{{262, 10}, {892, 928}}";
+ };
+ };
+ 4BF8D22A0834F07D00C94B91 /* JackAudioDriver.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1106, 3220}}";
+ sepNavSelRange = "{2487, 168}";
+ sepNavVisRect = "{{0, 2456}, {1014, 764}}";
+ sepNavWindowFrame = "{{342, -12}, {1053, 893}}";
+ };
+ };
+ 4BF8D2470834F20600C94B91 /* testSem.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1051, 2968}}";
+ sepNavSelRange = "{1319, 21}";
+ sepNavVisRect = "{{0, 0}, {1051, 783}}";
+ sepNavWindowFrame = "{{587, -88}, {1090, 912}}";
+ };
+ };
+ 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {997, 1540}}";
+ sepNavSelRange = "{3407, 13}";
+ sepNavVisRect = "{{0, 933}, {997, 607}}";
+ sepNavWindowFrame = "{{456, 47}, {1036, 736}}";
+ };
+ };
+ 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 1148}}";
+ sepNavSelRange = "{1998, 0}";
+ sepNavVisRect = "{{0, 584}, {845, 564}}";
+ sepNavWindowFrame = "{{107, 156}, {884, 693}}";
+ };
+ };
+ 4BFB297708AF44ED00D450D4 /* JackMachServerNotifyChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 770}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 33}, {925, 737}}";
+ sepNavWindowFrame = "{{84, 4}, {964, 866}}";
+ };
+ };
+ 4BFB297808AF44ED00D450D4 /* JackMachServerChannel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1036}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 299}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+ 4BFB297908AF44ED00D450D4 /* JackMachServerChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {941, 2142}}";
+ sepNavSelRange = "{2503, 26}";
+ sepNavVisRect = "{{0, 1446}, {941, 696}}";
+ sepNavWindowFrame = "{{316, 50}, {980, 825}}";
+ };
+ };
+ 4BFB298808AF450200D450D4 /* JackMachNotifyChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 910}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 173}, {925, 737}}";
+ sepNavWindowFrame = "{{61, 25}, {964, 866}}";
+ };
+ };
+ 4BFB29AE08AF45FD00D450D4 /* JackMachClientChannel.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {962, 3332}}";
+ sepNavSelRange = "{2895, 0}";
+ sepNavVisRect = "{{0, 2590}, {941, 696}}";
+ sepNavWindowFrame = "{{414, 89}, {980, 825}}";
+ };
+ };
+ 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {842, 3962}}";
+ sepNavSelRange = "{2968, 5}";
+ sepNavVisRect = "{{0, 1118}, {842, 635}}";
+ sepNavWindowFrame = "{{77, 91}, {881, 764}}";
+ };
+ };
+ 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 2716}}";
+ sepNavSelRange = "{7527, 9}";
+ sepNavVisRect = "{{0, 2152}, {845, 564}}";
+ sepNavWindowFrame = "{{38, 219}, {884, 693}}";
+ };
+ };
+ 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {925, 1708}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {925, 737}}";
+ sepNavWindowFrame = "{{15, 67}, {964, 866}}";
+ };
+ };
+}
diff --git a/macosx/Jackdmp.xcodeproj/project.pbxproj b/macosx/Jackdmp.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..b6f16d8a
--- /dev/null
+++ b/macosx/Jackdmp.xcodeproj/project.pbxproj
@@ -0,0 +1,7420 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXAggregateTarget section */
+ 4B699B26097D421600A18468 /* All Universal */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 4B699B33097D421600A18468 /* Build configuration list for PBXAggregateTarget "All Universal" */;
+ buildPhases = (
+ );
+ dependencies = (
+ 4B699DB4097D421700A18468 /* PBXTargetDependency */,
+ 4B699DB6097D421700A18468 /* PBXTargetDependency */,
+ 4B699DB8097D421700A18468 /* PBXTargetDependency */,
+ 4B699DBA097D421700A18468 /* PBXTargetDependency */,
+ 4B699DBC097D421700A18468 /* PBXTargetDependency */,
+ 4B978E800A31D8B7009E2DD1 /* PBXTargetDependency */,
+ );
+ name = "All Universal";
+ productName = All;
+ };
+ 4BF2955B08BC475500F2602F /* All */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 4B699B22097D421600A18468 /* Build configuration list for PBXAggregateTarget "All" */;
+ buildPhases = (
+ );
+ dependencies = (
+ 4BB47F890904138400890555 /* PBXTargetDependency */,
+ 4BF2956108BC475E00F2602F /* PBXTargetDependency */,
+ 4BF212AF08DADC73008D17F1 /* PBXTargetDependency */,
+ 4BFD0E2208DADFB000D838B8 /* PBXTargetDependency */,
+ 4B0C912908DAF35900AE19BE /* PBXTargetDependency */,
+ );
+ name = All;
+ productName = All;
+ };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+ 4B003A6308E2A87A0060EFDC /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B003AB408E2B2BA0060EFDC /* ringbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */; };
+ 4B003AB508E2B2BA0060EFDC /* ringbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */; };
+ 4B0C912608DAF34400AE19BE /* JackDummyDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */; };
+ 4B0C912708DAF34400AE19BE /* JackDummyDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */; };
+ 4B123D3508B3954300540632 /* JackGlobalsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B123D3308B3954300540632 /* JackGlobalsClient.cpp */; };
+ 4B283863093607430079C47F /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B2C28D208DACC9B00249230 /* JackCoreAudioDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B395C9606AEF53800923527 /* JackCoreAudioDriver.cpp */; };
+ 4B2C28FC08DAD01E00249230 /* JackGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */; };
+ 4B56881508B5C8620022B32D /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B56881608B5C8620022B32D /* JackFifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B56881008B5C8620022B32D /* JackFifo.h */; };
+ 4B60CE490AAABA31004956AA /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B60CE480AAABA31004956AA /* connect.c */; };
+ 4B60CE4A0AAABA31004956AA /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B60CE480AAABA31004956AA /* connect.c */; };
+ 4B60CE4B0AAABA31004956AA /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B60CE480AAABA31004956AA /* connect.c */; };
+ 4B60CE4C0AAABA31004956AA /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B60CE480AAABA31004956AA /* connect.c */; };
+ 4B646C210636CDFF003B5396 /* JackMacLibClientRPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3937C0626BF3600CC67FA /* JackMacLibClientRPC.cpp */; };
+ 4B66A85C0934964500A89560 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B66A85E0934964500A89560 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B66A8610934966F00A89560 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B66A8620934967000A89560 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B66A8640934967200A89560 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B66A8650934968E00A89560 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B66A8660934968E00A89560 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B66A8680934969100A89560 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B66A8690934969700A89560 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B66A86A0934969700A89560 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B66A86C0934969E00A89560 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699BAA097D421600A18468 /* Jackdmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2250834F06A00C94B91 /* Jackdmp.cpp */; };
+ 4B699C02097D421600A18468 /* JackMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B799AD707899652003F3F15 /* JackMachPort.h */; };
+ 4B699C03097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699C04097D421600A18468 /* JackTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1830834EE5800C94B91 /* JackTime.h */; };
+ 4B699C05097D421600A18468 /* JackShmMem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1870834EE7900C94B91 /* JackShmMem.h */; };
+ 4B699C06097D421600A18468 /* shm.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D18F0834EE8400C94B91 /* shm.h */; };
+ 4B699C07097D421600A18468 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4B699C08097D421600A18468 /* JackThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D19F0834EE9E00C94B91 /* JackThread.h */; };
+ 4B699C09097D421600A18468 /* JackActivationCount.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */; };
+ 4B699C0A097D421600A18468 /* JackChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */; };
+ 4B699C0B097D421600A18468 /* JackGraphManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */; };
+ 4B699C0C097D421600A18468 /* JackPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */; };
+ 4B699C0D097D421600A18468 /* JackClientInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */; };
+ 4B699C0E097D421600A18468 /* JackClientControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */; };
+ 4B699C0F097D421600A18468 /* JackClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1E10834EF5500C94B91 /* JackClient.h */; };
+ 4B699C10097D421600A18468 /* JackInternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */; };
+ 4B699C11097D421600A18468 /* JackLibGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1FB0834EFD100C94B91 /* JackLibGlobals.h */; };
+ 4B699C12097D421600A18468 /* JackLibClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1FC0834EFD100C94B91 /* JackLibClient.h */; };
+ 4B699C13097D421600A18468 /* JackConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */; };
+ 4B699C14097D421600A18468 /* JackFrameTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */; };
+ 4B699C15097D421600A18468 /* JackPosixSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */; };
+ 4B699C16097D421600A18468 /* JackMachSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */; };
+ 4B699C17097D421600A18468 /* JackGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */; };
+ 4B699C18097D421600A18468 /* JackMachThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */; };
+ 4B699C19097D421600A18468 /* JackMachClientChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB298708AF450200D450D4 /* JackMachClientChannel.h */; };
+ 4B699C1A097D421600A18468 /* JackSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97440D08AF54590094983C /* JackSocket.h */; };
+ 4B699C1B097D421600A18468 /* JackSocketClientChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441408AF546F0094983C /* JackSocketClientChannel.h */; };
+ 4B699C1C097D421600A18468 /* JackSocketNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */; };
+ 4B699C1D097D421600A18468 /* JackSocketServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441B08AF54930094983C /* JackSocketServerChannel.h */; };
+ 4B699C1E097D421600A18468 /* JackFifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B56881008B5C8620022B32D /* JackFifo.h */; };
+ 4B699C1F097D421600A18468 /* ringbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */; };
+ 4B699C20097D421600A18468 /* JackSynchro.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD561C708EEB910006BBC2A /* JackSynchro.h */; };
+ 4B699C21097D421600A18468 /* JackDebugClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B98AE010931D30C0091932A /* JackDebugClient.h */; };
+ 4B699C22097D421600A18468 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699C25097D421600A18468 /* JackMacLibClientRPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3937C0626BF3600CC67FA /* JackMacLibClientRPC.cpp */; };
+ 4B699C26097D421600A18468 /* JackRPCEngineUser.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B89B769076B74D200D170DE /* JackRPCEngineUser.c */; };
+ 4B699C27097D421600A18468 /* JackMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B799AD607899652003F3F15 /* JackMachPort.cpp */; };
+ 4B699C28097D421600A18468 /* JackShmMem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */; };
+ 4B699C29097D421600A18468 /* shm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1900834EE8400C94B91 /* shm.c */; };
+ 4B699C2A097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699C2B097D421600A18468 /* JackActivationCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */; };
+ 4B699C2C097D421600A18468 /* JackGraphManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */; };
+ 4B699C2D097D421600A18468 /* JackPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */; };
+ 4B699C2E097D421600A18468 /* JackClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */; };
+ 4B699C2F097D421600A18468 /* JackAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */; };
+ 4B699C30097D421600A18468 /* JackLibClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1FD0834EFD100C94B91 /* JackLibClient.cpp */; };
+ 4B699C31097D421600A18468 /* JackLibAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1FE0834EFD100C94B91 /* JackLibAPI.cpp */; };
+ 4B699C32097D421600A18468 /* JackConnectionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */; };
+ 4B699C33097D421600A18468 /* JackFrameTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */; };
+ 4B699C34097D421600A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699C35097D421600A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699C36097D421600A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699C37097D421600A18468 /* JackMachClientChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB29AE08AF45FD00D450D4 /* JackMachClientChannel.cpp */; };
+ 4B699C38097D421600A18468 /* JackSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97440C08AF54590094983C /* JackSocket.cpp */; };
+ 4B699C39097D421600A18468 /* JackSocketClientChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97441508AF546F0094983C /* JackSocketClientChannel.cpp */; };
+ 4B699C3A097D421600A18468 /* JackTime.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF773AA08B3414500149912 /* JackTime.c */; };
+ 4B699C3B097D421600A18468 /* JackGlobalsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B123D3308B3954300540632 /* JackGlobalsClient.cpp */; };
+ 4B699C3C097D421600A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699C3D097D421600A18468 /* JackGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */; };
+ 4B699C3E097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699C3F097D421600A18468 /* ringbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */; };
+ 4B699C40097D421600A18468 /* JackDebugClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B98AE000931D30C0091932A /* JackDebugClient.cpp */; };
+ 4B699C4E097D421600A18468 /* JackMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B799AD707899652003F3F15 /* JackMachPort.h */; };
+ 4B699C4F097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699C50097D421600A18468 /* JackTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1830834EE5800C94B91 /* JackTime.h */; };
+ 4B699C51097D421600A18468 /* JackShmMem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1870834EE7900C94B91 /* JackShmMem.h */; };
+ 4B699C52097D421600A18468 /* shm.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D18F0834EE8400C94B91 /* shm.h */; };
+ 4B699C53097D421600A18468 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4B699C54097D421600A18468 /* JackThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D19F0834EE9E00C94B91 /* JackThread.h */; };
+ 4B699C55097D421600A18468 /* JackActivationCount.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */; };
+ 4B699C56097D421600A18468 /* JackChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */; };
+ 4B699C57097D421600A18468 /* JackGraphManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */; };
+ 4B699C58097D421600A18468 /* JackPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */; };
+ 4B699C59097D421600A18468 /* JackClientInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */; };
+ 4B699C5A097D421600A18468 /* JackClientControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */; };
+ 4B699C5B097D421600A18468 /* JackClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1E10834EF5500C94B91 /* JackClient.h */; };
+ 4B699C5C097D421600A18468 /* JackInternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */; };
+ 4B699C5D097D421600A18468 /* JackConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */; };
+ 4B699C5E097D421600A18468 /* JackFrameTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */; };
+ 4B699C5F097D421600A18468 /* JackPosixSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */; };
+ 4B699C60097D421600A18468 /* JackMachSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */; };
+ 4B699C61097D421600A18468 /* JackGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */; };
+ 4B699C62097D421600A18468 /* JackMachThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */; };
+ 4B699C63097D421600A18468 /* JackSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97440D08AF54590094983C /* JackSocket.h */; };
+ 4B699C64097D421600A18468 /* JackSocketNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */; };
+ 4B699C65097D421600A18468 /* JackSocketServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441B08AF54930094983C /* JackSocketServerChannel.h */; };
+ 4B699C66097D421600A18468 /* JackFifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B56881008B5C8620022B32D /* JackFifo.h */; };
+ 4B699C67097D421600A18468 /* ringbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */; };
+ 4B699C68097D421600A18468 /* JackSynchro.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD561C708EEB910006BBC2A /* JackSynchro.h */; };
+ 4B699C69097D421600A18468 /* JackAudioDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2290834F07D00C94B91 /* JackAudioDriver.h */; };
+ 4B699C6A097D421600A18468 /* JackFreewheelDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1B90834EEF100C94B91 /* JackFreewheelDriver.h */; };
+ 4B699C6B097D421600A18468 /* JackThreadedDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1BD0834EEFC00C94B91 /* JackThreadedDriver.h */; };
+ 4B699C6C097D421600A18468 /* JackDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1B50834EEE400C94B91 /* JackDriver.h */; };
+ 4B699C6D097D421600A18468 /* driver_interface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B3D08C8D21C001CF041 /* driver_interface.h */; };
+ 4B699C6E097D421600A18468 /* driver_parse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B3E08C8D21C001CF041 /* driver_parse.h */; };
+ 4B699C6F097D421600A18468 /* JackDriverLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B4208C8D22F001CF041 /* JackDriverLoader.h */; };
+ 4B699C70097D421600A18468 /* jslist.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B6408C8D76B001CF041 /* jslist.h */; };
+ 4B699C71097D421600A18468 /* JackEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2130834F02800C94B91 /* JackEngine.h */; };
+ 4B699C72097D421600A18468 /* JackEngineTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2100834F01C00C94B91 /* JackEngineTiming.h */; };
+ 4B699C73097D421600A18468 /* JackExternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1F70834EFBD00C94B91 /* JackExternalClient.h */; };
+ 4B699C74097D421600A18468 /* JackServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2220834F05C00C94B91 /* JackServer.h */; };
+ 4B699C75097D421600A18468 /* JackSocketServerNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9745CB08AF771B0094983C /* JackSocketServerNotifyChannel.h */; };
+ 4B699C76097D421600A18468 /* JackRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9B815C08AFA45000D05A28 /* JackRequest.h */; };
+ 4B699C77097D421600A18468 /* JackMachNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB298908AF450200D450D4 /* JackMachNotifyChannel.h */; };
+ 4B699C78097D421600A18468 /* JackMachServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB297808AF44ED00D450D4 /* JackMachServerChannel.h */; };
+ 4B699C79097D421600A18468 /* JackMachServerNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB297A08AF44ED00D450D4 /* JackMachServerNotifyChannel.h */; };
+ 4B699C7A097D421600A18468 /* JackLoopbackDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF70ACB0908EE95008B75AD /* JackLoopbackDriver.h */; };
+ 4B699C7B097D421600A18468 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699C7E097D421600A18468 /* JackMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B799AD607899652003F3F15 /* JackMachPort.cpp */; };
+ 4B699C7F097D421600A18468 /* JackShmMem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */; };
+ 4B699C80097D421600A18468 /* shm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1900834EE8400C94B91 /* shm.c */; };
+ 4B699C81097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699C82097D421600A18468 /* JackActivationCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */; };
+ 4B699C83097D421600A18468 /* JackGraphManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */; };
+ 4B699C84097D421600A18468 /* JackPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */; };
+ 4B699C85097D421600A18468 /* JackClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */; };
+ 4B699C86097D421600A18468 /* JackAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */; };
+ 4B699C87097D421600A18468 /* JackConnectionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */; };
+ 4B699C88097D421600A18468 /* JackFrameTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */; };
+ 4B699C89097D421600A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699C8A097D421600A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699C8B097D421600A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699C8C097D421600A18468 /* JackSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97440C08AF54590094983C /* JackSocket.cpp */; };
+ 4B699C8D097D421600A18468 /* JackTime.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF773AA08B3414500149912 /* JackTime.c */; };
+ 4B699C8E097D421600A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699C8F097D421600A18468 /* JackGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */; };
+ 4B699C90097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699C91097D421600A18468 /* ringbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */; };
+ 4B699C92097D421600A18468 /* JackAudioDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D22A0834F07D00C94B91 /* JackAudioDriver.cpp */; };
+ 4B699C93097D421600A18468 /* JackFreewheelDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1BA0834EEF100C94B91 /* JackFreewheelDriver.cpp */; };
+ 4B699C94097D421600A18468 /* JackThreadedDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1BE0834EEFC00C94B91 /* JackThreadedDriver.cpp */; };
+ 4B699C95097D421600A18468 /* JackDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */; };
+ 4B699C96097D421600A18468 /* JackDriverLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B869D7F08C9CB00001CF041 /* JackDriverLoader.cpp */; };
+ 4B699C97097D421600A18468 /* JackEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2140834F02800C94B91 /* JackEngine.cpp */; };
+ 4B699C98097D421600A18468 /* JackEngineTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D20F0834F01C00C94B91 /* JackEngineTiming.cpp */; };
+ 4B699C99097D421600A18468 /* JackExternalClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1F80834EFBD00C94B91 /* JackExternalClient.cpp */; };
+ 4B699C9A097D421600A18468 /* JackInternalClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1ED0834EF9200C94B91 /* JackInternalClient.cpp */; };
+ 4B699C9B097D421600A18468 /* JackRPCClientUser.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B89B759076B731100D170DE /* JackRPCClientUser.c */; };
+ 4B699C9C097D421600A18468 /* JackGlobalsServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B123D3608B3954A00540632 /* JackGlobalsServer.cpp */; };
+ 4B699C9D097D421600A18468 /* JackServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2210834F05C00C94B91 /* JackServer.cpp */; };
+ 4B699C9E097D421600A18468 /* JackSocketServerChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97452B08AF6D4B0094983C /* JackSocketServerChannel.cpp */; };
+ 4B699C9F097D421600A18468 /* JackSocketServerNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B9745D908AF78200094983C /* JackSocketServerNotifyChannel.cpp */; };
+ 4B699CA0097D421600A18468 /* JackSocketNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97458708AF74FF0094983C /* JackSocketNotifyChannel.cpp */; };
+ 4B699CA1097D421600A18468 /* JackMacEngineRPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B4259E5076B635E00C1ECE1 /* JackMacEngineRPC.cpp */; };
+ 4B699CA2097D421600A18468 /* JackMachNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB298808AF450200D450D4 /* JackMachNotifyChannel.cpp */; };
+ 4B699CA3097D421600A18468 /* JackMachServerChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB297908AF44ED00D450D4 /* JackMachServerChannel.cpp */; };
+ 4B699CA4097D421600A18468 /* JackMachServerNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB297708AF44ED00D450D4 /* JackMachServerNotifyChannel.cpp */; };
+ 4B699CA5097D421600A18468 /* JackLoopbackDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70ACA0908EE95008B75AD /* JackLoopbackDriver.cpp */; };
+ 4B699CB4097D421600A18468 /* metro.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D16B0834EDF000C94B91 /* metro.c */; };
+ 4B699CC4097D421600A18468 /* lsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1690834EDE600C94B91 /* lsp.c */; };
+ 4B699CF6097D421600A18468 /* freewheel.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1710834EE0F00C94B91 /* freewheel.c */; };
+ 4B699D06097D421600A18468 /* external_metro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1750834EE3600C94B91 /* external_metro.cpp */; };
+ 4B699D15097D421600A18468 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4B699D16097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699D18097D421600A18468 /* testAtomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D23E0834F1C300C94B91 /* testAtomic.cpp */; };
+ 4B699D19097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699D1A097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699D29097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699D2A097D421600A18468 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4B699D2C097D421600A18468 /* testSem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2470834F20600C94B91 /* testSem.cpp */; };
+ 4B699D2D097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699D2E097D421600A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699D2F097D421600A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699D30097D421600A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699D31097D421600A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699D32097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699D42097D421600A18468 /* zombie.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1670834EDD900C94B91 /* zombie.c */; };
+ 4B699D51097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699D52097D421600A18468 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699D54097D421600A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699D55097D421600A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699D56097D421600A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699D57097D421600A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699D58097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699D59097D421600A18468 /* testSynchroServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BA577FB08BF8E4600F82DE1 /* testSynchroServer.cpp */; };
+ 4B699D5A097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699D69097D421600A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699D6A097D421600A18468 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699D6C097D421600A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699D6D097D421600A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699D6E097D421600A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699D6F097D421600A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699D70097D421600A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699D71097D421600A18468 /* testSynchroClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BA577BC08BF8BE200F82DE1 /* testSynchroClient.cpp */; };
+ 4B699D72097D421600A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699D81097D421700A18468 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4B699D82097D421700A18468 /* JackConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B66A8580934964500A89560 /* JackConstants.h */; };
+ 4B699D84097D421700A18468 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4B699D85097D421700A18468 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4B699D86097D421700A18468 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4B699D87097D421700A18468 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4B699D88097D421700A18468 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4B699D89097D421700A18468 /* testSynchroServerClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBD13CC08C71EB40079F7FF /* testSynchroServerClient.cpp */; };
+ 4B699D8A097D421700A18468 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4B699D99097D421700A18468 /* JackCoreAudioDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B395C9706AEF53800923527 /* JackCoreAudioDriver.h */; };
+ 4B699D9B097D421700A18468 /* JackCoreAudioDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B395C9606AEF53800923527 /* JackCoreAudioDriver.cpp */; };
+ 4B699DA8097D421700A18468 /* JackDummyDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */; };
+ 4B699DAA097D421700A18468 /* JackDummyDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */; };
+ 4B799ADA07899652003F3F15 /* JackMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B799AD607899652003F3F15 /* JackMachPort.cpp */; };
+ 4B799ADB07899652003F3F15 /* JackMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B799AD707899652003F3F15 /* JackMachPort.h */; };
+ 4B89B76A076B74D200D170DE /* JackRPCEngineUser.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B89B769076B74D200D170DE /* JackRPCEngineUser.c */; };
+ 4B97441208AF54590094983C /* JackSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97440C08AF54590094983C /* JackSocket.cpp */; };
+ 4B97441308AF54590094983C /* JackSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97440D08AF54590094983C /* JackSocket.h */; };
+ 4B97441808AF546F0094983C /* JackSocketClientChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441408AF546F0094983C /* JackSocketClientChannel.h */; };
+ 4B97441908AF546F0094983C /* JackSocketClientChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97441508AF546F0094983C /* JackSocketClientChannel.cpp */; };
+ 4B97441E08AF54930094983C /* JackSocketNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */; };
+ 4B97441F08AF54930094983C /* JackSocketServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441B08AF54930094983C /* JackSocketServerChannel.h */; };
+ 4B978DED0A31D099009E2DD1 /* JackPortAudioDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B978DEB0A31D099009E2DD1 /* JackPortAudioDriver.h */; };
+ 4B978DEE0A31D099009E2DD1 /* JackPortAudioDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B978DEC0A31D099009E2DD1 /* JackPortAudioDriver.cpp */; };
+ 4B98AE040931D30C0091932A /* JackDebugClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B98AE000931D30C0091932A /* JackDebugClient.cpp */; };
+ 4B98AE050931D30C0091932A /* JackDebugClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B98AE010931D30C0091932A /* JackDebugClient.h */; };
+ 4BA577BE08BF8BFB00F82DE1 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BA577BF08BF8BFD00F82DE1 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4BA577C008BF8C0000F82DE1 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BA577C108BF8C0500F82DE1 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BA577C208BF8C0700F82DE1 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BA577DD08BF8E0600F82DE1 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BA577DE08BF8E0600F82DE1 /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4BA577DF08BF8E0600F82DE1 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BA577E008BF8E0600F82DE1 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BA577E108BF8E0600F82DE1 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BA577FC08BF8E4600F82DE1 /* testSynchroServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BA577FB08BF8E4600F82DE1 /* testSynchroServer.cpp */; };
+ 4BA577FD08BF8E6100F82DE1 /* testSynchroClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BA577BC08BF8BE200F82DE1 /* testSynchroClient.cpp */; };
+ 4BAB18CA08F13ECF00F0CE8B /* JackInternalClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1ED0834EF9200C94B91 /* JackInternalClient.cpp */; };
+ 4BAB18CF08F13EFF00F0CE8B /* JackRPCClientUser.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B89B759076B731100D170DE /* JackRPCClientUser.c */; };
+ 4BAB18D008F13F5500F0CE8B /* JackGlobalsServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B123D3608B3954A00540632 /* JackGlobalsServer.cpp */; };
+ 4BAB18D108F13F5800F0CE8B /* JackServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2210834F05C00C94B91 /* JackServer.cpp */; };
+ 4BAB18D208F13F5900F0CE8B /* JackServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2220834F05C00C94B91 /* JackServer.h */; };
+ 4BAB18D608F13F7A00F0CE8B /* JackSocketServerChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97452B08AF6D4B0094983C /* JackSocketServerChannel.cpp */; };
+ 4BAB18DD08F13F8300F0CE8B /* JackSocketServerNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B9745D908AF78200094983C /* JackSocketServerNotifyChannel.cpp */; };
+ 4BAB18DE08F13F8400F0CE8B /* JackSocketServerNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9745CB08AF771B0094983C /* JackSocketServerNotifyChannel.h */; };
+ 4BAB18DF08F13F8900F0CE8B /* JackSocketNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97458708AF74FF0094983C /* JackSocketNotifyChannel.cpp */; };
+ 4BAB18E008F13FA300F0CE8B /* JackRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9B815C08AFA45000D05A28 /* JackRequest.h */; };
+ 4BAB18E208F13FBC00F0CE8B /* JackMacEngineRPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B4259E5076B635E00C1ECE1 /* JackMacEngineRPC.cpp */; };
+ 4BAB18E308F13FD600F0CE8B /* JackMachNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB298808AF450200D450D4 /* JackMachNotifyChannel.cpp */; };
+ 4BAB18E408F13FD600F0CE8B /* JackMachNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB298908AF450200D450D4 /* JackMachNotifyChannel.h */; };
+ 4BAB18E508F13FD700F0CE8B /* JackMachServerChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB297908AF44ED00D450D4 /* JackMachServerChannel.cpp */; };
+ 4BAB18E608F13FD700F0CE8B /* JackMachServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB297808AF44ED00D450D4 /* JackMachServerChannel.h */; };
+ 4BAB18E708F13FD700F0CE8B /* JackMachServerNotifyChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB297708AF44ED00D450D4 /* JackMachServerNotifyChannel.cpp */; };
+ 4BAB18E808F13FD800F0CE8B /* JackMachServerNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB297A08AF44ED00D450D4 /* JackMachServerNotifyChannel.h */; };
+ 4BB8789008AF4E5100AF4ABD /* JackMachClientChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB29AE08AF45FD00D450D4 /* JackMachClientChannel.cpp */; };
+ 4BBD13AD08C71A480079F7FF /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BBD13AE08C71A480079F7FF /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4BBD13AF08C71A480079F7FF /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BBD13B008C71A480079F7FF /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BBD13B108C71A480079F7FF /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BBD13CD08C71EB40079F7FF /* testSynchroServerClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBD13CC08C71EB40079F7FF /* testSynchroServerClient.cpp */; };
+ 4BBD140A08C739A10079F7FF /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4BBD140B08C739A60079F7FF /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BBD140C08C739B00079F7FF /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BBD140D08C739B60079F7FF /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BC216850A444BAD00BDA09F /* JackServerAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1F50834EFB000C94B91 /* JackServerAPI.cpp */; };
+ 4BC216890A444BDE00BDA09F /* JackServerGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC216880A444BDE00BDA09F /* JackServerGlobals.cpp */; };
+ 4BC2168A0A444BDE00BDA09F /* JackServerGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC216880A444BDE00BDA09F /* JackServerGlobals.cpp */; };
+ 4BC2168E0A444BED00BDA09F /* JackServerGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */; };
+ 4BC2168F0A444BED00BDA09F /* JackServerGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */; };
+ 4BD4B4D809BACD9600750C0F /* JackTransportEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */; };
+ 4BD4B4D909BACD9600750C0F /* JackTransportEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */; };
+ 4BD4B4E409BACEF300750C0F /* JackTransportEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */; };
+ 4BD4B4E509BACEF300750C0F /* JackTransportEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */; };
+ 4BD4B4E809BACF0000750C0F /* JackTransportEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */; };
+ 4BD4B4E909BACF0100750C0F /* JackTransportEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */; };
+ 4BD4B4EA09BACF0600750C0F /* JackTransportEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */; };
+ 4BD4B4EB09BACF0600750C0F /* JackTransportEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */; };
+ 4BD561C808EEB910006BBC2A /* JackSynchro.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD561C708EEB910006BBC2A /* JackSynchro.h */; };
+ 4BE6C6AD0A3E0A65005A203A /* jack_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BE6C6AC0A3E0A65005A203A /* jack_test.cpp */; };
+ 4BEE0B3208ACBB9F00D22B43 /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BEE0B3308ACBB9F00D22B43 /* JackPosixSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */; };
+ 4BF2124408DADA90008D17F1 /* JackCoreAudioDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B395C9706AEF53800923527 /* JackCoreAudioDriver.h */; };
+ 4BF2129408DADBB5008D17F1 /* Jackdmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2250834F06A00C94B91 /* Jackdmp.cpp */; };
+ 4BF5925F08F13D81005B1F5F /* JackMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B799AD707899652003F3F15 /* JackMachPort.h */; };
+ 4BF5926008F13D81005B1F5F /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4BF5926108F13D81005B1F5F /* JackTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1830834EE5800C94B91 /* JackTime.h */; };
+ 4BF5926208F13D81005B1F5F /* JackShmMem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1870834EE7900C94B91 /* JackShmMem.h */; };
+ 4BF5926308F13D81005B1F5F /* shm.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D18F0834EE8400C94B91 /* shm.h */; };
+ 4BF5926408F13D81005B1F5F /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4BF5926508F13D81005B1F5F /* JackThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D19F0834EE9E00C94B91 /* JackThread.h */; };
+ 4BF5926608F13D81005B1F5F /* JackActivationCount.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */; };
+ 4BF5926708F13D81005B1F5F /* JackChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */; };
+ 4BF5926808F13D81005B1F5F /* JackGraphManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */; };
+ 4BF5926908F13D81005B1F5F /* JackPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */; };
+ 4BF5926A08F13D81005B1F5F /* JackClientInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */; };
+ 4BF5926B08F13D81005B1F5F /* JackClientControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */; };
+ 4BF5926C08F13D81005B1F5F /* JackClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1E10834EF5500C94B91 /* JackClient.h */; };
+ 4BF5926D08F13D81005B1F5F /* JackInternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */; };
+ 4BF5927008F13D81005B1F5F /* JackConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */; };
+ 4BF5927108F13D81005B1F5F /* JackFrameTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */; };
+ 4BF5927208F13D81005B1F5F /* JackPosixSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */; };
+ 4BF5927308F13D81005B1F5F /* JackMachSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */; };
+ 4BF5927508F13D81005B1F5F /* JackGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */; };
+ 4BF5927608F13D81005B1F5F /* JackMachThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */; };
+ 4BF5927808F13D81005B1F5F /* JackSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97440D08AF54590094983C /* JackSocket.h */; };
+ 4BF5927A08F13D81005B1F5F /* JackSocketNotifyChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */; };
+ 4BF5927B08F13D81005B1F5F /* JackSocketServerChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B97441B08AF54930094983C /* JackSocketServerChannel.h */; };
+ 4BF5927C08F13D81005B1F5F /* JackFifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B56881008B5C8620022B32D /* JackFifo.h */; };
+ 4BF5927E08F13D81005B1F5F /* ringbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */; };
+ 4BF5927F08F13D81005B1F5F /* JackSynchro.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD561C708EEB910006BBC2A /* JackSynchro.h */; };
+ 4BF5928508F13D81005B1F5F /* JackMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B799AD607899652003F3F15 /* JackMachPort.cpp */; };
+ 4BF5928608F13D81005B1F5F /* JackShmMem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */; };
+ 4BF5928708F13D81005B1F5F /* shm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1900834EE8400C94B91 /* shm.c */; };
+ 4BF5928808F13D81005B1F5F /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BF5928908F13D81005B1F5F /* JackActivationCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */; };
+ 4BF5928A08F13D81005B1F5F /* JackGraphManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */; };
+ 4BF5928B08F13D81005B1F5F /* JackPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */; };
+ 4BF5928C08F13D81005B1F5F /* JackClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */; };
+ 4BF5928D08F13D81005B1F5F /* JackAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */; };
+ 4BF5929008F13D81005B1F5F /* JackConnectionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */; };
+ 4BF5929108F13D81005B1F5F /* JackFrameTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */; };
+ 4BF5929208F13D81005B1F5F /* JackPosixSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */; };
+ 4BF5929308F13D81005B1F5F /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BF5929408F13D81005B1F5F /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BF5929608F13D81005B1F5F /* JackSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B97440C08AF54590094983C /* JackSocket.cpp */; };
+ 4BF5929808F13D81005B1F5F /* JackTime.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF773AA08B3414500149912 /* JackTime.c */; };
+ 4BF5929A08F13D81005B1F5F /* JackFifo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B56880F08B5C8620022B32D /* JackFifo.cpp */; };
+ 4BF5929B08F13D81005B1F5F /* JackGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */; };
+ 4BF5929C08F13D81005B1F5F /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+ 4BF5929D08F13D81005B1F5F /* ringbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */; };
+ 4BF592AE08F13E40005B1F5F /* JackAudioDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D22A0834F07D00C94B91 /* JackAudioDriver.cpp */; };
+ 4BF592AF08F13E40005B1F5F /* JackAudioDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2290834F07D00C94B91 /* JackAudioDriver.h */; };
+ 4BF592B008F13E4B005B1F5F /* JackFreewheelDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1BA0834EEF100C94B91 /* JackFreewheelDriver.cpp */; };
+ 4BF592B108F13E4C005B1F5F /* JackFreewheelDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1B90834EEF100C94B91 /* JackFreewheelDriver.h */; };
+ 4BF592B208F13E4C005B1F5F /* JackThreadedDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1BE0834EEFC00C94B91 /* JackThreadedDriver.cpp */; };
+ 4BF592B308F13E4D005B1F5F /* JackThreadedDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1BD0834EEFC00C94B91 /* JackThreadedDriver.h */; };
+ 4BF592B408F13E5A005B1F5F /* JackDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */; };
+ 4BF592B508F13E5A005B1F5F /* JackDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1B50834EEE400C94B91 /* JackDriver.h */; };
+ 4BF592B608F13E5F005B1F5F /* driver_interface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B3D08C8D21C001CF041 /* driver_interface.h */; };
+ 4BF592B708F13E5F005B1F5F /* driver_parse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B3E08C8D21C001CF041 /* driver_parse.h */; };
+ 4BF592B808F13E60005B1F5F /* JackDriverLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B869D7F08C9CB00001CF041 /* JackDriverLoader.cpp */; };
+ 4BF592B908F13E61005B1F5F /* JackDriverLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B4208C8D22F001CF041 /* JackDriverLoader.h */; };
+ 4BF592BA08F13E61005B1F5F /* jslist.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B869B6408C8D76B001CF041 /* jslist.h */; };
+ 4BF592BB08F13E76005B1F5F /* JackEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2140834F02800C94B91 /* JackEngine.cpp */; };
+ 4BF592BC08F13E76005B1F5F /* JackEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2130834F02800C94B91 /* JackEngine.h */; };
+ 4BF592BD08F13E7A005B1F5F /* JackEngineTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D20F0834F01C00C94B91 /* JackEngineTiming.cpp */; };
+ 4BF592BE08F13E7A005B1F5F /* JackEngineTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D2100834F01C00C94B91 /* JackEngineTiming.h */; };
+ 4BF592BF08F13E8B005B1F5F /* JackExternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1F70834EFBD00C94B91 /* JackExternalClient.h */; };
+ 4BF592C008F13E8C005B1F5F /* JackExternalClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1F80834EFBD00C94B91 /* JackExternalClient.cpp */; };
+ 4BF6C1DB08ACE64C001E2013 /* JackMachSemaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */; };
+ 4BF6C1DC08ACE64C001E2013 /* JackMachSemaphore.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */; };
+ 4BF70ACC0908EE95008B75AD /* JackLoopbackDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70ACA0908EE95008B75AD /* JackLoopbackDriver.cpp */; };
+ 4BF70ACD0908EE95008B75AD /* JackLoopbackDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF70ACB0908EE95008B75AD /* JackLoopbackDriver.h */; };
+ 4BF773AD08B3414500149912 /* JackTime.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF773AA08B3414500149912 /* JackTime.c */; };
+ 4BF8D1680834EDD900C94B91 /* zombie.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1670834EDD900C94B91 /* zombie.c */; };
+ 4BF8D16A0834EDE600C94B91 /* lsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1690834EDE600C94B91 /* lsp.c */; };
+ 4BF8D16C0834EDF000C94B91 /* metro.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D16B0834EDF000C94B91 /* metro.c */; };
+ 4BF8D1720834EE0F00C94B91 /* freewheel.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1710834EE0F00C94B91 /* freewheel.c */; };
+ 4BF8D1760834EE3600C94B91 /* external_metro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1750834EE3600C94B91 /* external_metro.cpp */; };
+ 4BF8D17D0834EE4800C94B91 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4BF8D1860834EE5800C94B91 /* JackTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1830834EE5800C94B91 /* JackTime.h */; };
+ 4BF8D18D0834EE7900C94B91 /* JackShmMem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1870834EE7900C94B91 /* JackShmMem.h */; };
+ 4BF8D18E0834EE7900C94B91 /* JackShmMem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */; };
+ 4BF8D1950834EE8400C94B91 /* shm.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D18F0834EE8400C94B91 /* shm.h */; };
+ 4BF8D1960834EE8400C94B91 /* shm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1900834EE8400C94B91 /* shm.c */; };
+ 4BF8D19D0834EE9700C94B91 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4BF8D19E0834EE9700C94B91 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BF8D1A20834EE9E00C94B91 /* JackThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D19F0834EE9E00C94B91 /* JackThread.h */; };
+ 4BF8D1AD0834EEB400C94B91 /* JackActivationCount.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */; };
+ 4BF8D1AE0834EEB400C94B91 /* JackActivationCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */; };
+ 4BF8D1B20834EEC400C94B91 /* JackChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */; };
+ 4BF8D1CD0834EF2200C94B91 /* JackGraphManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */; };
+ 4BF8D1CE0834EF2200C94B91 /* JackGraphManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */; };
+ 4BF8D1D50834EF2F00C94B91 /* JackPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */; };
+ 4BF8D1D60834EF2F00C94B91 /* JackPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */; };
+ 4BF8D1DC0834EF4500C94B91 /* JackClientInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */; };
+ 4BF8D1E00834EF4D00C94B91 /* JackClientControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */; };
+ 4BF8D1E40834EF5500C94B91 /* JackClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1E10834EF5500C94B91 /* JackClient.h */; };
+ 4BF8D1E80834EF6700C94B91 /* JackClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */; };
+ 4BF8D1EC0834EF7500C94B91 /* JackAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */; };
+ 4BF8D1F40834EF9200C94B91 /* JackInternalClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */; };
+ 4BF8D2030834EFD100C94B91 /* JackLibGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1FB0834EFD100C94B91 /* JackLibGlobals.h */; };
+ 4BF8D2040834EFD100C94B91 /* JackLibClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1FC0834EFD100C94B91 /* JackLibClient.h */; };
+ 4BF8D2050834EFD100C94B91 /* JackLibClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1FD0834EFD100C94B91 /* JackLibClient.cpp */; };
+ 4BF8D2060834EFD100C94B91 /* JackLibAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1FE0834EFD100C94B91 /* JackLibAPI.cpp */; };
+ 4BF8D2350834F14400C94B91 /* JackConnectionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */; };
+ 4BF8D2360834F14400C94B91 /* JackConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */; };
+ 4BF8D23F0834F1C300C94B91 /* testAtomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D23E0834F1C300C94B91 /* testAtomic.cpp */; };
+ 4BF8D2400834F1DC00C94B91 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BF8D2410834F1DD00C94B91 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4BF8D2430834F1E400C94B91 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4BF8D2480834F20600C94B91 /* testSem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D2470834F20600C94B91 /* testSem.cpp */; };
+ 4BF8D24A0834F21300C94B91 /* JackError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1770834EE4800C94B91 /* JackError.h */; };
+ 4BF8D24B0834F21E00C94B91 /* JackPosixThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */; };
+ 4BF8D24C0834F21E00C94B91 /* JackPosixThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */; };
+ 4BF8FB1308AC88EF00D1A344 /* JackFrameTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */; };
+ 4BF8FB1408AC88EF00D1A344 /* JackFrameTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */; };
+ 4BFB299308AF450200D450D4 /* JackMachClientChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB298708AF450200D450D4 /* JackMachClientChannel.h */; };
+ 4BFB73F908AD291A00DB99B8 /* JackGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */; };
+ 4BFB742408AD2B9900DB99B8 /* JackMachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */; };
+ 4BFB742508AD2B9900DB99B8 /* JackMachThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */; };
+ 4BFC8139090E1F56007BAE60 /* JackError.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B003A6008E2A87A0060EFDC /* JackError.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 4B0C912808DAF35900AE19BE /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B0C911D08DAF32100AE19BE;
+ remoteInfo = jack_dummy;
+ };
+ 4B699DB3097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699C4C097D421600A18468;
+ remoteInfo = "Jackdmp.framework Universal";
+ };
+ 4B699DB5097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699C00097D421600A18468;
+ remoteInfo = "Jackmp.framework Universal";
+ };
+ 4B699DB7097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699BA7097D421600A18468;
+ remoteInfo = "jackdmp framework Universal";
+ };
+ 4B699DB9097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699D97097D421700A18468;
+ remoteInfo = "jack_coreaudio Universal";
+ };
+ 4B699DBB097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699DA6097D421700A18468;
+ remoteInfo = "jack_dummy Universal";
+ };
+ 4B699DBF097D421700A18468 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B699D03097D421600A18468;
+ remoteInfo = "jack_external_metro Universal";
+ };
+ 4B978E7F0A31D8B7009E2DD1 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B978DB10A31CF4A009E2DD1;
+ remoteInfo = "jack_portaudio Universal";
+ };
+ 4BA88D9408BE632C000095BE /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4BD81C7F07ACD3DE00ACB953;
+ remoteInfo = jack_external_metro;
+ };
+ 4BB47F880904138400890555 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4BF5925D08F13D81005B1F5F;
+ remoteInfo = Jackdmp.framework;
+ };
+ 4BF212AE08DADC73008D17F1 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4BF2124508DADBB5008D17F1;
+ remoteInfo = "jackdmp framework";
+ };
+ 4BF2956008BC475E00F2602F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B646BED0636CC42003B5396;
+ remoteInfo = Jackmp.framework;
+ };
+ 4BFD0E2108DADFB000D838B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4B2C28D008DACC6B00249230;
+ remoteInfo = jack_coreaudio;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 4B003A6008E2A87A0060EFDC /* JackError.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = JackError.c; path = ../common/JackError.c; sourceTree = SOURCE_ROOT; };
+ 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ringbuffer.c; path = ../common/ringbuffer.c; sourceTree = SOURCE_ROOT; };
+ 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ringbuffer.h; path = ../common/ringbuffer.h; sourceTree = SOURCE_ROOT; };
+ 4B0C912308DAF32100AE19BE /* jack_dummy.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = jack_dummy.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B123D3308B3954300540632 /* JackGlobalsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackGlobalsClient.cpp; path = ../common/JackGlobalsClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4B123D3608B3954A00540632 /* JackGlobalsServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackGlobalsServer.cpp; path = ../common/JackGlobalsServer.cpp; sourceTree = SOURCE_ROOT; };
+ 4B1CBD7C0799484F0096ABE0 /* testSem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testSem; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B1CBE2707994C6F0096ABE0 /* jack_freewheel */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_freewheel; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B2C28D108DACC6B00249230 /* jack_coreaudio.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = jack_coreaudio.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackGlobals.cpp; path = ../common/JackGlobals.cpp; sourceTree = SOURCE_ROOT; };
+ 4B37C20306DF1FBE0016E567 /* CALatencyLog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CALatencyLog.cpp; path = /Developer/Examples/CoreAudio/PublicUtility/CALatencyLog.cpp; sourceTree = "<absolute>"; };
+ 4B37C20406DF1FBE0016E567 /* CALatencyLog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CALatencyLog.h; path = /Developer/Examples/CoreAudio/PublicUtility/CALatencyLog.h; sourceTree = "<absolute>"; };
+ 4B37C20906DF1FE20016E567 /* latency.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = latency.c; path = /Developer/Examples/CoreAudio/PublicUtility/latency.c; sourceTree = "<absolute>"; };
+ 4B37C20A06DF1FE20016E567 /* latency.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = latency.h; path = /Developer/Examples/CoreAudio/PublicUtility/latency.h; sourceTree = "<absolute>"; };
+ 4B395C9606AEF53800923527 /* JackCoreAudioDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackCoreAudioDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4B395C9706AEF53800923527 /* JackCoreAudioDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackCoreAudioDriver.h; sourceTree = SOURCE_ROOT; };
+ 4B420C8207733D7C00DDA57E /* testAtomic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testAtomic; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B4259E5076B635E00C1ECE1 /* JackMacEngineRPC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMacEngineRPC.cpp; sourceTree = SOURCE_ROOT; };
+ 4B464301076CAC7700E5077C /* Jack-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Jack-Info.plist"; sourceTree = SOURCE_ROOT; };
+ 4B50A112080917BA003F4C95 /* zombie */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = zombie; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B56880F08B5C8620022B32D /* JackFifo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackFifo.cpp; path = ../common/JackFifo.cpp; sourceTree = SOURCE_ROOT; };
+ 4B56881008B5C8620022B32D /* JackFifo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackFifo.h; path = ../common/JackFifo.h; sourceTree = SOURCE_ROOT; };
+ 4B60CE480AAABA31004956AA /* connect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = connect.c; path = "../example-clients/connect.c"; sourceTree = SOURCE_ROOT; };
+ 4B646BEE0636CC42003B5396 /* Jackmp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Jackmp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B646C320636CEE6003B5396 /* jack_metro */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_metro; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B66A8580934964500A89560 /* JackConstants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackConstants.h; path = ../common/JackConstants.h; sourceTree = SOURCE_ROOT; };
+ 4B699BB1097D421600A18468 /* jackdmp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jackdmp; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699C47097D421600A18468 /* Jackmp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Jackmp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CAC097D421600A18468 /* Jackdmp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Jackdmp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CBB097D421600A18468 /* jack_metro */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_metro; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CCB097D421600A18468 /* jack_lsp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_lsp; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CDB097D421600A18468 /* jack_connect */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_connect; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CEB097D421600A18468 /* jack_disconnect */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_disconnect; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699CFD097D421600A18468 /* jack_freewheel */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_freewheel; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D0D097D421600A18468 /* jack_external_metro */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_external_metro; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D21097D421600A18468 /* testAtomic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testAtomic; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D39097D421600A18468 /* testSem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testSem; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D49097D421600A18468 /* zombie */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = zombie; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D61097D421600A18468 /* synchroServer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroServer; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D79097D421600A18468 /* synchroClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroClient; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699D91097D421700A18468 /* synchroServerClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroServerClient; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699DA1097D421700A18468 /* jack_coreaudio.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = jack_coreaudio.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B699DB0097D421700A18468 /* jack_dummy.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = jack_dummy.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B799AD607899652003F3F15 /* JackMachPort.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachPort.cpp; sourceTree = "<group>"; };
+ 4B799AD707899652003F3F15 /* JackMachPort.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachPort.h; sourceTree = "<group>"; };
+ 4B7D792F0637B848001E7115 /* jack_lsp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_lsp; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B869B3D08C8D21C001CF041 /* driver_interface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = driver_interface.h; path = ../common/driver_interface.h; sourceTree = SOURCE_ROOT; };
+ 4B869B3E08C8D21C001CF041 /* driver_parse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = driver_parse.h; path = ../common/driver_parse.h; sourceTree = SOURCE_ROOT; };
+ 4B869B4208C8D22F001CF041 /* JackDriverLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDriverLoader.h; path = ../common/JackDriverLoader.h; sourceTree = SOURCE_ROOT; };
+ 4B869B6408C8D76B001CF041 /* jslist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jslist.h; path = ../common/jslist.h; sourceTree = SOURCE_ROOT; };
+ 4B869D7F08C9CB00001CF041 /* JackDriverLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDriverLoader.cpp; path = ../common/JackDriverLoader.cpp; sourceTree = SOURCE_ROOT; };
+ 4B89B759076B731100D170DE /* JackRPCClientUser.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = JackRPCClientUser.c; path = RPC/JackRPCClientUser.c; sourceTree = SOURCE_ROOT; };
+ 4B89B769076B74D200D170DE /* JackRPCEngineUser.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = JackRPCEngineUser.c; path = RPC/JackRPCEngineUser.c; sourceTree = SOURCE_ROOT; };
+ 4B89C81606382F5800464BF4 /* jack_connect */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_connect; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B940B9B06DDDE5B00D77F60 /* AudioHardware.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AudioHardware.h; path = /System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/AudioHardware.h; sourceTree = "<absolute>"; };
+ 4B9686240771CA08002D75D5 /* jack_disconnect */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_disconnect; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B97440C08AF54590094983C /* JackSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackSocket.cpp; path = ../common/JackSocket.cpp; sourceTree = SOURCE_ROOT; };
+ 4B97440D08AF54590094983C /* JackSocket.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSocket.h; path = ../common/JackSocket.h; sourceTree = SOURCE_ROOT; };
+ 4B97441408AF546F0094983C /* JackSocketClientChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSocketClientChannel.h; path = ../common/JackSocketClientChannel.h; sourceTree = SOURCE_ROOT; };
+ 4B97441508AF546F0094983C /* JackSocketClientChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackSocketClientChannel.cpp; path = ../common/JackSocketClientChannel.cpp; sourceTree = SOURCE_ROOT; };
+ 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSocketNotifyChannel.h; path = ../common/JackSocketNotifyChannel.h; sourceTree = SOURCE_ROOT; };
+ 4B97441B08AF54930094983C /* JackSocketServerChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSocketServerChannel.h; path = ../common/JackSocketServerChannel.h; sourceTree = SOURCE_ROOT; };
+ 4B97452B08AF6D4B0094983C /* JackSocketServerChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackSocketServerChannel.cpp; path = ../common/JackSocketServerChannel.cpp; sourceTree = SOURCE_ROOT; };
+ 4B97458708AF74FF0094983C /* JackSocketNotifyChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackSocketNotifyChannel.cpp; path = ../common/JackSocketNotifyChannel.cpp; sourceTree = SOURCE_ROOT; };
+ 4B9745CB08AF771B0094983C /* JackSocketServerNotifyChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSocketServerNotifyChannel.h; path = ../common/JackSocketServerNotifyChannel.h; sourceTree = SOURCE_ROOT; };
+ 4B9745D908AF78200094983C /* JackSocketServerNotifyChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackSocketServerNotifyChannel.cpp; path = ../common/JackSocketServerNotifyChannel.cpp; sourceTree = SOURCE_ROOT; };
+ 4B978DBB0A31CF4A009E2DD1 /* jack_portaudio.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = jack_portaudio.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4B978DEB0A31D099009E2DD1 /* JackPortAudioDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackPortAudioDriver.h; path = ../windows/JackPortAudioDriver.h; sourceTree = SOURCE_ROOT; };
+ 4B978DEC0A31D099009E2DD1 /* JackPortAudioDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackPortAudioDriver.cpp; path = ../windows/JackPortAudioDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4B98AE000931D30C0091932A /* JackDebugClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDebugClient.cpp; path = ../common/JackDebugClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4B98AE010931D30C0091932A /* JackDebugClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDebugClient.h; path = ../common/JackDebugClient.h; sourceTree = SOURCE_ROOT; };
+ 4B9B815C08AFA45000D05A28 /* JackRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackRequest.h; path = ../common/JackRequest.h; sourceTree = SOURCE_ROOT; };
+ 4BA577B408BF8BAB00F82DE1 /* synchroServer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroServer; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BA577BC08BF8BE200F82DE1 /* testSynchroClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testSynchroClient.cpp; path = ../tests/testSynchroClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BA577E508BF8E0600F82DE1 /* synchroClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroClient; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BA577FB08BF8E4600F82DE1 /* testSynchroServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testSynchroServer.cpp; path = ../tests/testSynchroServer.cpp; sourceTree = SOURCE_ROOT; };
+ 4BBD13B608C71A480079F7FF /* synchroServerClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = synchroServerClient; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BBD13CC08C71EB40079F7FF /* testSynchroServerClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testSynchroServerClient.cpp; path = ../tests/testSynchroServerClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BC216880A444BDE00BDA09F /* JackServerGlobals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackServerGlobals.cpp; path = ../common/JackServerGlobals.cpp; sourceTree = SOURCE_ROOT; };
+ 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackServerGlobals.h; path = ../common/JackServerGlobals.h; sourceTree = SOURCE_ROOT; };
+ 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDummyDriver.cpp; path = ../common/JackDummyDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDummyDriver.h; path = ../common/JackDummyDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackTransportEngine.h; path = ../common/JackTransportEngine.h; sourceTree = SOURCE_ROOT; };
+ 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackTransportEngine.cpp; path = ../common/JackTransportEngine.cpp; sourceTree = SOURCE_ROOT; };
+ 4BD561C708EEB910006BBC2A /* JackSynchro.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackSynchro.h; path = ../common/JackSynchro.h; sourceTree = SOURCE_ROOT; };
+ 4BD81C8507ACD3DE00ACB953 /* jack_external_metro */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_external_metro; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BE6C6A30A3E096F005A203A /* jack_test */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = jack_test; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BE6C6AC0A3E0A65005A203A /* jack_test.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = jack_test.cpp; path = ../tests/jack_test.cpp; sourceTree = SOURCE_ROOT; };
+ 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackPosixSemaphore.cpp; path = ../common/JackPosixSemaphore.cpp; sourceTree = SOURCE_ROOT; };
+ 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackPosixSemaphore.h; path = ../common/JackPosixSemaphore.h; sourceTree = SOURCE_ROOT; };
+ 4BF212A808DADBB5008D17F1 /* jackdmp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jackdmp; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BF3937C0626BF3600CC67FA /* JackMacLibClientRPC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMacLibClientRPC.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF592A008F13D81005B1F5F /* Jackdmp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Jackdmp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachSemaphore.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachSemaphore.h; sourceTree = SOURCE_ROOT; };
+ 4BF70ACA0908EE95008B75AD /* JackLoopbackDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackLoopbackDriver.cpp; path = ../common/JackLoopbackDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF70ACB0908EE95008B75AD /* JackLoopbackDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackLoopbackDriver.h; path = ../common/JackLoopbackDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BF772FD08B3330F00149912 /* JackAtomic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackAtomic.h; path = ../common/JackAtomic.h; sourceTree = SOURCE_ROOT; };
+ 4BF773AA08B3414500149912 /* JackTime.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = JackTime.c; path = ../common/JackTime.c; sourceTree = SOURCE_ROOT; };
+ 4BF8D1670834EDD900C94B91 /* zombie.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = zombie.c; path = "../example-clients/zombie.c"; sourceTree = SOURCE_ROOT; };
+ 4BF8D1690834EDE600C94B91 /* lsp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lsp.c; path = "..//example-clients/lsp.c"; sourceTree = SOURCE_ROOT; };
+ 4BF8D16B0834EDF000C94B91 /* metro.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = metro.c; path = "../example-clients/metro.c"; sourceTree = SOURCE_ROOT; };
+ 4BF8D1710834EE0F00C94B91 /* freewheel.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = freewheel.c; path = "../example-clients/freewheel.c"; sourceTree = SOURCE_ROOT; };
+ 4BF8D1730834EE2800C94B91 /* internal_metro.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = internal_metro.cpp; path = "../example-clients/internal_metro.cpp"; sourceTree = SOURCE_ROOT; };
+ 4BF8D1750834EE3600C94B91 /* external_metro.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = external_metro.cpp; path = "../example-clients/external_metro.cpp"; sourceTree = SOURCE_ROOT; };
+ 4BF8D1770834EE4800C94B91 /* JackError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackError.h; path = ../common/JackError.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1830834EE5800C94B91 /* JackTime.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackTime.h; path = ../common/JackTime.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1870834EE7900C94B91 /* JackShmMem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackShmMem.h; path = ../common/JackShmMem.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackShmMem.cpp; path = ../common/JackShmMem.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D18F0834EE8400C94B91 /* shm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = shm.h; path = ../common/shm.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1900834EE8400C94B91 /* shm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = shm.c; path = ../common/shm.c; sourceTree = SOURCE_ROOT; };
+ 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackPosixThread.h; path = ../common/JackPosixThread.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackPosixThread.cpp; path = ../common/JackPosixThread.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D19F0834EE9E00C94B91 /* JackThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackThread.h; path = ../common/JackThread.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackActivationCount.h; path = ../common/JackActivationCount.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackActivationCount.cpp; path = ../common/JackActivationCount.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackChannel.h; path = ../common/JackChannel.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1B30834EED500C94B91 /* JackInternalClientChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackInternalClientChannel.h; path = ../common/JackInternalClientChannel.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1B50834EEE400C94B91 /* JackDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDriver.h; path = ../common/JackDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDriver.cpp; path = ../common/JackDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1B90834EEF100C94B91 /* JackFreewheelDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackFreewheelDriver.h; path = ../common/JackFreewheelDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1BA0834EEF100C94B91 /* JackFreewheelDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackFreewheelDriver.cpp; path = ../common/JackFreewheelDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1BD0834EEFC00C94B91 /* JackThreadedDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackThreadedDriver.h; path = ../common/JackThreadedDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1BE0834EEFC00C94B91 /* JackThreadedDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackThreadedDriver.cpp; path = ../common/JackThreadedDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1C10834EF0800C94B91 /* JackAtomicState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackAtomicState.h; path = ../common/JackAtomicState.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackConnectionManager.h; path = ../common/JackConnectionManager.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackConnectionManager.cpp; path = ../common/JackConnectionManager.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackGraphManager.h; path = ../common/JackGraphManager.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackGraphManager.cpp; path = ../common/JackGraphManager.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackPort.h; path = ../common/JackPort.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackPort.cpp; path = ../common/JackPort.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackClientInterface.h; path = ../common/JackClientInterface.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackClientControl.h; path = ../common/JackClientControl.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1E10834EF5500C94B91 /* JackClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackClient.h; path = ../common/JackClient.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackClient.cpp; path = ../common/JackClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackAPI.cpp; path = ../common/JackAPI.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1ED0834EF9200C94B91 /* JackInternalClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackInternalClient.cpp; path = ../common/JackInternalClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackInternalClient.h; path = ../common/JackInternalClient.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1F50834EFB000C94B91 /* JackServerAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackServerAPI.cpp; path = ../common/JackServerAPI.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1F70834EFBD00C94B91 /* JackExternalClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackExternalClient.h; path = ../common/JackExternalClient.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1F80834EFBD00C94B91 /* JackExternalClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackExternalClient.cpp; path = ../common/JackExternalClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1FB0834EFD100C94B91 /* JackLibGlobals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackLibGlobals.h; path = ../common/JackLibGlobals.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1FC0834EFD100C94B91 /* JackLibClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackLibClient.h; path = ../common/JackLibClient.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D1FD0834EFD100C94B91 /* JackLibClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackLibClient.cpp; path = ../common/JackLibClient.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D1FE0834EFD100C94B91 /* JackLibAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackLibAPI.cpp; path = ../common/JackLibAPI.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D20F0834F01C00C94B91 /* JackEngineTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackEngineTiming.cpp; path = ../common/JackEngineTiming.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D2100834F01C00C94B91 /* JackEngineTiming.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackEngineTiming.h; path = ../common/JackEngineTiming.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D2130834F02800C94B91 /* JackEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackEngine.h; path = ../common/JackEngine.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D2140834F02800C94B91 /* JackEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackEngine.cpp; path = ../common/JackEngine.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D2170834F03500C94B91 /* jack.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jack.h; path = ../common/jack.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D2190834F03D00C94B91 /* JackEngineControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackEngineControl.h; path = ../common/JackEngineControl.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D21B0834F04800C94B91 /* types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../common/types.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D21C0834F04800C94B91 /* transport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = transport.h; path = ../common/transport.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D2210834F05C00C94B91 /* JackServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackServer.cpp; path = ../common/JackServer.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D2220834F05C00C94B91 /* JackServer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackServer.h; path = ../common/JackServer.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D2250834F06A00C94B91 /* Jackdmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Jackdmp.cpp; path = ../common/Jackdmp.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D2290834F07D00C94B91 /* JackAudioDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackAudioDriver.h; path = ../common/JackAudioDriver.h; sourceTree = SOURCE_ROOT; };
+ 4BF8D22A0834F07D00C94B91 /* JackAudioDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackAudioDriver.cpp; path = ../common/JackAudioDriver.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D23E0834F1C300C94B91 /* testAtomic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testAtomic.cpp; path = ../tests/testAtomic.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8D2470834F20600C94B91 /* testSem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testSem.cpp; path = ../tests/testSem.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackFrameTimer.cpp; path = ../common/JackFrameTimer.cpp; sourceTree = SOURCE_ROOT; };
+ 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackFrameTimer.h; path = ../common/JackFrameTimer.h; sourceTree = SOURCE_ROOT; };
+ 4BFB297708AF44ED00D450D4 /* JackMachServerNotifyChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachServerNotifyChannel.cpp; sourceTree = "<group>"; };
+ 4BFB297808AF44ED00D450D4 /* JackMachServerChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachServerChannel.h; sourceTree = "<group>"; };
+ 4BFB297908AF44ED00D450D4 /* JackMachServerChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachServerChannel.cpp; sourceTree = "<group>"; };
+ 4BFB297A08AF44ED00D450D4 /* JackMachServerNotifyChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachServerNotifyChannel.h; sourceTree = "<group>"; };
+ 4BFB298708AF450200D450D4 /* JackMachClientChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachClientChannel.h; sourceTree = "<group>"; };
+ 4BFB298808AF450200D450D4 /* JackMachNotifyChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachNotifyChannel.cpp; sourceTree = "<group>"; };
+ 4BFB298908AF450200D450D4 /* JackMachNotifyChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachNotifyChannel.h; sourceTree = "<group>"; };
+ 4BFB29AE08AF45FD00D450D4 /* JackMachClientChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachClientChannel.cpp; sourceTree = SOURCE_ROOT; };
+ 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackGlobals.h; path = ../common/JackGlobals.h; sourceTree = SOURCE_ROOT; };
+ 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JackMachThread.cpp; sourceTree = SOURCE_ROOT; };
+ 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JackMachThread.h; sourceTree = SOURCE_ROOT; };
+ C6859E8B029090EE04C91782 /* JackServer.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = JackServer.1; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 4B0C912208DAF32100AE19BE /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD790799484F0096ABE0 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2407994C6F0096ABE0 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28CF08DACC6B00249230 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C7F07733D7C00DDA57E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A10F080917BA003F4C95 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEC0636CC42003B5396 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C2F0636CEE6003B5396 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699BAB097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C42097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CA7097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CB5097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CC5097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CD5097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CE5097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CF7097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D07097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D1B097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D33097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D43097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D5B097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D73097D421600A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D8B097D421700A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D9C097D421700A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699DAB097D421700A18468 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792C0637B848001E7115 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81306382F5800464BF4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686210771CA08002D75D5 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B978DB60A31CF4A009E2DD1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B108BF8BAB00F82DE1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577E308BF8E0600F82DE1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13B408C71A480079F7FF /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8307ACD3DE00ACB953 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BE6C69D0A3E096F005A203A /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF212A608DADBB5008D17F1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5929F08F13D81005B1F5F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0249A662FF388D9811CA2CEA /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 08FB7794FE84155DC02AAC07 /* JackServer */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB7795FE84155DC02AAC07 /* Source */,
+ C6859E8C029090F304C91782 /* Documentation */,
+ 0249A662FF388D9811CA2CEA /* External Frameworks and Libraries */,
+ 1AB674ADFE9D54B511CA2CBB /* Products */,
+ 4B464301076CAC7700E5077C /* Jack-Info.plist */,
+ );
+ name = JackServer;
+ sourceTree = "<group>";
+ };
+ 08FB7795FE84155DC02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ 4B6BEB4A07A6CCDC00A5DBDA /* Tests */,
+ 4B37C20006DF1F900016E567 /* Latency */,
+ 4B03383E0797E19900686131 /* Simple clients */,
+ 4B765CC805ECE17900571F78 /* Tools */,
+ 4BA550FC05E2421400569492 /* Shm */,
+ 4BA33DF905EDFD8C000CCD5F /* Thread */,
+ 4BA3874007947A46008D8992 /* Synchro */,
+ 4BA550FF05E2423600569492 /* Channels */,
+ 4BA550F605E241B800569492 /* Driver */,
+ 4BA3873B079479C2008D8992 /* Graph */,
+ 4BA550FA05E241F200569492 /* Ports */,
+ 4BD56D74079687D7006D44F9 /* Client */,
+ 4BA550FB05E2420000569492 /* Engine */,
+ 4B9B627005E60A9E001E19AA /* Server */,
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+ 1AB674ADFE9D54B511CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4B646BEE0636CC42003B5396 /* Jackmp.framework */,
+ 4B646C320636CEE6003B5396 /* jack_metro */,
+ 4B7D792F0637B848001E7115 /* jack_lsp */,
+ 4B89C81606382F5800464BF4 /* jack_connect */,
+ 4B9686240771CA08002D75D5 /* jack_disconnect */,
+ 4B420C8207733D7C00DDA57E /* testAtomic */,
+ 4B1CBD7C0799484F0096ABE0 /* testSem */,
+ 4B1CBE2707994C6F0096ABE0 /* jack_freewheel */,
+ 4BD81C8507ACD3DE00ACB953 /* jack_external_metro */,
+ 4B50A112080917BA003F4C95 /* zombie */,
+ 4BA577B408BF8BAB00F82DE1 /* synchroServer */,
+ 4BA577E508BF8E0600F82DE1 /* synchroClient */,
+ 4BBD13B608C71A480079F7FF /* synchroServerClient */,
+ 4B2C28D108DACC6B00249230 /* jack_coreaudio.so */,
+ 4BF212A808DADBB5008D17F1 /* jackdmp */,
+ 4B0C912308DAF32100AE19BE /* jack_dummy.so */,
+ 4BF592A008F13D81005B1F5F /* Jackdmp.framework */,
+ 4B699BB1097D421600A18468 /* jackdmp */,
+ 4B699C47097D421600A18468 /* Jackmp.framework */,
+ 4B699CAC097D421600A18468 /* Jackdmp.framework */,
+ 4B699CBB097D421600A18468 /* jack_metro */,
+ 4B699CCB097D421600A18468 /* jack_lsp */,
+ 4B699CDB097D421600A18468 /* jack_connect */,
+ 4B699CEB097D421600A18468 /* jack_disconnect */,
+ 4B699CFD097D421600A18468 /* jack_freewheel */,
+ 4B699D0D097D421600A18468 /* jack_external_metro */,
+ 4B699D21097D421600A18468 /* testAtomic */,
+ 4B699D39097D421600A18468 /* testSem */,
+ 4B699D49097D421600A18468 /* zombie */,
+ 4B699D61097D421600A18468 /* synchroServer */,
+ 4B699D79097D421600A18468 /* synchroClient */,
+ 4B699D91097D421700A18468 /* synchroServerClient */,
+ 4B699DA1097D421700A18468 /* jack_coreaudio.so */,
+ 4B699DB0097D421700A18468 /* jack_dummy.so */,
+ 4B978DBB0A31CF4A009E2DD1 /* jack_portaudio.so */,
+ 4BE6C6A30A3E096F005A203A /* jack_test */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 4B03383E0797E19900686131 /* Simple clients */ = {
+ isa = PBXGroup;
+ children = (
+ 4B60CE480AAABA31004956AA /* connect.c */,
+ 4BF8D1670834EDD900C94B91 /* zombie.c */,
+ 4BF8D1690834EDE600C94B91 /* lsp.c */,
+ 4BF8D16B0834EDF000C94B91 /* metro.c */,
+ 4BF8D1710834EE0F00C94B91 /* freewheel.c */,
+ 4BF8D1730834EE2800C94B91 /* internal_metro.cpp */,
+ 4BF8D1750834EE3600C94B91 /* external_metro.cpp */,
+ );
+ name = "Simple clients";
+ sourceTree = "<group>";
+ };
+ 4B168CA3076A5319005B2802 /* MIG_RPC */ = {
+ isa = PBXGroup;
+ children = (
+ 4B89B759076B731100D170DE /* JackRPCClientUser.c */,
+ 4B4259E5076B635E00C1ECE1 /* JackMacEngineRPC.cpp */,
+ );
+ name = MIG_RPC;
+ sourceTree = "<group>";
+ };
+ 4B168CA4076A5333005B2802 /* MIG_RPC */ = {
+ isa = PBXGroup;
+ children = (
+ 4B89B769076B74D200D170DE /* JackRPCEngineUser.c */,
+ 4BF3937C0626BF3600CC67FA /* JackMacLibClientRPC.cpp */,
+ );
+ name = MIG_RPC;
+ sourceTree = "<group>";
+ };
+ 4B37C20006DF1F900016E567 /* Latency */ = {
+ isa = PBXGroup;
+ children = (
+ 4B37C20906DF1FE20016E567 /* latency.c */,
+ 4B37C20A06DF1FE20016E567 /* latency.h */,
+ 4B37C20306DF1FBE0016E567 /* CALatencyLog.cpp */,
+ 4B37C20406DF1FBE0016E567 /* CALatencyLog.h */,
+ );
+ name = Latency;
+ sourceTree = "<group>";
+ };
+ 4B6BEB4A07A6CCDC00A5DBDA /* Tests */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D23E0834F1C300C94B91 /* testAtomic.cpp */,
+ 4BF8D2470834F20600C94B91 /* testSem.cpp */,
+ 4BA577BC08BF8BE200F82DE1 /* testSynchroClient.cpp */,
+ 4BA577FB08BF8E4600F82DE1 /* testSynchroServer.cpp */,
+ 4BBD13CC08C71EB40079F7FF /* testSynchroServerClient.cpp */,
+ 4BE6C6AC0A3E0A65005A203A /* jack_test.cpp */,
+ );
+ name = Tests;
+ sourceTree = "<group>";
+ };
+ 4B765CC805ECE17900571F78 /* Tools */ = {
+ isa = PBXGroup;
+ children = (
+ 4B003AB008E2B2BA0060EFDC /* ringbuffer.c */,
+ 4B003AB108E2B2BA0060EFDC /* ringbuffer.h */,
+ 4B003A6008E2A87A0060EFDC /* JackError.c */,
+ 4BF8D1770834EE4800C94B91 /* JackError.h */,
+ 4BF8D1830834EE5800C94B91 /* JackTime.h */,
+ 4BF773AA08B3414500149912 /* JackTime.c */,
+ );
+ name = Tools;
+ sourceTree = "<group>";
+ };
+ 4B9B627005E60A9E001E19AA /* Server */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D2170834F03500C94B91 /* jack.h */,
+ 4BF8D21B0834F04800C94B91 /* types.h */,
+ 4BF8D21C0834F04800C94B91 /* transport.h */,
+ 4B66A8580934964500A89560 /* JackConstants.h */,
+ 4BFB73F608AD291A00DB99B8 /* JackGlobals.h */,
+ 4B2C28F908DAD01E00249230 /* JackGlobals.cpp */,
+ 4B123D3308B3954300540632 /* JackGlobalsClient.cpp */,
+ 4B123D3608B3954A00540632 /* JackGlobalsServer.cpp */,
+ 4BF8D2190834F03D00C94B91 /* JackEngineControl.h */,
+ 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */,
+ 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */,
+ 4BF8D2220834F05C00C94B91 /* JackServer.h */,
+ 4BF8D2210834F05C00C94B91 /* JackServer.cpp */,
+ 4BF8D2250834F06A00C94B91 /* Jackdmp.cpp */,
+ 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */,
+ 4BC216880A444BDE00BDA09F /* JackServerGlobals.cpp */,
+ );
+ name = Server;
+ sourceTree = "<group>";
+ };
+ 4BA33DF905EDFD8C000CCD5F /* Thread */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D19F0834EE9E00C94B91 /* JackThread.h */,
+ 4BF8D1970834EE9700C94B91 /* JackPosixThread.h */,
+ 4BF8D1980834EE9700C94B91 /* JackPosixThread.cpp */,
+ 4BFB741F08AD2B9900DB99B8 /* JackMachThread.h */,
+ 4BFB741E08AD2B9900DB99B8 /* JackMachThread.cpp */,
+ );
+ name = Thread;
+ sourceTree = "<group>";
+ };
+ 4BA3873B079479C2008D8992 /* Graph */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF772FD08B3330F00149912 /* JackAtomic.h */,
+ 4BF8D1C10834EF0800C94B91 /* JackAtomicState.h */,
+ 4BF8D1C30834EF1400C94B91 /* JackConnectionManager.h */,
+ 4BF8D1C40834EF1400C94B91 /* JackConnectionManager.cpp */,
+ 4BF8D1C70834EF2200C94B91 /* JackGraphManager.h */,
+ 4BF8D1C80834EF2200C94B91 /* JackGraphManager.cpp */,
+ );
+ name = Graph;
+ sourceTree = "<group>";
+ };
+ 4BA3874007947A46008D8992 /* Synchro */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */,
+ 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */,
+ 4BD561C708EEB910006BBC2A /* JackSynchro.h */,
+ 4B56881008B5C8620022B32D /* JackFifo.h */,
+ 4B56880F08B5C8620022B32D /* JackFifo.cpp */,
+ 4BF6C1D608ACE64C001E2013 /* JackMachSemaphore.h */,
+ 4BF6C1D508ACE64C001E2013 /* JackMachSemaphore.cpp */,
+ 4BEE0B2D08ACBB9F00D22B43 /* JackPosixSemaphore.h */,
+ 4BEE0B2C08ACBB9F00D22B43 /* JackPosixSemaphore.cpp */,
+ );
+ name = Synchro;
+ sourceTree = "<group>";
+ };
+ 4BA550F605E241B800569492 /* Driver */ = {
+ isa = PBXGroup;
+ children = (
+ 4B869B6408C8D76B001CF041 /* jslist.h */,
+ 4B869B3D08C8D21C001CF041 /* driver_interface.h */,
+ 4B869B3E08C8D21C001CF041 /* driver_parse.h */,
+ 4B869B4208C8D22F001CF041 /* JackDriverLoader.h */,
+ 4B869D7F08C9CB00001CF041 /* JackDriverLoader.cpp */,
+ 4BF8D1B50834EEE400C94B91 /* JackDriver.h */,
+ 4BF8D1B60834EEE400C94B91 /* JackDriver.cpp */,
+ 4BF70ACB0908EE95008B75AD /* JackLoopbackDriver.h */,
+ 4BF70ACA0908EE95008B75AD /* JackLoopbackDriver.cpp */,
+ 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */,
+ 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */,
+ 4BD56D8707968982006D44F9 /* Threaded */,
+ 4BD56D8607968979006D44F9 /* Audio */,
+ );
+ name = Driver;
+ sourceTree = "<group>";
+ };
+ 4BA550F905E241D900569492 /* Library */ = {
+ isa = PBXGroup;
+ children = (
+ 4B168CA4076A5333005B2802 /* MIG_RPC */,
+ 4BF8D1FB0834EFD100C94B91 /* JackLibGlobals.h */,
+ 4BF8D1FC0834EFD100C94B91 /* JackLibClient.h */,
+ 4BF8D1FD0834EFD100C94B91 /* JackLibClient.cpp */,
+ 4BF8D1FE0834EFD100C94B91 /* JackLibAPI.cpp */,
+ );
+ name = Library;
+ sourceTree = "<group>";
+ };
+ 4BA550FA05E241F200569492 /* Ports */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1CF0834EF2F00C94B91 /* JackPort.h */,
+ 4BF8D1D00834EF2F00C94B91 /* JackPort.cpp */,
+ );
+ name = Ports;
+ sourceTree = "<group>";
+ };
+ 4BA550FB05E2420000569492 /* Engine */ = {
+ isa = PBXGroup;
+ children = (
+ 4B168CA3076A5319005B2802 /* MIG_RPC */,
+ 4BF8D2130834F02800C94B91 /* JackEngine.h */,
+ 4BF8D2140834F02800C94B91 /* JackEngine.cpp */,
+ 4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */,
+ 4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */,
+ 4BF8D2100834F01C00C94B91 /* JackEngineTiming.h */,
+ 4BF8D20F0834F01C00C94B91 /* JackEngineTiming.cpp */,
+ );
+ name = Engine;
+ sourceTree = "<group>";
+ };
+ 4BA550FC05E2421400569492 /* Shm */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D18F0834EE8400C94B91 /* shm.h */,
+ 4BF8D1900834EE8400C94B91 /* shm.c */,
+ 4BF8D1870834EE7900C94B91 /* JackShmMem.h */,
+ 4BF8D1880834EE7900C94B91 /* JackShmMem.cpp */,
+ );
+ name = Shm;
+ sourceTree = "<group>";
+ };
+ 4BA550FF05E2423600569492 /* Channels */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1AF0834EEC400C94B91 /* JackChannel.h */,
+ 4BF8D1B30834EED500C94B91 /* JackInternalClientChannel.h */,
+ 4BFB299908AF452300D450D4 /* Socket */,
+ 4BFB299808AF451200D450D4 /* Mach */,
+ );
+ name = Channels;
+ sourceTree = "<group>";
+ };
+ 4BD56D73079687AD006D44F9 /* External */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1F70834EFBD00C94B91 /* JackExternalClient.h */,
+ 4BF8D1F80834EFBD00C94B91 /* JackExternalClient.cpp */,
+ );
+ name = External;
+ sourceTree = "<group>";
+ };
+ 4BD56D74079687D7006D44F9 /* Client */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1D90834EF4500C94B91 /* JackClientInterface.h */,
+ 4BF8D1DD0834EF4D00C94B91 /* JackClientControl.h */,
+ 4BF8D1E10834EF5500C94B91 /* JackClient.h */,
+ 4BF8D1E50834EF6700C94B91 /* JackClient.cpp */,
+ 4B98AE010931D30C0091932A /* JackDebugClient.h */,
+ 4B98AE000931D30C0091932A /* JackDebugClient.cpp */,
+ 4BF8D1E90834EF7500C94B91 /* JackAPI.cpp */,
+ 4BD56D75079687EB006D44F9 /* Internal */,
+ 4BD56D73079687AD006D44F9 /* External */,
+ 4BA550F905E241D900569492 /* Library */,
+ );
+ name = Client;
+ sourceTree = "<group>";
+ };
+ 4BD56D75079687EB006D44F9 /* Internal */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1EE0834EF9200C94B91 /* JackInternalClient.h */,
+ 4BF8D1ED0834EF9200C94B91 /* JackInternalClient.cpp */,
+ 4BF8D1F50834EFB000C94B91 /* JackServerAPI.cpp */,
+ );
+ name = "Internal ";
+ sourceTree = "<group>";
+ };
+ 4BD56D8607968979006D44F9 /* Audio */ = {
+ isa = PBXGroup;
+ children = (
+ 4B940B9B06DDDE5B00D77F60 /* AudioHardware.h */,
+ 4BF8D2290834F07D00C94B91 /* JackAudioDriver.h */,
+ 4BF8D22A0834F07D00C94B91 /* JackAudioDriver.cpp */,
+ 4B395C9706AEF53800923527 /* JackCoreAudioDriver.h */,
+ 4B395C9606AEF53800923527 /* JackCoreAudioDriver.cpp */,
+ 4B978DEB0A31D099009E2DD1 /* JackPortAudioDriver.h */,
+ 4B978DEC0A31D099009E2DD1 /* JackPortAudioDriver.cpp */,
+ );
+ name = Audio;
+ sourceTree = "<group>";
+ };
+ 4BD56D8707968982006D44F9 /* Threaded */ = {
+ isa = PBXGroup;
+ children = (
+ 4BF8D1BD0834EEFC00C94B91 /* JackThreadedDriver.h */,
+ 4BF8D1BE0834EEFC00C94B91 /* JackThreadedDriver.cpp */,
+ 4BF8D1B90834EEF100C94B91 /* JackFreewheelDriver.h */,
+ 4BF8D1BA0834EEF100C94B91 /* JackFreewheelDriver.cpp */,
+ );
+ name = Threaded;
+ sourceTree = "<group>";
+ };
+ 4BFB299808AF451200D450D4 /* Mach */ = {
+ isa = PBXGroup;
+ children = (
+ 4B799AD707899652003F3F15 /* JackMachPort.h */,
+ 4B799AD607899652003F3F15 /* JackMachPort.cpp */,
+ 4BFB298708AF450200D450D4 /* JackMachClientChannel.h */,
+ 4BFB29AE08AF45FD00D450D4 /* JackMachClientChannel.cpp */,
+ 4BFB297808AF44ED00D450D4 /* JackMachServerChannel.h */,
+ 4BFB297908AF44ED00D450D4 /* JackMachServerChannel.cpp */,
+ 4BFB297A08AF44ED00D450D4 /* JackMachServerNotifyChannel.h */,
+ 4BFB297708AF44ED00D450D4 /* JackMachServerNotifyChannel.cpp */,
+ 4BFB298908AF450200D450D4 /* JackMachNotifyChannel.h */,
+ 4BFB298808AF450200D450D4 /* JackMachNotifyChannel.cpp */,
+ );
+ name = Mach;
+ sourceTree = "<group>";
+ };
+ 4BFB299908AF452300D450D4 /* Socket */ = {
+ isa = PBXGroup;
+ children = (
+ 4B9B815C08AFA45000D05A28 /* JackRequest.h */,
+ 4B97440D08AF54590094983C /* JackSocket.h */,
+ 4B97440C08AF54590094983C /* JackSocket.cpp */,
+ 4B97441408AF546F0094983C /* JackSocketClientChannel.h */,
+ 4B97441508AF546F0094983C /* JackSocketClientChannel.cpp */,
+ 4B97441B08AF54930094983C /* JackSocketServerChannel.h */,
+ 4B97452B08AF6D4B0094983C /* JackSocketServerChannel.cpp */,
+ 4B9745CB08AF771B0094983C /* JackSocketServerNotifyChannel.h */,
+ 4B9745D908AF78200094983C /* JackSocketServerNotifyChannel.cpp */,
+ 4B97441A08AF54930094983C /* JackSocketNotifyChannel.h */,
+ 4B97458708AF74FF0094983C /* JackSocketNotifyChannel.cpp */,
+ );
+ name = Socket;
+ sourceTree = "<group>";
+ };
+ C6859E8C029090F304C91782 /* Documentation */ = {
+ isa = PBXGroup;
+ children = (
+ C6859E8B029090EE04C91782 /* JackServer.1 */,
+ );
+ name = Documentation;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 4B0C911E08DAF32100AE19BE /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B0C912708DAF34400AE19BE /* JackDummyDriver.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD770799484F0096ABE0 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D24A0834F21300C94B91 /* JackError.h in Headers */,
+ 4BF8D24C0834F21E00C94B91 /* JackPosixThread.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2207994C6F0096ABE0 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28CD08DACC6B00249230 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF2124408DADA90008D17F1 /* JackCoreAudioDriver.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C7D07733D7C00DDA57E /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D2410834F1DD00C94B91 /* JackPosixThread.h in Headers */,
+ 4BF8D2430834F1E400C94B91 /* JackError.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A10D080917BA003F4C95 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BE80636CC42003B5396 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B799ADB07899652003F3F15 /* JackMachPort.h in Headers */,
+ 4BF8D17D0834EE4800C94B91 /* JackError.h in Headers */,
+ 4BF8D1860834EE5800C94B91 /* JackTime.h in Headers */,
+ 4BF8D18D0834EE7900C94B91 /* JackShmMem.h in Headers */,
+ 4BF8D1950834EE8400C94B91 /* shm.h in Headers */,
+ 4BF8D19D0834EE9700C94B91 /* JackPosixThread.h in Headers */,
+ 4BF8D1A20834EE9E00C94B91 /* JackThread.h in Headers */,
+ 4BF8D1AD0834EEB400C94B91 /* JackActivationCount.h in Headers */,
+ 4BF8D1B20834EEC400C94B91 /* JackChannel.h in Headers */,
+ 4BF8D1CD0834EF2200C94B91 /* JackGraphManager.h in Headers */,
+ 4BF8D1D50834EF2F00C94B91 /* JackPort.h in Headers */,
+ 4BF8D1DC0834EF4500C94B91 /* JackClientInterface.h in Headers */,
+ 4BF8D1E00834EF4D00C94B91 /* JackClientControl.h in Headers */,
+ 4BF8D1E40834EF5500C94B91 /* JackClient.h in Headers */,
+ 4BF8D1F40834EF9200C94B91 /* JackInternalClient.h in Headers */,
+ 4BF8D2030834EFD100C94B91 /* JackLibGlobals.h in Headers */,
+ 4BF8D2040834EFD100C94B91 /* JackLibClient.h in Headers */,
+ 4BF8D2360834F14400C94B91 /* JackConnectionManager.h in Headers */,
+ 4BF8FB1408AC88EF00D1A344 /* JackFrameTimer.h in Headers */,
+ 4BEE0B3308ACBB9F00D22B43 /* JackPosixSemaphore.h in Headers */,
+ 4BF6C1DC08ACE64C001E2013 /* JackMachSemaphore.h in Headers */,
+ 4BFB73F908AD291A00DB99B8 /* JackGlobals.h in Headers */,
+ 4BFB742508AD2B9900DB99B8 /* JackMachThread.h in Headers */,
+ 4BFB299308AF450200D450D4 /* JackMachClientChannel.h in Headers */,
+ 4B97441308AF54590094983C /* JackSocket.h in Headers */,
+ 4B97441808AF546F0094983C /* JackSocketClientChannel.h in Headers */,
+ 4B97441E08AF54930094983C /* JackSocketNotifyChannel.h in Headers */,
+ 4B97441F08AF54930094983C /* JackSocketServerChannel.h in Headers */,
+ 4B56881608B5C8620022B32D /* JackFifo.h in Headers */,
+ 4B003AB508E2B2BA0060EFDC /* ringbuffer.h in Headers */,
+ 4BD561C808EEB910006BBC2A /* JackSynchro.h in Headers */,
+ 4B98AE050931D30C0091932A /* JackDebugClient.h in Headers */,
+ 4B66A85C0934964500A89560 /* JackConstants.h in Headers */,
+ 4BD4B4E909BACF0100750C0F /* JackTransportEngine.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C2D0636CEE6003B5396 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699BA8097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C01097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699C02097D421600A18468 /* JackMachPort.h in Headers */,
+ 4B699C03097D421600A18468 /* JackError.h in Headers */,
+ 4B699C04097D421600A18468 /* JackTime.h in Headers */,
+ 4B699C05097D421600A18468 /* JackShmMem.h in Headers */,
+ 4B699C06097D421600A18468 /* shm.h in Headers */,
+ 4B699C07097D421600A18468 /* JackPosixThread.h in Headers */,
+ 4B699C08097D421600A18468 /* JackThread.h in Headers */,
+ 4B699C09097D421600A18468 /* JackActivationCount.h in Headers */,
+ 4B699C0A097D421600A18468 /* JackChannel.h in Headers */,
+ 4B699C0B097D421600A18468 /* JackGraphManager.h in Headers */,
+ 4B699C0C097D421600A18468 /* JackPort.h in Headers */,
+ 4B699C0D097D421600A18468 /* JackClientInterface.h in Headers */,
+ 4B699C0E097D421600A18468 /* JackClientControl.h in Headers */,
+ 4B699C0F097D421600A18468 /* JackClient.h in Headers */,
+ 4B699C10097D421600A18468 /* JackInternalClient.h in Headers */,
+ 4B699C11097D421600A18468 /* JackLibGlobals.h in Headers */,
+ 4B699C12097D421600A18468 /* JackLibClient.h in Headers */,
+ 4B699C13097D421600A18468 /* JackConnectionManager.h in Headers */,
+ 4B699C14097D421600A18468 /* JackFrameTimer.h in Headers */,
+ 4B699C15097D421600A18468 /* JackPosixSemaphore.h in Headers */,
+ 4B699C16097D421600A18468 /* JackMachSemaphore.h in Headers */,
+ 4B699C17097D421600A18468 /* JackGlobals.h in Headers */,
+ 4B699C18097D421600A18468 /* JackMachThread.h in Headers */,
+ 4B699C19097D421600A18468 /* JackMachClientChannel.h in Headers */,
+ 4B699C1A097D421600A18468 /* JackSocket.h in Headers */,
+ 4B699C1B097D421600A18468 /* JackSocketClientChannel.h in Headers */,
+ 4B699C1C097D421600A18468 /* JackSocketNotifyChannel.h in Headers */,
+ 4B699C1D097D421600A18468 /* JackSocketServerChannel.h in Headers */,
+ 4B699C1E097D421600A18468 /* JackFifo.h in Headers */,
+ 4B699C1F097D421600A18468 /* ringbuffer.h in Headers */,
+ 4B699C20097D421600A18468 /* JackSynchro.h in Headers */,
+ 4B699C21097D421600A18468 /* JackDebugClient.h in Headers */,
+ 4B699C22097D421600A18468 /* JackConstants.h in Headers */,
+ 4BD4B4E509BACEF300750C0F /* JackTransportEngine.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C4D097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699C4E097D421600A18468 /* JackMachPort.h in Headers */,
+ 4B699C4F097D421600A18468 /* JackError.h in Headers */,
+ 4B699C50097D421600A18468 /* JackTime.h in Headers */,
+ 4B699C51097D421600A18468 /* JackShmMem.h in Headers */,
+ 4B699C52097D421600A18468 /* shm.h in Headers */,
+ 4B699C53097D421600A18468 /* JackPosixThread.h in Headers */,
+ 4B699C54097D421600A18468 /* JackThread.h in Headers */,
+ 4B699C55097D421600A18468 /* JackActivationCount.h in Headers */,
+ 4B699C56097D421600A18468 /* JackChannel.h in Headers */,
+ 4B699C57097D421600A18468 /* JackGraphManager.h in Headers */,
+ 4B699C58097D421600A18468 /* JackPort.h in Headers */,
+ 4B699C59097D421600A18468 /* JackClientInterface.h in Headers */,
+ 4B699C5A097D421600A18468 /* JackClientControl.h in Headers */,
+ 4B699C5B097D421600A18468 /* JackClient.h in Headers */,
+ 4B699C5C097D421600A18468 /* JackInternalClient.h in Headers */,
+ 4B699C5D097D421600A18468 /* JackConnectionManager.h in Headers */,
+ 4B699C5E097D421600A18468 /* JackFrameTimer.h in Headers */,
+ 4B699C5F097D421600A18468 /* JackPosixSemaphore.h in Headers */,
+ 4B699C60097D421600A18468 /* JackMachSemaphore.h in Headers */,
+ 4B699C61097D421600A18468 /* JackGlobals.h in Headers */,
+ 4B699C62097D421600A18468 /* JackMachThread.h in Headers */,
+ 4B699C63097D421600A18468 /* JackSocket.h in Headers */,
+ 4B699C64097D421600A18468 /* JackSocketNotifyChannel.h in Headers */,
+ 4B699C65097D421600A18468 /* JackSocketServerChannel.h in Headers */,
+ 4B699C66097D421600A18468 /* JackFifo.h in Headers */,
+ 4B699C67097D421600A18468 /* ringbuffer.h in Headers */,
+ 4B699C68097D421600A18468 /* JackSynchro.h in Headers */,
+ 4B699C69097D421600A18468 /* JackAudioDriver.h in Headers */,
+ 4B699C6A097D421600A18468 /* JackFreewheelDriver.h in Headers */,
+ 4B699C6B097D421600A18468 /* JackThreadedDriver.h in Headers */,
+ 4B699C6C097D421600A18468 /* JackDriver.h in Headers */,
+ 4B699C6D097D421600A18468 /* driver_interface.h in Headers */,
+ 4B699C6E097D421600A18468 /* driver_parse.h in Headers */,
+ 4B699C6F097D421600A18468 /* JackDriverLoader.h in Headers */,
+ 4B699C70097D421600A18468 /* jslist.h in Headers */,
+ 4B699C71097D421600A18468 /* JackEngine.h in Headers */,
+ 4B699C72097D421600A18468 /* JackEngineTiming.h in Headers */,
+ 4B699C73097D421600A18468 /* JackExternalClient.h in Headers */,
+ 4B699C74097D421600A18468 /* JackServer.h in Headers */,
+ 4B699C75097D421600A18468 /* JackSocketServerNotifyChannel.h in Headers */,
+ 4B699C76097D421600A18468 /* JackRequest.h in Headers */,
+ 4B699C77097D421600A18468 /* JackMachNotifyChannel.h in Headers */,
+ 4B699C78097D421600A18468 /* JackMachServerChannel.h in Headers */,
+ 4B699C79097D421600A18468 /* JackMachServerNotifyChannel.h in Headers */,
+ 4B699C7A097D421600A18468 /* JackLoopbackDriver.h in Headers */,
+ 4B699C7B097D421600A18468 /* JackConstants.h in Headers */,
+ 4BD4B4D809BACD9600750C0F /* JackTransportEngine.h in Headers */,
+ 4BC2168E0A444BED00BDA09F /* JackServerGlobals.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CB2097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CC2097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CD2097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CE2097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CF4097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D04097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D14097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D15097D421600A18468 /* JackPosixThread.h in Headers */,
+ 4B699D16097D421600A18468 /* JackError.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D28097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D29097D421600A18468 /* JackError.h in Headers */,
+ 4B699D2A097D421600A18468 /* JackPosixThread.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D40097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D50097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D51097D421600A18468 /* JackError.h in Headers */,
+ 4B699D52097D421600A18468 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D68097D421600A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D69097D421600A18468 /* JackError.h in Headers */,
+ 4B699D6A097D421600A18468 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D80097D421700A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D81097D421700A18468 /* JackError.h in Headers */,
+ 4B699D82097D421700A18468 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D98097D421700A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D99097D421700A18468 /* JackCoreAudioDriver.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699DA7097D421700A18468 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699DA8097D421700A18468 /* JackDummyDriver.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792A0637B848001E7115 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81106382F5800464BF4 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B96861F0771CA08002D75D5 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B978DB20A31CF4A009E2DD1 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B978DED0A31D099009E2DD1 /* JackPortAudioDriver.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577AF08BF8BAB00F82DE1 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A8620934967000A89560 /* JackError.h in Headers */,
+ 4B66A8640934967200A89560 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577DA08BF8E0600F82DE1 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A8660934968E00A89560 /* JackError.h in Headers */,
+ 4B66A8680934969100A89560 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13AB08C71A480079F7FF /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B66A86A0934969700A89560 /* JackError.h in Headers */,
+ 4B66A86C0934969E00A89560 /* JackConstants.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8007ACD3DE00ACB953 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BE6C6920A3E096F005A203A /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF2124608DADBB5008D17F1 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5925E08F13D81005B1F5F /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF5925F08F13D81005B1F5F /* JackMachPort.h in Headers */,
+ 4BF5926008F13D81005B1F5F /* JackError.h in Headers */,
+ 4BF5926108F13D81005B1F5F /* JackTime.h in Headers */,
+ 4BF5926208F13D81005B1F5F /* JackShmMem.h in Headers */,
+ 4BF5926308F13D81005B1F5F /* shm.h in Headers */,
+ 4BF5926408F13D81005B1F5F /* JackPosixThread.h in Headers */,
+ 4BF5926508F13D81005B1F5F /* JackThread.h in Headers */,
+ 4BF5926608F13D81005B1F5F /* JackActivationCount.h in Headers */,
+ 4BF5926708F13D81005B1F5F /* JackChannel.h in Headers */,
+ 4BF5926808F13D81005B1F5F /* JackGraphManager.h in Headers */,
+ 4BF5926908F13D81005B1F5F /* JackPort.h in Headers */,
+ 4BF5926A08F13D81005B1F5F /* JackClientInterface.h in Headers */,
+ 4BF5926B08F13D81005B1F5F /* JackClientControl.h in Headers */,
+ 4BF5926C08F13D81005B1F5F /* JackClient.h in Headers */,
+ 4BF5926D08F13D81005B1F5F /* JackInternalClient.h in Headers */,
+ 4BF5927008F13D81005B1F5F /* JackConnectionManager.h in Headers */,
+ 4BF5927108F13D81005B1F5F /* JackFrameTimer.h in Headers */,
+ 4BF5927208F13D81005B1F5F /* JackPosixSemaphore.h in Headers */,
+ 4BF5927308F13D81005B1F5F /* JackMachSemaphore.h in Headers */,
+ 4BF5927508F13D81005B1F5F /* JackGlobals.h in Headers */,
+ 4BF5927608F13D81005B1F5F /* JackMachThread.h in Headers */,
+ 4BF5927808F13D81005B1F5F /* JackSocket.h in Headers */,
+ 4BF5927A08F13D81005B1F5F /* JackSocketNotifyChannel.h in Headers */,
+ 4BF5927B08F13D81005B1F5F /* JackSocketServerChannel.h in Headers */,
+ 4BF5927C08F13D81005B1F5F /* JackFifo.h in Headers */,
+ 4BF5927E08F13D81005B1F5F /* ringbuffer.h in Headers */,
+ 4BF5927F08F13D81005B1F5F /* JackSynchro.h in Headers */,
+ 4BF592AF08F13E40005B1F5F /* JackAudioDriver.h in Headers */,
+ 4BF592B108F13E4C005B1F5F /* JackFreewheelDriver.h in Headers */,
+ 4BF592B308F13E4D005B1F5F /* JackThreadedDriver.h in Headers */,
+ 4BF592B508F13E5A005B1F5F /* JackDriver.h in Headers */,
+ 4BF592B608F13E5F005B1F5F /* driver_interface.h in Headers */,
+ 4BF592B708F13E5F005B1F5F /* driver_parse.h in Headers */,
+ 4BF592B908F13E61005B1F5F /* JackDriverLoader.h in Headers */,
+ 4BF592BA08F13E61005B1F5F /* jslist.h in Headers */,
+ 4BF592BC08F13E76005B1F5F /* JackEngine.h in Headers */,
+ 4BF592BE08F13E7A005B1F5F /* JackEngineTiming.h in Headers */,
+ 4BF592BF08F13E8B005B1F5F /* JackExternalClient.h in Headers */,
+ 4BAB18D208F13F5900F0CE8B /* JackServer.h in Headers */,
+ 4BAB18DE08F13F8400F0CE8B /* JackSocketServerNotifyChannel.h in Headers */,
+ 4BAB18E008F13FA300F0CE8B /* JackRequest.h in Headers */,
+ 4BAB18E408F13FD600F0CE8B /* JackMachNotifyChannel.h in Headers */,
+ 4BAB18E608F13FD700F0CE8B /* JackMachServerChannel.h in Headers */,
+ 4BAB18E808F13FD800F0CE8B /* JackMachServerNotifyChannel.h in Headers */,
+ 4BF70ACD0908EE95008B75AD /* JackLoopbackDriver.h in Headers */,
+ 4B66A85E0934964500A89560 /* JackConstants.h in Headers */,
+ 4BD4B4EB09BACF0600750C0F /* JackTransportEngine.h in Headers */,
+ 4BC2168F0A444BED00BDA09F /* JackServerGlobals.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 4B0C911D08DAF32100AE19BE /* jack_dummy */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699DA2097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_dummy" */;
+ buildPhases = (
+ 4B0C911E08DAF32100AE19BE /* Headers */,
+ 4B0C912008DAF32100AE19BE /* Sources */,
+ 4B0C912208DAF32100AE19BE /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = jack_dummy;
+ productName = jack_coreaudio;
+ productReference = 4B0C912308DAF32100AE19BE /* jack_dummy.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B2C28D008DACC6B00249230 /* jack_coreaudio */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D93097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_coreaudio" */;
+ buildPhases = (
+ 4B2C28CD08DACC6B00249230 /* Headers */,
+ 4B2C28CE08DACC6B00249230 /* Sources */,
+ 4B2C28CF08DACC6B00249230 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = jack_coreaudio;
+ productName = jack_coreaudio;
+ productReference = 4B2C28D108DACC6B00249230 /* jack_coreaudio.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B646BED0636CC42003B5396 /* Jackmp.framework */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699BFC097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackmp.framework" */;
+ buildPhases = (
+ 4B646BE80636CC42003B5396 /* Headers */,
+ 4B646BE90636CC42003B5396 /* Resources */,
+ 4B646BEA0636CC42003B5396 /* Sources */,
+ 4B646BEB0636CC42003B5396 /* Rez */,
+ 4B646BEC0636CC42003B5396 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Jackmp.framework;
+ productName = Jack;
+ productReference = 4B646BEE0636CC42003B5396 /* Jackmp.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 4B699BA7097D421600A18468 /* jackdmp framework Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699BAD097D421600A18468 /* Build configuration list for PBXNativeTarget "jackdmp framework Universal" */;
+ buildPhases = (
+ 4B699BA8097D421600A18468 /* Headers */,
+ 4B699BA9097D421600A18468 /* Sources */,
+ 4B699BAB097D421600A18468 /* Frameworks */,
+ 4B699BAC097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jackdmp framework Universal";
+ productInstallPath = /usr/local/bin;
+ productName = TestMacEngine;
+ productReference = 4B699BB1097D421600A18468 /* jackdmp */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699C00097D421600A18468 /* Jackmp.framework Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699C43097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackmp.framework Universal" */;
+ buildPhases = (
+ 4B699C01097D421600A18468 /* Headers */,
+ 4B699C23097D421600A18468 /* Resources */,
+ 4B699C24097D421600A18468 /* Sources */,
+ 4B699C41097D421600A18468 /* Rez */,
+ 4B699C42097D421600A18468 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "Jackmp.framework Universal";
+ productName = Jack;
+ productReference = 4B699C47097D421600A18468 /* Jackmp.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 4B699C4C097D421600A18468 /* Jackdmp.framework Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CA8097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackdmp.framework Universal" */;
+ buildPhases = (
+ 4B699C4D097D421600A18468 /* Headers */,
+ 4B699C7C097D421600A18468 /* Resources */,
+ 4B699C7D097D421600A18468 /* Sources */,
+ 4B699CA6097D421600A18468 /* Rez */,
+ 4B699CA7097D421600A18468 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "Jackdmp.framework Universal";
+ productName = Jack;
+ productReference = 4B699CAC097D421600A18468 /* Jackdmp.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 4B699CB1097D421600A18468 /* jack_metro Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CB7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_metro Universal" */;
+ buildPhases = (
+ 4B699CB2097D421600A18468 /* Headers */,
+ 4B699CB3097D421600A18468 /* Sources */,
+ 4B699CB5097D421600A18468 /* Frameworks */,
+ 4B699CB6097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_metro Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4B699CBB097D421600A18468 /* jack_metro */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699CC1097D421600A18468 /* jack_lsp Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CC7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_lsp Universal" */;
+ buildPhases = (
+ 4B699CC2097D421600A18468 /* Headers */,
+ 4B699CC3097D421600A18468 /* Sources */,
+ 4B699CC5097D421600A18468 /* Frameworks */,
+ 4B699CC6097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_lsp Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_lsp;
+ productReference = 4B699CCB097D421600A18468 /* jack_lsp */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699CD1097D421600A18468 /* jack_connect Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CD7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_connect Universal" */;
+ buildPhases = (
+ 4B699CD2097D421600A18468 /* Headers */,
+ 4B699CD3097D421600A18468 /* Sources */,
+ 4B699CD5097D421600A18468 /* Frameworks */,
+ 4B699CD6097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_connect Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_connect;
+ productReference = 4B699CDB097D421600A18468 /* jack_connect */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699CE1097D421600A18468 /* jack_disconnect Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CE7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_disconnect Universal" */;
+ buildPhases = (
+ 4B699CE2097D421600A18468 /* Headers */,
+ 4B699CE3097D421600A18468 /* Sources */,
+ 4B699CE5097D421600A18468 /* Frameworks */,
+ 4B699CE6097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_disconnect Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_disconnect;
+ productReference = 4B699CEB097D421600A18468 /* jack_disconnect */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699CF1097D421600A18468 /* jack_freewheel Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699CF9097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_freewheel Universal" */;
+ buildPhases = (
+ 4B699CF4097D421600A18468 /* Headers */,
+ 4B699CF5097D421600A18468 /* Sources */,
+ 4B699CF7097D421600A18468 /* Frameworks */,
+ 4B699CF8097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4B699DC0097D421700A18468 /* PBXTargetDependency */,
+ );
+ name = "jack_freewheel Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_freewheel;
+ productReference = 4B699CFD097D421600A18468 /* jack_freewheel */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D03097D421600A18468 /* jack_external_metro Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D09097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_external_metro Universal" */;
+ buildPhases = (
+ 4B699D04097D421600A18468 /* Headers */,
+ 4B699D05097D421600A18468 /* Sources */,
+ 4B699D07097D421600A18468 /* Frameworks */,
+ 4B699D08097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_external_metro Universal";
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4B699D0D097D421600A18468 /* jack_external_metro */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D13097D421600A18468 /* testAtomic Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D1D097D421600A18468 /* Build configuration list for PBXNativeTarget "testAtomic Universal" */;
+ buildPhases = (
+ 4B699D14097D421600A18468 /* Headers */,
+ 4B699D17097D421600A18468 /* Sources */,
+ 4B699D1B097D421600A18468 /* Frameworks */,
+ 4B699D1C097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "testAtomic Universal";
+ productInstallPath = /usr/local/bin;
+ productName = testAtomic;
+ productReference = 4B699D21097D421600A18468 /* testAtomic */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D27097D421600A18468 /* testSem Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D35097D421600A18468 /* Build configuration list for PBXNativeTarget "testSem Universal" */;
+ buildPhases = (
+ 4B699D28097D421600A18468 /* Headers */,
+ 4B699D2B097D421600A18468 /* Sources */,
+ 4B699D33097D421600A18468 /* Frameworks */,
+ 4B699D34097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "testSem Universal";
+ productInstallPath = /usr/local/bin;
+ productName = testSem;
+ productReference = 4B699D39097D421600A18468 /* testSem */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D3F097D421600A18468 /* zombie Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D45097D421600A18468 /* Build configuration list for PBXNativeTarget "zombie Universal" */;
+ buildPhases = (
+ 4B699D40097D421600A18468 /* Headers */,
+ 4B699D41097D421600A18468 /* Sources */,
+ 4B699D43097D421600A18468 /* Frameworks */,
+ 4B699D44097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "zombie Universal";
+ productInstallPath = /usr/local/bin;
+ productName = zombie;
+ productReference = 4B699D49097D421600A18468 /* zombie */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D4F097D421600A18468 /* synchroServer Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D5D097D421600A18468 /* Build configuration list for PBXNativeTarget "synchroServer Universal" */;
+ buildPhases = (
+ 4B699D50097D421600A18468 /* Headers */,
+ 4B699D53097D421600A18468 /* Sources */,
+ 4B699D5B097D421600A18468 /* Frameworks */,
+ 4B699D5C097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "synchroServer Universal";
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4B699D61097D421600A18468 /* synchroServer */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D67097D421600A18468 /* synchroClient Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D75097D421600A18468 /* Build configuration list for PBXNativeTarget "synchroClient Universal" */;
+ buildPhases = (
+ 4B699D68097D421600A18468 /* Headers */,
+ 4B699D6B097D421600A18468 /* Sources */,
+ 4B699D73097D421600A18468 /* Frameworks */,
+ 4B699D74097D421600A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "synchroClient Universal";
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4B699D79097D421600A18468 /* synchroClient */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D7F097D421700A18468 /* synchroServerClient Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D8D097D421700A18468 /* Build configuration list for PBXNativeTarget "synchroServerClient Universal" */;
+ buildPhases = (
+ 4B699D80097D421700A18468 /* Headers */,
+ 4B699D83097D421700A18468 /* Sources */,
+ 4B699D8B097D421700A18468 /* Frameworks */,
+ 4B699D8C097D421700A18468 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "synchroServerClient Universal";
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4B699D91097D421700A18468 /* synchroServerClient */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4B699D97097D421700A18468 /* jack_coreaudio Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699D9D097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_coreaudio Universal" */;
+ buildPhases = (
+ 4B699D98097D421700A18468 /* Headers */,
+ 4B699D9A097D421700A18468 /* Sources */,
+ 4B699D9C097D421700A18468 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_coreaudio Universal";
+ productName = jack_coreaudio;
+ productReference = 4B699DA1097D421700A18468 /* jack_coreaudio.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B699DA6097D421700A18468 /* jack_dummy Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699DAC097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_dummy Universal" */;
+ buildPhases = (
+ 4B699DA7097D421700A18468 /* Headers */,
+ 4B699DA9097D421700A18468 /* Sources */,
+ 4B699DAB097D421700A18468 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_dummy Universal";
+ productName = jack_coreaudio;
+ productReference = 4B699DB0097D421700A18468 /* jack_dummy.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4B978DB10A31CF4A009E2DD1 /* jack_portaudio Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B978DB70A31CF4A009E2DD1 /* Build configuration list for PBXNativeTarget "jack_portaudio Universal" */;
+ buildPhases = (
+ 4B978DB20A31CF4A009E2DD1 /* Headers */,
+ 4B978DB40A31CF4A009E2DD1 /* Sources */,
+ 4B978DB60A31CF4A009E2DD1 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_portaudio Universal";
+ productName = jack_coreaudio;
+ productReference = 4B978DBB0A31CF4A009E2DD1 /* jack_portaudio.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 4BE6C6910A3E096F005A203A /* jack_test Universal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4BE6C69F0A3E096F005A203A /* Build configuration list for PBXNativeTarget "jack_test Universal" */;
+ buildPhases = (
+ 4BE6C6920A3E096F005A203A /* Headers */,
+ 4BE6C6950A3E096F005A203A /* Sources */,
+ 4BE6C69D0A3E096F005A203A /* Frameworks */,
+ 4BE6C69E0A3E096F005A203A /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "jack_test Universal";
+ productInstallPath = /usr/local/bin;
+ productName = testSem;
+ productReference = 4BE6C6A30A3E096F005A203A /* jack_test */;
+ productType = "com.apple.product-type.tool";
+ };
+ 4BF5925D08F13D81005B1F5F /* Jackdmp.framework */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4B699C48097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackdmp.framework" */;
+ buildPhases = (
+ 4BF5925E08F13D81005B1F5F /* Headers */,
+ 4BF5928008F13D81005B1F5F /* Resources */,
+ 4BF5928208F13D81005B1F5F /* Sources */,
+ 4BF5929E08F13D81005B1F5F /* Rez */,
+ 4BF5929F08F13D81005B1F5F /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Jackdmp.framework;
+ productName = Jack;
+ productReference = 4BF592A008F13D81005B1F5F /* Jackdmp.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 4B699DD5097D427F00A18468 /* Build configuration list for PBXProject "Jackdmp" */;
+ hasScannedForEncodings = 1;
+ mainGroup = 08FB7794FE84155DC02AAC07 /* JackServer */;
+ projectDirPath = "";
+ targets = (
+ 4B699B26097D421600A18468 /* All Universal */,
+ 4B699BA7097D421600A18468 /* jackdmp framework Universal */,
+ 4B699C00097D421600A18468 /* Jackmp.framework Universal */,
+ 4B699C4C097D421600A18468 /* Jackdmp.framework Universal */,
+ 4B699CB1097D421600A18468 /* jack_metro Universal */,
+ 4B699CC1097D421600A18468 /* jack_lsp Universal */,
+ 4B699CD1097D421600A18468 /* jack_connect Universal */,
+ 4B699CE1097D421600A18468 /* jack_disconnect Universal */,
+ 4B699CF1097D421600A18468 /* jack_freewheel Universal */,
+ 4B699D03097D421600A18468 /* jack_external_metro Universal */,
+ 4B699D13097D421600A18468 /* testAtomic Universal */,
+ 4B699D27097D421600A18468 /* testSem Universal */,
+ 4B699D3F097D421600A18468 /* zombie Universal */,
+ 4BE6C6910A3E096F005A203A /* jack_test Universal */,
+ 4B699D4F097D421600A18468 /* synchroServer Universal */,
+ 4B699D67097D421600A18468 /* synchroClient Universal */,
+ 4B699D7F097D421700A18468 /* synchroServerClient Universal */,
+ 4B699D97097D421700A18468 /* jack_coreaudio Universal */,
+ 4B978DB10A31CF4A009E2DD1 /* jack_portaudio Universal */,
+ 4B699DA6097D421700A18468 /* jack_dummy Universal */,
+ 4BF2955B08BC475500F2602F /* All */,
+ 4BF2124508DADBB5008D17F1 /* jackdmp framework */,
+ 4B646BED0636CC42003B5396 /* Jackmp.framework */,
+ 4BF5925D08F13D81005B1F5F /* Jackdmp.framework */,
+ 4B646C310636CEE6003B5396 /* jack_metro */,
+ 4B7D792E0637B848001E7115 /* jack_lsp */,
+ 4B89C81506382F5800464BF4 /* jack_connect */,
+ 4B9686230771CA08002D75D5 /* jack_disconnect */,
+ 4B1CBE2607994C6F0096ABE0 /* jack_freewheel */,
+ 4BD81C7F07ACD3DE00ACB953 /* jack_external_metro */,
+ 4B420C8107733D7C00DDA57E /* testAtomic */,
+ 4B1CBD7B0799484F0096ABE0 /* testSem */,
+ 4B50A111080917BA003F4C95 /* zombie */,
+ 4BA577B308BF8BAB00F82DE1 /* synchroServer */,
+ 4BA577D908BF8E0600F82DE1 /* synchroClient */,
+ 4BBD13AA08C71A480079F7FF /* synchroServerClient */,
+ 4B2C28D008DACC6B00249230 /* jack_coreaudio */,
+ 4B0C911D08DAF32100AE19BE /* jack_dummy */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 4B646BE90636CC42003B5396 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C23097D421600A18468 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C7C097D421600A18468 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5928008F13D81005B1F5F /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+ 4B1CBD7A0799484F0096ABE0 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2507994C6F0096ABE0 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C8007733D7C00DDA57E /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A110080917BA003F4C95 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEB0636CC42003B5396 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C300636CEE6003B5396 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699BAC097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C41097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CA6097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CB6097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CC6097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CD6097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CE6097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CF8097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D08097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D1C097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D34097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D44097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D5C097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D74097D421600A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D8C097D421700A18468 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792D0637B848001E7115 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81406382F5800464BF4 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686220771CA08002D75D5 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B208BF8BAB00F82DE1 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577E408BF8E0600F82DE1 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13B508C71A480079F7FF /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8407ACD3DE00ACB953 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BE6C69E0A3E096F005A203A /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF212A708DADBB5008D17F1 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5929E08F13D81005B1F5F /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 4B0C912008DAF32100AE19BE /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B0C912608DAF34400AE19BE /* JackDummyDriver.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBD780799484F0096ABE0 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D2480834F20600C94B91 /* testSem.cpp in Sources */,
+ 4BF8D24B0834F21E00C94B91 /* JackPosixThread.cpp in Sources */,
+ 4BBD140A08C739A10079F7FF /* JackFifo.cpp in Sources */,
+ 4BBD140B08C739A60079F7FF /* JackPosixSemaphore.cpp in Sources */,
+ 4BBD140C08C739B00079F7FF /* JackMachSemaphore.cpp in Sources */,
+ 4BBD140D08C739B60079F7FF /* JackMachThread.cpp in Sources */,
+ 4B283863093607430079C47F /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B1CBE2307994C6F0096ABE0 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1720834EE0F00C94B91 /* freewheel.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B2C28CE08DACC6B00249230 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B2C28D208DACC9B00249230 /* JackCoreAudioDriver.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B420C7E07733D7C00DDA57E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D23F0834F1C300C94B91 /* testAtomic.cpp in Sources */,
+ 4BF8D2400834F1DC00C94B91 /* JackPosixThread.cpp in Sources */,
+ 4BFC8139090E1F56007BAE60 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B50A10E080917BA003F4C95 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1680834EDD900C94B91 /* zombie.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646BEA0636CC42003B5396 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B646C210636CDFF003B5396 /* JackMacLibClientRPC.cpp in Sources */,
+ 4B89B76A076B74D200D170DE /* JackRPCEngineUser.c in Sources */,
+ 4B799ADA07899652003F3F15 /* JackMachPort.cpp in Sources */,
+ 4BF8D18E0834EE7900C94B91 /* JackShmMem.cpp in Sources */,
+ 4BF8D1960834EE8400C94B91 /* shm.c in Sources */,
+ 4BF8D19E0834EE9700C94B91 /* JackPosixThread.cpp in Sources */,
+ 4BF8D1AE0834EEB400C94B91 /* JackActivationCount.cpp in Sources */,
+ 4BF8D1CE0834EF2200C94B91 /* JackGraphManager.cpp in Sources */,
+ 4BF8D1D60834EF2F00C94B91 /* JackPort.cpp in Sources */,
+ 4BF8D1E80834EF6700C94B91 /* JackClient.cpp in Sources */,
+ 4BF8D1EC0834EF7500C94B91 /* JackAPI.cpp in Sources */,
+ 4BF8D2050834EFD100C94B91 /* JackLibClient.cpp in Sources */,
+ 4BF8D2060834EFD100C94B91 /* JackLibAPI.cpp in Sources */,
+ 4BF8D2350834F14400C94B91 /* JackConnectionManager.cpp in Sources */,
+ 4BF8FB1308AC88EF00D1A344 /* JackFrameTimer.cpp in Sources */,
+ 4BEE0B3208ACBB9F00D22B43 /* JackPosixSemaphore.cpp in Sources */,
+ 4BF6C1DB08ACE64C001E2013 /* JackMachSemaphore.cpp in Sources */,
+ 4BFB742408AD2B9900DB99B8 /* JackMachThread.cpp in Sources */,
+ 4BB8789008AF4E5100AF4ABD /* JackMachClientChannel.cpp in Sources */,
+ 4B97441208AF54590094983C /* JackSocket.cpp in Sources */,
+ 4B97441908AF546F0094983C /* JackSocketClientChannel.cpp in Sources */,
+ 4BF773AD08B3414500149912 /* JackTime.c in Sources */,
+ 4B123D3508B3954300540632 /* JackGlobalsClient.cpp in Sources */,
+ 4B56881508B5C8620022B32D /* JackFifo.cpp in Sources */,
+ 4B2C28FC08DAD01E00249230 /* JackGlobals.cpp in Sources */,
+ 4B003A6308E2A87A0060EFDC /* JackError.c in Sources */,
+ 4B003AB408E2B2BA0060EFDC /* ringbuffer.c in Sources */,
+ 4B98AE040931D30C0091932A /* JackDebugClient.cpp in Sources */,
+ 4BD4B4E809BACF0000750C0F /* JackTransportEngine.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B646C2E0636CEE6003B5396 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D16C0834EDF000C94B91 /* metro.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699BA9097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699BAA097D421600A18468 /* Jackdmp.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C24097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699C25097D421600A18468 /* JackMacLibClientRPC.cpp in Sources */,
+ 4B699C26097D421600A18468 /* JackRPCEngineUser.c in Sources */,
+ 4B699C27097D421600A18468 /* JackMachPort.cpp in Sources */,
+ 4B699C28097D421600A18468 /* JackShmMem.cpp in Sources */,
+ 4B699C29097D421600A18468 /* shm.c in Sources */,
+ 4B699C2A097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699C2B097D421600A18468 /* JackActivationCount.cpp in Sources */,
+ 4B699C2C097D421600A18468 /* JackGraphManager.cpp in Sources */,
+ 4B699C2D097D421600A18468 /* JackPort.cpp in Sources */,
+ 4B699C2E097D421600A18468 /* JackClient.cpp in Sources */,
+ 4B699C2F097D421600A18468 /* JackAPI.cpp in Sources */,
+ 4B699C30097D421600A18468 /* JackLibClient.cpp in Sources */,
+ 4B699C31097D421600A18468 /* JackLibAPI.cpp in Sources */,
+ 4B699C32097D421600A18468 /* JackConnectionManager.cpp in Sources */,
+ 4B699C33097D421600A18468 /* JackFrameTimer.cpp in Sources */,
+ 4B699C34097D421600A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699C35097D421600A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699C36097D421600A18468 /* JackMachThread.cpp in Sources */,
+ 4B699C37097D421600A18468 /* JackMachClientChannel.cpp in Sources */,
+ 4B699C38097D421600A18468 /* JackSocket.cpp in Sources */,
+ 4B699C39097D421600A18468 /* JackSocketClientChannel.cpp in Sources */,
+ 4B699C3A097D421600A18468 /* JackTime.c in Sources */,
+ 4B699C3B097D421600A18468 /* JackGlobalsClient.cpp in Sources */,
+ 4B699C3C097D421600A18468 /* JackFifo.cpp in Sources */,
+ 4B699C3D097D421600A18468 /* JackGlobals.cpp in Sources */,
+ 4B699C3E097D421600A18468 /* JackError.c in Sources */,
+ 4B699C3F097D421600A18468 /* ringbuffer.c in Sources */,
+ 4B699C40097D421600A18468 /* JackDebugClient.cpp in Sources */,
+ 4BD4B4E409BACEF300750C0F /* JackTransportEngine.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699C7D097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699C7E097D421600A18468 /* JackMachPort.cpp in Sources */,
+ 4B699C7F097D421600A18468 /* JackShmMem.cpp in Sources */,
+ 4B699C80097D421600A18468 /* shm.c in Sources */,
+ 4B699C81097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699C82097D421600A18468 /* JackActivationCount.cpp in Sources */,
+ 4B699C83097D421600A18468 /* JackGraphManager.cpp in Sources */,
+ 4B699C84097D421600A18468 /* JackPort.cpp in Sources */,
+ 4B699C85097D421600A18468 /* JackClient.cpp in Sources */,
+ 4B699C86097D421600A18468 /* JackAPI.cpp in Sources */,
+ 4B699C87097D421600A18468 /* JackConnectionManager.cpp in Sources */,
+ 4B699C88097D421600A18468 /* JackFrameTimer.cpp in Sources */,
+ 4B699C89097D421600A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699C8A097D421600A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699C8B097D421600A18468 /* JackMachThread.cpp in Sources */,
+ 4B699C8C097D421600A18468 /* JackSocket.cpp in Sources */,
+ 4B699C8D097D421600A18468 /* JackTime.c in Sources */,
+ 4B699C8E097D421600A18468 /* JackFifo.cpp in Sources */,
+ 4B699C8F097D421600A18468 /* JackGlobals.cpp in Sources */,
+ 4B699C90097D421600A18468 /* JackError.c in Sources */,
+ 4B699C91097D421600A18468 /* ringbuffer.c in Sources */,
+ 4B699C92097D421600A18468 /* JackAudioDriver.cpp in Sources */,
+ 4B699C93097D421600A18468 /* JackFreewheelDriver.cpp in Sources */,
+ 4B699C94097D421600A18468 /* JackThreadedDriver.cpp in Sources */,
+ 4B699C95097D421600A18468 /* JackDriver.cpp in Sources */,
+ 4B699C96097D421600A18468 /* JackDriverLoader.cpp in Sources */,
+ 4B699C97097D421600A18468 /* JackEngine.cpp in Sources */,
+ 4B699C98097D421600A18468 /* JackEngineTiming.cpp in Sources */,
+ 4B699C99097D421600A18468 /* JackExternalClient.cpp in Sources */,
+ 4B699C9A097D421600A18468 /* JackInternalClient.cpp in Sources */,
+ 4B699C9B097D421600A18468 /* JackRPCClientUser.c in Sources */,
+ 4B699C9C097D421600A18468 /* JackGlobalsServer.cpp in Sources */,
+ 4B699C9D097D421600A18468 /* JackServer.cpp in Sources */,
+ 4B699C9E097D421600A18468 /* JackSocketServerChannel.cpp in Sources */,
+ 4B699C9F097D421600A18468 /* JackSocketServerNotifyChannel.cpp in Sources */,
+ 4B699CA0097D421600A18468 /* JackSocketNotifyChannel.cpp in Sources */,
+ 4B699CA1097D421600A18468 /* JackMacEngineRPC.cpp in Sources */,
+ 4B699CA2097D421600A18468 /* JackMachNotifyChannel.cpp in Sources */,
+ 4B699CA3097D421600A18468 /* JackMachServerChannel.cpp in Sources */,
+ 4B699CA4097D421600A18468 /* JackMachServerNotifyChannel.cpp in Sources */,
+ 4B699CA5097D421600A18468 /* JackLoopbackDriver.cpp in Sources */,
+ 4BD4B4D909BACD9600750C0F /* JackTransportEngine.cpp in Sources */,
+ 4BC216850A444BAD00BDA09F /* JackServerAPI.cpp in Sources */,
+ 4BC216890A444BDE00BDA09F /* JackServerGlobals.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CB3097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699CB4097D421600A18468 /* metro.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CC3097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699CC4097D421600A18468 /* lsp.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CD3097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B60CE490AAABA31004956AA /* connect.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CE3097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B60CE4A0AAABA31004956AA /* connect.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699CF5097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699CF6097D421600A18468 /* freewheel.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D05097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D06097D421600A18468 /* external_metro.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D17097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D18097D421600A18468 /* testAtomic.cpp in Sources */,
+ 4B699D19097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699D1A097D421600A18468 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D2B097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D2C097D421600A18468 /* testSem.cpp in Sources */,
+ 4B699D2D097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699D2E097D421600A18468 /* JackFifo.cpp in Sources */,
+ 4B699D2F097D421600A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699D30097D421600A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699D31097D421600A18468 /* JackMachThread.cpp in Sources */,
+ 4B699D32097D421600A18468 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D41097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D42097D421600A18468 /* zombie.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D53097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D54097D421600A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699D55097D421600A18468 /* JackFifo.cpp in Sources */,
+ 4B699D56097D421600A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699D57097D421600A18468 /* JackMachThread.cpp in Sources */,
+ 4B699D58097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699D59097D421600A18468 /* testSynchroServer.cpp in Sources */,
+ 4B699D5A097D421600A18468 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D6B097D421600A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D6C097D421600A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699D6D097D421600A18468 /* JackFifo.cpp in Sources */,
+ 4B699D6E097D421600A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699D6F097D421600A18468 /* JackMachThread.cpp in Sources */,
+ 4B699D70097D421600A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699D71097D421600A18468 /* testSynchroClient.cpp in Sources */,
+ 4B699D72097D421600A18468 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D83097D421700A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D84097D421700A18468 /* JackMachSemaphore.cpp in Sources */,
+ 4B699D85097D421700A18468 /* JackFifo.cpp in Sources */,
+ 4B699D86097D421700A18468 /* JackPosixSemaphore.cpp in Sources */,
+ 4B699D87097D421700A18468 /* JackMachThread.cpp in Sources */,
+ 4B699D88097D421700A18468 /* JackPosixThread.cpp in Sources */,
+ 4B699D89097D421700A18468 /* testSynchroServerClient.cpp in Sources */,
+ 4B699D8A097D421700A18468 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699D9A097D421700A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699D9B097D421700A18468 /* JackCoreAudioDriver.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B699DA9097D421700A18468 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B699DAA097D421700A18468 /* JackDummyDriver.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B7D792B0637B848001E7115 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D16A0834EDE600C94B91 /* lsp.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B89C81206382F5800464BF4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B60CE4B0AAABA31004956AA /* connect.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B9686200771CA08002D75D5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B60CE4C0AAABA31004956AA /* connect.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4B978DB40A31CF4A009E2DD1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4B978DEE0A31D099009E2DD1 /* JackPortAudioDriver.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577B008BF8BAB00F82DE1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BA577BE08BF8BFB00F82DE1 /* JackMachSemaphore.cpp in Sources */,
+ 4BA577BF08BF8BFD00F82DE1 /* JackFifo.cpp in Sources */,
+ 4BA577C008BF8C0000F82DE1 /* JackPosixSemaphore.cpp in Sources */,
+ 4BA577C108BF8C0500F82DE1 /* JackMachThread.cpp in Sources */,
+ 4BA577C208BF8C0700F82DE1 /* JackPosixThread.cpp in Sources */,
+ 4BA577FC08BF8E4600F82DE1 /* testSynchroServer.cpp in Sources */,
+ 4B66A8610934966F00A89560 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BA577DB08BF8E0600F82DE1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BA577DD08BF8E0600F82DE1 /* JackMachSemaphore.cpp in Sources */,
+ 4BA577DE08BF8E0600F82DE1 /* JackFifo.cpp in Sources */,
+ 4BA577DF08BF8E0600F82DE1 /* JackPosixSemaphore.cpp in Sources */,
+ 4BA577E008BF8E0600F82DE1 /* JackMachThread.cpp in Sources */,
+ 4BA577E108BF8E0600F82DE1 /* JackPosixThread.cpp in Sources */,
+ 4BA577FD08BF8E6100F82DE1 /* testSynchroClient.cpp in Sources */,
+ 4B66A8650934968E00A89560 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BBD13AC08C71A480079F7FF /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BBD13AD08C71A480079F7FF /* JackMachSemaphore.cpp in Sources */,
+ 4BBD13AE08C71A480079F7FF /* JackFifo.cpp in Sources */,
+ 4BBD13AF08C71A480079F7FF /* JackPosixSemaphore.cpp in Sources */,
+ 4BBD13B008C71A480079F7FF /* JackMachThread.cpp in Sources */,
+ 4BBD13B108C71A480079F7FF /* JackPosixThread.cpp in Sources */,
+ 4BBD13CD08C71EB40079F7FF /* testSynchroServerClient.cpp in Sources */,
+ 4B66A8690934969700A89560 /* JackError.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BD81C8107ACD3DE00ACB953 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF8D1760834EE3600C94B91 /* external_metro.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BE6C6950A3E096F005A203A /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BE6C6AD0A3E0A65005A203A /* jack_test.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF2127C08DADBB5008D17F1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF2129408DADBB5008D17F1 /* Jackdmp.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 4BF5928208F13D81005B1F5F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4BF5928508F13D81005B1F5F /* JackMachPort.cpp in Sources */,
+ 4BF5928608F13D81005B1F5F /* JackShmMem.cpp in Sources */,
+ 4BF5928708F13D81005B1F5F /* shm.c in Sources */,
+ 4BF5928808F13D81005B1F5F /* JackPosixThread.cpp in Sources */,
+ 4BF5928908F13D81005B1F5F /* JackActivationCount.cpp in Sources */,
+ 4BF5928A08F13D81005B1F5F /* JackGraphManager.cpp in Sources */,
+ 4BF5928B08F13D81005B1F5F /* JackPort.cpp in Sources */,
+ 4BF5928C08F13D81005B1F5F /* JackClient.cpp in Sources */,
+ 4BF5928D08F13D81005B1F5F /* JackAPI.cpp in Sources */,
+ 4BF5929008F13D81005B1F5F /* JackConnectionManager.cpp in Sources */,
+ 4BF5929108F13D81005B1F5F /* JackFrameTimer.cpp in Sources */,
+ 4BF5929208F13D81005B1F5F /* JackPosixSemaphore.cpp in Sources */,
+ 4BF5929308F13D81005B1F5F /* JackMachSemaphore.cpp in Sources */,
+ 4BF5929408F13D81005B1F5F /* JackMachThread.cpp in Sources */,
+ 4BF5929608F13D81005B1F5F /* JackSocket.cpp in Sources */,
+ 4BF5929808F13D81005B1F5F /* JackTime.c in Sources */,
+ 4BF5929A08F13D81005B1F5F /* JackFifo.cpp in Sources */,
+ 4BF5929B08F13D81005B1F5F /* JackGlobals.cpp in Sources */,
+ 4BF5929C08F13D81005B1F5F /* JackError.c in Sources */,
+ 4BF5929D08F13D81005B1F5F /* ringbuffer.c in Sources */,
+ 4BF592AE08F13E40005B1F5F /* JackAudioDriver.cpp in Sources */,
+ 4BF592B008F13E4B005B1F5F /* JackFreewheelDriver.cpp in Sources */,
+ 4BF592B208F13E4C005B1F5F /* JackThreadedDriver.cpp in Sources */,
+ 4BF592B408F13E5A005B1F5F /* JackDriver.cpp in Sources */,
+ 4BF592B808F13E60005B1F5F /* JackDriverLoader.cpp in Sources */,
+ 4BF592BB08F13E76005B1F5F /* JackEngine.cpp in Sources */,
+ 4BF592BD08F13E7A005B1F5F /* JackEngineTiming.cpp in Sources */,
+ 4BF592C008F13E8C005B1F5F /* JackExternalClient.cpp in Sources */,
+ 4BAB18CA08F13ECF00F0CE8B /* JackInternalClient.cpp in Sources */,
+ 4BAB18CF08F13EFF00F0CE8B /* JackRPCClientUser.c in Sources */,
+ 4BAB18D008F13F5500F0CE8B /* JackGlobalsServer.cpp in Sources */,
+ 4BAB18D108F13F5800F0CE8B /* JackServer.cpp in Sources */,
+ 4BAB18D608F13F7A00F0CE8B /* JackSocketServerChannel.cpp in Sources */,
+ 4BAB18DD08F13F8300F0CE8B /* JackSocketServerNotifyChannel.cpp in Sources */,
+ 4BAB18DF08F13F8900F0CE8B /* JackSocketNotifyChannel.cpp in Sources */,
+ 4BAB18E208F13FBC00F0CE8B /* JackMacEngineRPC.cpp in Sources */,
+ 4BAB18E308F13FD600F0CE8B /* JackMachNotifyChannel.cpp in Sources */,
+ 4BAB18E508F13FD700F0CE8B /* JackMachServerChannel.cpp in Sources */,
+ 4BAB18E708F13FD700F0CE8B /* JackMachServerNotifyChannel.cpp in Sources */,
+ 4BF70ACC0908EE95008B75AD /* JackLoopbackDriver.cpp in Sources */,
+ 4BD4B4EA09BACF0600750C0F /* JackTransportEngine.cpp in Sources */,
+ 4BC2168A0A444BDE00BDA09F /* JackServerGlobals.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 4B0C912908DAF35900AE19BE /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B0C911D08DAF32100AE19BE /* jack_dummy */;
+ targetProxy = 4B0C912808DAF35900AE19BE /* PBXContainerItemProxy */;
+ };
+ 4B699DB4097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699C4C097D421600A18468 /* Jackdmp.framework Universal */;
+ targetProxy = 4B699DB3097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B699DB6097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699C00097D421600A18468 /* Jackmp.framework Universal */;
+ targetProxy = 4B699DB5097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B699DB8097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699BA7097D421600A18468 /* jackdmp framework Universal */;
+ targetProxy = 4B699DB7097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B699DBA097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699D97097D421700A18468 /* jack_coreaudio Universal */;
+ targetProxy = 4B699DB9097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B699DBC097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699DA6097D421700A18468 /* jack_dummy Universal */;
+ targetProxy = 4B699DBB097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B699DC0097D421700A18468 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B699D03097D421600A18468 /* jack_external_metro Universal */;
+ targetProxy = 4B699DBF097D421700A18468 /* PBXContainerItemProxy */;
+ };
+ 4B978E800A31D8B7009E2DD1 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B978DB10A31CF4A009E2DD1 /* jack_portaudio Universal */;
+ targetProxy = 4B978E7F0A31D8B7009E2DD1 /* PBXContainerItemProxy */;
+ };
+ 4BA88D9508BE632C000095BE /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4BD81C7F07ACD3DE00ACB953 /* jack_external_metro */;
+ targetProxy = 4BA88D9408BE632C000095BE /* PBXContainerItemProxy */;
+ };
+ 4BB47F890904138400890555 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4BF5925D08F13D81005B1F5F /* Jackdmp.framework */;
+ targetProxy = 4BB47F880904138400890555 /* PBXContainerItemProxy */;
+ };
+ 4BF212AF08DADC73008D17F1 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4BF2124508DADBB5008D17F1 /* jackdmp framework */;
+ targetProxy = 4BF212AE08DADC73008D17F1 /* PBXContainerItemProxy */;
+ };
+ 4BF2956108BC475E00F2602F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B646BED0636CC42003B5396 /* Jackmp.framework */;
+ targetProxy = 4BF2956008BC475E00F2602F /* PBXContainerItemProxy */;
+ };
+ 4BFD0E2208DADFB000D838B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4B2C28D008DACC6B00249230 /* jack_coreaudio */;
+ targetProxy = 4BFD0E2108DADFB000D838B8 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXToolTarget section */
+ 4B1CBD7B0799484F0096ABE0 /* testSem */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D23097D421600A18468 /* Build configuration list for PBXToolTarget "testSem" */;
+ buildPhases = (
+ 4B1CBD770799484F0096ABE0 /* Headers */,
+ 4B1CBD780799484F0096ABE0 /* Sources */,
+ 4B1CBD790799484F0096ABE0 /* Frameworks */,
+ 4B1CBD7A0799484F0096ABE0 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = testSem;
+ productInstallPath = /usr/local/bin;
+ productName = testSem;
+ productReference = 4B1CBD7C0799484F0096ABE0 /* testSem */;
+ };
+ 4B1CBE2607994C6F0096ABE0 /* jack_freewheel */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CED097D421600A18468 /* Build configuration list for PBXToolTarget "jack_freewheel" */;
+ buildPhases = (
+ 4B1CBE2207994C6F0096ABE0 /* Headers */,
+ 4B1CBE2307994C6F0096ABE0 /* Sources */,
+ 4B1CBE2407994C6F0096ABE0 /* Frameworks */,
+ 4B1CBE2507994C6F0096ABE0 /* Rez */,
+ );
+ dependencies = (
+ 4BA88D9508BE632C000095BE /* PBXTargetDependency */,
+ );
+ name = jack_freewheel;
+ productInstallPath = /usr/local/bin;
+ productName = jack_freewheel;
+ productReference = 4B1CBE2707994C6F0096ABE0 /* jack_freewheel */;
+ };
+ 4B420C8107733D7C00DDA57E /* testAtomic */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D0F097D421600A18468 /* Build configuration list for PBXToolTarget "testAtomic" */;
+ buildPhases = (
+ 4B420C7D07733D7C00DDA57E /* Headers */,
+ 4B420C7E07733D7C00DDA57E /* Sources */,
+ 4B420C7F07733D7C00DDA57E /* Frameworks */,
+ 4B420C8007733D7C00DDA57E /* Rez */,
+ );
+ dependencies = (
+ );
+ name = testAtomic;
+ productInstallPath = /usr/local/bin;
+ productName = testAtomic;
+ productReference = 4B420C8207733D7C00DDA57E /* testAtomic */;
+ };
+ 4B50A111080917BA003F4C95 /* zombie */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D3B097D421600A18468 /* Build configuration list for PBXToolTarget "zombie" */;
+ buildPhases = (
+ 4B50A10D080917BA003F4C95 /* Headers */,
+ 4B50A10E080917BA003F4C95 /* Sources */,
+ 4B50A10F080917BA003F4C95 /* Frameworks */,
+ 4B50A110080917BA003F4C95 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = zombie;
+ productInstallPath = /usr/local/bin;
+ productName = zombie;
+ productReference = 4B50A112080917BA003F4C95 /* zombie */;
+ };
+ 4B646C310636CEE6003B5396 /* jack_metro */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CAD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_metro" */;
+ buildPhases = (
+ 4B646C2D0636CEE6003B5396 /* Headers */,
+ 4B646C2E0636CEE6003B5396 /* Sources */,
+ 4B646C2F0636CEE6003B5396 /* Frameworks */,
+ 4B646C300636CEE6003B5396 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = jack_metro;
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4B646C320636CEE6003B5396 /* jack_metro */;
+ };
+ 4B7D792E0637B848001E7115 /* jack_lsp */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CBD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_lsp" */;
+ buildPhases = (
+ 4B7D792A0637B848001E7115 /* Headers */,
+ 4B7D792B0637B848001E7115 /* Sources */,
+ 4B7D792C0637B848001E7115 /* Frameworks */,
+ 4B7D792D0637B848001E7115 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = jack_lsp;
+ productInstallPath = /usr/local/bin;
+ productName = jack_lsp;
+ productReference = 4B7D792F0637B848001E7115 /* jack_lsp */;
+ };
+ 4B89C81506382F5800464BF4 /* jack_connect */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CCD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_connect" */;
+ buildPhases = (
+ 4B89C81106382F5800464BF4 /* Headers */,
+ 4B89C81206382F5800464BF4 /* Sources */,
+ 4B89C81306382F5800464BF4 /* Frameworks */,
+ 4B89C81406382F5800464BF4 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = jack_connect;
+ productInstallPath = /usr/local/bin;
+ productName = jack_connect;
+ productReference = 4B89C81606382F5800464BF4 /* jack_connect */;
+ };
+ 4B9686230771CA08002D75D5 /* jack_disconnect */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CDD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_disconnect" */;
+ buildPhases = (
+ 4B96861F0771CA08002D75D5 /* Headers */,
+ 4B9686200771CA08002D75D5 /* Sources */,
+ 4B9686210771CA08002D75D5 /* Frameworks */,
+ 4B9686220771CA08002D75D5 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = jack_disconnect;
+ productInstallPath = /usr/local/bin;
+ productName = jack_disconnect;
+ productReference = 4B9686240771CA08002D75D5 /* jack_disconnect */;
+ };
+ 4BA577B308BF8BAB00F82DE1 /* synchroServer */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D4B097D421600A18468 /* Build configuration list for PBXToolTarget "synchroServer" */;
+ buildPhases = (
+ 4BA577AF08BF8BAB00F82DE1 /* Headers */,
+ 4BA577B008BF8BAB00F82DE1 /* Sources */,
+ 4BA577B108BF8BAB00F82DE1 /* Frameworks */,
+ 4BA577B208BF8BAB00F82DE1 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = synchroServer;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BA577B408BF8BAB00F82DE1 /* synchroServer */;
+ };
+ 4BA577D908BF8E0600F82DE1 /* synchroClient */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D63097D421600A18468 /* Build configuration list for PBXToolTarget "synchroClient" */;
+ buildPhases = (
+ 4BA577DA08BF8E0600F82DE1 /* Headers */,
+ 4BA577DB08BF8E0600F82DE1 /* Sources */,
+ 4BA577E308BF8E0600F82DE1 /* Frameworks */,
+ 4BA577E408BF8E0600F82DE1 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = synchroClient;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BA577E508BF8E0600F82DE1 /* synchroClient */;
+ };
+ 4BBD13AA08C71A480079F7FF /* synchroServerClient */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699D7B097D421600A18468 /* Build configuration list for PBXToolTarget "synchroServerClient" */;
+ buildPhases = (
+ 4BBD13AB08C71A480079F7FF /* Headers */,
+ 4BBD13AC08C71A480079F7FF /* Sources */,
+ 4BBD13B408C71A480079F7FF /* Frameworks */,
+ 4BBD13B508C71A480079F7FF /* Rez */,
+ );
+ dependencies = (
+ );
+ name = synchroServerClient;
+ productInstallPath = /usr/local/bin;
+ productName = synchroServer;
+ productReference = 4BBD13B608C71A480079F7FF /* synchroServerClient */;
+ };
+ 4BD81C7F07ACD3DE00ACB953 /* jack_external_metro */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699CFF097D421600A18468 /* Build configuration list for PBXToolTarget "jack_external_metro" */;
+ buildPhases = (
+ 4BD81C8007ACD3DE00ACB953 /* Headers */,
+ 4BD81C8107ACD3DE00ACB953 /* Sources */,
+ 4BD81C8307ACD3DE00ACB953 /* Frameworks */,
+ 4BD81C8407ACD3DE00ACB953 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = jack_external_metro;
+ productInstallPath = /usr/local/bin;
+ productName = jack_metro;
+ productReference = 4BD81C8507ACD3DE00ACB953 /* jack_external_metro */;
+ };
+ 4BF2124508DADBB5008D17F1 /* jackdmp framework */ = {
+ isa = PBXToolTarget;
+ buildConfigurationList = 4B699BA3097D421600A18468 /* Build configuration list for PBXToolTarget "jackdmp framework" */;
+ buildPhases = (
+ 4BF2124608DADBB5008D17F1 /* Headers */,
+ 4BF2127C08DADBB5008D17F1 /* Sources */,
+ 4BF212A608DADBB5008D17F1 /* Frameworks */,
+ 4BF212A708DADBB5008D17F1 /* Rez */,
+ );
+ dependencies = (
+ );
+ name = "jackdmp framework";
+ productInstallPath = /usr/local/bin;
+ productName = TestMacEngine;
+ productReference = 4BF212A808DADBB5008D17F1 /* jackdmp */;
+ };
+/* End PBXToolTarget section */
+
+/* Begin XCBuildConfiguration section */
+ 4B699B23097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699B24097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699B25097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699B34097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699B35097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699B36097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699BA4097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699BA5097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUGGING_SYMBOLS = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699BA6097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUGGING_SYMBOLS = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699BAE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699BAF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699BB0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = (
+ ../common,
+ RPC,
+ );
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jackdmp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699BFD097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699BFE097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699BFF097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ name = Default;
+ };
+ 4B699C44097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699C45097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699C46097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ name = Default;
+ };
+ 4B699C49097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699C4A097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699C4B097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ name = Default;
+ };
+ 4B699CA9097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CAA097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CAB097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = NO;
+ GENERATE_PKGINFO_FILE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ INFOPLIST_FILE = "Jack-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LIBRARY_SEARCH_PATHS = /usr/lib/gcc/darwin/3.3;
+ OTHER_CFLAGS = "-DUSE_POSIX_SHM";
+ OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Carbon,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = Jackdmp;
+ REZ_EXECUTABLE = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost";
+ };
+ name = Default;
+ };
+ 4B699CAE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CAF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CB0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CB8097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = ppc;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CB9097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = ppc;
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CBA097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = ppc;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CBE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CBF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CC0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CC8097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CC9097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CCA097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_lsp;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CCE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CCF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CD0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CD8097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ SYMROOT = build;
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CD9097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ SYMROOT = build;
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CDA097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_connect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ SYMROOT = build;
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CDE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CDF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CE0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CE8097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CE9097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CEA097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_disconnect;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CEE097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CEF097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CF0097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699CFA097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699CFB097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699CFC097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_freewheel;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D00097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D01097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D02097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D0A097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D0B097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D0C097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ FRAMEWORK_SEARCH_PATHS = /Volumes/Document1/Developpement/ProjectsCVS/JackCVS/JackServerCPP/build;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ "-framework",
+ CoreFoundation,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_external_metro;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D10097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ HEADER_SEARCH_PATHS = RPC;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D11097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ HEADER_SEARCH_PATHS = RPC;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D12097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ HEADER_SEARCH_PATHS = RPC;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRECOMPILE_PREFIX_HEADER = YES;
+ PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D1E097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ HEADER_SEARCH_PATHS = RPC;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D1F097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ HEADER_SEARCH_PATHS = RPC;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D20097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ HEADER_SEARCH_PATHS = RPC;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testAtomic;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D24097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D25097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D26097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OPTIMIZATION_CFLAGS = "-O3";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D36097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D37097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D38097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_OPTIMIZATION_LEVEL = 3;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = testSem;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D3C097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D3D097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D3E097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D46097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D47097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D48097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = zombie;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D4C097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D4D097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D4E097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D5E097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D5F097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D60097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServer;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D64097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D65097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D66097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D76097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D77097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D78097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D7C097D421600A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D7D097D421600A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D7E097D421600A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D8E097D421700A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D8F097D421700A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D90097D421700A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = synchroServerClient;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D94097D421700A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D95097D421700A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699D96097D421700A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699D9E097D421700A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G4;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699D9F097D421700A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699DA0097D421700A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_coreaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699DA3097D421700A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699DA4097D421700A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699DA5097D421700A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699DAD097D421700A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G4;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B699DAE097D421700A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B699DAF097D421700A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ CoreServices,
+ "-framework",
+ AudioUnit,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_dummy;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4B699DD6097D427F00A18468 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Development;
+ };
+ 4B699DD7097D427F00A18468 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Deployment;
+ };
+ 4B699DD8097D427F00A18468 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Default;
+ };
+ 4B978DB80A31CF4A009E2DD1 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ DEBUGGING_SYMBOLS = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G4;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = ../common/;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OPTIMIZATION_CFLAGS = "-O0";
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ ../windows/libportaudio.a,
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ AudioUnit,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_portaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4B978DB90A31CF4A009E2DD1 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = ../common/;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ ../windows/libportaudio.a,
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ AudioUnit,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_portaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4B978DBA0A31CF4A009E2DD1 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ EXECUTABLE_EXTENSION = so;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ HEADER_SEARCH_PATHS = ../common/;
+ INSTALL_PATH = /usr/local/lib;
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_CFLAGS = "";
+ OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+ OTHER_LDFLAGS = (
+ ../windows/libportaudio.a,
+ "-framework",
+ Jackdmp,
+ "-framework",
+ AudioToolBox,
+ "-framework",
+ CoreAudio,
+ "-framework",
+ AudioUnit,
+ "-framework",
+ CoreServices,
+ );
+ OTHER_REZFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = jack_portaudio;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+ 4BE6C6A00A3E096F005A203A /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_test;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 4BE6C6A10A3E096F005A203A /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_test;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4BE6C6A20A3E096F005A203A /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_OPTIMIZATION_LEVEL = 3;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Jackmp,
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = jack_test;
+ REZ_EXECUTABLE = YES;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Default;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4B699B22097D421600A18468 /* Build configuration list for PBXAggregateTarget "All" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699B23097D421600A18468 /* Development */,
+ 4B699B24097D421600A18468 /* Deployment */,
+ 4B699B25097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699B33097D421600A18468 /* Build configuration list for PBXAggregateTarget "All Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699B34097D421600A18468 /* Development */,
+ 4B699B35097D421600A18468 /* Deployment */,
+ 4B699B36097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699BA3097D421600A18468 /* Build configuration list for PBXToolTarget "jackdmp framework" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699BA4097D421600A18468 /* Development */,
+ 4B699BA5097D421600A18468 /* Deployment */,
+ 4B699BA6097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699BAD097D421600A18468 /* Build configuration list for PBXNativeTarget "jackdmp framework Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699BAE097D421600A18468 /* Development */,
+ 4B699BAF097D421600A18468 /* Deployment */,
+ 4B699BB0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699BFC097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackmp.framework" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699BFD097D421600A18468 /* Development */,
+ 4B699BFE097D421600A18468 /* Deployment */,
+ 4B699BFF097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699C43097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackmp.framework Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699C44097D421600A18468 /* Development */,
+ 4B699C45097D421600A18468 /* Deployment */,
+ 4B699C46097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699C48097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackdmp.framework" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699C49097D421600A18468 /* Development */,
+ 4B699C4A097D421600A18468 /* Deployment */,
+ 4B699C4B097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CA8097D421600A18468 /* Build configuration list for PBXNativeTarget "Jackdmp.framework Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CA9097D421600A18468 /* Development */,
+ 4B699CAA097D421600A18468 /* Deployment */,
+ 4B699CAB097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CAD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_metro" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CAE097D421600A18468 /* Development */,
+ 4B699CAF097D421600A18468 /* Deployment */,
+ 4B699CB0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CB7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_metro Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CB8097D421600A18468 /* Development */,
+ 4B699CB9097D421600A18468 /* Deployment */,
+ 4B699CBA097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CBD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_lsp" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CBE097D421600A18468 /* Development */,
+ 4B699CBF097D421600A18468 /* Deployment */,
+ 4B699CC0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CC7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_lsp Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CC8097D421600A18468 /* Development */,
+ 4B699CC9097D421600A18468 /* Deployment */,
+ 4B699CCA097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CCD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_connect" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CCE097D421600A18468 /* Development */,
+ 4B699CCF097D421600A18468 /* Deployment */,
+ 4B699CD0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CD7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_connect Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CD8097D421600A18468 /* Development */,
+ 4B699CD9097D421600A18468 /* Deployment */,
+ 4B699CDA097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CDD097D421600A18468 /* Build configuration list for PBXToolTarget "jack_disconnect" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CDE097D421600A18468 /* Development */,
+ 4B699CDF097D421600A18468 /* Deployment */,
+ 4B699CE0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CE7097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_disconnect Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CE8097D421600A18468 /* Development */,
+ 4B699CE9097D421600A18468 /* Deployment */,
+ 4B699CEA097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CED097D421600A18468 /* Build configuration list for PBXToolTarget "jack_freewheel" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CEE097D421600A18468 /* Development */,
+ 4B699CEF097D421600A18468 /* Deployment */,
+ 4B699CF0097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CF9097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_freewheel Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699CFA097D421600A18468 /* Development */,
+ 4B699CFB097D421600A18468 /* Deployment */,
+ 4B699CFC097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699CFF097D421600A18468 /* Build configuration list for PBXToolTarget "jack_external_metro" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D00097D421600A18468 /* Development */,
+ 4B699D01097D421600A18468 /* Deployment */,
+ 4B699D02097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D09097D421600A18468 /* Build configuration list for PBXNativeTarget "jack_external_metro Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D0A097D421600A18468 /* Development */,
+ 4B699D0B097D421600A18468 /* Deployment */,
+ 4B699D0C097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D0F097D421600A18468 /* Build configuration list for PBXToolTarget "testAtomic" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D10097D421600A18468 /* Development */,
+ 4B699D11097D421600A18468 /* Deployment */,
+ 4B699D12097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D1D097D421600A18468 /* Build configuration list for PBXNativeTarget "testAtomic Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D1E097D421600A18468 /* Development */,
+ 4B699D1F097D421600A18468 /* Deployment */,
+ 4B699D20097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D23097D421600A18468 /* Build configuration list for PBXToolTarget "testSem" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D24097D421600A18468 /* Development */,
+ 4B699D25097D421600A18468 /* Deployment */,
+ 4B699D26097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D35097D421600A18468 /* Build configuration list for PBXNativeTarget "testSem Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D36097D421600A18468 /* Development */,
+ 4B699D37097D421600A18468 /* Deployment */,
+ 4B699D38097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D3B097D421600A18468 /* Build configuration list for PBXToolTarget "zombie" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D3C097D421600A18468 /* Development */,
+ 4B699D3D097D421600A18468 /* Deployment */,
+ 4B699D3E097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D45097D421600A18468 /* Build configuration list for PBXNativeTarget "zombie Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D46097D421600A18468 /* Development */,
+ 4B699D47097D421600A18468 /* Deployment */,
+ 4B699D48097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D4B097D421600A18468 /* Build configuration list for PBXToolTarget "synchroServer" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D4C097D421600A18468 /* Development */,
+ 4B699D4D097D421600A18468 /* Deployment */,
+ 4B699D4E097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D5D097D421600A18468 /* Build configuration list for PBXNativeTarget "synchroServer Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D5E097D421600A18468 /* Development */,
+ 4B699D5F097D421600A18468 /* Deployment */,
+ 4B699D60097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D63097D421600A18468 /* Build configuration list for PBXToolTarget "synchroClient" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D64097D421600A18468 /* Development */,
+ 4B699D65097D421600A18468 /* Deployment */,
+ 4B699D66097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D75097D421600A18468 /* Build configuration list for PBXNativeTarget "synchroClient Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D76097D421600A18468 /* Development */,
+ 4B699D77097D421600A18468 /* Deployment */,
+ 4B699D78097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D7B097D421600A18468 /* Build configuration list for PBXToolTarget "synchroServerClient" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D7C097D421600A18468 /* Development */,
+ 4B699D7D097D421600A18468 /* Deployment */,
+ 4B699D7E097D421600A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D8D097D421700A18468 /* Build configuration list for PBXNativeTarget "synchroServerClient Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D8E097D421700A18468 /* Development */,
+ 4B699D8F097D421700A18468 /* Deployment */,
+ 4B699D90097D421700A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D93097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_coreaudio" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D94097D421700A18468 /* Development */,
+ 4B699D95097D421700A18468 /* Deployment */,
+ 4B699D96097D421700A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699D9D097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_coreaudio Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699D9E097D421700A18468 /* Development */,
+ 4B699D9F097D421700A18468 /* Deployment */,
+ 4B699DA0097D421700A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699DA2097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_dummy" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699DA3097D421700A18468 /* Development */,
+ 4B699DA4097D421700A18468 /* Deployment */,
+ 4B699DA5097D421700A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699DAC097D421700A18468 /* Build configuration list for PBXNativeTarget "jack_dummy Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699DAD097D421700A18468 /* Development */,
+ 4B699DAE097D421700A18468 /* Deployment */,
+ 4B699DAF097D421700A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B699DD5097D427F00A18468 /* Build configuration list for PBXProject "Jackdmp" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B699DD6097D427F00A18468 /* Development */,
+ 4B699DD7097D427F00A18468 /* Deployment */,
+ 4B699DD8097D427F00A18468 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4B978DB70A31CF4A009E2DD1 /* Build configuration list for PBXNativeTarget "jack_portaudio Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4B978DB80A31CF4A009E2DD1 /* Development */,
+ 4B978DB90A31CF4A009E2DD1 /* Deployment */,
+ 4B978DBA0A31CF4A009E2DD1 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 4BE6C69F0A3E096F005A203A /* Build configuration list for PBXNativeTarget "jack_test Universal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4BE6C6A00A3E096F005A203A /* Development */,
+ 4BE6C6A10A3E096F005A203A /* Deployment */,
+ 4BE6C6A20A3E096F005A203A /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/macosx/RPC/JackRPCClient.defs b/macosx/RPC/JackRPCClient.defs
new file mode 100644
index 00000000..22f857b9
--- /dev/null
+++ b/macosx/RPC/JackRPCClient.defs
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 2004 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+subsystem JackRPCClient 1000;
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+import "Jackdefs.h";
+waittime 5000;
+
+type client_name_t = c_string[128];
+type client_port_name_t = c_string[128];
+
+routine rpc_jack_client_sync_notify(
+ client_port : mach_port_t;
+ refnum : int;
+ client_name : client_name_t;
+ notify : int;
+ value : int;
+ out result : int);
+
+simpleroutine rpc_jack_client_async_notify(
+ client_port : mach_port_t;
+ refnum : int;
+ client_name : client_name_t;
+ notify : int;
+ value : int);
diff --git a/macosx/RPC/JackRPCClient.h b/macosx/RPC/JackRPCClient.h
new file mode 100644
index 00000000..03b19592
--- /dev/null
+++ b/macosx/RPC/JackRPCClient.h
@@ -0,0 +1,186 @@
+#ifndef _JackRPCClient_user_
+#define _JackRPCClient_user_
+
+/* Module JackRPCClient */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+ char *name;
+ function_ptr_t function;
+} function_table_entry;
+typedef function_table_entry *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef JackRPCClient_MSG_COUNT
+#define JackRPCClient_MSG_COUNT 2
+#endif /* JackRPCClient_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include "Jackdefs.h"
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine rpc_jack_client_sync_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_sync_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value,
+ int *result
+);
+
+/* SimpleRoutine rpc_jack_client_async_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_async_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here. */
+/* For example, if any of the arguments are variable- */
+/* sized, and less than the maximum is sent, the data */
+/* will be packed tight in the actual message to reduce */
+/* the presence of holes. */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__JackRPCClient_subsystem__defined
+#define __Request__JackRPCClient_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_sync_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_async_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Request__JackRPCClient_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__JackRPCClient_subsystem__defined
+#define __RequestUnion__JackRPCClient_subsystem__defined
+union __RequestUnion__JackRPCClient_subsystem {
+ __Request__rpc_jack_client_sync_notify_t Request_rpc_jack_client_sync_notify;
+ __Request__rpc_jack_client_async_notify_t Request_rpc_jack_client_async_notify;
+};
+#endif /* !__RequestUnion__JackRPCClient_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__JackRPCClient_subsystem__defined
+#define __Reply__JackRPCClient_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_sync_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ } __Reply__rpc_jack_client_async_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Reply__JackRPCClient_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__JackRPCClient_subsystem__defined
+#define __ReplyUnion__JackRPCClient_subsystem__defined
+union __ReplyUnion__JackRPCClient_subsystem {
+ __Reply__rpc_jack_client_sync_notify_t Reply_rpc_jack_client_sync_notify;
+ __Reply__rpc_jack_client_async_notify_t Reply_rpc_jack_client_async_notify;
+};
+#endif /* !__RequestUnion__JackRPCClient_subsystem__defined */
+
+#ifndef subsystem_to_name_map_JackRPCClient
+#define subsystem_to_name_map_JackRPCClient \
+ { "rpc_jack_client_sync_notify", 1000 },\
+ { "rpc_jack_client_async_notify", 1001 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif /* _JackRPCClient_user_ */
diff --git a/macosx/RPC/JackRPCClientServer.c b/macosx/RPC/JackRPCClientServer.c
new file mode 100644
index 00000000..af7d5a9e
--- /dev/null
+++ b/macosx/RPC/JackRPCClientServer.c
@@ -0,0 +1,1045 @@
+/*
+ * IDENTIFICATION:
+ * stub generated Mon Feb 13 17:58:24 2006
+ * with a MiG generated Sun Mar 20 14:22:13 PST 2005 by root@b05.apple.com
+ * OPTIONS:
+ */
+
+/* Module JackRPCClient */
+
+#define __MIG_check__Request__JackRPCClient_subsystem__ 1
+#define __NDR_convert__Request__JackRPCClient_subsystem__ 1
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include "Jackdefs.h"
+
+#ifndef mig_internal
+#define mig_internal static __inline__
+#endif /* mig_internal */
+
+#ifndef mig_external
+#define mig_external
+#endif /* mig_external */
+
+#if !defined(__MigTypeCheck) && defined(TypeCheck)
+#define __MigTypeCheck TypeCheck /* Legacy setting */
+#endif /* !defined(__MigTypeCheck) */
+
+#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
+#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
+#endif /* !defined(__MigKernelSpecificCode) */
+
+#ifndef LimitCheck
+#define LimitCheck 0
+#endif /* LimitCheck */
+
+#ifndef min
+#define min(a,b) ( ((a) < (b))? (a): (b) )
+#endif /* min */
+
+#if !defined(_WALIGN_)
+#define _WALIGN_(x) (((x) + 3) & ~3)
+#endif /* !defined(_WALIGN_) */
+
+#if !defined(_WALIGNSZ_)
+#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
+#endif /* !defined(_WALIGNSZ_) */
+
+#ifndef UseStaticTemplates
+#define UseStaticTemplates 0
+#endif /* UseStaticTemplates */
+
+#ifndef __DeclareRcvRpc
+#define __DeclareRcvRpc(_NUM_, _NAME_)
+#endif /* __DeclareRcvRpc */
+
+#ifndef __BeforeRcvRpc
+#define __BeforeRcvRpc(_NUM_, _NAME_)
+#endif /* __BeforeRcvRpc */
+
+#ifndef __AfterRcvRpc
+#define __AfterRcvRpc(_NUM_, _NAME_)
+#endif /* __AfterRcvRpc */
+
+#ifndef __DeclareRcvSimple
+#define __DeclareRcvSimple(_NUM_, _NAME_)
+#endif /* __DeclareRcvSimple */
+
+#ifndef __BeforeRcvSimple
+#define __BeforeRcvSimple(_NUM_, _NAME_)
+#endif /* __BeforeRcvSimple */
+
+#ifndef __AfterRcvSimple
+#define __AfterRcvSimple(_NUM_, _NAME_)
+#endif /* __AfterRcvSimple */
+
+#define novalue void
+
+#define msgh_request_port msgh_local_port
+#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
+#define msgh_reply_port msgh_remote_port
+#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
+
+#define MIG_RETURN_ERROR(X, code) {\
+ ((mig_reply_error_t *)X)->RetCode = code;\
+ ((mig_reply_error_t *)X)->NDR = NDR_record;\
+ return;\
+ }
+
+/* typedefs for all requests */
+
+#ifndef __Request__JackRPCClient_subsystem__defined
+#define __Request__JackRPCClient_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_sync_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_async_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Request__JackRPCClient_subsystem__defined */
+
+/* typedefs for all replies */
+
+#ifndef __Reply__JackRPCClient_subsystem__defined
+#define __Reply__JackRPCClient_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_sync_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ } __Reply__rpc_jack_client_async_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Reply__JackRPCClient_subsystem__defined */
+
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__JackRPCClient_subsystem__defined
+#define __ReplyUnion__JackRPCClient_subsystem__defined
+union __ReplyUnion__JackRPCClient_subsystem {
+ __Reply__rpc_jack_client_sync_notify_t Reply_rpc_jack_client_sync_notify;
+ __Reply__rpc_jack_client_async_notify_t Reply_rpc_jack_client_async_notify;
+};
+#endif /* __RequestUnion__JackRPCClient_subsystem__defined */
+/* Forward Declarations */
+
+
+mig_internal novalue _Xrpc_jack_client_sync_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_client_async_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCClient_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_sync_notify_t__defined)
+#define __MIG_check__Request__rpc_jack_client_sync_notify_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(__Request__rpc_jack_client_sync_notify_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_sync_notify_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name(&In0P->client_name, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify(&In0P->notify, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value(&In0P->value, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name(&In0P->client_name, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify(&In0P->notify, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value(&In0P->value, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name(&In0P->client_name, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify(&In0P->notify, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__notify__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value(&In0P->value, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_sync_notify_t__defined) */
+#endif /* __MIG_check__Request__JackRPCClient_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_sync_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_sync_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value,
+ int *result
+);
+
+/* Routine rpc_jack_client_sync_notify */
+mig_internal novalue _Xrpc_jack_client_sync_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_sync_notify_t __Request;
+ typedef __Reply__rpc_jack_client_sync_notify_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_sync_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_sync_notify_t__defined */
+
+ __DeclareRcvRpc(1000, "rpc_jack_client_sync_notify")
+ __BeforeRcvRpc(1000, "rpc_jack_client_sync_notify")
+
+#if defined(__MIG_check__Request__rpc_jack_client_sync_notify_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_sync_notify_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_sync_notify_t__defined) */
+
+ OutP->RetCode = rpc_jack_client_sync_notify(In0P->Head.msgh_request_port, In0P->refnum, In0P->client_name, In0P->notify, In0P->value, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1000, "rpc_jack_client_sync_notify")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCClient_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_async_notify_t__defined)
+#define __MIG_check__Request__rpc_jack_client_async_notify_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t(__Request__rpc_jack_client_async_notify_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_async_notify_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name(&In0P->client_name, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify(&In0P->notify, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value(&In0P->value, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name(&In0P->client_name, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify(&In0P->notify, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value(&In0P->value, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name(&In0P->client_name, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify(&In0P->notify, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__notify__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value(&In0P->value, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_async_notify_t__defined) */
+#endif /* __MIG_check__Request__JackRPCClient_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* SimpleRoutine rpc_jack_client_async_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_async_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value
+);
+
+/* SimpleRoutine rpc_jack_client_async_notify */
+mig_internal novalue _Xrpc_jack_client_async_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_async_notify_t __Request;
+ typedef __Reply__rpc_jack_client_async_notify_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_async_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_async_notify_t__defined */
+
+ __DeclareRcvSimple(1001, "rpc_jack_client_async_notify")
+ __BeforeRcvSimple(1001, "rpc_jack_client_async_notify")
+
+#if defined(__MIG_check__Request__rpc_jack_client_async_notify_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_async_notify_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_async_notify_t__defined) */
+
+ OutP->RetCode = rpc_jack_client_async_notify(In0P->Head.msgh_request_port, In0P->refnum, In0P->client_name, In0P->notify, In0P->value);
+ __AfterRcvSimple(1001, "rpc_jack_client_async_notify")
+}
+
+
+extern boolean_t JackRPCClient_server(
+ mach_msg_header_t *InHeadP,
+ mach_msg_header_t *OutHeadP);
+
+extern mig_routine_t JackRPCClient_server_routine(
+ mach_msg_header_t *InHeadP);
+
+
+/* Description of this subsystem, for use in direct RPC */
+const struct JackRPCClient_subsystem {
+ mig_server_routine_t server; /* Server routine */
+ mach_msg_id_t start; /* Min routine number */
+ mach_msg_id_t end; /* Max routine number + 1 */
+ unsigned int maxsize; /* Max msg size */
+ vm_address_t reserved; /* Reserved */
+ struct routine_descriptor /*Array of routine descriptors */
+ routine[2];
+} JackRPCClient_subsystem = {
+ JackRPCClient_server_routine,
+ 1000,
+ 1002,
+ (mach_msg_size_t)sizeof(union __ReplyUnion__JackRPCClient_subsystem),
+ (vm_address_t)0,
+ {
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_sync_notify, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_sync_notify_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_async_notify, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_async_notify_t)},
+ }
+};
+
+mig_external boolean_t JackRPCClient_server
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ register mig_routine_t routine;
+
+ OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
+ OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
+ /* Minimal size: routine() will update it if different */
+ OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
+ OutHeadP->msgh_local_port = MACH_PORT_NULL;
+ OutHeadP->msgh_id = InHeadP->msgh_id + 100;
+
+ if ((InHeadP->msgh_id > 1001) || (InHeadP->msgh_id < 1000) ||
+ ((routine = JackRPCClient_subsystem.routine[InHeadP->msgh_id - 1000].stub_routine) == 0)) {
+ ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
+ ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
+ return FALSE;
+ }
+ (*routine) (InHeadP, OutHeadP);
+ return TRUE;
+}
+
+mig_external mig_routine_t JackRPCClient_server_routine
+ (mach_msg_header_t *InHeadP)
+{
+ register int msgh_id;
+
+ msgh_id = InHeadP->msgh_id - 1000;
+
+ if ((msgh_id > 1) || (msgh_id < 0))
+ return 0;
+
+ return JackRPCClient_subsystem.routine[msgh_id].stub_routine;
+}
diff --git a/macosx/RPC/JackRPCClientUser.c b/macosx/RPC/JackRPCClientUser.c
new file mode 100644
index 00000000..7fe935fe
--- /dev/null
+++ b/macosx/RPC/JackRPCClientUser.c
@@ -0,0 +1,448 @@
+/*
+ * IDENTIFICATION:
+ * stub generated Mon Feb 13 17:58:24 2006
+ * with a MiG generated Sun Mar 20 14:22:13 PST 2005 by root@b05.apple.com
+ * OPTIONS:
+ */
+#define __MIG_check__Reply__JackRPCClient_subsystem__ 1
+#define __NDR_convert__Reply__JackRPCClient_subsystem__ 1
+#define __NDR_convert__mig_reply_error_subsystem__ 1
+
+#include "JackRPCClient.h"
+
+
+#ifndef mig_internal
+#define mig_internal static __inline__
+#endif /* mig_internal */
+
+#ifndef mig_external
+#define mig_external
+#endif /* mig_external */
+
+#if !defined(__MigTypeCheck) && defined(TypeCheck)
+#define __MigTypeCheck TypeCheck /* Legacy setting */
+#endif /* !defined(__MigTypeCheck) */
+
+#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
+#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
+#endif /* !defined(__MigKernelSpecificCode) */
+
+#ifndef LimitCheck
+#define LimitCheck 0
+#endif /* LimitCheck */
+
+#ifndef min
+#define min(a,b) ( ((a) < (b))? (a): (b) )
+#endif /* min */
+
+#if !defined(_WALIGN_)
+#define _WALIGN_(x) (((x) + 3) & ~3)
+#endif /* !defined(_WALIGN_) */
+
+#if !defined(_WALIGNSZ_)
+#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
+#endif /* !defined(_WALIGNSZ_) */
+
+#ifndef UseStaticTemplates
+#define UseStaticTemplates 0
+#endif /* UseStaticTemplates */
+
+#ifndef __MachMsgErrorWithTimeout
+#define __MachMsgErrorWithTimeout(_R_) { \
+ switch (_R_) { \
+ case MACH_SEND_INVALID_REPLY: \
+ case MACH_RCV_INVALID_NAME: \
+ case MACH_RCV_PORT_DIED: \
+ case MACH_RCV_PORT_CHANGED: \
+ case MACH_RCV_TIMED_OUT: \
+ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
+ break; \
+ default: \
+ mig_put_reply_port(InP->Head.msgh_reply_port); \
+ } \
+}
+#endif /* __MachMsgErrorWithTimeout */
+
+#ifndef __MachMsgErrorWithoutTimeout
+#define __MachMsgErrorWithoutTimeout(_R_) { \
+ switch (_R_) { \
+ case MACH_SEND_INVALID_REPLY: \
+ case MACH_RCV_INVALID_NAME: \
+ case MACH_RCV_PORT_DIED: \
+ case MACH_RCV_PORT_CHANGED: \
+ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
+ break; \
+ default: \
+ mig_put_reply_port(InP->Head.msgh_reply_port); \
+ } \
+}
+#endif /* __MachMsgErrorWithoutTimeout */
+
+#ifndef __DeclareSendRpc
+#define __DeclareSendRpc(_NUM_, _NAME_)
+#endif /* __DeclareSendRpc */
+
+#ifndef __BeforeSendRpc
+#define __BeforeSendRpc(_NUM_, _NAME_)
+#endif /* __BeforeSendRpc */
+
+#ifndef __AfterSendRpc
+#define __AfterSendRpc(_NUM_, _NAME_)
+#endif /* __AfterSendRpc */
+
+#ifndef __DeclareSendSimple
+#define __DeclareSendSimple(_NUM_, _NAME_)
+#endif /* __DeclareSendSimple */
+
+#ifndef __BeforeSendSimple
+#define __BeforeSendSimple(_NUM_, _NAME_)
+#endif /* __BeforeSendSimple */
+
+#ifndef __AfterSendSimple
+#define __AfterSendSimple(_NUM_, _NAME_)
+#endif /* __AfterSendSimple */
+
+#define msgh_request_port msgh_remote_port
+#define msgh_reply_port msgh_local_port
+
+
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCClient_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_client_sync_notify_t__defined)
+#define __MIG_check__Reply__rpc_jack_client_sync_notify_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCClient__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCClient__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_sync_notify_t(__Reply__rpc_jack_client_sync_notify_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_client_sync_notify_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1100) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_sync_notify_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_client_sync_notify_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCClient_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_sync_notify */
+mig_external kern_return_t rpc_jack_client_sync_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_sync_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_sync_notify_t__defined */
+
+ __DeclareSendRpc(1000, "rpc_jack_client_sync_notify")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ (void) mig_strncpy(InP->client_name, client_name, 128);
+
+ InP->notify = notify;
+
+ InP->value = value;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = client_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1000;
+
+ __BeforeSendRpc(1000, "rpc_jack_client_sync_notify")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_SEND_TIMEOUT|MACH_RCV_TIMEOUT|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, 5000, MACH_PORT_NULL);
+ __AfterSendRpc(1000, "rpc_jack_client_sync_notify")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_client_sync_notify_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_client_sync_notify_t((__Reply__rpc_jack_client_sync_notify_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_client_sync_notify_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+/* SimpleRoutine rpc_jack_client_async_notify */
+mig_external kern_return_t rpc_jack_client_async_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ client_name_t client_name,
+ int notify,
+ int value
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_name_t client_name;
+ int notify;
+ int value;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ } Mess;
+
+ Request *InP = &Mess.In;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_async_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_async_notify_t__defined */
+
+ __DeclareSendSimple(1001, "rpc_jack_client_async_notify")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ (void) mig_strncpy(InP->client_name, client_name, 128);
+
+ InP->notify = notify;
+
+ InP->value = value;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, 0);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = client_port;
+ InP->Head.msgh_reply_port = MACH_PORT_NULL;
+ InP->Head.msgh_id = 1001;
+
+ __BeforeSendSimple(1001, "rpc_jack_client_async_notify")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_SEND_TIMEOUT|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), 0, MACH_PORT_NULL, 5000, MACH_PORT_NULL);
+ __AfterSendSimple(1001, "rpc_jack_client_async_notify")
+ return msg_result;
+ return KERN_SUCCESS;
+ }
+}
diff --git a/macosx/RPC/JackRPCEngine.defs b/macosx/RPC/JackRPCEngine.defs
new file mode 100644
index 00000000..a833529d
--- /dev/null
+++ b/macosx/RPC/JackRPCEngine.defs
@@ -0,0 +1,126 @@
+/*
+ Copyright (C) 2004 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+subsystem JackRPCEngine 1000;
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+import "Jackdefs.h";
+
+ServerPrefix server_;
+
+type client_name_t = c_string[128];
+type client_port_name_t = c_string[128];
+
+routine rpc_jack_client_new(
+ server_port : mach_port_t;
+ client_name : client_name_t;
+ out private_port : mach_port_make_send_t;
+ out shared_engine : int;
+ out shared_client : int;
+ out shared_ports : int;
+ out result : int);
+
+routine rpc_jack_client_close(
+ server_port : mach_port_t;
+ refnum : int;
+ out result : int);
+
+routine rpc_jack_client_activate(
+ server_port : mach_port_t;
+ refnum : int;
+ out result : int);
+
+routine rpc_jack_client_deactivate(
+ server_port : mach_port_t;
+ refnum : int;
+ out result : int);
+
+routine rpc_jack_port_register(
+ server_port : mach_port_t;
+ refnum : int;
+ name : client_port_name_t;
+ flags : unsigned;
+ buffer_size : unsigned;
+ out port_index : unsigned;
+ out result : int);
+
+routine rpc_jack_port_unregister(
+ server_port : mach_port_t;
+ refnum : int;
+ port : int;
+ out result : int);
+
+routine rpc_jack_port_connect(
+ server_port : mach_port_t;
+ refnum : int;
+ src : int;
+ dst : int;
+ out result : int);
+
+routine rpc_jack_port_disconnect(
+ server_port : mach_port_t;
+ refnum : int;
+ src : int;
+ dst : int;
+ out result : int);
+
+routine rpc_jack_port_connect_name(
+ server_port : mach_port_t;
+ refnum : int;
+ src : client_port_name_t;
+ dst : client_port_name_t;
+ out result : int);
+
+routine rpc_jack_port_disconnect_name(
+ server_port : mach_port_t;
+ refnum : int;
+ src : client_port_name_t;
+ dst : client_port_name_t;
+ out result : int);
+
+routine rpc_jack_set_buffer_size(
+ server_port : mach_port_t;
+ buffer_size : int;
+ out result : int);
+
+routine rpc_jack_set_freewheel(
+ server_port : mach_port_t;
+ onoff : int;
+ out result : int);
+
+routine rpc_jack_release_timebase(
+ server_port : mach_port_t;
+ refnum : int;
+ out result : int);
+
+routine rpc_jack_set_timebase_callback(
+ server_port : mach_port_t;
+ refnum : int;
+ conditional : int;
+ out result : int);
+
+simpleroutine rpc_jack_client_rt_notify(
+ client_port : mach_port_t;
+ refnum : int;
+ notify : int;
+ value : int;
+ waittime timeout : int);
+
+ \ No newline at end of file
diff --git a/macosx/RPC/JackRPCEngine.h b/macosx/RPC/JackRPCEngine.h
new file mode 100644
index 00000000..753d26dd
--- /dev/null
+++ b/macosx/RPC/JackRPCEngine.h
@@ -0,0 +1,750 @@
+#ifndef _JackRPCEngine_user_
+#define _JackRPCEngine_user_
+
+/* Module JackRPCEngine */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+ char *name;
+ function_ptr_t function;
+} function_table_entry;
+typedef function_table_entry *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef JackRPCEngine_MSG_COUNT
+#define JackRPCEngine_MSG_COUNT 15
+#endif /* JackRPCEngine_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include "Jackdefs.h"
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine rpc_jack_client_new */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_new
+(
+ mach_port_t server_port,
+ client_name_t client_name,
+ mach_port_t *private_port,
+ int *shared_engine,
+ int *shared_client,
+ int *shared_ports,
+ int *result
+);
+
+/* Routine rpc_jack_client_close */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_close
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_client_activate */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_activate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_client_deactivate */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_deactivate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_port_register */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_register
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t name,
+ unsigned flags,
+ unsigned buffer_size,
+ unsigned *port_index,
+ int *result
+);
+
+/* Routine rpc_jack_port_unregister */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_unregister
+(
+ mach_port_t server_port,
+ int refnum,
+ int port,
+ int *result
+);
+
+/* Routine rpc_jack_port_connect */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_connect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_disconnect */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_disconnect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_connect_name */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_connect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_disconnect_name */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_port_disconnect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+);
+
+/* Routine rpc_jack_set_buffer_size */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_set_buffer_size
+(
+ mach_port_t server_port,
+ int buffer_size,
+ int *result
+);
+
+/* Routine rpc_jack_set_freewheel */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_set_freewheel
+(
+ mach_port_t server_port,
+ int onoff,
+ int *result
+);
+
+/* Routine rpc_jack_release_timebase */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_release_timebase
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_set_timebase_callback */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_set_timebase_callback
+(
+ mach_port_t server_port,
+ int refnum,
+ int conditional,
+ int *result
+);
+
+/* SimpleRoutine rpc_jack_client_rt_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t rpc_jack_client_rt_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ int notify,
+ int value,
+ int timeout
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here. */
+/* For example, if any of the arguments are variable- */
+/* sized, and less than the maximum is sent, the data */
+/* will be packed tight in the actual message to reduce */
+/* the presence of holes. */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__JackRPCEngine_subsystem__defined
+#define __Request__JackRPCEngine_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ client_name_t client_name;
+ } __Request__rpc_jack_client_new_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_close_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_activate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_deactivate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t name;
+ unsigned flags;
+ unsigned buffer_size;
+ } __Request__rpc_jack_port_register_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int port;
+ } __Request__rpc_jack_port_unregister_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } __Request__rpc_jack_port_connect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } __Request__rpc_jack_port_disconnect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } __Request__rpc_jack_port_connect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } __Request__rpc_jack_port_disconnect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int buffer_size;
+ } __Request__rpc_jack_set_buffer_size_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int onoff;
+ } __Request__rpc_jack_set_freewheel_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_release_timebase_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int conditional;
+ } __Request__rpc_jack_set_timebase_callback_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_rt_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Request__JackRPCEngine_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__JackRPCEngine_subsystem__defined
+#define __RequestUnion__JackRPCEngine_subsystem__defined
+union __RequestUnion__JackRPCEngine_subsystem {
+ __Request__rpc_jack_client_new_t Request_rpc_jack_client_new;
+ __Request__rpc_jack_client_close_t Request_rpc_jack_client_close;
+ __Request__rpc_jack_client_activate_t Request_rpc_jack_client_activate;
+ __Request__rpc_jack_client_deactivate_t Request_rpc_jack_client_deactivate;
+ __Request__rpc_jack_port_register_t Request_rpc_jack_port_register;
+ __Request__rpc_jack_port_unregister_t Request_rpc_jack_port_unregister;
+ __Request__rpc_jack_port_connect_t Request_rpc_jack_port_connect;
+ __Request__rpc_jack_port_disconnect_t Request_rpc_jack_port_disconnect;
+ __Request__rpc_jack_port_connect_name_t Request_rpc_jack_port_connect_name;
+ __Request__rpc_jack_port_disconnect_name_t Request_rpc_jack_port_disconnect_name;
+ __Request__rpc_jack_set_buffer_size_t Request_rpc_jack_set_buffer_size;
+ __Request__rpc_jack_set_freewheel_t Request_rpc_jack_set_freewheel;
+ __Request__rpc_jack_release_timebase_t Request_rpc_jack_release_timebase;
+ __Request__rpc_jack_set_timebase_callback_t Request_rpc_jack_set_timebase_callback;
+ __Request__rpc_jack_client_rt_notify_t Request_rpc_jack_client_rt_notify;
+};
+#endif /* !__RequestUnion__JackRPCEngine_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__JackRPCEngine_subsystem__defined
+#define __Reply__JackRPCEngine_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ /* start of the kernel processed data */
+ mach_msg_body_t msgh_body;
+ mach_msg_port_descriptor_t private_port;
+ /* end of the kernel processed data */
+ NDR_record_t NDR;
+ int shared_engine;
+ int shared_client;
+ int shared_ports;
+ int result;
+ } __Reply__rpc_jack_client_new_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_close_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_activate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_deactivate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ unsigned port_index;
+ int result;
+ } __Reply__rpc_jack_port_register_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_unregister_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_connect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_disconnect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_connect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_disconnect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_buffer_size_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_freewheel_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_release_timebase_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_timebase_callback_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ } __Reply__rpc_jack_client_rt_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Reply__JackRPCEngine_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__JackRPCEngine_subsystem__defined
+#define __ReplyUnion__JackRPCEngine_subsystem__defined
+union __ReplyUnion__JackRPCEngine_subsystem {
+ __Reply__rpc_jack_client_new_t Reply_rpc_jack_client_new;
+ __Reply__rpc_jack_client_close_t Reply_rpc_jack_client_close;
+ __Reply__rpc_jack_client_activate_t Reply_rpc_jack_client_activate;
+ __Reply__rpc_jack_client_deactivate_t Reply_rpc_jack_client_deactivate;
+ __Reply__rpc_jack_port_register_t Reply_rpc_jack_port_register;
+ __Reply__rpc_jack_port_unregister_t Reply_rpc_jack_port_unregister;
+ __Reply__rpc_jack_port_connect_t Reply_rpc_jack_port_connect;
+ __Reply__rpc_jack_port_disconnect_t Reply_rpc_jack_port_disconnect;
+ __Reply__rpc_jack_port_connect_name_t Reply_rpc_jack_port_connect_name;
+ __Reply__rpc_jack_port_disconnect_name_t Reply_rpc_jack_port_disconnect_name;
+ __Reply__rpc_jack_set_buffer_size_t Reply_rpc_jack_set_buffer_size;
+ __Reply__rpc_jack_set_freewheel_t Reply_rpc_jack_set_freewheel;
+ __Reply__rpc_jack_release_timebase_t Reply_rpc_jack_release_timebase;
+ __Reply__rpc_jack_set_timebase_callback_t Reply_rpc_jack_set_timebase_callback;
+ __Reply__rpc_jack_client_rt_notify_t Reply_rpc_jack_client_rt_notify;
+};
+#endif /* !__RequestUnion__JackRPCEngine_subsystem__defined */
+
+#ifndef subsystem_to_name_map_JackRPCEngine
+#define subsystem_to_name_map_JackRPCEngine \
+ { "rpc_jack_client_new", 1000 },\
+ { "rpc_jack_client_close", 1001 },\
+ { "rpc_jack_client_activate", 1002 },\
+ { "rpc_jack_client_deactivate", 1003 },\
+ { "rpc_jack_port_register", 1004 },\
+ { "rpc_jack_port_unregister", 1005 },\
+ { "rpc_jack_port_connect", 1006 },\
+ { "rpc_jack_port_disconnect", 1007 },\
+ { "rpc_jack_port_connect_name", 1008 },\
+ { "rpc_jack_port_disconnect_name", 1009 },\
+ { "rpc_jack_set_buffer_size", 1010 },\
+ { "rpc_jack_set_freewheel", 1011 },\
+ { "rpc_jack_release_timebase", 1012 },\
+ { "rpc_jack_set_timebase_callback", 1013 },\
+ { "rpc_jack_client_rt_notify", 1014 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif /* _JackRPCEngine_user_ */
diff --git a/macosx/RPC/JackRPCEngineServer.c b/macosx/RPC/JackRPCEngineServer.c
new file mode 100644
index 00000000..76000513
--- /dev/null
+++ b/macosx/RPC/JackRPCEngineServer.c
@@ -0,0 +1,4418 @@
+/*
+ * IDENTIFICATION:
+ * stub generated Mon Feb 13 17:58:24 2006
+ * with a MiG generated Sun Mar 20 14:22:13 PST 2005 by root@b05.apple.com
+ * OPTIONS:
+ */
+
+/* Module JackRPCEngine */
+
+#define __MIG_check__Request__JackRPCEngine_subsystem__ 1
+#define __NDR_convert__Request__JackRPCEngine_subsystem__ 1
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include "Jackdefs.h"
+
+#ifndef mig_internal
+#define mig_internal static __inline__
+#endif /* mig_internal */
+
+#ifndef mig_external
+#define mig_external
+#endif /* mig_external */
+
+#if !defined(__MigTypeCheck) && defined(TypeCheck)
+#define __MigTypeCheck TypeCheck /* Legacy setting */
+#endif /* !defined(__MigTypeCheck) */
+
+#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
+#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
+#endif /* !defined(__MigKernelSpecificCode) */
+
+#ifndef LimitCheck
+#define LimitCheck 0
+#endif /* LimitCheck */
+
+#ifndef min
+#define min(a,b) ( ((a) < (b))? (a): (b) )
+#endif /* min */
+
+#if !defined(_WALIGN_)
+#define _WALIGN_(x) (((x) + 3) & ~3)
+#endif /* !defined(_WALIGN_) */
+
+#if !defined(_WALIGNSZ_)
+#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
+#endif /* !defined(_WALIGNSZ_) */
+
+#ifndef UseStaticTemplates
+#define UseStaticTemplates 0
+#endif /* UseStaticTemplates */
+
+#ifndef __DeclareRcvRpc
+#define __DeclareRcvRpc(_NUM_, _NAME_)
+#endif /* __DeclareRcvRpc */
+
+#ifndef __BeforeRcvRpc
+#define __BeforeRcvRpc(_NUM_, _NAME_)
+#endif /* __BeforeRcvRpc */
+
+#ifndef __AfterRcvRpc
+#define __AfterRcvRpc(_NUM_, _NAME_)
+#endif /* __AfterRcvRpc */
+
+#ifndef __DeclareRcvSimple
+#define __DeclareRcvSimple(_NUM_, _NAME_)
+#endif /* __DeclareRcvSimple */
+
+#ifndef __BeforeRcvSimple
+#define __BeforeRcvSimple(_NUM_, _NAME_)
+#endif /* __BeforeRcvSimple */
+
+#ifndef __AfterRcvSimple
+#define __AfterRcvSimple(_NUM_, _NAME_)
+#endif /* __AfterRcvSimple */
+
+#define novalue void
+
+#define msgh_request_port msgh_local_port
+#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
+#define msgh_reply_port msgh_remote_port
+#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
+
+#define MIG_RETURN_ERROR(X, code) {\
+ ((mig_reply_error_t *)X)->RetCode = code;\
+ ((mig_reply_error_t *)X)->NDR = NDR_record;\
+ return;\
+ }
+
+/* typedefs for all requests */
+
+#ifndef __Request__JackRPCEngine_subsystem__defined
+#define __Request__JackRPCEngine_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ client_name_t client_name;
+ } __Request__rpc_jack_client_new_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_close_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_activate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_client_deactivate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t name;
+ unsigned flags;
+ unsigned buffer_size;
+ } __Request__rpc_jack_port_register_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int port;
+ } __Request__rpc_jack_port_unregister_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } __Request__rpc_jack_port_connect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } __Request__rpc_jack_port_disconnect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } __Request__rpc_jack_port_connect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } __Request__rpc_jack_port_disconnect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int buffer_size;
+ } __Request__rpc_jack_set_buffer_size_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int onoff;
+ } __Request__rpc_jack_set_freewheel_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } __Request__rpc_jack_release_timebase_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int conditional;
+ } __Request__rpc_jack_set_timebase_callback_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int notify;
+ int value;
+ } __Request__rpc_jack_client_rt_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Request__JackRPCEngine_subsystem__defined */
+
+/* typedefs for all replies */
+
+#ifndef __Reply__JackRPCEngine_subsystem__defined
+#define __Reply__JackRPCEngine_subsystem__defined
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ /* start of the kernel processed data */
+ mach_msg_body_t msgh_body;
+ mach_msg_port_descriptor_t private_port;
+ /* end of the kernel processed data */
+ NDR_record_t NDR;
+ int shared_engine;
+ int shared_client;
+ int shared_ports;
+ int result;
+ } __Reply__rpc_jack_client_new_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_close_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_activate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_client_deactivate_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ unsigned port_index;
+ int result;
+ } __Reply__rpc_jack_port_register_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_unregister_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_connect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_disconnect_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_connect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_port_disconnect_name_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_buffer_size_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_freewheel_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_release_timebase_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply__rpc_jack_set_timebase_callback_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ } __Reply__rpc_jack_client_rt_notify_t;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#endif /* !__Reply__JackRPCEngine_subsystem__defined */
+
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__server_JackRPCEngine_subsystem__defined
+#define __ReplyUnion__server_JackRPCEngine_subsystem__defined
+union __ReplyUnion__server_JackRPCEngine_subsystem {
+ __Reply__rpc_jack_client_new_t Reply_rpc_jack_client_new;
+ __Reply__rpc_jack_client_close_t Reply_rpc_jack_client_close;
+ __Reply__rpc_jack_client_activate_t Reply_rpc_jack_client_activate;
+ __Reply__rpc_jack_client_deactivate_t Reply_rpc_jack_client_deactivate;
+ __Reply__rpc_jack_port_register_t Reply_rpc_jack_port_register;
+ __Reply__rpc_jack_port_unregister_t Reply_rpc_jack_port_unregister;
+ __Reply__rpc_jack_port_connect_t Reply_rpc_jack_port_connect;
+ __Reply__rpc_jack_port_disconnect_t Reply_rpc_jack_port_disconnect;
+ __Reply__rpc_jack_port_connect_name_t Reply_rpc_jack_port_connect_name;
+ __Reply__rpc_jack_port_disconnect_name_t Reply_rpc_jack_port_disconnect_name;
+ __Reply__rpc_jack_set_buffer_size_t Reply_rpc_jack_set_buffer_size;
+ __Reply__rpc_jack_set_freewheel_t Reply_rpc_jack_set_freewheel;
+ __Reply__rpc_jack_release_timebase_t Reply_rpc_jack_release_timebase;
+ __Reply__rpc_jack_set_timebase_callback_t Reply_rpc_jack_set_timebase_callback;
+ __Reply__rpc_jack_client_rt_notify_t Reply_rpc_jack_client_rt_notify;
+};
+#endif /* __RequestUnion__server_JackRPCEngine_subsystem__defined */
+/* Forward Declarations */
+
+
+mig_internal novalue _Xrpc_jack_client_new
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_client_close
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_client_activate
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_client_deactivate
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_register
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_unregister
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_connect
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_disconnect
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_connect_name
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_port_disconnect_name
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_set_buffer_size
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_set_freewheel
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_release_timebase
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_set_timebase_callback
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+mig_internal novalue _Xrpc_jack_client_rt_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);
+
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_new_t__defined)
+#define __MIG_check__Request__rpc_jack_client_new_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__int_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__char_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__float_rep__client_name_t((client_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_new_t(__Request__rpc_jack_client_new_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_new_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name(&In0P->client_name, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_new_t__client_name__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name(&In0P->client_name, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_new_t__client_name__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name(&In0P->client_name, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_new_t__client_name__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_new_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_new */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_client_new
+(
+ mach_port_t server_port,
+ client_name_t client_name,
+ mach_port_t *private_port,
+ int *shared_engine,
+ int *shared_client,
+ int *shared_ports,
+ int *result
+);
+
+/* Routine rpc_jack_client_new */
+mig_internal novalue _Xrpc_jack_client_new
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ client_name_t client_name;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_new_t __Request;
+ typedef __Reply__rpc_jack_client_new_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_new_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_new_t__defined */
+
+#if UseStaticTemplates
+ const static mach_msg_port_descriptor_t private_portTemplate = {
+ /* name = */ MACH_PORT_NULL,
+ /* pad1 = */ 0,
+ /* pad2 = */ 0,
+ /* disp = */ 20,
+ /* type = */ MACH_MSG_PORT_DESCRIPTOR,
+ };
+#endif /* UseStaticTemplates */
+
+ kern_return_t RetCode;
+ __DeclareRcvRpc(1000, "rpc_jack_client_new")
+ __BeforeRcvRpc(1000, "rpc_jack_client_new")
+
+#if defined(__MIG_check__Request__rpc_jack_client_new_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_new_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_new_t__defined) */
+
+#if UseStaticTemplates
+ OutP->private_port = private_portTemplate;
+#else /* UseStaticTemplates */
+ OutP->private_port.disposition = 20;
+ OutP->private_port.type = MACH_MSG_PORT_DESCRIPTOR;
+#endif /* UseStaticTemplates */
+
+
+ RetCode = server_rpc_jack_client_new(In0P->Head.msgh_request_port, In0P->client_name, &OutP->private_port.name, &OutP->shared_engine, &OutP->shared_client, &OutP->shared_ports, &OutP->result);
+ if (RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ OutP->msgh_body.msgh_descriptor_count = 1;
+ __AfterRcvRpc(1000, "rpc_jack_client_new")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_close_t__defined)
+#define __MIG_check__Request__rpc_jack_client_close_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_close_t(__Request__rpc_jack_client_close_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_close_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_close_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_close_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_close_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_close_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_close */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_client_close
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_client_close */
+mig_internal novalue _Xrpc_jack_client_close
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_close_t __Request;
+ typedef __Reply__rpc_jack_client_close_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_close_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_close_t__defined */
+
+ __DeclareRcvRpc(1001, "rpc_jack_client_close")
+ __BeforeRcvRpc(1001, "rpc_jack_client_close")
+
+#if defined(__MIG_check__Request__rpc_jack_client_close_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_close_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_close_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_client_close(In0P->Head.msgh_request_port, In0P->refnum, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1001, "rpc_jack_client_close")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_activate_t__defined)
+#define __MIG_check__Request__rpc_jack_client_activate_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_activate_t(__Request__rpc_jack_client_activate_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_activate_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_activate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_activate_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_activate */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_client_activate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_client_activate */
+mig_internal novalue _Xrpc_jack_client_activate
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_activate_t __Request;
+ typedef __Reply__rpc_jack_client_activate_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_activate_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_activate_t__defined */
+
+ __DeclareRcvRpc(1002, "rpc_jack_client_activate")
+ __BeforeRcvRpc(1002, "rpc_jack_client_activate")
+
+#if defined(__MIG_check__Request__rpc_jack_client_activate_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_activate_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_activate_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_client_activate(In0P->Head.msgh_request_port, In0P->refnum, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1002, "rpc_jack_client_activate")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_deactivate_t__defined)
+#define __MIG_check__Request__rpc_jack_client_deactivate_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_deactivate_t(__Request__rpc_jack_client_deactivate_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_deactivate_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_deactivate_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_deactivate_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_deactivate */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_client_deactivate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_client_deactivate */
+mig_internal novalue _Xrpc_jack_client_deactivate
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_deactivate_t __Request;
+ typedef __Reply__rpc_jack_client_deactivate_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_deactivate_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_deactivate_t__defined */
+
+ __DeclareRcvRpc(1003, "rpc_jack_client_deactivate")
+ __BeforeRcvRpc(1003, "rpc_jack_client_deactivate")
+
+#if defined(__MIG_check__Request__rpc_jack_client_deactivate_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_deactivate_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_deactivate_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_client_deactivate(In0P->Head.msgh_request_port, In0P->refnum, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1003, "rpc_jack_client_deactivate")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_register_t__defined)
+#define __MIG_check__Request__rpc_jack_port_register_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__int_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__unsigned__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__int_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__uint32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__int_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__unsigned__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__uint32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__char_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__unsigned__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__char_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__uint32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__char_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__unsigned__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__uint32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__float_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__unsigned__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__float_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__uint32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags(a, f) \
+ __NDR_convert__float_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__unsigned__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__uint32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_register_t(__Request__rpc_jack_port_register_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_register_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name(&In0P->name, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__name__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags(&In0P->flags, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__flags__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size(&In0P->buffer_size, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name(&In0P->name, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__name__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags(&In0P->flags, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__flags__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size(&In0P->buffer_size, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name(&In0P->name, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__name__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags(&In0P->flags, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__flags__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size(&In0P->buffer_size, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_register_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_register_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_register */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_register
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t name,
+ unsigned flags,
+ unsigned buffer_size,
+ unsigned *port_index,
+ int *result
+);
+
+/* Routine rpc_jack_port_register */
+mig_internal novalue _Xrpc_jack_port_register
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t name;
+ unsigned flags;
+ unsigned buffer_size;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_register_t __Request;
+ typedef __Reply__rpc_jack_port_register_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_register_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_register_t__defined */
+
+ __DeclareRcvRpc(1004, "rpc_jack_port_register")
+ __BeforeRcvRpc(1004, "rpc_jack_port_register")
+
+#if defined(__MIG_check__Request__rpc_jack_port_register_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_register_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_register_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_register(In0P->Head.msgh_request_port, In0P->refnum, In0P->name, In0P->flags, In0P->buffer_size, &OutP->port_index, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1004, "rpc_jack_port_register")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_unregister_t__defined)
+#define __MIG_check__Request__rpc_jack_port_unregister_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_unregister_t(__Request__rpc_jack_port_unregister_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_unregister_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port(&In0P->port, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_unregister_t__port__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port(&In0P->port, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_unregister_t__port__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port(&In0P->port, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_unregister_t__port__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_unregister_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_unregister */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_unregister
+(
+ mach_port_t server_port,
+ int refnum,
+ int port,
+ int *result
+);
+
+/* Routine rpc_jack_port_unregister */
+mig_internal novalue _Xrpc_jack_port_unregister
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int port;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_unregister_t __Request;
+ typedef __Reply__rpc_jack_port_unregister_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_unregister_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_unregister_t__defined */
+
+ __DeclareRcvRpc(1005, "rpc_jack_port_unregister")
+ __BeforeRcvRpc(1005, "rpc_jack_port_unregister")
+
+#if defined(__MIG_check__Request__rpc_jack_port_unregister_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_unregister_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_unregister_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_unregister(In0P->Head.msgh_request_port, In0P->refnum, In0P->port, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1005, "rpc_jack_port_unregister")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_connect_t__defined)
+#define __MIG_check__Request__rpc_jack_port_connect_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_connect_t(__Request__rpc_jack_port_connect_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_connect_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src(&In0P->src, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__src__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst(&In0P->dst, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src(&In0P->src, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__src__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst(&In0P->dst, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src(&In0P->src, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__src__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst(&In0P->dst, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_connect_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_connect */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_connect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_connect */
+mig_internal novalue _Xrpc_jack_port_connect
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_connect_t __Request;
+ typedef __Reply__rpc_jack_port_connect_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_connect_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_connect_t__defined */
+
+ __DeclareRcvRpc(1006, "rpc_jack_port_connect")
+ __BeforeRcvRpc(1006, "rpc_jack_port_connect")
+
+#if defined(__MIG_check__Request__rpc_jack_port_connect_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_connect_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_connect_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_connect(In0P->Head.msgh_request_port, In0P->refnum, In0P->src, In0P->dst, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1006, "rpc_jack_port_connect")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_disconnect_t__defined)
+#define __MIG_check__Request__rpc_jack_port_disconnect_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_disconnect_t(__Request__rpc_jack_port_disconnect_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_disconnect_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src(&In0P->src, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst(&In0P->dst, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src(&In0P->src, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst(&In0P->dst, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src(&In0P->src, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__src__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst(&In0P->dst, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_disconnect_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_disconnect */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_disconnect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_disconnect */
+mig_internal novalue _Xrpc_jack_port_disconnect
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_disconnect_t __Request;
+ typedef __Reply__rpc_jack_port_disconnect_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_disconnect_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_disconnect_t__defined */
+
+ __DeclareRcvRpc(1007, "rpc_jack_port_disconnect")
+ __BeforeRcvRpc(1007, "rpc_jack_port_disconnect")
+
+#if defined(__MIG_check__Request__rpc_jack_port_disconnect_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_disconnect_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_disconnect_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_disconnect(In0P->Head.msgh_request_port, In0P->refnum, In0P->src, In0P->dst, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1007, "rpc_jack_port_disconnect")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_connect_name_t__defined)
+#define __MIG_check__Request__rpc_jack_port_connect_name_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__int_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__char_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__float_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_connect_name_t(__Request__rpc_jack_port_connect_name_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_connect_name_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src(&In0P->src, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst(&In0P->dst, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src(&In0P->src, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst(&In0P->dst, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src(&In0P->src, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__src__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst(&In0P->dst, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_connect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_connect_name_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_connect_name */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_connect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_connect_name */
+mig_internal novalue _Xrpc_jack_port_connect_name
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_connect_name_t __Request;
+ typedef __Reply__rpc_jack_port_connect_name_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_connect_name_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_connect_name_t__defined */
+
+ __DeclareRcvRpc(1008, "rpc_jack_port_connect_name")
+ __BeforeRcvRpc(1008, "rpc_jack_port_connect_name")
+
+#if defined(__MIG_check__Request__rpc_jack_port_connect_name_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_connect_name_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_connect_name_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_connect_name(In0P->Head.msgh_request_port, In0P->refnum, In0P->src, In0P->dst, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1008, "rpc_jack_port_connect_name")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_port_disconnect_name_t__defined)
+#define __MIG_check__Request__rpc_jack_port_disconnect_name_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__int_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__client_port_name_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__int_rep__string__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__int_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__char_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__client_port_name_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__char_rep__string__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__char_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__float_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__client_port_name_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__client_port_name_t((client_port_name_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__string(a, f, 128)
+#elif defined(__NDR_convert__float_rep__string__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst(a, f) \
+ __NDR_convert__float_rep__string(a, f, 128)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_disconnect_name_t(__Request__rpc_jack_port_disconnect_name_t *In0P)
+{
+
+ typedef __Request__rpc_jack_port_disconnect_name_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src(&In0P->src, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst(&In0P->dst, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src(&In0P->src, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst(&In0P->dst, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src(&In0P->src, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__src__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst(&In0P->dst, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_port_disconnect_name_t__dst__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_port_disconnect_name_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_disconnect_name */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_port_disconnect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+);
+
+/* Routine rpc_jack_port_disconnect_name */
+mig_internal novalue _Xrpc_jack_port_disconnect_name
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_port_disconnect_name_t __Request;
+ typedef __Reply__rpc_jack_port_disconnect_name_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_port_disconnect_name_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_port_disconnect_name_t__defined */
+
+ __DeclareRcvRpc(1009, "rpc_jack_port_disconnect_name")
+ __BeforeRcvRpc(1009, "rpc_jack_port_disconnect_name")
+
+#if defined(__MIG_check__Request__rpc_jack_port_disconnect_name_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_port_disconnect_name_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_port_disconnect_name_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_port_disconnect_name(In0P->Head.msgh_request_port, In0P->refnum, In0P->src, In0P->dst, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1009, "rpc_jack_port_disconnect_name")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_set_buffer_size_t__defined)
+#define __MIG_check__Request__rpc_jack_set_buffer_size_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_set_buffer_size_t(__Request__rpc_jack_set_buffer_size_t *In0P)
+{
+
+ typedef __Request__rpc_jack_set_buffer_size_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(&In0P->buffer_size, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(&In0P->buffer_size, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size(&In0P->buffer_size, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_buffer_size_t__buffer_size__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_set_buffer_size_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_buffer_size */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_set_buffer_size
+(
+ mach_port_t server_port,
+ int buffer_size,
+ int *result
+);
+
+/* Routine rpc_jack_set_buffer_size */
+mig_internal novalue _Xrpc_jack_set_buffer_size
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int buffer_size;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_set_buffer_size_t __Request;
+ typedef __Reply__rpc_jack_set_buffer_size_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_set_buffer_size_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_set_buffer_size_t__defined */
+
+ __DeclareRcvRpc(1010, "rpc_jack_set_buffer_size")
+ __BeforeRcvRpc(1010, "rpc_jack_set_buffer_size")
+
+#if defined(__MIG_check__Request__rpc_jack_set_buffer_size_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_set_buffer_size_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_set_buffer_size_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_set_buffer_size(In0P->Head.msgh_request_port, In0P->buffer_size, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1010, "rpc_jack_set_buffer_size")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_set_freewheel_t__defined)
+#define __MIG_check__Request__rpc_jack_set_freewheel_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_set_freewheel_t(__Request__rpc_jack_set_freewheel_t *In0P)
+{
+
+ typedef __Request__rpc_jack_set_freewheel_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff(&In0P->onoff, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff(&In0P->onoff, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff(&In0P->onoff, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_freewheel_t__onoff__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_set_freewheel_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_freewheel */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_set_freewheel
+(
+ mach_port_t server_port,
+ int onoff,
+ int *result
+);
+
+/* Routine rpc_jack_set_freewheel */
+mig_internal novalue _Xrpc_jack_set_freewheel
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int onoff;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_set_freewheel_t __Request;
+ typedef __Reply__rpc_jack_set_freewheel_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_set_freewheel_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_set_freewheel_t__defined */
+
+ __DeclareRcvRpc(1011, "rpc_jack_set_freewheel")
+ __BeforeRcvRpc(1011, "rpc_jack_set_freewheel")
+
+#if defined(__MIG_check__Request__rpc_jack_set_freewheel_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_set_freewheel_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_set_freewheel_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_set_freewheel(In0P->Head.msgh_request_port, In0P->onoff, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1011, "rpc_jack_set_freewheel")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_release_timebase_t__defined)
+#define __MIG_check__Request__rpc_jack_release_timebase_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_release_timebase_t(__Request__rpc_jack_release_timebase_t *In0P)
+{
+
+ typedef __Request__rpc_jack_release_timebase_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_release_timebase_t__refnum__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_release_timebase_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_release_timebase */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_release_timebase
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+);
+
+/* Routine rpc_jack_release_timebase */
+mig_internal novalue _Xrpc_jack_release_timebase
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_release_timebase_t __Request;
+ typedef __Reply__rpc_jack_release_timebase_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_release_timebase_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_release_timebase_t__defined */
+
+ __DeclareRcvRpc(1012, "rpc_jack_release_timebase")
+ __BeforeRcvRpc(1012, "rpc_jack_release_timebase")
+
+#if defined(__MIG_check__Request__rpc_jack_release_timebase_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_release_timebase_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_release_timebase_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_release_timebase(In0P->Head.msgh_request_port, In0P->refnum, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1012, "rpc_jack_release_timebase")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_set_timebase_callback_t__defined)
+#define __MIG_check__Request__rpc_jack_set_timebase_callback_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_set_timebase_callback_t(__Request__rpc_jack_set_timebase_callback_t *In0P)
+{
+
+ typedef __Request__rpc_jack_set_timebase_callback_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional(&In0P->conditional, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional(&In0P->conditional, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional(&In0P->conditional, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_set_timebase_callback_t__conditional__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_set_timebase_callback_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_timebase_callback */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_set_timebase_callback
+(
+ mach_port_t server_port,
+ int refnum,
+ int conditional,
+ int *result
+);
+
+/* Routine rpc_jack_set_timebase_callback */
+mig_internal novalue _Xrpc_jack_set_timebase_callback
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int conditional;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_set_timebase_callback_t __Request;
+ typedef __Reply__rpc_jack_set_timebase_callback_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_set_timebase_callback_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_set_timebase_callback_t__defined */
+
+ __DeclareRcvRpc(1013, "rpc_jack_set_timebase_callback")
+ __BeforeRcvRpc(1013, "rpc_jack_set_timebase_callback")
+
+#if defined(__MIG_check__Request__rpc_jack_set_timebase_callback_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_set_timebase_callback_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_set_timebase_callback_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_set_timebase_callback(In0P->Head.msgh_request_port, In0P->refnum, In0P->conditional, &OutP->result);
+ if (OutP->RetCode != KERN_SUCCESS) {
+ MIG_RETURN_ERROR(OutP, OutP->RetCode);
+ }
+
+ OutP->NDR = NDR_record;
+
+
+ OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
+ __AfterRcvRpc(1013, "rpc_jack_set_timebase_callback")
+}
+
+#if (__MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Request__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Request__rpc_jack_client_rt_notify_t__defined)
+#define __MIG_check__Request__rpc_jack_client_rt_notify_t__defined
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+
+#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+
+#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+
+#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined
+#define __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+
+
+mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_rt_notify_t(__Request__rpc_jack_client_rt_notify_t *In0P)
+{
+
+ typedef __Request__rpc_jack_client_rt_notify_t __Request;
+#if __MigTypeCheck
+ if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
+ return MIG_BAD_ARGUMENTS;
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined) || \
+ defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ if (In0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum(&In0P->refnum, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify(&In0P->notify, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value(&In0P->value, In0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined) || \
+ defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ if (In0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum(&In0P->refnum, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify(&In0P->notify, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value(&In0P->value, In0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined) || \
+ defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ if (In0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum(&In0P->refnum, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__refnum__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify(&In0P->notify, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__notify__defined */
+#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined)
+ __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value(&In0P->value, In0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_rt_notify_t__value__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Request__rpc_jack_client_rt_notify_t__defined) */
+#endif /* __MIG_check__Request__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* SimpleRoutine rpc_jack_client_rt_notify */
+#ifdef mig_external
+mig_external
+#else
+extern
+#endif /* mig_external */
+kern_return_t server_rpc_jack_client_rt_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ int notify,
+ int value
+);
+
+/* SimpleRoutine rpc_jack_client_rt_notify */
+mig_internal novalue _Xrpc_jack_client_rt_notify
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int notify;
+ int value;
+ mach_msg_trailer_t trailer;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ typedef __Request__rpc_jack_client_rt_notify_t __Request;
+ typedef __Reply__rpc_jack_client_rt_notify_t Reply;
+
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ Request *In0P = (Request *) InHeadP;
+ Reply *OutP = (Reply *) OutHeadP;
+#ifdef __MIG_check__Request__rpc_jack_client_rt_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Request__rpc_jack_client_rt_notify_t__defined */
+
+ __DeclareRcvSimple(1014, "rpc_jack_client_rt_notify")
+ __BeforeRcvSimple(1014, "rpc_jack_client_rt_notify")
+
+#if defined(__MIG_check__Request__rpc_jack_client_rt_notify_t__defined)
+ check_result = __MIG_check__Request__rpc_jack_client_rt_notify_t((__Request *)In0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { MIG_RETURN_ERROR(OutP, check_result); }
+#endif /* defined(__MIG_check__Request__rpc_jack_client_rt_notify_t__defined) */
+
+ OutP->RetCode = server_rpc_jack_client_rt_notify(In0P->Head.msgh_request_port, In0P->refnum, In0P->notify, In0P->value);
+ __AfterRcvSimple(1014, "rpc_jack_client_rt_notify")
+}
+
+
+extern boolean_t JackRPCEngine_server(
+ mach_msg_header_t *InHeadP,
+ mach_msg_header_t *OutHeadP);
+
+extern mig_routine_t JackRPCEngine_server_routine(
+ mach_msg_header_t *InHeadP);
+
+
+/* Description of this subsystem, for use in direct RPC */
+const struct server_JackRPCEngine_subsystem {
+ mig_server_routine_t server; /* Server routine */
+ mach_msg_id_t start; /* Min routine number */
+ mach_msg_id_t end; /* Max routine number + 1 */
+ unsigned int maxsize; /* Max msg size */
+ vm_address_t reserved; /* Reserved */
+ struct routine_descriptor /*Array of routine descriptors */
+ routine[15];
+} server_JackRPCEngine_subsystem = {
+ JackRPCEngine_server_routine,
+ 1000,
+ 1015,
+ (mach_msg_size_t)sizeof(union __ReplyUnion__server_JackRPCEngine_subsystem),
+ (vm_address_t)0,
+ {
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_new, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_new_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_close, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_close_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_activate, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_activate_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_deactivate, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_deactivate_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_register, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_register_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_unregister, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_unregister_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_connect, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_connect_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_disconnect, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_disconnect_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_connect_name, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_connect_name_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_port_disconnect_name, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_disconnect_name_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_set_buffer_size, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_set_buffer_size_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_set_freewheel, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_set_freewheel_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_release_timebase, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_release_timebase_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_set_timebase_callback, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_set_timebase_callback_t)},
+ { (mig_impl_routine_t) 0,
+ (mig_stub_routine_t) _Xrpc_jack_client_rt_notify, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_rt_notify_t)},
+ }
+};
+
+mig_external boolean_t JackRPCEngine_server
+ (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
+{
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ register mig_routine_t routine;
+
+ OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
+ OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
+ /* Minimal size: routine() will update it if different */
+ OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
+ OutHeadP->msgh_local_port = MACH_PORT_NULL;
+ OutHeadP->msgh_id = InHeadP->msgh_id + 100;
+
+ if ((InHeadP->msgh_id > 1014) || (InHeadP->msgh_id < 1000) ||
+ ((routine = server_JackRPCEngine_subsystem.routine[InHeadP->msgh_id - 1000].stub_routine) == 0)) {
+ ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
+ ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
+ return FALSE;
+ }
+ (*routine) (InHeadP, OutHeadP);
+ return TRUE;
+}
+
+mig_external mig_routine_t JackRPCEngine_server_routine
+ (mach_msg_header_t *InHeadP)
+{
+ register int msgh_id;
+
+ msgh_id = InHeadP->msgh_id - 1000;
+
+ if ((msgh_id > 14) || (msgh_id < 0))
+ return 0;
+
+ return server_JackRPCEngine_subsystem.routine[msgh_id].stub_routine;
+}
diff --git a/macosx/RPC/JackRPCEngineUser.c b/macosx/RPC/JackRPCEngineUser.c
new file mode 100644
index 00000000..85234c31
--- /dev/null
+++ b/macosx/RPC/JackRPCEngineUser.c
@@ -0,0 +1,4115 @@
+/*
+ * IDENTIFICATION:
+ * stub generated Mon Feb 13 17:58:24 2006
+ * with a MiG generated Sun Mar 20 14:22:13 PST 2005 by root@b05.apple.com
+ * OPTIONS:
+ */
+#define __MIG_check__Reply__JackRPCEngine_subsystem__ 1
+#define __NDR_convert__Reply__JackRPCEngine_subsystem__ 1
+#define __NDR_convert__mig_reply_error_subsystem__ 1
+
+#include "JackRPCEngine.h"
+
+
+#ifndef mig_internal
+#define mig_internal static __inline__
+#endif /* mig_internal */
+
+#ifndef mig_external
+#define mig_external
+#endif /* mig_external */
+
+#if !defined(__MigTypeCheck) && defined(TypeCheck)
+#define __MigTypeCheck TypeCheck /* Legacy setting */
+#endif /* !defined(__MigTypeCheck) */
+
+#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
+#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
+#endif /* !defined(__MigKernelSpecificCode) */
+
+#ifndef LimitCheck
+#define LimitCheck 0
+#endif /* LimitCheck */
+
+#ifndef min
+#define min(a,b) ( ((a) < (b))? (a): (b) )
+#endif /* min */
+
+#if !defined(_WALIGN_)
+#define _WALIGN_(x) (((x) + 3) & ~3)
+#endif /* !defined(_WALIGN_) */
+
+#if !defined(_WALIGNSZ_)
+#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
+#endif /* !defined(_WALIGNSZ_) */
+
+#ifndef UseStaticTemplates
+#define UseStaticTemplates 0
+#endif /* UseStaticTemplates */
+
+#ifndef __MachMsgErrorWithTimeout
+#define __MachMsgErrorWithTimeout(_R_) { \
+ switch (_R_) { \
+ case MACH_SEND_INVALID_REPLY: \
+ case MACH_RCV_INVALID_NAME: \
+ case MACH_RCV_PORT_DIED: \
+ case MACH_RCV_PORT_CHANGED: \
+ case MACH_RCV_TIMED_OUT: \
+ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
+ break; \
+ default: \
+ mig_put_reply_port(InP->Head.msgh_reply_port); \
+ } \
+}
+#endif /* __MachMsgErrorWithTimeout */
+
+#ifndef __MachMsgErrorWithoutTimeout
+#define __MachMsgErrorWithoutTimeout(_R_) { \
+ switch (_R_) { \
+ case MACH_SEND_INVALID_REPLY: \
+ case MACH_RCV_INVALID_NAME: \
+ case MACH_RCV_PORT_DIED: \
+ case MACH_RCV_PORT_CHANGED: \
+ mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
+ break; \
+ default: \
+ mig_put_reply_port(InP->Head.msgh_reply_port); \
+ } \
+}
+#endif /* __MachMsgErrorWithoutTimeout */
+
+#ifndef __DeclareSendRpc
+#define __DeclareSendRpc(_NUM_, _NAME_)
+#endif /* __DeclareSendRpc */
+
+#ifndef __BeforeSendRpc
+#define __BeforeSendRpc(_NUM_, _NAME_)
+#endif /* __BeforeSendRpc */
+
+#ifndef __AfterSendRpc
+#define __AfterSendRpc(_NUM_, _NAME_)
+#endif /* __AfterSendRpc */
+
+#ifndef __DeclareSendSimple
+#define __DeclareSendSimple(_NUM_, _NAME_)
+#endif /* __DeclareSendSimple */
+
+#ifndef __BeforeSendSimple
+#define __BeforeSendSimple(_NUM_, _NAME_)
+#endif /* __BeforeSendSimple */
+
+#ifndef __AfterSendSimple
+#define __AfterSendSimple(_NUM_, _NAME_)
+#endif /* __AfterSendSimple */
+
+#define msgh_request_port msgh_remote_port
+#define msgh_reply_port msgh_local_port
+
+
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_client_new_t__defined)
+#define __MIG_check__Reply__rpc_jack_client_new_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined */
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined */
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_new_t(__Reply__rpc_jack_client_new_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_client_new_t __Reply;
+ boolean_t msgh_simple;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1100) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+ msgh_simple = !(Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX);
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((msgh_simple || Out0P->msgh_body.msgh_descriptor_count != 1 ||
+ msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (!msgh_simple || msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ ((mig_reply_error_t *)Out0P)->RetCode == KERN_SUCCESS))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (msgh_simple) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if __MigTypeCheck
+ if (Out0P->private_port.type != MACH_MSG_PORT_DESCRIPTOR ||
+ Out0P->private_port.disposition != 17)
+ { return MIG_TYPE_ERROR; }
+#endif /* __MigTypeCheck */
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine(&Out0P->shared_engine, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client(&Out0P->shared_client, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports(&Out0P->shared_ports, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_new_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined) || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined) || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined) || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine(&Out0P->shared_engine, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client(&Out0P->shared_client, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports(&Out0P->shared_ports, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_new_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined) || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined) || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined) || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine(&Out0P->shared_engine, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_engine__defined */
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client(&Out0P->shared_client, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_client__defined */
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports(&Out0P->shared_ports, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__shared_ports__defined */
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_new_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_client_new_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_new */
+mig_external kern_return_t rpc_jack_client_new
+(
+ mach_port_t server_port,
+ client_name_t client_name,
+ mach_port_t *private_port,
+ int *shared_engine,
+ int *shared_client,
+ int *shared_ports,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ client_name_t client_name;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ /* start of the kernel processed data */
+ mach_msg_body_t msgh_body;
+ mach_msg_port_descriptor_t private_port;
+ /* end of the kernel processed data */
+ NDR_record_t NDR;
+ int shared_engine;
+ int shared_client;
+ int shared_ports;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ /* start of the kernel processed data */
+ mach_msg_body_t msgh_body;
+ mach_msg_port_descriptor_t private_port;
+ /* end of the kernel processed data */
+ NDR_record_t NDR;
+ int shared_engine;
+ int shared_client;
+ int shared_ports;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_new_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_new_t__defined */
+
+ __DeclareSendRpc(1000, "rpc_jack_client_new")
+
+ InP->NDR = NDR_record;
+
+ (void) mig_strncpy(InP->client_name, client_name, 128);
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1000;
+
+ __BeforeSendRpc(1000, "rpc_jack_client_new")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1000, "rpc_jack_client_new")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_client_new_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_client_new_t((__Reply__rpc_jack_client_new_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_client_new_t__defined) */
+
+ *private_port = Out0P->private_port.name;
+ *shared_engine = Out0P->shared_engine;
+
+ *shared_client = Out0P->shared_client;
+
+ *shared_ports = Out0P->shared_ports;
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_client_close_t__defined)
+#define __MIG_check__Reply__rpc_jack_client_close_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_close_t(__Reply__rpc_jack_client_close_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_client_close_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1101) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_close_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_close_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_close_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_client_close_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_close */
+mig_external kern_return_t rpc_jack_client_close
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_close_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_close_t__defined */
+
+ __DeclareSendRpc(1001, "rpc_jack_client_close")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1001;
+
+ __BeforeSendRpc(1001, "rpc_jack_client_close")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1001, "rpc_jack_client_close")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_client_close_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_client_close_t((__Reply__rpc_jack_client_close_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_client_close_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_client_activate_t__defined)
+#define __MIG_check__Reply__rpc_jack_client_activate_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_activate_t(__Reply__rpc_jack_client_activate_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_client_activate_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1102) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_activate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_activate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_activate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_client_activate_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_activate */
+mig_external kern_return_t rpc_jack_client_activate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_activate_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_activate_t__defined */
+
+ __DeclareSendRpc(1002, "rpc_jack_client_activate")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1002;
+
+ __BeforeSendRpc(1002, "rpc_jack_client_activate")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1002, "rpc_jack_client_activate")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_client_activate_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_client_activate_t((__Reply__rpc_jack_client_activate_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_client_activate_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_client_deactivate_t__defined)
+#define __MIG_check__Reply__rpc_jack_client_deactivate_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_deactivate_t(__Reply__rpc_jack_client_deactivate_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_client_deactivate_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1103) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_deactivate_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_client_deactivate_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_client_deactivate */
+mig_external kern_return_t rpc_jack_client_deactivate
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_deactivate_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_deactivate_t__defined */
+
+ __DeclareSendRpc(1003, "rpc_jack_client_deactivate")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1003;
+
+ __BeforeSendRpc(1003, "rpc_jack_client_deactivate")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1003, "rpc_jack_client_deactivate")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_client_deactivate_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_client_deactivate_t((__Reply__rpc_jack_client_deactivate_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_client_deactivate_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_register_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_register_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__unsigned__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__int_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__uint32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__int_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__unsigned__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__char_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__uint32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__char_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__unsigned__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__unsigned__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__float_rep__unsigned((unsigned *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__uint32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__uint32_t((uint32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__uint32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index(a, f) \
+ __NDR_convert__float_rep__uint32_t((uint32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_register_t(__Reply__rpc_jack_port_register_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_register_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1104) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index(&Out0P->port_index, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_register_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined) || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index(&Out0P->port_index, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_register_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined) || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index(&Out0P->port_index, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__port_index__defined */
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_register_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_register_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_register */
+mig_external kern_return_t rpc_jack_port_register
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t name,
+ unsigned flags,
+ unsigned buffer_size,
+ unsigned *port_index,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t name;
+ unsigned flags;
+ unsigned buffer_size;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ unsigned port_index;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ unsigned port_index;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_register_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_register_t__defined */
+
+ __DeclareSendRpc(1004, "rpc_jack_port_register")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ (void) mig_strncpy(InP->name, name, 128);
+
+ InP->flags = flags;
+
+ InP->buffer_size = buffer_size;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1004;
+
+ __BeforeSendRpc(1004, "rpc_jack_port_register")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1004, "rpc_jack_port_register")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_register_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_register_t((__Reply__rpc_jack_port_register_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_register_t__defined) */
+
+ *port_index = Out0P->port_index;
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_unregister_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_unregister_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_unregister_t(__Reply__rpc_jack_port_unregister_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_unregister_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1105) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_unregister_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_unregister_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_unregister */
+mig_external kern_return_t rpc_jack_port_unregister
+(
+ mach_port_t server_port,
+ int refnum,
+ int port,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int port;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_unregister_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_unregister_t__defined */
+
+ __DeclareSendRpc(1005, "rpc_jack_port_unregister")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->port = port;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1005;
+
+ __BeforeSendRpc(1005, "rpc_jack_port_unregister")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1005, "rpc_jack_port_unregister")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_unregister_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_unregister_t((__Reply__rpc_jack_port_unregister_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_unregister_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_connect_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_connect_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_connect_t(__Reply__rpc_jack_port_connect_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_connect_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1106) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_connect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_connect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_connect_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_connect */
+mig_external kern_return_t rpc_jack_port_connect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_connect_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_connect_t__defined */
+
+ __DeclareSendRpc(1006, "rpc_jack_port_connect")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->src = src;
+
+ InP->dst = dst;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1006;
+
+ __BeforeSendRpc(1006, "rpc_jack_port_connect")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1006, "rpc_jack_port_connect")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_connect_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_connect_t((__Reply__rpc_jack_port_connect_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_connect_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_disconnect_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_disconnect_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_disconnect_t(__Reply__rpc_jack_port_disconnect_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_disconnect_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1107) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_disconnect_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_disconnect */
+mig_external kern_return_t rpc_jack_port_disconnect
+(
+ mach_port_t server_port,
+ int refnum,
+ int src,
+ int dst,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int src;
+ int dst;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_disconnect_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_disconnect_t__defined */
+
+ __DeclareSendRpc(1007, "rpc_jack_port_disconnect")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->src = src;
+
+ InP->dst = dst;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1007;
+
+ __BeforeSendRpc(1007, "rpc_jack_port_disconnect")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1007, "rpc_jack_port_disconnect")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_disconnect_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_disconnect_t((__Reply__rpc_jack_port_disconnect_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_disconnect_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_connect_name_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_connect_name_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_connect_name_t(__Reply__rpc_jack_port_connect_name_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_connect_name_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1108) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_connect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_connect_name_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_connect_name */
+mig_external kern_return_t rpc_jack_port_connect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_connect_name_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_connect_name_t__defined */
+
+ __DeclareSendRpc(1008, "rpc_jack_port_connect_name")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ (void) mig_strncpy(InP->src, src, 128);
+
+ (void) mig_strncpy(InP->dst, dst, 128);
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1008;
+
+ __BeforeSendRpc(1008, "rpc_jack_port_connect_name")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1008, "rpc_jack_port_connect_name")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_connect_name_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_connect_name_t((__Reply__rpc_jack_port_connect_name_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_connect_name_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined)
+#define __MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_port_disconnect_name_t(__Reply__rpc_jack_port_disconnect_name_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_port_disconnect_name_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1109) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_port_disconnect_name_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_port_disconnect_name */
+mig_external kern_return_t rpc_jack_port_disconnect_name
+(
+ mach_port_t server_port,
+ int refnum,
+ client_port_name_t src,
+ client_port_name_t dst,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ client_port_name_t src;
+ client_port_name_t dst;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined */
+
+ __DeclareSendRpc(1009, "rpc_jack_port_disconnect_name")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ (void) mig_strncpy(InP->src, src, 128);
+
+ (void) mig_strncpy(InP->dst, dst, 128);
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1009;
+
+ __BeforeSendRpc(1009, "rpc_jack_port_disconnect_name")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1009, "rpc_jack_port_disconnect_name")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_port_disconnect_name_t((__Reply__rpc_jack_port_disconnect_name_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_port_disconnect_name_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_set_buffer_size_t__defined)
+#define __MIG_check__Reply__rpc_jack_set_buffer_size_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_set_buffer_size_t(__Reply__rpc_jack_set_buffer_size_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_set_buffer_size_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1110) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_buffer_size_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_set_buffer_size_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_buffer_size */
+mig_external kern_return_t rpc_jack_set_buffer_size
+(
+ mach_port_t server_port,
+ int buffer_size,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int buffer_size;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_set_buffer_size_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_set_buffer_size_t__defined */
+
+ __DeclareSendRpc(1010, "rpc_jack_set_buffer_size")
+
+ InP->NDR = NDR_record;
+
+ InP->buffer_size = buffer_size;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1010;
+
+ __BeforeSendRpc(1010, "rpc_jack_set_buffer_size")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1010, "rpc_jack_set_buffer_size")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_set_buffer_size_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_set_buffer_size_t((__Reply__rpc_jack_set_buffer_size_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_set_buffer_size_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_set_freewheel_t__defined)
+#define __MIG_check__Reply__rpc_jack_set_freewheel_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_set_freewheel_t(__Reply__rpc_jack_set_freewheel_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_set_freewheel_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1111) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_freewheel_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_set_freewheel_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_freewheel */
+mig_external kern_return_t rpc_jack_set_freewheel
+(
+ mach_port_t server_port,
+ int onoff,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int onoff;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_set_freewheel_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_set_freewheel_t__defined */
+
+ __DeclareSendRpc(1011, "rpc_jack_set_freewheel")
+
+ InP->NDR = NDR_record;
+
+ InP->onoff = onoff;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1011;
+
+ __BeforeSendRpc(1011, "rpc_jack_set_freewheel")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1011, "rpc_jack_set_freewheel")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_set_freewheel_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_set_freewheel_t((__Reply__rpc_jack_set_freewheel_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_set_freewheel_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_release_timebase_t__defined)
+#define __MIG_check__Reply__rpc_jack_release_timebase_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_release_timebase_t(__Reply__rpc_jack_release_timebase_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_release_timebase_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1112) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_release_timebase_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_release_timebase_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_release_timebase */
+mig_external kern_return_t rpc_jack_release_timebase
+(
+ mach_port_t server_port,
+ int refnum,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_release_timebase_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_release_timebase_t__defined */
+
+ __DeclareSendRpc(1012, "rpc_jack_release_timebase")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1012;
+
+ __BeforeSendRpc(1012, "rpc_jack_release_timebase")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1012, "rpc_jack_release_timebase")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_release_timebase_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_release_timebase_t((__Reply__rpc_jack_release_timebase_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_release_timebase_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+#if ( __MigTypeCheck || __NDR_convert__ )
+#if __MIG_check__Reply__JackRPCEngine_subsystem__
+#if !defined(__MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined)
+#define __MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__kern_return_t((kern_return_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode(a, f) \
+ __NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined */
+
+
+#ifndef __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__int__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__int_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__int_rep__int32_t__defined)
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__int_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+
+
+
+#ifndef __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__int__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__char_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__char_rep__int32_t__defined)
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__char_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+
+
+
+#ifndef __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__int__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__float_rep__int((int *)(a), f)
+#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f)
+#elif defined(__NDR_convert__float_rep__int32_t__defined)
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined
+#define __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result(a, f) \
+ __NDR_convert__float_rep__int32_t((int32_t *)(a), f)
+#endif /* defined(__NDR_convert__*__defined) */
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+
+
+
+mig_internal kern_return_t __MIG_check__Reply__rpc_jack_set_timebase_callback_t(__Reply__rpc_jack_set_timebase_callback_t *Out0P)
+{
+
+ typedef __Reply__rpc_jack_set_timebase_callback_t __Reply;
+#if __MigTypeCheck
+ unsigned int msgh_size;
+#endif /* __MigTypeCheck */
+ if (Out0P->Head.msgh_id != 1113) {
+ if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
+ { return MIG_SERVER_DIED; }
+ else
+ { return MIG_REPLY_MISMATCH; }
+ }
+
+#if __MigTypeCheck
+ msgh_size = Out0P->Head.msgh_size;
+
+ if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
+ ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
+ (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
+ Out0P->RetCode == KERN_SUCCESS)))
+ { return MIG_TYPE_ERROR ; }
+#endif /* __MigTypeCheck */
+
+ if (Out0P->RetCode != KERN_SUCCESS) {
+#ifdef __NDR_convert__mig_reply_error_t__defined
+ __NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
+#endif /* __NDR_convert__mig_reply_error_t__defined */
+ return ((mig_reply_error_t *)Out0P)->RetCode;
+ }
+
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined) || \
+ defined(__NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ if (Out0P->NDR.int_rep != NDR_record.int_rep) {
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__RetCode__defined */
+#if defined(__NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result(&Out0P->result, Out0P->NDR.int_rep);
+#endif /* __NDR_convert__int_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__int_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ if (Out0P->NDR.char_rep != NDR_record.char_rep) {
+#if defined(__NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result(&Out0P->result, Out0P->NDR.char_rep);
+#endif /* __NDR_convert__char_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__char_rep...) */
+
+#if 0 || \
+ defined(__NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ if (Out0P->NDR.float_rep != NDR_record.float_rep) {
+#if defined(__NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined)
+ __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result(&Out0P->result, Out0P->NDR.float_rep);
+#endif /* __NDR_convert__float_rep__Reply__rpc_jack_set_timebase_callback_t__result__defined */
+ }
+#endif /* defined(__NDR_convert__float_rep...) */
+
+ return MACH_MSG_SUCCESS;
+}
+#endif /* !defined(__MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined) */
+#endif /* __MIG_check__Reply__JackRPCEngine_subsystem__ */
+#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
+
+
+/* Routine rpc_jack_set_timebase_callback */
+mig_external kern_return_t rpc_jack_set_timebase_callback
+(
+ mach_port_t server_port,
+ int refnum,
+ int conditional,
+ int *result
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int conditional;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ mach_msg_trailer_t trailer;
+ } Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ int result;
+ } __Reply;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ Reply Out;
+ } Mess;
+
+ Request *InP = &Mess.In;
+ Reply *Out0P = &Mess.Out;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined */
+
+ __DeclareSendRpc(1013, "rpc_jack_set_timebase_callback")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->conditional = conditional;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = server_port;
+ InP->Head.msgh_reply_port = mig_get_reply_port();
+ InP->Head.msgh_id = 1013;
+
+ __BeforeSendRpc(1013, "rpc_jack_set_timebase_callback")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ __AfterSendRpc(1013, "rpc_jack_set_timebase_callback")
+ if (msg_result != MACH_MSG_SUCCESS) {
+ __MachMsgErrorWithoutTimeout(msg_result);
+ { return msg_result; }
+ }
+
+
+#if defined(__MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined)
+ check_result = __MIG_check__Reply__rpc_jack_set_timebase_callback_t((__Reply__rpc_jack_set_timebase_callback_t *)Out0P);
+ if (check_result != MACH_MSG_SUCCESS)
+ { return check_result; }
+#endif /* defined(__MIG_check__Reply__rpc_jack_set_timebase_callback_t__defined) */
+
+ *result = Out0P->result;
+
+ return KERN_SUCCESS;
+ }
+}
+
+/* SimpleRoutine rpc_jack_client_rt_notify */
+mig_external kern_return_t rpc_jack_client_rt_notify
+(
+ mach_port_t client_port,
+ int refnum,
+ int notify,
+ int value,
+ int timeout
+)
+{
+ {
+
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ int refnum;
+ int notify;
+ int value;
+ } Request;
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+ /*
+ * typedef struct {
+ * mach_msg_header_t Head;
+ * NDR_record_t NDR;
+ * kern_return_t RetCode;
+ * } mig_reply_error_t;
+ */
+
+ union {
+ Request In;
+ } Mess;
+
+ Request *InP = &Mess.In;
+
+ mach_msg_return_t msg_result;
+
+#ifdef __MIG_check__Reply__rpc_jack_client_rt_notify_t__defined
+ kern_return_t check_result;
+#endif /* __MIG_check__Reply__rpc_jack_client_rt_notify_t__defined */
+
+ __DeclareSendSimple(1014, "rpc_jack_client_rt_notify")
+
+ InP->NDR = NDR_record;
+
+ InP->refnum = refnum;
+
+ InP->notify = notify;
+
+ InP->value = value;
+
+ InP->Head.msgh_bits =
+ MACH_MSGH_BITS(19, 0);
+ /* msgh_size passed as argument */
+ InP->Head.msgh_request_port = client_port;
+ InP->Head.msgh_reply_port = MACH_PORT_NULL;
+ InP->Head.msgh_id = 1014;
+
+ __BeforeSendSimple(1014, "rpc_jack_client_rt_notify")
+ msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_SEND_TIMEOUT|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), 0, MACH_PORT_NULL, timeout, MACH_PORT_NULL);
+ __AfterSendSimple(1014, "rpc_jack_client_rt_notify")
+ return msg_result;
+ return KERN_SUCCESS;
+ }
+}
diff --git a/macosx/RPC/Jackdefs.h b/macosx/RPC/Jackdefs.h
new file mode 100644
index 00000000..bfa035ce
--- /dev/null
+++ b/macosx/RPC/Jackdefs.h
@@ -0,0 +1,4 @@
+
+
+typedef char client_name_t[128];
+typedef char client_port_name_t[128]; \ No newline at end of file
diff --git a/tests/jack_test.cpp b/tests/jack_test.cpp
new file mode 100644
index 00000000..7ebd0e05
--- /dev/null
+++ b/tests/jack_test.cpp
@@ -0,0 +1,1812 @@
+/*
+ Copyright (C) 2005 Samuel TRACOL for GRAME
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+/** @file jack_test.c
+ *
+ * @brief This client test the jack API.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <getopt.h>
+#include <math.h>
+#include <assert.h>
+#include <stdarg.h>
+#ifndef WIN32
+#include <jack/jack.h>
+#else
+#include "jack.h"
+#include "transport.h"
+#endif
+
+#ifdef WIN32
+#define M_PI 3.151592653
+#endif
+
+#ifdef WIN32
+#define jack_sleep(val) Sleep((val))
+#else
+#define jack_sleep(val) usleep((val) * 1000)
+#endif
+
+typedef struct
+{
+ jack_nframes_t ft; // running counter frame time
+ jack_nframes_t fcs; // from sycle start...
+ jack_nframes_t lft; // last frame time...
+}
+FrameTimeCollector;
+
+FILE *file;
+FrameTimeCollector* framecollect;
+FrameTimeCollector perpetualcollect;
+FrameTimeCollector lastperpetualcollect;
+int frames_collected = 0;
+
+// ports
+jack_port_t *output_port1;
+jack_port_t *output_port1b;
+jack_port_t *input_port2;
+jack_port_t *output_port2;
+jack_port_t *input_port1;
+
+// clients
+jack_client_t *client1;
+jack_client_t *client2;
+const char *client_name1;
+const char *client_name2;
+
+unsigned long sr; // sample rate
+// for time -t option
+int time_to_run = 0;
+int time_before_exit = 1;
+// standard error count
+int t_error = 0;
+int reorder = 0; // graph reorder callback
+int RT = 0; // is real time or not...
+int FW = 0; // freewheel mode
+int init_clbk = 0; // init callback
+int i, j, k = 0;
+int port_callback_reg = 0;
+jack_nframes_t cur_buffer_size, old_buffer_size, cur_pos;
+int activated = 0;
+int count1, count2 = 0; // for freewheel
+int xrun = 0;
+int have_xrun = 0; // msg to tell the process1 function to write a special thing in the frametime file.
+int process1_activated = -1; // to control processing...
+int process2_activated = -1; // to control processing...
+unsigned long int index1 = 0;
+unsigned long int index2 = 0;
+jack_default_audio_sample_t *signal1; // signal source d'emission
+jack_default_audio_sample_t *signal2; // tableau de reception
+jack_transport_state_t ts;
+jack_position_t pos;
+jack_position_t request_pos;
+int silent_error = 0; // jack silent mode
+int verbose_mode = 0;
+int transport_mode = 1;
+int ext_latency = 0; // test latency for PHY devices
+
+int sync_called = 0;
+int starting_state = 1;
+
+int linecount = 0; // line counter for log file of sampleframe counter --> for graph function.
+int linebuf = 0; // reminders for graph analysis
+int linetransport = 0;
+int linefw = 0;
+int lineports = 0;
+int linecl2 = 0;
+
+/**
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+
+ Callbacks & basics functions
+
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*/
+
+void usage()
+{
+ fprintf (stderr, "\n\n"
+ "usage: jack_test \n"
+ " [ --time OR -t time_to_run (in seconds) ]\n"
+ " [ --quiet OR -q (quiet mode : without jack server errors) ]\n"
+ " [ --verbose OR -v (verbose mode : no details on tests done. Only main results & errors) ]\n"
+ " [ --transport OR -k (Do not test transport functions.) ]\n"
+ " --realtime OR -R (jack is in rt mode)\n\n\n"
+ );
+ exit(1);
+}
+
+void Log(char *fmt, ...)
+{
+ if (verbose_mode) {
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
+}
+
+void Collect(FrameTimeCollector* TheFrame)
+{
+ TheFrame->lft = jack_last_frame_time(client1);
+ TheFrame->ft = jack_frame_time(client1);
+ TheFrame->fcs = jack_frames_since_cycle_start(client1);
+}
+
+void Jack_Thread_Init_Callback(void *arg)
+{
+ Log("Init callback has been successfully called. (msg from callback)\n");
+ init_clbk = 1;
+}
+
+void Jack_Freewheel_Callback(int starting, void *arg)
+{
+ Log("Freewhell callback has been successfully called with value %i.(msg from callback)\n", starting);
+ FW = starting;
+}
+
+int Jack_Update_Buffer_Size(jack_nframes_t nframes, void *arg)
+{
+ cur_buffer_size = jack_get_buffer_size(client1);
+ Log("Buffer size = %d (msg from callback)\n", cur_buffer_size);
+ return 0;
+}
+
+int Jack_XRun_Callback(void *arg)
+{
+ xrun++;
+ have_xrun = 1;
+ printf("Xrun has been detected ! (msg from callback)\n");
+ return 0;
+}
+
+int Jack_Graph_Order_Callback(void *arg)
+{
+ reorder++;
+ return 0;
+}
+
+int Jack_Sample_Rate_Callback(jack_nframes_t nframes, void *arg)
+{
+ Log("Sample rate : %i.\n", nframes);
+ return 0;
+}
+
+void Jack_Error_Callback(const char *msg)
+{
+ if (silent_error == 0) {
+ fprintf(stderr, "error : %s (msg from callback)\n", msg);
+ }
+}
+
+void jack_shutdown (void *arg)
+{
+ printf("Jack_test has been kicked out by jackd !\n");
+ exit (1);
+}
+
+void Jack_Port_Register(jack_port_id_t port, int mode, void *arg)
+{
+ port_callback_reg++;
+}
+
+int Jack_Sync_Callback(jack_transport_state_t state, jack_position_t *pos, void *arg)
+{
+ int res = 0;
+
+ switch (state) {
+
+ case JackTransportStarting:
+ sync_called++;
+ if (starting_state == 0) {
+ Log("sync callback : Releasing status : now ready...\n");
+ res = 1;
+ } else {
+ if (sync_called == 1) {
+ Log("sync callback : Holding status...\n");
+ }
+ res = 0;
+ }
+ break;
+
+ case JackTransportStopped:
+ Log("sync callback : JackTransportStopped...\n");
+ res = 0;
+ break;
+
+ default:
+ res = 0;
+ break;
+ }
+
+ return res;
+}
+
+/**
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+
+ processing functions
+
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ * Proccess1 is for client1
+ * 4 modes, activated with process1_activated
+ *
+ * -1 : idle mode
+ * 0 : write zeros to output 1
+ * 1 : write continuously signal1 (sinusoïdal test signal) to output1
+ * 3 : mode for summation test. While record (done by process2) is not running, write signal1 to both out1 & out1b.
+ * when record begin (index2 > 0), write signal1 in phase opposition to out1 & out2
+ * 5 : Frames Time checking mode : write the array containing the three values of frame_time, frames cycles start and
+ * last frame time during 150 cycles.
+ */
+
+int process1(jack_nframes_t nframes, void *arg)
+{
+ if (FW == 0) {
+ Collect(&perpetualcollect);
+ if (have_xrun) {
+ fprintf(file, "%i %i\n", (perpetualcollect.ft - lastperpetualcollect.ft), (2*cur_buffer_size));
+ have_xrun = 0;
+ } else {
+ fprintf(file, "%i 0\n", (perpetualcollect.ft - lastperpetualcollect.ft));
+ }
+ linecount++;
+ lastperpetualcollect.ft = perpetualcollect.ft;
+ }
+
+ jack_default_audio_sample_t *out1;
+ jack_default_audio_sample_t *out1b;
+ activated++; // counter of callback activation
+ if (process1_activated == 1) {
+ out1 = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port1, nframes);
+ for (int p = 0; p < nframes;p++) {
+ out1[p] = signal1[index1];
+ index1++;
+ if (index1 == 48000)
+ index1 = 0;
+ }
+ }
+ if (process1_activated == 3) {
+ out1 = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port1, nframes);
+ out1b = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port1b, nframes);
+ for (int p = 0; p < nframes;p++) {
+ out1[p] = signal1[index1];
+ if (index2 != 0) {
+ out1b[p] = ( -1 * signal1[index1]);
+ } else {
+ out1b[p] = signal1[index1];
+ }
+ index1++;
+ if (index1 == 48000)
+ index1 = 0;
+ }
+ }
+ if (process1_activated == 0) {
+ out1 = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port1, nframes);
+ memset (out1, 0, sizeof (jack_default_audio_sample_t) * nframes); //écrit des zéros en sortie...
+ }
+ if (process1_activated == 5) {
+ Collect(&framecollect[frames_collected]);
+ frames_collected++;
+ if (frames_collected > 798) {
+ process1_activated = -1;
+ }
+ }
+ return 0;
+}
+
+/**
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ * Proccess2 is for client2
+ * 3 modes, activated with process1_activated
+ *
+ * -1 : idle mode
+ * 0 : idle mode
+ * 1 : record in2 into signal2.(for first transmit test)
+ * 2 : record in2 into signal2 while send signal1 in out2. used dor Tie data test.
+ * 3 : record in2 into sigal2 for summation data test.
+ * In records modes, at the end of the record (signal2 is full), it stop the test, setting both activation states to -1.
+ */
+
+int process2(jack_nframes_t nframes, void *arg)
+{
+ jack_default_audio_sample_t *out2;
+ jack_default_audio_sample_t *in2;
+
+ if (process2_activated == 1) { // Réception du process1 pour comparer les données
+ in2 = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port2, nframes);
+ for (int p = 0; p < nframes;p++) {
+ signal2[index2] = in2[p];
+ if (index2 == 95999) {
+ process2_activated = 0;
+ process1_activated = 0;
+ //index2 = 0;
+ } else {
+ index2++;
+ }
+ }
+ }
+ if (process2_activated == 2) { // envoie de signal1 pour test tie mode et le récupère direct + latence de la boucle jack...
+ out2 = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port2, nframes);
+ in2 = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port2, nframes);
+
+ for (int p = 0; p < nframes;p++) {
+ out2[p] = signal1[index1];
+ index1++;
+ if (index1 == 48000)
+ index1 = 0;
+ signal2[index2] = in2[p];
+ if (index2 == 95999) {
+ process2_activated = -1;
+ //index2 = 0;
+ } else {
+ index2++;
+ }
+ }
+
+ }
+ if (process2_activated == 3) { // envoie de -signal1 pour sommation en oppo de phase par jack
+ in2 = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port2, nframes);
+
+ for (int p = 0; p < nframes;p++) {
+ signal2[index2] = in2[p];
+ if (index2 == 95999) {
+ process2_activated = 0;
+ process1_activated = 0;
+ //index2 = 0;
+ } else {
+ index2++;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static void display_transport_state()
+{
+ jack_transport_state_t ts;
+ jack_position_t pos;
+
+ ts = jack_transport_query(client2, &pos);
+ switch (ts) {
+ case JackTransportStopped:
+ Log("Transport is stopped...\n");
+ break;
+ case JackTransportRolling:
+ Log("Transport is rolling...\n");
+ break;
+ case JackTransportLooping:
+ Log("Transport is looping...\n");
+ break;
+ case JackTransportStarting:
+ Log("Transport is starting...\n");
+ break;
+ }
+}
+
+/**
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ MAIN FUNCTION
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+*/
+int main (int argc, char *argv[])
+{
+ const char **inports; // array of PHY input/output
+ const char **outports; // array of PHY input/outputs
+ const char *server_name = NULL;
+ const char **connexions1;
+ const char **connexions2;
+ jack_status_t status;
+ char portname[128] = "port";
+ char filename[128] = "framefile.ext";
+ char *nullportname = "";
+ int option_index;
+ int opt;
+ int a = 0; // working number for in/out port (PHY)...
+ int test_link = 0; // for testing the "overconnect" function
+ int flag; // flag for ports...
+ int is_mine = 0; // to test jack_port_is_mine function...
+ int connected = 0; // check connect functions of ports
+ const char *options = "kRnqvt:";
+ float ratio; // for speed calculation in freewheel mode
+ jack_options_t jack_options = JackNullOption;
+ struct option long_options[] = {
+ {"realtime", 0, 0, 'R'
+ },
+ {"non-realtime", 0, 0, 'n'},
+ {"time", 0, 0, 't'},
+ {"quiet", 0, 0, 'q'},
+ {"verbose", 0, 0, 'v'},
+ {"transport", 0, 0, 'k'},
+ {0, 0, 0, 0}
+ };
+
+ client_name1 = "jack_test";
+ time_to_run = 1;
+ while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) {
+ switch (opt) {
+ case 'k':
+ transport_mode = 0;
+ break;
+ case 'q':
+ silent_error = 1;
+ break;
+ case 'v':
+ verbose_mode = 1;
+ printf("Verbose mode is activated...\n");
+ break;
+ case 't':
+ time_to_run = atoi(optarg);
+ break;
+ case 'R':
+ RT = 1;
+ break;
+ default:
+ fprintf (stderr, "unknown option %c\n", opt);
+ usage ();
+ }
+ }
+
+ if (RT) {
+ printf("Jack server is said being in realtime mode...\n");
+ } else {
+ printf("Jack server is said being in non-realtime mode...\n");
+ }
+ /**
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ init signal data for test
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ */
+ framecollect = (FrameTimeCollector *) malloc(800 * sizeof(FrameTimeCollector));
+
+ signal1 = (jack_default_audio_sample_t *) malloc(48000 * sizeof(jack_default_audio_sample_t));
+ signal2 = (jack_default_audio_sample_t *) malloc(96000 * sizeof(jack_default_audio_sample_t));
+ signal1[0] = 0;
+ int p;
+ for (p = 1; p < 48000;p++) {
+ signal1[p] = (sin((p * 2 * M_PI * 1000 ) / 48000));
+ }
+ for (p = 0; p < 95999;p++) {
+ signal2[p] = 0.0 ;
+ }
+ index1 = 0;
+ index2 = 0;
+ /**
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ begin test
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ */
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-* Start jack server stress test *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+
+ /**
+ * Register a client...
+ *
+ */
+ Log("Register a client using jack_client_open()...\n");
+ client1 = jack_client_open(client_name1, jack_options, &status, server_name);
+ if (client1 == NULL) {
+ fprintf (stderr, "jack_client_open() failed, "
+ "status = 0x%2.0x\n", status);
+ if (status & JackServerFailed) {
+ fprintf(stderr, "Unable to connect to JACK server\n");
+ }
+ exit (1);
+ }
+ if (status & JackServerStarted) {
+ fprintf(stderr, "JACK server started\n");
+ }
+ /**
+ * try to register another one with the same name...
+ *
+ */
+ Log("trying to register a new jackd client with name %s using jack_client_new()...\n", client_name1);
+ client2 = jack_client_new(client_name1);
+ if (client2 == NULL) {
+ Log ("valid : a second client with the same name cannot be registered\n");
+ } else {
+ printf("!!! ERROR !!! Jackd server has accepted multiples client with the same name !");
+ jack_client_close(client2);
+ }
+
+ /**
+ * testing client name...
+ * Verify that the name sended at registration and the one returned by jack server is the same...
+ *
+ */
+ Log("Testing name...");
+ client_name2 = jack_get_client_name(client1);
+ if (strcmp(client_name1, client_name2) == 0)
+ Log(" ok\n");
+ else
+ printf("\n!!! ERROR !!! name returned different from the one given : %s\n", client_name2);
+
+ /**
+ * Test RT mode...
+ * verify if the real time mode returned by jack match the optional argument defined when launching jack_test*/
+ if (jack_is_realtime(client1) == RT )
+ Log("Jackd is in realtime mode (RT = %i).\n", RT);
+ else
+ printf("!!! ERROR !!! Jackd is in a non-expected realtime mode (RT = %i).\n", RT);
+
+ /**
+ * Register all callbacks...
+ *
+ */
+ if (jack_set_thread_init_callback(client1, Jack_Thread_Init_Callback, 0) != 0)
+ printf("!!! ERROR !!! while calling jack_set_thread_init_callback()...\n");
+ if (jack_set_freewheel_callback(client1, Jack_Freewheel_Callback, 0) != 0 )
+ printf("\n!!! ERROR !!! while calling jack_set_freewheel_callback()...\n");
+
+ if (jack_set_process_callback(client1, process1, 0) != 0) {
+ printf("Error when calling jack_set_process_callback() !\n");
+ }
+
+ jack_on_shutdown(client1, jack_shutdown, 0);
+
+ if (jack_set_buffer_size_callback(client1, Jack_Update_Buffer_Size, 0) != 0) {
+ printf("Error when calling buffer_size_callback !\n");
+ }
+ if (jack_set_graph_order_callback(client1, Jack_Graph_Order_Callback, 0) != 0) {
+ printf("Error when calling Jack_Graph_Order_Callback() !\n");
+ }
+ if (jack_set_xrun_callback(client1, Jack_XRun_Callback, 0 ) != 0) {
+ printf("Error when calling jack_set_xrun_callback() !\n");
+ }
+ if (jack_set_sample_rate_callback(client1, Jack_Sample_Rate_Callback, 0 ) != 0) {
+ printf("Error when calling Jack_Sample_Rate_Callback() !\n");
+ }
+ if (jack_set_port_registration_callback(client1, Jack_Port_Register, 0) != 0) {
+ printf("Error when calling jack_set_port_registration_callback() !\n");
+ }
+ jack_set_error_function (Jack_Error_Callback);
+
+ /**
+ * Create file for clock "frame time" analysis
+ *
+ */
+ cur_buffer_size = jack_get_buffer_size(client1);
+ sprintf (filename, "framefile-%i.dat", cur_buffer_size);
+ file = fopen(filename, "w");
+ if (file == NULL) {
+ fprintf(stderr, "Erreur dans l'ouverture du fichier log framefile.dat");
+ exit( -1);
+ }
+
+ /**
+ * Try to register a client with a NULL name/zero length name...
+ *
+ */
+ output_port1 = jack_port_register(client1, nullportname,
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ if (output_port1 == NULL) {
+ Log("Can't register a port with a NULL portname... ok.\n");
+ } else {
+ printf("!!! ERROR !!! Can register a port with a NULL portname !\n");
+ jack_port_unregister(client1, output_port1);
+ }
+
+ /**
+ * Register 1 port in order to stress other functions.
+ *
+ */
+ output_port1 = jack_port_register(client1, portname,
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ if (output_port1 == NULL) {
+ printf("!!! ERROR !!! Can't register any port for the client !\n");
+ exit(1);
+ }
+
+ /**
+ * Try to register another port with the same name...
+ *
+ */
+ output_port2 = jack_port_register(client1, portname,
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ if (output_port2 == NULL) {
+ Log("Can't register two ports with the same name... ok\n");
+ } else {
+ if (strcmp (jack_port_name(output_port1), jack_port_name(output_port2)) == 0) {
+ printf("!!! ERROR !!! Can register two ports with the same name ! (%i : %s & %i : %s).\n", output_port1, jack_port_name(output_port1), output_port2, jack_port_name(output_port2));
+ jack_port_unregister(client1, output_port2);
+ } else {
+ Log("Can't register two ports with the same name... ok (auto-rename %s into %s).\n", jack_port_name(output_port1), jack_port_name(output_port2));
+ jack_port_unregister(client1, output_port2);
+ }
+ }
+
+ /**
+ * Verify that both port_name and port_short_name return correct results...
+ *
+ */
+ sprintf (portname, "%s:%s", jack_get_client_name(client1), jack_port_short_name(output_port1));
+ if (strcmp(jack_port_name(output_port1), portname) != 0) {
+ printf("!!! ERROR !!! functions jack_port_name and/or jack_short_port_name seems to be invalid !\n");
+ printf("client_name = %s\n short_port_name = %s\n port_name = %s\n", jack_get_client_name(client1), jack_port_short_name(output_port1), jack_port_name(output_port1));
+ }
+
+ /**
+ * Verify the function port_set_name
+ *
+ */
+ if (jack_port_set_name (output_port1, "renamed-port#") == 0 ) {
+ if (strcmp(jack_port_name(output_port1), "renamed-port#") == 0) {
+ printf("!!! ERROR !!! functions jack_port_set_name seems to be invalid !\n");
+ printf("Jack_port_name return '%s' whereas 'renamed-port#' was expected...\n");
+ } else {
+ Log("checking jack_port_set_name... ok\n");
+ jack_port_set_name (output_port1, "port");
+ }
+ } else {
+ printf("error : port_set_name function can't be tested...\n");
+ }
+
+ /**
+ * Activate the client
+ *
+ */
+ if (jack_activate(client1) < 0) {
+ printf ("Fatal error : cannot activate client1\n");
+ exit (1);
+ }
+
+ /**
+ * Test if init callback initThread have been called.
+ *
+ */
+ if (init_clbk == 0)
+ printf("!!! ERROR !!! JackThreadInitCallback was not called !!.\n");
+
+ jack_sleep(10 * 1000); // test see the clock in the graph at the begining...
+
+ /**
+ * Stress Freewheel mode...
+ * Try to enter freewheel mode. Check the realtime mode de-activation.
+ * Check that the number of call of the process callback is greater than in non-freewheel mode.
+ * Give an approximated speed ratio (number of process call) between the two modes.
+ * Then return in normal mode.
+ */
+ t_error = 0;
+ activated = 0;
+ jack_sleep(1 * 1000);
+ count1 = activated;
+ Log("Testing activation freewheel mode...\n");
+ linefw = linecount; // count for better graph reading with gnuplot
+ jack_set_freewheel(client1, 1);
+ activated = 0;
+ jack_sleep(1 * 1000);
+ count2 = activated;
+ if (jack_is_realtime(client1) == 0) {
+ t_error = 0;
+ } else {
+ printf("\n!!! ERROR !!! RT mode is always activated while freewheel mode is applied !\n");
+ t_error = 1;
+ }
+ if (activated == 0)
+ printf("!!! ERROR !!! Freewheel mode doesn't activate audio callback !!\n");
+
+ jack_set_freewheel(client1, 0);
+ jack_sleep(7 * 1000);
+
+if (jack_is_realtime(client1) == 1) {}
+ else {
+ printf("\n!!! ERROR !!! freewheel mode fail to reactivate RT mode when exiting !\n");
+ t_error = 1;
+ }
+ if (t_error == 0) {
+ Log("Freewheel mode appears to work well...\n");
+ }
+ if (count1 == 0) {
+ Log("Audio Callback in 'standard' (non-freewheel) mode seems not to be called...\n");
+ Log("Ratio speed would be unavailable...\n");
+ } else {
+ ratio = (float) ((count2 - count1) / count1);
+ Log("Approximative speed ratio of freewheel mode = %f : 1.00\n", ratio);
+ }
+
+ /**
+ * Stress buffer function...
+ * get current buffer size.
+ * Try to apply a new buffer size value ( 2 x the precedent buffer size value)
+ * Then return in previous buffer size mode.
+ *
+ */
+
+
+ float factor = 0.5f;
+ old_buffer_size = jack_get_buffer_size(client1);
+ Log("Testing BufferSize change & Callback...\n--> Current buffer size : %i.\n", old_buffer_size);
+ linebuf = linecount;
+ if (jack_set_buffer_size(client1, old_buffer_size * factor) < 0) {
+ printf("!!! ERROR !!! jack_set_buffer_size fails !\n");
+ }
+ jack_sleep(1 * 1000);
+ cur_buffer_size = jack_get_buffer_size(client1);
+ if ((old_buffer_size * factor) != cur_buffer_size) {
+ printf("!!! ERROR !!! Buffer size has not been changed !\n");
+ printf("!!! Maybe jack was compiled without the '--enable-resize' flag...\n");
+ } else {
+ Log("jack_set_buffer_size() command successfully applied...\n");
+ }
+ jack_sleep(3 * 1000);
+ jack_set_buffer_size(client1, old_buffer_size);
+ cur_buffer_size = jack_get_buffer_size(client1);
+
+
+ /**
+ * Test the last regestered port to see if port_is_mine function the right value.
+ * A second test will be performed later.
+ * The result will be printed at the end.
+ *
+ */
+ if (jack_port_is_mine(client1, output_port1)) {
+ is_mine = 1;
+ } else {
+ is_mine = 0;
+ }
+
+ /**
+ * Check that the ID returned by the port_by_name is right.
+ * (it seems there is a problem here in some jack versions).
+ *
+ */
+ if (output_port1 != jack_port_by_name(client1, jack_port_name(output_port1))) {
+ printf("!!! ERROR !!! function jack_port_by_name() return bad value !\n");
+ printf("!!! jack_port_by_name(jack_port_name(_ID_) ) != _ID_returned_at_port_registering ! (%i != %i)\n", jack_port_by_name(client1, jack_port_name(output_port1)), output_port1);
+ } else {
+ Log("Checking jack_port_by_name() return value... ok\n");
+ }
+ if (NULL != jack_port_by_name(client1, jack_port_short_name(output_port1))) {
+ printf("!!! ERROR !!! function jack_port_by_name() return a value (%i) while name is incomplete !\n", jack_port_by_name(client1, jack_port_short_name(output_port1)));
+ } else {
+ Log("Checking jack_port_by_name() with bad argument... ok (returned id 0)\n");
+ }
+
+ /**
+ * remove the output port previously created
+ * no more ports should subsist here for our client.
+ *
+ */
+ if (jack_port_unregister(client1, output_port1) != 0) {
+ printf("!!! ERROR !!! while unregistering port %s.\n", jack_port_name(output_port1));
+ }
+
+ /**
+ * list all in ports
+ *
+ */
+ inports = jack_get_ports(client1, NULL, NULL, 0);
+
+ /**
+ * Test the first PHY (physical) connection to see if it's "mine".
+ * and report the result in the test that began before.
+ * The result is printed later.
+ *
+ */
+ if (jack_port_is_mine(client1, jack_port_by_name(client1, inports[0]))) {
+ is_mine = 0;
+ }
+
+ /**
+ * List all devices' flags and print them...
+ *
+ */
+ Log("\nTry functions jack_get_ports, jack_port_flag & jack_port_by_name to list PHY devices...\n");
+ Log("-----------------------------------------------------------\n");
+ Log("---------------------------DEVICES-------------------------\n");
+ Log("-----------------------------------------------------------\n");
+ a = 0;
+ while (inports[a] != NULL) {
+ flag = jack_port_flags(jack_port_by_name(client1, inports[a]) );
+ Log(" * %s (id : %i)\n", inports[a], jack_port_by_name(client1, inports[a]));
+ Log(" (");
+ if (flag & JackPortIsInput)
+ Log("JackPortIsInput ");
+ if (flag & JackPortIsOutput)
+ Log("JackPortIsOutput ");
+ if (flag & JackPortIsPhysical)
+ Log("JackPortIsPhysical ");
+ if (flag & JackPortCanMonitor)
+ Log("JackPortCanMonitor ");
+ if (flag & JackPortIsTerminal)
+ Log("JackPortIsTerminal ");
+ Log(")\n\n");
+ a++;
+ }
+ Log("-----------------------------------------------------------\n\n");
+
+ /**
+ * list all PHY in/out ports...
+ * This list will be used later many times.
+ *
+ */
+ outports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsOutput);
+ inports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+
+ if (outports == NULL) {
+ printf("!!! WARNING !!! no physical capture ports founded !\n");
+ }
+ if (inports == NULL) {
+ printf("!!! WARNING !!! no physical output ports founded !\n");
+ }
+
+ /**
+ * Brute test : try to create as many ports as possible.
+ * It stops when jack returns an error.
+ * Then try to connect each port to physical entry...
+ * Check also that graph reorder callback is called.
+ *
+ */
+ Log("Registering as many ports as possible and connect them to physical entries...\n");
+ lineports = linecount;
+ t_error = 0;
+
+ i = 0; // number of couple 'input-ouput'
+ j = 0; // number of ports created
+ port_callback_reg = 0; // number of port registration received by the callback
+ reorder = 0; // number of graph reorder callback activation
+ test_link = 0 ; // Test the "overconnect" function only one time
+ while (t_error == 0) {
+ sprintf (portname, "input_%d", i);
+ input_port1 = jack_port_register(client1, portname,
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsInput, 0);
+ j++;
+ if (input_port1 == NULL) {
+ j--;
+ t_error = 1;
+ } else {
+ // Connect created input to PHY output
+ a = 0;
+ while (outports[a] != NULL) {
+ if (jack_connect(client1, outports[a], jack_port_name(input_port1))) {
+ printf ("error : cannot connect input PHY port to client port %s\n", jack_port_name(input_port1));
+ } else {
+ // printf ("input PHY port %s connected to client port %s\n", outports[a], jack_port_name(input_port1));
+ }
+ a++;
+ }
+ // Try one time to "overconnect" 2 ports (the latest created)...
+ if (test_link == 0) {
+ if (jack_connect(client1, outports[a - 1], jack_port_name(input_port1)) == EEXIST) {
+ // cannot over-connect input PHY port to client port. ok.
+ test_link = 1;
+ }
+ }
+ }
+
+ sprintf(portname, "output_%d", i);
+ output_port1 = jack_port_register(client1, portname,
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ j++;
+ if (output_port1 == NULL) {
+ t_error = 1;
+ j--;
+ } else {
+ // Connect created input to PHY output
+ a = 0;
+ while (inports[a] != NULL) {
+ if (jack_connect(client1, jack_port_name(output_port1), inports[a])) {
+ printf ("error : cannot connect input PHY port %s to client port %s\n", inports[a], jack_port_name(output_port1));
+ } else {
+ // output PHY port %s connected to client port. ok.
+ }
+ a++;
+ }
+ // Try one time to "overconnect" 2 ports (the latest created)...
+ if (test_link == 0) {
+ if (jack_connect(client1, jack_port_name(output_port1), inports[a - 1]) == EEXIST) {
+ // cannot over-connect output PHY port to client port. ok.
+ test_link = 1;
+ }
+ }
+ }
+ i++;
+ }
+
+ jack_sleep(1 * 1000); // To hope all port registration and reorder callback have been received...
+ if (j == port_callback_reg) {
+ Log("%i ports have been successfully created, and %i callback reg ports have been received... ok\n", j, port_callback_reg);
+ } else {
+ printf("!!! ERROR !!! %i ports have been created, and %i callback reg ports have been received !\n", j, k);
+ }
+ if (reorder == (2 * j)) {
+ Log("%i graph reorder callback have been received... ok\n", reorder);
+ } else {
+ printf("!!! ERROR !!! %i graph reorder callback have been received (maybe non-valid value)...\n", reorder);
+ }
+ /**
+ * print basic test connection functions result ...
+ * over-connected means here that we try to connect 2 ports that are already connected.
+ *
+ */
+ if (test_link) {
+ Log("Jack links can't be 'over-connected'... ok\n");
+ } else {
+ printf("!!! ERROR !!! Jack links can be 'over-connected'...\n");
+ }
+ /**
+ * Print the result of the two jack_is_mine test.
+ *
+ */
+ if (is_mine == 1) {
+ Log("Checking jack_port_is_mine... ok\n");
+ } else {
+ printf("!!! ERROR !!! jack_port_is_mine() function seems to send non-valid datas !\n");
+ }
+ /**
+ * Free the array of the physical input and ouput ports.
+ * (as mentionned in the doc of jack_get_ports)
+ *
+ */
+ free(inports);
+ free(outports);
+
+ /**
+ * Try to "reactivate" the client whereas it's already activated...
+ *
+ */
+ if (jack_activate(client1) < 0) {
+ printf("!!! ERROR !!! Cannot activate client1 a second time...\n");
+ exit(1);
+ } else {
+ Log("jackd server accept client.jack_activate() re-activation (while client was already activated).\n");
+ }
+
+ /**
+ * Deregister all ports previously created.
+ *
+ */
+ Log("Deregistering all ports of the client...\n");
+ inports = jack_get_ports(client1, NULL, NULL, 0);
+ a = 0;
+ while (inports[a] != NULL) {
+ flag = jack_port_flags(jack_port_by_name(client1, inports[a]));
+ input_port1 = jack_port_by_name(client1, inports[a]);
+ if (jack_port_is_mine(client1, input_port1)) {
+ if (jack_port_unregister(client1, input_port1) != 0) {
+ printf("!!! ERROR !!! while unregistering port %s.\n", jack_port_name(output_port1));
+ }
+ }
+ a++;
+ }
+
+ free(inports); // free array of ports (as mentionned in the doc of jack_get_ports)
+
+ /**
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ Open a new client (second one) to test some other things...
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ */
+
+ Log("\n\n----------------------------------------------------------------------\n");
+ Log("Starting second new client 'jack_test_#2'...\n");
+ /* open a client connection to the JACK server */
+ client_name2 = "jack_test_#2";
+ linecl2 = linecount; // reminders for graph analysis
+ client2 = jack_client_new(client_name2);
+
+ if (client2 == NULL) {
+ fprintf(stderr, "jack_client_new() failed for %s.\n"
+ "status = 0x%2.0x\n", client_name2, status);
+ if (status & JackServerFailed) {
+ fprintf(stderr, "Unable to connect client2 to JACK server\n");
+ }
+ exit(1);
+ }
+
+ /**
+ * Register callback for this client.
+ * Callbacks are the same as the first client for most of them, excepted for process audio callback.
+ *
+ */
+ jack_set_port_registration_callback(client2, Jack_Port_Register, 0);
+
+ jack_set_process_callback(client2, process2, 0);
+
+ jack_on_shutdown(client2, jack_shutdown, 0);
+
+ /**
+ * Register one input and one output for each client.
+ *
+ */
+ Log("registering 1 input/output ports for each client...\n");
+
+ output_port1 = jack_port_register(client1, "out1",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ output_port2 = jack_port_register(client2, "out2",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ input_port1 = jack_port_register(client1, "in1",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsInput, 0);
+ input_port2 = jack_port_register(client2, "in2",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsInput, 0);
+ if ((output_port1 == NULL) || (output_port2 == NULL) || (input_port1 == NULL) || (input_port2 == NULL)) {
+ printf("!!! ERROR !!! Unable to register ports...\n");
+ }
+
+ /**
+ * Set each process mode to idle and activate client2
+ *
+ */
+ process2_activated = -1;
+ process1_activated = -1;
+ if (jack_activate(client2) < 0) {
+ printf ("Fatal error : cannot activate client2\n");
+ exit (1);
+ }
+
+ /**
+ * Connect the two clients and check that all connections are well-done.
+ *
+ */
+ Log("Testing connections functions between clients...\n");
+ if (jack_connect(client1, jack_port_name(output_port1), jack_port_name(input_port2)) != 0) {
+ printf("!!! ERROR !!! while client1 intenting to connect ports...\n");
+ }
+ if (jack_connect(client2, jack_port_name(output_port2), jack_port_name(input_port1)) != 0) {
+ printf("!!! ERROR !!! while client2 intenting to connect ports...\n");
+ }
+ if (jack_connect(client1, jack_port_name(output_port1), jack_port_name(input_port1)) != 0) {
+ printf("!!! ERROR !!! while client1 intenting to connect ports...\n");
+ }
+
+ /**
+ * Test the port_connected function...
+ *
+ */
+ if ((jack_port_connected(output_port1) == jack_port_connected(input_port1)) &&
+ (jack_port_connected(output_port2) == jack_port_connected(input_port2)) &&
+ (jack_port_connected(output_port2) == 1) &&
+ (jack_port_connected(output_port1) == 2)
+ ) {
+ Log("Checking jack_port_connected()... ok.\n");
+ } else {
+ printf("!!! ERROR !!! function jack_port_connected() return a bad value !\n");
+ printf("jack_port_connected(output_port1) %ld\n", jack_port_connected(output_port1));
+ printf("jack_port_connected(output_port2) %ld\n", jack_port_connected(output_port2));
+ printf("jack_port_connected(input_port1) %ld\n", jack_port_connected(input_port1));
+ printf("jack_port_connected(input_port2) %ld\n", jack_port_connected(input_port2));
+ }
+
+ /**
+ * Test a new time the port_by_name function...(now we are in multi-client mode)
+ *
+ */
+ Log("Testing again jack_port_by_name...\n");
+ if (output_port1 != jack_port_by_name(client1, jack_port_name(output_port1))) {
+ printf("!!! ERROR !!! function jack_port_by_name() return bad value in a multi-client application!\n");
+ printf("!!! jack_port_by_name(jack_port_name(_ID_) ) != _ID_ in multiclient application.\n");
+ } else {
+ Log("Checking jack_port_by_name() function with a multi-client application... ok\n");
+ }
+
+ /**
+ * Test the port_connected_to function...
+ *
+ */
+ if ((jack_port_connected_to (output_port1, jack_port_name(input_port2))) &&
+ (!(jack_port_connected_to (output_port2, jack_port_name(input_port2))))) {
+ Log("checking jack_port_connected_to()... ok\n");
+ } else {
+ printf("!!! ERROR !!! jack_port_connected_to() return bad value !\n");
+ }
+
+ /**
+ * Test the port_get_connections & port_get_all_connections functions...
+ *
+ */
+ Log("Testing jack_port_get_connections and jack_port_get_all_connections...\n");
+ a = 0;
+ t_error = 0;
+ connexions1 = jack_port_get_connections (output_port1);
+ connexions2 = jack_port_get_all_connections(client1, output_port1);
+ if ((connexions1 == NULL) || (connexions2 == NULL)) {
+ printf("!!! ERROR !!! port_get_connexions or port_get_all_connexions return a NULL pointer !\n");
+ } else {
+ while ((connexions1[a] != NULL) && (connexions2[a] != NULL) && (t_error == 0)) {
+ t_error = strcmp(connexions1[a], connexions2[a]);
+ a++;
+ }
+
+ if (t_error == 0) {
+ Log("Checking jack_port_get_connections Vs jack_port_get_all_connections... ok\n");
+ } else {
+ printf("!!! ERROR !!! while checking jack_port_get_connections Vs jack_port_get_all_connections...\n");
+ }
+ }
+ a = 0;
+ t_error = 0;
+ inports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+ connexions1 = NULL;
+ assert(inports != NULL);
+ if (inports[0] != NULL) {
+ connexions1 = jack_port_get_connections (jack_port_by_name(client1, inports[0]));
+ connexions2 = jack_port_get_all_connections(client1, jack_port_by_name(client1, inports[0]));
+ }
+
+ free (inports);
+ if (connexions1 == NULL) {
+ Log("checking jack_port_get_connections for external client... ok\n");
+ } else {
+ while ((connexions1[a] != NULL) && (connexions2[a] != NULL) && (t_error == 0)) {
+ t_error = strcmp(connexions1[a], connexions2[a]);
+ a++;
+ }
+ }
+ if (t_error == 0) {
+ Log("Checking jack_port_get_connections Vs jack_port_get_all_connections on PHY port... ok\n");
+ } else {
+ printf("!!! ERROR !!! while checking jack_port_get_connections Vs jack_port_get_all_connections on PHY port...\n");
+ }
+
+ /**
+ * Test port locking function
+ * Check the validity of the lock...
+ *
+ */
+ Log("Testing connections locks between clients...\n");
+ if (jack_disconnect(client1, jack_port_name(output_port1), jack_port_name(input_port1)) != 0) {
+ printf("!!! ERROR !!! while client1 intenting to disconnect ports...\n");
+ }
+
+ if (jack_port_lock(client2, output_port2) != 0) {
+ printf("Error while calling port_lock... jack_lock will not be checked !\n");
+ } else {
+ Log("Locking port 'out2'...ok\n");
+ if (jack_disconnect(client2, jack_port_name(output_port2), jack_port_name(input_port1)) != 0) {
+ Log("Checking lock status with disconnect... ok\n");
+ } else {
+ printf("!!! ERRROR !!! Jack_lock didn't lock port_connections with disconnect!\n");
+ }
+ if (jack_port_disconnect(client1, output_port2) != 0) {
+ Log("Checking lock status with port_disconnect... ok\n");
+ } else {
+ printf("!!! ERRROR !!! Jack_lock didn't lock port_connections with port_disconnect!\n");
+ }
+ if (jack_connect(client2, jack_port_name(output_port2), jack_port_name(input_port2)) != 0) {
+ Log("Checking lock status with connect... ok\n");
+ } else {
+ printf("!!! ERRROR !!! Jack_lock didn't lock port_connections with connect!\n");
+ jack_disconnect(client2, jack_port_name(output_port2), jack_port_name(input_port2));
+ }
+ if (jack_port_unlock(client1, output_port2) != 0) {
+ Log("Checking unlock by another client... ok\n");
+ } else {
+ printf("!!! ERROR !!! a client can unlock a port locked previously by another client... \n");
+ }
+ if (jack_port_unlock(client2, output_port2) != 0) {
+ printf("Error while calling port_unlock... \n");
+ }
+ if (jack_port_lock(client2, output_port1) != 0) {
+ Log("Checking lock of port of an other client... ok\n");
+ } else {
+ printf("!!! ERROR !!! a port can be locked by a non-owner client !\n");
+ jack_port_unlock(client2, output_port1);
+ }
+ }
+
+ jack_disconnect(client1, jack_port_name(output_port2), jack_port_name(input_port1));
+
+ // No links should subsist now...
+
+ /**
+ * Checking data connexion
+ * establishing a link between client1.out1 --> client2.in2
+ * Send the signal1 test on out1. Record the result into signal2. (see process functions).
+ ---------------------------------------------------------------------------*/
+ Log("Testing connections datas between clients...\n");
+ jack_connect(client2, jack_port_name(output_port1), jack_port_name(input_port2) );
+ process2_activated = -1;
+ process1_activated = -1;
+ Log("process 2 : idle mode...\n");
+ Log("Sending datas...");
+ index1 = 0;
+ index2 = 0;
+ process1_activated = 1; // We start emitting first.
+ process2_activated = 1; // So record begin at least when we just begin to emitt the signal, else at next call of process with
+ // nframe = jack buffersize shifting.
+
+ while (process2_activated == 1) {
+ jack_sleep(1 * 1000);
+ Log(".");
+ }
+ index2 = 0;
+ Log("\nAnalysing datas...\n"); // search the first occurence of the first element of the reference signal in the recorded signal
+ while (signal2[index2] != signal1[1] ) {
+ index2++;
+ if (index2 == 95999) {
+ printf("!!! ERROR !!! Data not found in first connexion data check!\n");
+ break;
+ }
+ }
+ index1 = index2;
+ Log("Data founded at offset %i.\n", index2);
+ // And now we founded were the recorded data are, we can see if the two signals matches...
+ while ( (signal2[index2] == signal1[index2 - index1 + 1]) || (index2 == 95999) || ((index2 - index1 + 1) == 47999) ) {
+ index2++;
+ }
+ Log("Checking difference between datas... %i have the same value...\n", index2 - index1);
+ if ((index2 - index1) == 48000) {
+ Log("Data received are valid...\n");
+ } else {
+ printf("!!! ERROR !!! data transmission seems not to be valid in first connexion data check!\n");
+ }
+ if (jack_disconnect(client1, jack_port_name(output_port1), jack_port_name(input_port2) ) != 0)
+ // no more connection between ports exist now...
+ {
+ printf("Error while establishing new connexion (disconnect).\n");
+ }
+
+ /**
+ * Test TIE MODE
+ * (This mode seems to be problematic in standard jack version 0.100. It seems that nobody
+ * is used to apply this mode because the tie mode doesn't work at all. A patch seems difficult to produce
+ * in this version of jack. Tie mode work well in MP version.)
+ * Test some basic thinks (tie with 2 differents client, tie non-owned ports...)
+ * Tie client1.in1 and client1.out1 ports, and make some data test to check the validity of the tie.
+ *
+ */
+ Log("Testing tie mode...\n");
+ if (jack_port_tie(input_port1, output_port2) != 0) {
+ Log("not possible to tie two ports from two differents clients... ok\n");
+ } else {
+ printf("!!! ERROR !!! port_tie has allowed a connexion between two differents clients !\n");
+ jack_port_untie(output_port2);
+ }
+ Log("Testing connections datas in tie mode...\n");
+ int g;
+ for (g = 0; g < 96000; g++)
+ signal2[g] = 0.0;
+ // Create a loop (emit test) client2.out2----client.in1--tie--client1.out1-----client2.in1 (receive test)
+ if (jack_port_tie(input_port1, output_port1) != 0) {
+ printf("Unable to tie... fatal error : data test will not be performed on tie mode !!\n");
+ } else { // begin of tie
+ if (jack_connect(client1, jack_port_name(output_port1), jack_port_name(input_port2)) != 0) {
+ printf("!!! ERROR !!! while client1 intenting to connect ports...\n");
+ }
+ if (jack_connect(client1, jack_port_name(output_port2), jack_port_name(input_port1)) != 0) {
+ printf("!!! ERROR !!! while client1 intenting to connect ports...\n");
+ }
+
+ process1_activated = -1;
+ process2_activated = -1;
+
+ // We can manualy check here that the tie is effective.
+ // ie : playing a wav with a client, connecting ports manualy with qjackctl, and listen...
+ // printf("manual test\n");
+ // jack_sleep(50);
+ // printf("end of manual test\n");
+
+ index1 = 0;
+ index2 = 0;
+ process1_activated = -1;
+ process2_activated = 2;
+
+ Log("Sending datas...");
+
+ while (process2_activated == 2) {
+ jack_sleep(1 * 1000);
+ Log(".");
+ }
+ process1_activated = -1;
+ process2_activated = -1;
+ index2 = 0;
+ Log("\nAnalysing datas...\n");
+ // We must find at least 2 identical values to ensure we are at the right place in the siusoidal array...
+ while (!((signal2[index2] == signal1[1]) && (signal2[index2 + 1] == signal1[2]))) {
+ index2++;
+ if (index2 == 95999) {
+ printf("!!! ERROR !!! Data not found in connexion check of tie mode!\n");
+ break;
+ }
+ }
+ index1 = index2;
+ Log("Tie mode : Data founded at offset %i.\n", index2);
+ while (signal2[index2] == signal1[index2 - index1 + 1]) {
+ index2++;
+ if ((index2 == 95999) || ((index2 - index1 + 1) == 47999)) {
+ break;
+ }
+ }
+ Log("Checking difference between datas... %i have the same value...\n", index2 - index1);
+ if ((index2 - index1) > 47995) {
+ Log("Data received in tie mode are valid...\n");
+ } else {
+ // in tie mode, the buffers adress should be the same for the two tied ports.
+ printf("!!! ERROR !!! data transmission seems not to be valid !\n");
+ printf("Links topology : (emitt) client2.out2 ----> client1.in1--(tie)--client1.out1----->client2.in2 (recive)\n");
+ printf(" port_name : Port_adress \n");
+ printf(" output_port1 : %x\n", jack_port_get_buffer(output_port1, cur_buffer_size));
+ printf(" input_port2 : %x\n", jack_port_get_buffer(input_port2, cur_buffer_size));
+ printf(" output_port2 : %x\n", jack_port_get_buffer(output_port2, cur_buffer_size));
+ printf(" input_port1 : %x\n", jack_port_get_buffer(input_port1, cur_buffer_size));
+ }
+
+ jack_port_untie(output_port1);
+ jack_port_disconnect(client1, output_port2);
+ jack_port_disconnect(client1, output_port1);
+
+ } //end of tie
+
+
+ /**
+ * Testing SUMMATION CAPABILITIES OF JACK CONNECTIONS
+ *
+ * In a short test, we just check a simple summation in jack.
+ * A first client(client1) send two signal in phase opposition
+ * A second client(client2) record the summation at one of his port
+ * So, the result must be zero...
+ * See process1 for details about steps of this test
+ *
+ */
+ // fprintf(file, "Sum test\n");
+ Log("Checking summation capabilities of patching...\n");
+ output_port1b = jack_port_register(client1, "out1b",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+ jack_connect(client2, jack_port_name(output_port1), jack_port_name(input_port2));
+ jack_connect(client2, jack_port_name(output_port1b), jack_port_name(input_port2));
+
+ process1_activated = 3;
+ process2_activated = -1;
+ for (g = 0; g < 96000; g++)
+ signal2[g] = 0.0;
+ index1 = 0;
+ index2 = 0;
+
+ Log("Sending datas...");
+ process2_activated = 3;
+
+ while (process2_activated == 3) {
+ jack_sleep(1 * 1000);
+ Log(".");
+ }
+ process1_activated = -1;
+ process2_activated = -1;
+ index2 = 0;
+ Log("\nAnalysing datas...\n"); // same idea as above, with first data check...
+ while (!((signal2[index2] == 0.0 ) && (signal2[(index2 + 1)] == 0.0 ))) {
+ index2++;
+ if (index2 == 95999) {
+ printf("!!! ERROR !!! Data not found in summation check!\n");
+ break;
+ }
+ }
+ index1 = index2;
+ Log("Data founded at offset %i.\n", index2);
+
+ while ( signal2[index2] == 0.0 ) {
+ index2++;
+ if ((index2 > 95998) || ((index2 - index1 + 1) > 47998)) {
+ break;
+ }
+ }
+ Log("Checking difference between datas...\n");
+ if ((index2 - index1) > 47996) {
+ Log("Data mixed received are valid...\nSummation is well done.\n");
+ } else {
+ printf("!!! ERROR !!! data transmission / summation seems not to be valid !\n");
+ }
+ jack_port_disconnect(client1, output_port1);
+ jack_port_disconnect(client1, output_port1b);
+ jack_port_unregister(client1, output_port1b);
+
+ if (jack_port_name(output_port1b) != NULL ) {
+ printf("!!! WARNING !!! port_name return something while the port have been unregistered !\n");
+ printf("!!! Name of unregistered port : %s !\n", jack_port_name(output_port1b));
+ } else {
+ Log("checking port_name() with a non valid port... ok\n");
+ }
+
+ if (jack_port_set_name(output_port1b, "new_name") == 0 ) {
+ printf("!!! WARNING !!! An unregistered port can be renamed successfully !\n");
+ } else {
+ Log("Checking renaming of an unregistered port... ok\n");
+ }
+ inports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+ if (jack_port_set_name(jack_port_by_name(client1, inports[0]), "new_name") == 0 ) {
+ printf("!!! WARNING !!! A PHYSICAL port can be renamed successfully !\n");
+ } else {
+ Log("Checking renaming of an unregistered port... ok\n");
+ }
+ free (inports);
+
+
+ /**
+ * Checking latency issues
+ * here are simple latency check
+ * We simply check that the value returned by jack seems ok
+ * Latency compensation is a difficult point.
+ * Actually, jack is not able to see "thru" client to build a full latency chain.
+ * Ardour use theses informations to do internally his compensations.
+ *
+ * 3 test are done : one with no connections between client, one with a serial connection, and one with parallel connection
+ */
+ Log("Checking about latency functions...\n");
+ t_error = 0;
+ jack_recompute_total_latencies(client1);
+ if ((jack_port_get_latency (output_port1) != 0) ||
+ (jack_port_get_total_latency(client1, output_port1) != 0) ) {
+ t_error = 1;
+ printf("!!! ERROR !!! default latency of a non-PHY device is not set to zero !\n");
+ }
+
+ inports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
+ outports = jack_get_ports(client1, NULL, NULL, JackPortIsPhysical | JackPortIsOutput);
+ if (inports[0] != NULL) {
+ ext_latency = jack_port_get_latency (jack_port_by_name(client1, inports[0]));
+ if (ext_latency != jack_port_get_total_latency(client1, jack_port_by_name(client1, inports[0]))) {
+ t_error = 1;
+ printf("!!! ERROR !!! get_latency & get_all_latency for a PHY device (unconnected) didn't return the same value !\n");
+ }
+ Log("Checking a serial model with 2 clients...\n");
+
+ jack_connect(client1, jack_port_name(output_port1), jack_port_name(input_port2));
+ jack_connect(client1, outports[0], jack_port_name(input_port1));
+ jack_connect(client2, jack_port_name(output_port2), inports[0]);
+ jack_port_set_latency (output_port2, 256);
+ jack_recompute_total_latencies(client1);
+
+ if ((jack_port_get_latency (output_port1) != 0) ||
+ (jack_port_get_total_latency(client1, output_port1) != 0) ||
+ (jack_port_get_latency (jack_port_by_name(client1, inports[0])) != (ext_latency)) ||
+ (jack_port_get_total_latency(client1, jack_port_by_name(client1, inports[0])) != (ext_latency + 256)) ||
+ (jack_port_get_total_latency(client1, output_port2) != (ext_latency + 256)) ||
+ (jack_port_get_total_latency(client1, input_port2) != 0) ||
+ (jack_port_get_total_latency(client1, input_port1) != ext_latency) ||
+ (jack_port_get_latency (jack_port_by_name(client1, outports[0])) != ext_latency) ||
+ (jack_port_get_total_latency(client1, jack_port_by_name(client1, outports[0])) != ext_latency)
+ ) {
+ printf("!!! WARNING !!! get_latency functions may have a problem : bad value returned !\n");
+ printf("!!! get_latency(output_port1) : %i (must be 0)\n", jack_port_get_latency (output_port1) );
+ printf("!!! get_total_latency(output_port1) : %i (must be 0)\n", jack_port_get_total_latency(client1, output_port1));
+ printf("!!! get_latency(PHY[0]) : %i (must be external latency : %i)\n", jack_port_get_latency (jack_port_by_name(client1, inports[0])), ext_latency);
+ printf("!!! get_total_latency(PHY[0]) : %i (must be %i)\n", jack_port_get_total_latency(client1, jack_port_by_name(client1, inports[0])) , (ext_latency + 256));
+ printf("!!! get_total_latency(output_port2) : %i (must be %i)\n", jack_port_get_total_latency(client1, output_port2), (ext_latency + 256));
+ printf("!!! get_total_latency(input_port2) : %i (must be 0)\n", jack_port_get_total_latency(client1, input_port2));
+ printf("!!! get_total_latency(input_port1) : %i (must be %i)\n", jack_port_get_total_latency(client1, input_port1), ext_latency);
+ printf("!!! get_latency(PHY[0]) : %i (must be %i)\n", jack_port_get_latency (jack_port_by_name(client1, outports[0])), ext_latency);
+ printf("!!! get_total_latency(PHY[0]) : %i (must be %i)\n", jack_port_get_total_latency(client1, jack_port_by_name(client1, outports[0])), ext_latency);
+
+ } else {
+ Log("get_latency & get_total_latency seems quite ok...\n");
+ }
+
+ jack_port_disconnect(client1, output_port1);
+ jack_port_disconnect(client1, output_port2);
+ jack_port_disconnect(client1, input_port1);
+ jack_port_disconnect(client1, input_port2);
+ Log("Checking a parallel model with 2 clients...\n");
+ jack_connect(client2, outports[0], jack_port_name(input_port1) );
+ jack_connect(client2, outports[0], jack_port_name(input_port2) );
+ jack_connect(client2, jack_port_name(output_port1), inports[0] );
+ jack_connect(client2, jack_port_name(output_port2), inports[0] );
+ jack_port_set_latency (output_port1, 256);
+ jack_port_set_latency (output_port2, 512);
+ jack_recompute_total_latencies(client1);
+
+ if ((jack_port_get_latency (output_port1) != 256 ) ||
+ (jack_port_get_total_latency(client1, output_port1) != (256 + ext_latency)) ||
+ (jack_port_get_latency (output_port2) != 512) ||
+ (jack_port_get_total_latency(client1, output_port2) != (512 + ext_latency)) ||
+ (jack_port_get_latency (jack_port_by_name(client1, inports[0])) != ext_latency) ||
+ (jack_port_get_total_latency(client1, jack_port_by_name(client1, inports[0])) != (512 + ext_latency))
+ ) {
+ printf("!!! WARNING !!! get_latency functions may have a problem : bad value returned !\n");
+ } else {
+ Log("get_latency & get_total_latency seems quite ok...\n");
+ }
+ } else {
+ printf("No physical port founded : not able to test latency functions...");
+ }
+
+ jack_port_disconnect(client1, input_port1);
+ jack_port_disconnect(client1, input_port2);
+ jack_port_disconnect(client1, output_port1);
+ jack_port_disconnect(client1, output_port2);
+
+ free(inports);
+ free(outports);
+
+ /**
+ * Checking transport API.
+ * Simple transport test.
+ * Check a transport start with a "slow" client, simulating a delay around 1 sec before becoming ready.
+ *
+ */
+
+ lineports = linecount;
+
+ if (transport_mode) {
+ int wait_count;
+ ts = jack_transport_query(client1, &pos);
+ if (ts == JackTransportStopped) {
+ Log("Transport is stopped...\n");
+ } else {
+ jack_transport_stop(client1);
+ Log("Transport state : %i\n", ts);
+ }
+ if (jack_set_sync_callback(client2, Jack_Sync_Callback, 0) != 0)
+ printf("error while calling set_sync_callback...\n");
+
+ Log("starting transport...\n");
+
+ starting_state = 1; // Simulate starting state
+ jack_transport_start(client1);
+
+ // Wait until sync callback is called
+ while (!(sync_called)) {
+ jack_sleep(1 * 1000);
+ }
+
+ // Wait untill rolling : simulate sync time out
+ Log("Simulate a slow-sync client exceeding the time-out\n");
+ wait_count = 0;
+
+ do {
+ jack_sleep(100); // Wait 100 ms each cycle
+ wait_count++;
+ if (wait_count == 100) {
+ Log("!!! ERROR !!! max time-out exceedeed : sync time-out does not work correctly\n");
+ break;
+ }
+ ts = jack_transport_query(client2, &pos);
+ Log("Waiting....pos = %ld\n", pos.frame);
+ display_transport_state();
+
+ } while (ts != JackTransportRolling);
+
+ Log("Sync callback have been called %i times.\n", sync_called);
+ jack_transport_stop(client1);
+
+ // Wait until stopped
+ ts = jack_transport_query(client2, &pos);
+ while (ts != JackTransportStopped) {
+ jack_sleep(1 * 1000);
+ ts = jack_transport_query(client2, &pos);
+ }
+
+ // Simulate starting a slow-sync client that rolls after 0.5 sec
+ Log("Simulate a slow-sync client that needs 0.5 sec to start\n");
+ sync_called = 0;
+ wait_count = 0;
+ starting_state = 1; // Simulate starting state
+
+ Log("Starting transport...\n");
+ jack_transport_start(client1);
+ display_transport_state();
+
+ Log("Waiting 0.5 sec...\n");
+ jack_sleep(500);
+ starting_state = 0; // Simulate end of starting state after 0.5 sec
+
+ // Wait untill rolling
+ ts = jack_transport_query(client2, &pos);
+ while (ts != JackTransportRolling) {
+ jack_sleep(100); // Wait 100 ms each cycle
+ wait_count++;
+ if (wait_count == 10) {
+ Log("!!! ERROR !!! starting a slow-sync client does not work correctly\n");
+ break;
+ }
+ ts = jack_transport_query(client2, &pos);
+ }
+
+ if (sync_called == 0)
+ Log("!!! ERROR !!! starting a slow-sync client does not work correctly\n");
+
+ Log("Sync callback have been called %i times.\n", sync_called);
+ display_transport_state();
+
+ // Test jack_transport_locate while rolling
+ Log("Test jack_transport_locate while rolling\n");
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+ jack_nframes_t cur_frame = pos.frame;
+
+ wait_count = 0;
+ do {
+ display_transport_state();
+ jack_sleep(10); // 10 ms
+ // locate at first...
+ wait_count++;
+ if (wait_count == 1) {
+ Log("Do jack_transport_locate\n");
+ jack_transport_locate(client1, cur_frame / 2);
+ } else if (wait_count == 100) {
+ break;
+ }
+ ts = jack_transport_query(client2, &pos);
+ Log("Locating.... frame = %ld\n", pos.frame);
+ } while (pos.frame > cur_frame);
+
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+ if (wait_count == 100) {
+ printf("!!! ERROR !!! jack_transport_locate does not work correctly\n");
+ }
+
+ // Test jack_transport_reposition while rolling
+ Log("Test jack_transport_reposition while rolling\n");
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+ cur_frame = pos.frame;
+
+ wait_count = 0;
+ do {
+ display_transport_state();
+ jack_sleep(10); // 10 ms
+ // locate at first...
+ wait_count++;
+ if (wait_count == 1) {
+ Log("Do jack_transport_reposition\n");
+ request_pos.frame = cur_frame / 2;
+ jack_transport_reposition(client1, &request_pos);
+ } else if (wait_count == 100) {
+ break;
+ }
+ ts = jack_transport_query(client2, &pos);
+ Log("Locating.... frame = %ld\n", pos.frame);
+ } while (pos.frame > cur_frame);
+
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+ if (wait_count == 100) {
+ printf("!!! ERROR !!! jack_transport_reposition does not work correctly\n");
+ }
+
+ // Test jack_transport_reposition while stopped
+ jack_transport_stop(client1);
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+
+ Log("Test jack_transport_reposition while stopped\n");
+ wait_count = 0;
+ request_pos.frame = 10000;
+ jack_transport_reposition(client1, &request_pos);
+
+ do {
+ display_transport_state();
+ jack_sleep(100); // 100 ms
+ if (wait_count++ == 10)
+ break;
+ ts = jack_transport_query(client2, &pos);
+ Log("Locating.... frame = %ld\n", pos.frame);
+ } while (pos.frame != 10000);
+
+ ts = jack_transport_query(client2, &pos);
+ Log("Transport current frame = %ld\n", pos.frame);
+ if (pos.frame != 10000) {
+ printf("!!! ERROR !!! jack_transport_reposition does not work correctly\n");
+ }
+
+ jack_transport_stop(client1);
+
+ /* Tell the JACK server that we are ready to roll. Our
+ * process() callback will start running now. */
+
+ } else {
+ printf("Transport check is disabled...\n");
+ }
+
+ time_before_exit = time_to_run;
+ while (time_before_exit != 0) {
+ jack_sleep (1 * 1000);
+ time_before_exit--;
+ }
+
+ /**
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ Closing program
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ */
+
+ if (jack_deactivate(client2) != 0) {
+ printf("!!! ERROR !!! jack_deactivate does not return 0 for client2 !\n");
+ }
+ if (jack_deactivate(client1) != 0) {
+ printf("!!! ERROR !!! jack_deactivate does not return 0 for client1 !\n");
+ }
+ if (jack_client_close(client2) != 0) {
+ printf("!!! ERROR !!! jack_client_close does not return 0 for client2 !\n");
+ }
+ if (jack_client_close(client1) != 0) {
+ printf("!!! ERROR !!! jack_client_close does not return 0 for client1 !\n");
+ }
+
+ if (xrun == 0) {
+ Log("No Xrun have been detected during this test... cool !\n");
+ } else {
+ printf("%i Xrun have been detected during this session (seen callback messages to see where are the problems).\n");
+ }
+ free(framecollect);
+ free(signal1);
+ free(signal2);
+ Log("Exiting jack_test...\n");
+ fclose(file);
+ printf("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+ sprintf (filename, "framegraph-%i.gnu", cur_buffer_size);
+ file = fopen(filename, "w");
+ if (file == NULL) {
+ fprintf(stderr, "Erreur dans l'ouverture du fichier");
+ exit( -1);
+ }
+ fprintf(file, "reset\n");
+ fprintf(file, "set terminal png transparent nocrop enhanced\n");
+ fprintf(file, "set output 'framegraph-%i-1.png'\n", cur_buffer_size);
+ fprintf(file, "set title \"Frame time evolution during jack_test run\"\n");
+ fprintf(file, "set yrange [ %i.00000 : %i.0000 ] noreverse nowriteback\n", cur_buffer_size - (cur_buffer_size / 8), cur_buffer_size + (cur_buffer_size / 8));
+ fprintf(file, "set xrange [ 0.00000 : %i.0000 ] noreverse nowriteback\n" , linecount - 1);
+ fprintf(file, "set ylabel \"Frametime evolution (d(ft)/dt)\"\n");
+ fprintf(file, "set xlabel \"FrameTime\"\n");
+ fprintf(file, "set label \"| buf.siz:%i | fr.wl:%i | rg.ports:%i | 2nd.client:%i | trsprt:%i |\" at graph 0.01, 0.04\n", linebuf, linefw, lineports, linecl2, linetransport);
+ fprintf(file, "plot 'framefile-%i.dat' using 2 with impulses title \"Xruns\",'framefile-%i.dat' using 1 with line title \"Sampletime variation at %i\"\n", cur_buffer_size, cur_buffer_size, cur_buffer_size);
+
+ fprintf(file, "set output 'framegraph-%i-2.png'\n", cur_buffer_size);
+ fprintf(file, "set title \"Frame time evolution during jack_test run\"\n");
+ fprintf(file, "set yrange [ %i.00000 : %i.0000 ] noreverse nowriteback\n", (int) (cur_buffer_size / 2), (int) (2*cur_buffer_size + (cur_buffer_size / 8)));
+ fprintf(file, "set xrange [ 0.00000 : %i.0000 ] noreverse nowriteback\n" , linecount - 1);
+ fprintf(file, "set ylabel \"Frametime evolution (d(ft)/dt)\"\n");
+ fprintf(file, "set xlabel \"FrameTime\"\n");
+ fprintf(file, "set label \"| buf.siz:%i | fr.wl:%i | rg.ports:%i | 2nd.client:%i | trsprt:%i |\" at graph 0.01, 0.04\n", linebuf, linefw, lineports, linecl2, linetransport);
+ fprintf(file, "plot 'framefile-%i.dat' using 2 with impulses title \"Xruns\",'framefile-%i.dat' using 1 with line title \"Sampletime variation at %i\"\n", cur_buffer_size, cur_buffer_size, cur_buffer_size);
+ fclose(file);
+ exit(0);
+}
diff --git a/tests/testAtomic.cpp b/tests/testAtomic.cpp
new file mode 100644
index 00000000..211ce0e5
--- /dev/null
+++ b/tests/testAtomic.cpp
@@ -0,0 +1,258 @@
+/*
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <unistd.h>
+
+#include "JackAtomicState.h"
+#include "JackPosixThread.h"
+
+using namespace Jack;
+
+int verbose = 0;
+
+#define SIZE 1024
+
+struct TestState {
+
+ long fTable[SIZE];
+ long fReadCounter;
+ long fWriteCounter;
+
+ TestState()
+ {
+ for (int i = 0; i < SIZE; i++) {
+ fTable[i] = 0;
+ }
+ fReadCounter = 0;
+ fWriteCounter = 0;
+ }
+ virtual ~TestState()
+ {}
+
+ void Write()
+ {
+ fWriteCounter++;
+ for (int i = 0; i < SIZE; i++) {
+ fTable[i] = fTable[i] + 10;
+ }
+ }
+
+ bool Read()
+ {
+ int val = fTable[0];
+ fReadCounter++;
+ for (int i = 0; i < SIZE; i++) {
+ if (fTable[i] != val) {
+ printf("Read error fReadCounter %ld, i %ld, curVal %ld, oldVal %ld\n", fReadCounter, i, fTable[i], val);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ bool ReadCopy(long* result)
+ {
+ int val = fTable[0];
+ fReadCounter++;
+ for (int i = 0; i < SIZE; i++) {
+ result[i] = fTable[i];
+ if (fTable[i] != val) {
+ //printf("ReadCopy error fReadCounter %ld, i %ld, curVal %ld, oldVal %ld\n", fReadCounter, i, fTable[i], val);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ bool Check(long* result)
+ {
+ int val = result[0];
+ for (int i = 0; i < SIZE; i++) {
+ if (result[i] != val) {
+ printf("Check error fReadCounter %ld, i %ld, curVal %ld, oldVal %ld\n", fReadCounter, i, fTable[i], val);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ int GetVal()
+ {
+ return fTable[10];
+ }
+
+};
+
+/*!
+\brief The state wrapped with the 2 state atomic class.
+*/
+
+class TestStateUser : public JackAtomicState<TestState> {
+
+ public:
+
+ TestStateUser(){}
+ virtual ~TestStateUser(){}
+
+ void TestWriteMethod()
+ {
+ TestState* state = WriteNextStateStart();
+ state->Write();
+ state->Write();
+ state->Write();
+ WriteNextStateStop();
+ }
+
+ void TestReadMethod()
+ {
+ TestState* state;
+ int fCount = 0;
+ long result[SIZE];
+ UInt16 cur_index;
+ UInt16 next_index;
+ do {
+ cur_index = GetCurrentIndex();
+ fCount++;
+ state = ReadCurrentState();
+ bool res = state->ReadCopy(result);
+ next_index = GetCurrentIndex();
+ if (!res)
+ printf("TestReadMethod fCount %ld cur %ld next %ld\n", fCount, cur_index, next_index);
+ }while (cur_index != next_index);
+ state->Check(result);
+ }
+
+ void TestReadRTMethod1()
+ {
+ TestState* state = TrySwitchState();
+ bool res = state->Read();
+ }
+
+ void TestReadRTMethod2()
+ {
+ TestState* state = ReadCurrentState();
+ state->Read();
+ }
+};
+
+/*!
+\brief Base class for reader/writer threads.
+*/
+
+struct TestThread : public JackRunnableInterface {
+
+ JackPosixThread* fThread;
+ TestStateUser* fObject;
+
+ TestThread(TestStateUser* state):fObject(state)
+ {
+ fThread = new JackPosixThread(this);
+ int res = fThread->Start();
+ }
+
+ virtual ~TestThread()
+ {
+ fThread->Kill();
+ delete fThread;
+ }
+
+};
+
+/*!
+\brief "Real-time" reader thread.
+*/
+
+struct RTReaderThread : public TestThread {
+
+ RTReaderThread(TestStateUser* state):TestThread(state)
+ {}
+
+ bool Execute()
+ {
+ fObject->TestReadRTMethod1();
+
+ for (int i = 0; i < 5; i++) {
+ fObject->TestReadRTMethod2();
+ }
+
+ usleep(50);
+ return true;
+ }
+};
+
+/*!
+\brief Non "Real-time" reader thread.
+*/
+
+struct ReaderThread : public TestThread {
+
+ ReaderThread(TestStateUser* state):TestThread(state)
+ {}
+
+ bool Execute()
+ {
+ fObject->TestReadMethod();
+ usleep(56);
+ return true;
+ }
+};
+
+/*!
+\brief Writer thread.
+*/
+
+struct WriterThread : public TestThread {
+
+ WriterThread(TestStateUser* state):TestThread(state)
+ {}
+
+ bool Execute()
+ {
+ fObject->TestWriteMethod();
+ usleep(75);
+ return true;
+ }
+};
+
+
+int main(int argc, char * const argv[])
+{
+ char c;
+
+ printf("Test concurrent access to a TestState data structure protected with the 2 state JackAtomicState class\n");
+
+ TestStateUser fObject;
+ WriterThread writer(&fObject);
+ RTReaderThread readerRT1(&fObject);
+ ReaderThread reader1(&fObject);
+
+ /*
+ ReaderThread reader2(&fObject);
+ ReaderThread reader3(&fObject);
+ ReaderThread reader4(&fObject);
+ ReaderThread reader5(&fObject);
+ ReaderThread reader6(&fObject);
+ */
+
+ while ((c = getchar()) != 'q') {}
+ return 1;
+}
+
+
diff --git a/tests/testSem.cpp b/tests/testSem.cpp
new file mode 100644
index 00000000..7bebd282
--- /dev/null
+++ b/tests/testSem.cpp
@@ -0,0 +1,211 @@
+/*
+ Copyright (C) 2004-2006 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <stdio.h>
+#include <sys/time.h>
+#include <stdlib.h>
+
+#ifdef __APPLE__
+#include "JackMachSemaphore.h"
+#include "JackMachThread.h"
+#endif
+
+#include "JackPosixThread.h"
+#include "JackPosixSemaphore.h"
+#include "JackFifo.h"
+
+#define ITER 500000
+
+int verbose = 0;
+
+using namespace Jack;
+
+struct ServerThread : public JackRunnableInterface {
+
+ JackThread* fThread;
+ JackSynchro* fServerSem;
+ JackSynchro* fClientSem;
+
+ ServerThread()
+ {
+ fServerSem->Allocate("JackSemServer", 0);
+ fClientSem->Allocate("JackSemClient", 0);
+ //fThread = new JackMachThread(this);
+ fThread->SetParams(0, 500*1000, 500*1000);
+ fThread->Start();
+ //fThread->AcquireRealTime();
+ }
+
+ virtual ~ServerThread()
+ {
+ fThread->Kill();
+ delete fThread;
+ }
+
+ bool Execute()
+ {
+ printf("Execute Server\n");
+ for (int i = 0; i < ITER; i++)
+ {
+ fClientSem->Signal();
+ fServerSem->Wait();
+ }
+ return true;
+ }
+
+};
+
+struct ClientThread : public JackRunnableInterface {
+
+ JackThread* fThread;
+ JackSynchro* fServerSem;
+ JackSynchro* fClientSem;
+
+ ClientThread()
+ {
+ fServerSem->Connect("JackSemServer");
+ fClientSem->Connect("JackSemClient");
+ //fThread = new JackMachThread(this);
+ fThread->SetParams(0, 500*1000, 500*1000);
+ fThread->Start();
+ //fThread->AcquireRealTime();
+ }
+
+ virtual ~ClientThread()
+ {
+ fThread->Kill();
+ delete fThread;
+ }
+
+ bool Execute()
+ {
+ struct timeval T0, T1;
+ printf("Execute Client\n");
+ fClientSem->Wait();
+ gettimeofday(&T0, 0);
+
+ for (int i = 0; i < ITER; i++)
+ {
+ fServerSem->Signal();
+ fClientSem->Wait();
+ }
+
+ gettimeofday(&T1, 0);
+ printf("%5.1lf usec\n", (1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec) / (2.0 * ITER));
+ return true;
+ }
+
+};
+
+void server(JackSynchro* sem)
+{
+ char c;
+ printf("server\n");
+
+ sem->Allocate("JackSem", 0);
+
+ while (((c = getchar()) != 'q')) {
+
+ switch(c) {
+
+ case 's':
+ printf("SynchroSignal....\n");
+ //sem->Signal();
+ sem->SignalAll();
+ printf("SynchroSignal OK\n");
+ break;
+
+ case 'w':
+ printf("SemaphoreWait....\n");
+ sem->Wait();
+ printf("SemaphoreWait OK\n");
+ break;
+ }
+ }
+}
+
+void client(JackSynchro* sem)
+{
+ char c;
+ printf("client\n");
+
+ sem->Connect("JackSem");
+
+ while (((c = getchar()) != 'q')) {
+
+ switch(c) {
+
+ case 's':
+ printf("SemaphoreSignal....\n");
+ sem->Signal();
+ printf("SemaphoreSignal OK\n");
+ break;
+
+ case 'w':
+ printf("SemaphoreWait....\n");
+ sem->Wait();
+ printf("SemaphoreWait OK\n");
+ break;
+ }
+ }
+}
+
+int main (int argc, char * const argv[])
+{
+ char c;
+ ServerThread* serverthread = NULL;
+ ClientThread* clientthread = NULL;
+ JackSynchro* sem1 = NULL;
+
+ if (strcmp(argv[1],"-s") == 0) {
+ printf("Posix semaphore\n");
+ sem1 = new JackPosixSemaphore();
+ }
+
+ if (strcmp(argv[1],"-f") == 0) {
+ printf("Fifo\n");
+ sem1 = new JackFifo();
+ }
+
+#ifdef __APPLE__
+ if (strcmp(argv[1],"-m") == 0) {
+ printf("Mach semaphore\n");
+ sem1 = new JackMachSemaphore();
+ }
+#endif
+
+ /*
+ if (strcmp(argv[2], "server") == 0) {
+ serverthread = new ServerThread();
+ } else {
+ clientthread = new ClientThread();
+ }
+ */
+
+ if (strcmp(argv[2], "server") == 0) {
+ server(sem1);
+ } else {
+ client(sem1);
+ }
+
+ while (((c = getchar()) != 'q')) {}
+
+ delete serverthread;
+ delete clientthread;
+}
diff --git a/tests/testSynchroClient.cpp b/tests/testSynchroClient.cpp
new file mode 100644
index 00000000..5497ab01
--- /dev/null
+++ b/tests/testSynchroClient.cpp
@@ -0,0 +1,149 @@
+#ifdef WIN32
+
+#else
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <semaphore.h>
+#include <sys/time.h>
+#include <time.h>
+
+#endif
+
+#ifdef __APPLE__
+ #include "JackMachSemaphore.h"
+ #include "JackMachThread.h"
+#endif
+
+#ifdef WIN32
+ #include "JackWinThread.h"
+ #include "JackWinEvent.h"
+#endif
+
+#ifdef linux
+ #include "JackPosixThread.h"
+ #include "JackPosixSemaphore.h"
+ #include "JackFifo.h"
+#endif
+
+#define ITER 1000
+
+#define SERVER "serveur3"
+#define CLIENT "client3"
+
+using namespace Jack;
+
+int verbose = 0;
+
+class Test2 : public JackRunnableInterface
+{
+
+ private:
+
+ JackSynchro* fSynchro1;
+ JackSynchro* fSynchro2;
+
+ public:
+
+ Test2(JackSynchro* synchro1, JackSynchro* synchro2)
+ : fSynchro1(synchro1), fSynchro2(synchro2)
+ {}
+
+ bool Execute()
+ {
+ int a = 1;
+ for (int i = 0; i < ITER; i++) {
+ fSynchro2->Wait();
+ for (int j = 0; j < 2000000; j++) {
+ a += j;
+ }
+ fSynchro1->Signal();
+ }
+ return true;
+ }
+
+};
+
+int main(int ac, char *av [])
+{
+ Test2* obj;
+ JackSynchro* sem1 = NULL;
+ JackSynchro* sem2 = NULL;
+ JackThread* thread;
+
+ printf("Test of synchronization primitives : client side\n");
+ printf("type -s to test Posix semaphore\n");
+ printf("type -f to test Fifo\n");
+ printf("type -m to test Mach semaphore\n");
+ printf("type -e to test Windows event\n");
+
+#ifdef __APPLE__
+ if (strcmp(av[1], "-m") == 0) {
+ printf("Mach semaphore\n");
+ sem1 = new JackMachSemaphore();
+ sem2 = new JackMachSemaphore();
+ }
+#endif
+
+#ifdef WIN32
+ if (strcmp(av[1], "-e") == 0) {
+ printf("Win event\n");
+ sem1 = new JackWinEvent();
+ sem2 = new JackWinEvent();
+ }
+#endif
+
+#ifdef linux
+ if (strcmp(av[1], "-s") == 0) {
+ printf("Posix semaphore\n");
+ sem1 = new JackPosixSemaphore();
+ sem2 = new JackPosixSemaphore();
+ }
+
+ if (strcmp(av[1], "-f") == 0) {
+ printf("Fifo\n");
+ sem1 = new JackFifo();
+ sem2 = new JackFifo();
+ }
+#endif
+
+ sem1->ConnectOutput(SERVER);
+ sem2->ConnectInput(CLIENT);
+
+ obj = new Test2(sem1, sem2);
+
+#ifdef __APPLE__
+ thread = new JackMachThread(obj, 10000 * 1000, 500 * 1000, 10000 * 1000);
+#endif
+
+#ifdef WIN32
+ thread = new JackWinThread(obj);
+#endif
+
+#ifdef linux
+ thread = new JackPosixThread(obj, false, 50, PTHREAD_CANCEL_DEFERRED);
+#endif
+
+ thread->Start();
+ thread->AcquireRealTime();
+#ifdef WIN32
+ Sleep(30 * 1000);
+#else
+ sleep(30);
+#endif
+ //thread->Stop();
+ thread->Kill();
+ sem1->Disconnect();
+ sem2->Disconnect();
+ delete obj;
+ delete thread;
+ delete sem1;
+ delete sem2;
+ return 0;
+}
+
diff --git a/tests/testSynchroServer.cpp b/tests/testSynchroServer.cpp
new file mode 100644
index 00000000..5156286b
--- /dev/null
+++ b/tests/testSynchroServer.cpp
@@ -0,0 +1,205 @@
+#ifdef WIN32
+
+#else
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <semaphore.h>
+#include <sys/time.h>
+#include <time.h>
+
+#endif
+
+#ifdef __APPLE__
+ #include "JackMachSemaphore.h"
+ #include "JackMachThread.h"
+#endif
+
+#ifdef WIN32
+ #include "JackWinThread.h"
+ #include "JackWinEvent.h"
+#endif
+
+#ifdef linux
+ #include "JackPosixThread.h"
+ #include "JackPosixSemaphore.h"
+ #include "JackFifo.h"
+#endif
+
+#define ITER 1000
+
+#define SERVER "serveur3"
+#define CLIENT "client3"
+
+int verbose = 0;
+
+using namespace Jack;
+
+#ifdef WIN32
+LARGE_INTEGER gFreq;
+long gQueryOverhead;
+
+static long elapsed (LARGE_INTEGER * t1, LARGE_INTEGER *t2)
+{
+ long high = t1->HighPart - t2->HighPart;
+ double low = t1->LowPart - t2->LowPart;
+ // ignore values when high part changes
+ return high ? 0 : (long)((low * 1000000) / gFreq.LowPart);
+}
+
+static BOOL overhead (long * overhead)
+{
+ LARGE_INTEGER t1, t2;
+ BOOL r1, r2;
+ int i = 50;
+ r1 = QueryPerformanceCounter (&t1);
+ while (i--)
+ QueryPerformanceCounter (&t2);
+ r2 = QueryPerformanceCounter (&t2);
+ if (!r1 || !r2)
+ return FALSE;
+ *overhead = elapsed(&t2, &t1) / 50;
+ return TRUE;
+}
+
+#endif
+
+class Test1 : public JackRunnableInterface
+{
+
+ private:
+
+ JackSynchro* fSynchro1;
+ JackSynchro* fSynchro2;
+
+ public:
+
+ Test1(JackSynchro* synchro1, JackSynchro* synchro2)
+ : fSynchro1(synchro1), fSynchro2(synchro2)
+ {}
+
+ bool Execute()
+ {
+
+ #ifdef WIN32
+ LARGE_INTEGER t1, t2;
+ BOOL r1, r2;
+ r1 = QueryPerformanceCounter (&t1);
+ #else
+ struct timeval T0, T1;
+ clock_t time1, time2;
+ // Get total time for 2 * ITER process swaps
+ time1 = clock();
+ gettimeofday(&T0, 0);
+ #endif
+ printf("Execute loop\n");
+ for (int i = 0; i < ITER; i++) {
+ fSynchro2->Signal();
+ fSynchro1->Wait();
+ }
+
+ #ifdef WIN32
+ r2 = QueryPerformanceCounter (&t2);
+ elapsed(&t2, &t1);
+ printf ("%5.1lf usec for inter process swap\n", elapsed(&t2, &t1) / (2.0 * ITER));
+ #else
+ time2 = clock();
+ gettimeofday(&T1, 0);
+ printf ("%5.1lf usec for inter process swap\n", (1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec) / (2.0 * ITER));
+ printf ("%f usec for inter process swap \n", (1e6 * ((time2 - time1) / (double(CLOCKS_PER_SEC)))) / (2.0 * ITER));
+ #endif
+ return true;
+ }
+
+};
+
+int main(int ac, char *av [])
+{
+ Test1* obj;
+ JackSynchro* sem1 = NULL;
+ JackSynchro* sem2 = NULL;
+ JackThread* thread;
+
+#ifdef WIN32
+ if (!QueryPerformanceFrequency (&gFreq) ||
+ !overhead (&gQueryOverhead)) {
+ printf ("cannot query performance counter\n");
+ }
+#endif
+
+ printf("Test of synchronization primitives : server side\n");
+ printf("type -s to test Posix semaphore\n");
+ printf("type -f to test Fifo\n");
+ printf("type -m to test Mach semaphore\n");
+ printf("type -e to test Windows event\n");
+
+#ifdef __APPLE__
+ if (strcmp(av[1], "-m") == 0) {
+ printf("Mach semaphore\n");
+ sem1 = new JackMachSemaphore();
+ sem2 = new JackMachSemaphore();
+ }
+#endif
+
+#ifdef WIN32
+ if (strcmp(av[1], "-e") == 0) {
+ printf("Win event\n");
+ sem1 = new JackWinEvent();
+ sem2 = new JackWinEvent();
+ }
+#endif
+
+#ifdef linux
+ if (strcmp(av[1], "-s") == 0) {
+ printf("Posix semaphore\n");
+ sem1 = new JackPosixSemaphore();
+ sem2 = new JackPosixSemaphore();
+ }
+
+ if (strcmp(av[1], "-f") == 0) {
+ printf("Fifo\n");
+ sem1 = new JackFifo();
+ sem2 = new JackFifo();
+ }
+#endif
+
+ sem1->Allocate(SERVER, 0);
+ sem2->Allocate(CLIENT, 0);
+
+ // run test in RT thread
+ obj = new Test1(sem1, sem2);
+
+#ifdef __APPLE__
+ thread = new JackMachThread(obj, 10000 * 1000, 500 * 1000, 10000 * 1000);
+#endif
+
+#ifdef WIN32
+ thread = new JackWinThread(obj);
+#endif
+
+#ifdef linux
+ thread = new JackPosixThread(obj, false, 50, PTHREAD_CANCEL_DEFERRED);
+#endif
+
+ thread->Start();
+ thread->AcquireRealTime();
+#ifdef WIN32
+ Sleep(90 * 1000);
+#else
+ sleep(30);
+#endif
+
+ thread->Stop();
+ sem1->Destroy();
+ sem2->Destroy();
+ delete obj;
+ delete thread;
+ delete sem1;
+ delete sem2;
+ return 0;
+}
diff --git a/tests/testSynchroServerClient.cpp b/tests/testSynchroServerClient.cpp
new file mode 100644
index 00000000..59be6908
--- /dev/null
+++ b/tests/testSynchroServerClient.cpp
@@ -0,0 +1,268 @@
+#ifdef WIN32
+
+#else
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <semaphore.h>
+#include <sys/time.h>
+#include <time.h>
+
+#endif
+
+#ifdef __APPLE__
+ #include "JackMachSemaphore.h"
+ #include "JackMachThread.h"
+#endif
+
+#ifdef WIN32
+ #include "JackWinThread.h"
+ #include "JackWinEvent.h"
+#endif
+
+#ifdef linux
+ #include "JackPosixThread.h"
+ #include "JackPosixSemaphore.h"
+ #include "JackPthreadCond.h"
+ #include "JackFifo.h"
+#endif
+
+#define ITER 100000
+
+#define SERVER "serveur1"
+#define CLIENT "client1"
+
+int verbose = 0;
+
+using namespace Jack;
+
+#ifdef WIN32
+LARGE_INTEGER gFreq;
+long gQueryOverhead;
+
+static long elapsed (LARGE_INTEGER * t1, LARGE_INTEGER *t2)
+{
+ long high = t1->HighPart - t2->HighPart;
+ double low = t1->LowPart - t2->LowPart;
+ // ignore values when high part changes
+ return high ? 0 : (long)((low * 1000000) / gFreq.LowPart);
+}
+
+static BOOL overhead (long * overhead)
+{
+ LARGE_INTEGER t1, t2;
+ BOOL r1, r2;
+ int i = 50;
+ r1 = QueryPerformanceCounter (&t1);
+ while (i--)
+ QueryPerformanceCounter (&t2);
+ r2 = QueryPerformanceCounter (&t2);
+ if (!r1 || !r2)
+ return FALSE;
+ *overhead = elapsed(&t2, &t1) / 50;
+ return TRUE;
+}
+
+#endif
+
+class Test1 : public JackRunnableInterface
+{
+
+ private:
+
+ JackSynchro* fSynchro1;
+ JackSynchro* fSynchro2;
+
+ public:
+
+ Test1(JackSynchro* synchro1, JackSynchro* synchro2)
+ : fSynchro1(synchro1), fSynchro2(synchro2)
+ {}
+
+ bool Execute()
+ {
+
+ #ifdef WIN32
+ LARGE_INTEGER t1, t2;
+ BOOL r1, r2;
+ r1 = QueryPerformanceCounter (&t1);
+ #else
+ struct timeval T0, T1;
+ clock_t time1, time2;
+ // Get total time for 2 * ITER process swaps
+ time1 = clock();
+ gettimeofday(&T0, 0);
+ #endif
+
+ printf("Execute loop Test1\n");
+ for (int i = 0; i < ITER; i++) {
+ fSynchro2->Signal();
+ fSynchro1->Wait();
+ }
+
+ #ifdef WIN32
+ r2 = QueryPerformanceCounter (&t2);
+ elapsed(&t2, &t1);
+ printf ("%5.1lf usec for inter process swap\n", elapsed(&t2, &t1) / (2.0 * ITER));
+ #else
+ time2 = clock();
+ gettimeofday(&T1, 0);
+ printf ("%5.1lf usec for inter process swap\n", (1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec) / (2.0 * ITER));
+ printf ("%f usec for inter process swap \n", (1e6 * ((time2 - time1) / (double(CLOCKS_PER_SEC)))) / (2.0 * ITER));
+ #endif
+ return true;
+ }
+
+};
+
+class Test2 : public JackRunnableInterface
+{
+
+ private:
+
+ JackSynchro* fSynchro1;
+ JackSynchro* fSynchro2;
+
+ public:
+
+ Test2(JackSynchro* synchro1, JackSynchro* synchro2)
+ : fSynchro1(synchro1), fSynchro2(synchro2)
+ {}
+
+ bool Execute()
+ {
+ printf("Execute loop Test2\n");
+ for (int i = 0; i < ITER; i++) {
+ fSynchro2->Wait();
+ fSynchro1->Signal();
+ }
+ return true;
+ }
+
+};
+
+int main(int ac, char *av [])
+{
+ Test1* obj1;
+ Test2* obj2;
+ JackSynchro* sem1 = NULL;
+ JackSynchro* sem2 = NULL;
+ JackSynchro* sem3 = NULL;
+ JackSynchro* sem4 = NULL;
+ JackThread* thread1;
+ JackThread* thread2;
+
+#ifdef WIN32
+ if (!QueryPerformanceFrequency (&gFreq) ||
+ !overhead (&gQueryOverhead)) {
+ printf ("cannot query performance counter\n");
+ }
+#endif
+
+ printf("Test of synchronization primitives : inside a process\n");
+ printf("type -s to test Posix semaphore\n");
+ printf("type -f to test Fifo\n");
+ printf("type -m to test Mach semaphore\n");
+ printf("type -e to test Windows event\n");
+
+#ifdef __APPLE__
+ if (strcmp(av[1], "-m") == 0) {
+ printf("Mach semaphore\n");
+ sem1 = new JackMachSemaphore();
+ sem2 = new JackMachSemaphore();
+ sem3 = new JackMachSemaphore();
+ sem4 = new JackMachSemaphore();
+ }
+#endif
+
+#ifdef WIN32
+ if (strcmp(av[1], "-e") == 0) {
+ printf("Win event\n");
+ sem1 = new JackWinEvent();
+ sem2 = new JackWinEvent();
+ sem3 = new JackWinEvent();
+ sem4 = new JackWinEvent();
+ }
+#endif
+
+#ifdef linux
+ if (strcmp(av[1], "-s") == 0) {
+ printf("Posix semaphore\n");
+ sem1 = new JackPosixSemaphore();
+ sem2 = new JackPosixSemaphore();
+ sem3 = new JackPosixSemaphore();
+ sem4 = new JackPosixSemaphore();
+ }
+
+ if (strcmp(av[1], "-f") == 0) {
+ printf("Fifo\n");
+ sem1 = new JackFifo();
+ sem2 = new JackFifo();
+ sem3 = new JackFifo();
+ sem4 = new JackFifo();
+ }
+
+ if (strcmp(av[1], "-p") == 0) {
+ printf("Fifo\n");
+ sem1 = new JackPthreadCondServer();
+ sem2 = new JackPthreadCondServer();
+ sem3 = new JackPthreadCondClient(0);
+ sem4 = new JackPthreadCondClient(0);
+ }
+#endif
+
+ sem1->Allocate(SERVER, 0);
+ sem2->Allocate(CLIENT, 0);
+ sem3->ConnectOutput(SERVER);
+ sem4->ConnectInput(CLIENT);
+
+ // run test in RT thread
+ obj1 = new Test1(sem1, sem2);
+ obj2 = new Test2(sem3, sem4);
+
+#ifdef __APPLE__
+ thread1 = new JackMachThread(obj1, 10000 * 1000, 500 * 1000, 10000 * 1000);
+ thread2 = new JackMachThread(obj2, 10000 * 1000, 500 * 1000, 10000 * 1000);
+#endif
+
+#ifdef WIN32
+ thread1 = new JackWinThread(obj1);
+ thread2 = new JackWinThread(obj2);
+#endif
+
+#ifdef linux
+ thread1 = new JackPosixThread(obj1, false, 50, PTHREAD_CANCEL_DEFERRED);
+ thread2 = new JackPosixThread(obj2, false, 50, PTHREAD_CANCEL_DEFERRED);
+#endif
+
+ thread1->Start();
+ thread2->Start();
+ //thread1->AcquireRealTime();
+ //thread2->AcquireRealTime();
+#ifdef WIN32
+ Sleep(30 * 1000);
+#else
+ sleep (30);
+#endif
+
+ thread1->Stop();
+ thread2->Stop();
+ sem3->Disconnect();
+ sem4->Disconnect();
+ sem1->Destroy();
+ sem2->Destroy();
+ delete obj1;
+ delete obj2;
+ delete thread1;
+ delete thread2;
+ delete sem1;
+ delete sem2;
+ delete sem3;
+ delete sem4;
+ return 0;
+}
diff --git a/tests/testThread.cpp b/tests/testThread.cpp
new file mode 100644
index 00000000..7c817f1a
--- /dev/null
+++ b/tests/testThread.cpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2004-2005 Grame
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <stdio.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <exception>
+
+pthread_t fThread;
+char fName[256];
+int fFifo;
+
+void* ThreadHandler(void* arg)
+{
+ char c;
+ printf("ThreadHandler\n");
+ try {
+ while (1) {
+ read(fFifo, &c, sizeof(c));
+ sleep (1);
+ //pthread_testcancel();
+ }
+ }catch (std::exception e) {}
+}
+
+
+int main (int argc, char * const argv[])
+{
+ int res;
+ void* status;
+ struct stat statbuf;
+
+ printf("Thread test\n");
+ std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
+
+ sprintf(fName, "/tmp/fifo");
+
+ if (stat(fName, &statbuf)) {
+ if (errno == ENOENT) {
+ if (mkfifo(fName, 0666) < 0){
+ printf("Cannot create inter-client FIFO [%s]\n", fName);
+ return 0;
+ }
+ } else {
+ printf("Cannot check on FIFO %s\n", fName);
+ return 0;
+ }
+ } else {
+ if (!S_ISFIFO(statbuf.st_mode)) {
+ printf("FIFO (%s) already exists, but is not a FIFO!\n", fName);
+ return 0;
+ }
+ }
+
+ if ((fFifo = open(fName, O_RDWR|O_CREAT, 0666)) < 0) {
+ printf("Cannot open fifo [%s]", fName);
+ return 0;
+ }
+
+ if (res = pthread_create(&fThread, 0, ThreadHandler, NULL)) {
+ printf("Cannot set create thread %d\n", res);
+ return 0;
+ }
+
+ sleep (3);
+ printf("Cancel Thread\n");
+ pthread_cancel(fThread);
+ pthread_join(fThread, &status);
+}
diff --git a/windows/JackASIODriver.cpp b/windows/JackASIODriver.cpp
new file mode 100644
index 00000000..b31d27e6
--- /dev/null
+++ b/windows/JackASIODriver.cpp
@@ -0,0 +1,758 @@
+/*
+Copyright (C) 2006 Grame
+
+Portable Audio I/O Library for ASIO Drivers
+Author: Stephane Letz
+Based on the Open Source API proposed by Ross Bencina
+Copyright (c) 2000-2002 Stephane Letz, Phil Burk, Ross Bencina
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "pa_asio.h"
+#include "JackDriverLoader.h"
+#include "driver_interface.h"
+
+#include "JackASIODriver.h"
+#include "JackEngineControl.h"
+#include "JackGraphManager.h"
+#include "JackError.h"
+#include "JackClientControl.h"
+#include "JackGlobals.h"
+#include <iostream>
+
+
+#include <windows.h>
+#include <mmsystem.h>
+
+#include "asiosys.h"
+#include "asio.h"
+#include "asiodrivers.h"
+#include "iasiothiscallresolver.h"
+
+
+/* external references */
+extern AsioDrivers* asioDrivers ;
+bool loadAsioDriver(char *name);
+
+
+namespace Jack
+{
+
+
+/*
+ load the asio driver named by <driverName> and return statistics about
+ the driver in info. If no error occurred, the driver will remain open
+ and must be closed by the called by calling ASIOExit() - if an error
+ is returned the driver will already be closed.
+*/
+static PaError LoadAsioDriver( const char *driverName,
+ PaAsioDriverInfo *driverInfo, void *systemSpecific )
+{
+ PaError result = paNoError;
+ ASIOError asioError;
+ int asioIsInitialized = 0;
+
+ if( !loadAsioDriver(const_cast<char*>(driverName)))
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_HOST_ERROR( 0, "Failed to load ASIO driver" );
+ goto error;
+ }
+
+ memset( &driverInfo->asioDriverInfo, 0, sizeof(ASIODriverInfo) );
+ driverInfo->asioDriverInfo.asioVersion = 2;
+ driverInfo->asioDriverInfo.sysRef = systemSpecific;
+ if( (asioError = ASIOInit( &driverInfo->asioDriverInfo )) != ASE_OK )
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+ goto error;
+ }
+ else
+ {
+ asioIsInitialized = 1;
+ }
+
+ if( (asioError = ASIOGetChannels(&driverInfo->inputChannelCount,
+ &driverInfo->outputChannelCount)) != ASE_OK )
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+ goto error;
+ }
+
+ if( (asioError = ASIOGetBufferSize(&driverInfo->bufferMinSize,
+ &driverInfo->bufferMaxSize, &driverInfo->bufferPreferredSize,
+ &driverInfo->bufferGranularity)) != ASE_OK )
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+ goto error;
+ }
+
+ if( ASIOOutputReady() == ASE_OK )
+ driverInfo->postOutput = true;
+ else
+ driverInfo->postOutput = false;
+
+ return result;
+
+error:
+ if( asioIsInitialized )
+ ASIOExit();
+
+ return result;
+}
+
+
+int JackASIODriver::bufferSwitch(long index, ASIOBool directProcess)
+{
+ JackASIODriver* driver = (JackASIODriver*)userData;
+
+ // the actual processing callback.
+ // Beware that this is normally in a seperate thread, hence be sure that
+ // you take care about thread synchronization. This is omitted here for
+ // simplicity.
+
+ // as this is a "back door" into the bufferSwitchTimeInfo a timeInfo needs
+ // to be created though it will only set the timeInfo.samplePosition and
+ // timeInfo.systemTime fields and the according flags
+
+ ASIOTime timeInfo;
+ memset(&timeInfo, 0, sizeof(timeInfo));
+
+ // get the time stamp of the buffer, not necessary if no
+ // synchronization to other media is required
+ if( ASIOGetSamplePosition(&timeInfo.timeInfo.samplePosition, &timeInfo.timeInfo.systemTime) == ASE_OK)
+ timeInfo.timeInfo.flags = kSystemTimeValid | kSamplePositionValid;
+
+
+ driver->fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ driver->fInputBuffer = (float**)inputBuffer;
+ driver->fOutputBuffer = (float**)outputBuffer;
+
+ // Call the real callback
+ bufferSwitchTimeInfo( &timeInfo, index, directProcess );
+
+ return driver->Process();
+}
+
+int JackASIODriver::Read()
+{
+ return 0;
+}
+
+int JackASIODriver::Write()
+{
+ return 0;
+}
+
+
+int JackASIODriver::Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+ PaError result = paNoError;
+ int i, driverCount;
+ PaAsioHostApiRepresentation *asioHostApi;
+ PaAsioDeviceInfo *deviceInfoArray;
+ char **names;
+ PaAsioDriverInfo paAsioDriverInfo;
+
+ asioHostApi = (PaAsioHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaAsioHostApiRepresentation) );
+ if( !asioHostApi )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ asioHostApi->allocations = PaUtil_CreateAllocationGroup();
+ if( !asioHostApi->allocations )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ asioHostApi->systemSpecific = 0;
+ asioHostApi->openAsioDeviceIndex = paNoDevice;
+
+ *hostApi = &asioHostApi->inheritedHostApiRep;
+ (*hostApi)->info.structVersion = 1;
+
+ (*hostApi)->info.type = paASIO;
+ (*hostApi)->info.name = "ASIO";
+ (*hostApi)->info.deviceCount = 0;
+
+ #ifdef WINDOWS
+ /* use desktop window as system specific ptr */
+ asioHostApi->systemSpecific = GetDesktopWindow();
+ CoInitialize(NULL);
+ #endif
+
+ /* MUST BE CHECKED : to force fragments loading on Mac */
+ loadAsioDriver( "dummy" );
+
+ /* driverCount is the number of installed drivers - not necessarily
+ the number of installed physical devices. */
+ #if MAC
+ driverCount = asioDrivers->getNumFragments();
+ #elif WINDOWS
+ driverCount = asioDrivers->asioGetNumDev();
+ #endif
+
+ if( driverCount > 0 )
+ {
+ names = GetAsioDriverNames( asioHostApi->allocations, driverCount );
+ if( !names )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+
+ /* allocate enough space for all drivers, even if some aren't installed */
+
+ (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+ asioHostApi->allocations, sizeof(PaDeviceInfo*) * driverCount );
+ if( !(*hostApi)->deviceInfos )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ /* allocate all device info structs in a contiguous block */
+ deviceInfoArray = (PaAsioDeviceInfo*)PaUtil_GroupAllocateMemory(
+ asioHostApi->allocations, sizeof(PaAsioDeviceInfo) * driverCount );
+ if( !deviceInfoArray )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ for( i=0; i < driverCount; ++i )
+ {
+
+ PA_DEBUG(("ASIO names[%d]:%s\n",i,names[i]));
+
+ // Since portaudio opens ALL ASIO drivers, and no one else does that,
+ // we face fact that some drivers were not meant for it, drivers which act
+ // like shells on top of REAL drivers, for instance.
+ // so we get duplicate handles, locks and other problems.
+ // so lets NOT try to load any such wrappers.
+ // The ones i [davidv] know of so far are:
+
+ if ( strcmp (names[i],"ASIO DirectX Full Duplex Driver") == 0
+ || strcmp (names[i],"ASIO Multimedia Driver") == 0
+ || strncmp(names[i],"Premiere",8) == 0 //"Premiere Elements Windows Sound 1.0"
+ || strncmp(names[i],"Adobe",5) == 0 ) //"Adobe Default Windows Sound 1.5"
+ {
+ PA_DEBUG(("BLACKLISTED!!!\n"));
+ continue;
+ }
+
+
+ /* Attempt to load the asio driver... */
+ if( LoadAsioDriver( names[i], &paAsioDriverInfo, asioHostApi->systemSpecific ) == paNoError )
+ {
+ PaAsioDeviceInfo *asioDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];
+ PaDeviceInfo *deviceInfo = &asioDeviceInfo->commonDeviceInfo;
+
+ deviceInfo->structVersion = 2;
+ deviceInfo->hostApi = hostApiIndex;
+
+ deviceInfo->name = names[i];
+ PA_DEBUG(("PaAsio_Initialize: drv:%d name = %s\n", i,deviceInfo->name));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d inputChannels = %d\n", i, paAsioDriverInfo.inputChannelCount));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d outputChannels = %d\n", i, paAsioDriverInfo.outputChannelCount));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d bufferMinSize = %d\n", i, paAsioDriverInfo.bufferMinSize));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d bufferMaxSize = %d\n", i, paAsioDriverInfo.bufferMaxSize));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d bufferPreferredSize = %d\n", i, paAsioDriverInfo.bufferPreferredSize));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d bufferGranularity = %d\n", i, paAsioDriverInfo.bufferGranularity));
+
+ deviceInfo->maxInputChannels = paAsioDriverInfo.inputChannelCount;
+ deviceInfo->maxOutputChannels = paAsioDriverInfo.outputChannelCount;
+
+ deviceInfo->defaultSampleRate = 0.;
+ bool foundDefaultSampleRate = false;
+ for( int j=0; j < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++j )
+ {
+ ASIOError asioError = ASIOCanSampleRate( defaultSampleRateSearchOrder_[j] );
+ if( asioError != ASE_NoClock && asioError != ASE_NotPresent )
+ {
+ deviceInfo->defaultSampleRate = defaultSampleRateSearchOrder_[j];
+ foundDefaultSampleRate = true;
+ break;
+ }
+ }
+
+ PA_DEBUG(("PaAsio_Initialize: drv:%d defaultSampleRate = %f\n", i, deviceInfo->defaultSampleRate));
+
+ if( foundDefaultSampleRate ){
+
+ /* calculate default latency values from bufferPreferredSize
+ for default low latency, and bufferPreferredSize * 3
+ for default high latency.
+ use the default sample rate to convert from samples to
+ seconds. Without knowing what sample rate the user will
+ use this is the best we can do.
+ */
+
+ double defaultLowLatency =
+ paAsioDriverInfo.bufferPreferredSize / deviceInfo->defaultSampleRate;
+
+ deviceInfo->defaultLowInputLatency = defaultLowLatency;
+ deviceInfo->defaultLowOutputLatency = defaultLowLatency;
+
+ long defaultHighLatencyBufferSize =
+ paAsioDriverInfo.bufferPreferredSize * 3;
+
+ if( defaultHighLatencyBufferSize > paAsioDriverInfo.bufferMaxSize )
+ defaultHighLatencyBufferSize = paAsioDriverInfo.bufferMaxSize;
+
+ double defaultHighLatency =
+ defaultHighLatencyBufferSize / deviceInfo->defaultSampleRate;
+
+ if( defaultHighLatency < defaultLowLatency )
+ defaultHighLatency = defaultLowLatency; /* just incase the driver returns something strange */
+
+ deviceInfo->defaultHighInputLatency = defaultHighLatency;
+ deviceInfo->defaultHighOutputLatency = defaultHighLatency;
+
+ }else{
+
+ deviceInfo->defaultLowInputLatency = 0.;
+ deviceInfo->defaultLowOutputLatency = 0.;
+ deviceInfo->defaultHighInputLatency = 0.;
+ deviceInfo->defaultHighOutputLatency = 0.;
+ }
+
+ PA_DEBUG(("PaAsio_Initialize: drv:%d defaultLowInputLatency = %f\n", i, deviceInfo->defaultLowInputLatency));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d defaultLowOutputLatency = %f\n", i, deviceInfo->defaultLowOutputLatency));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d defaultHighInputLatency = %f\n", i, deviceInfo->defaultHighInputLatency));
+ PA_DEBUG(("PaAsio_Initialize: drv:%d defaultHighOutputLatency = %f\n", i, deviceInfo->defaultHighOutputLatency));
+
+ asioDeviceInfo->minBufferSize = paAsioDriverInfo.bufferMinSize;
+ asioDeviceInfo->maxBufferSize = paAsioDriverInfo.bufferMaxSize;
+ asioDeviceInfo->preferredBufferSize = paAsioDriverInfo.bufferPreferredSize;
+ asioDeviceInfo->bufferGranularity = paAsioDriverInfo.bufferGranularity;
+
+
+ asioDeviceInfo->asioChannelInfos = (ASIOChannelInfo*)PaUtil_GroupAllocateMemory(
+ asioHostApi->allocations,
+ sizeof(ASIOChannelInfo) * (deviceInfo->maxInputChannels
+ + deviceInfo->maxOutputChannels) );
+ if( !asioDeviceInfo->asioChannelInfos )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ int a;
+
+ for( a=0; a < deviceInfo->maxInputChannels; ++a ){
+ asioDeviceInfo->asioChannelInfos[a].channel = a;
+ asioDeviceInfo->asioChannelInfos[a].isInput = ASIOTrue;
+ ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[a] );
+ if( asioError != ASE_OK )
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+ goto error;
+ }
+ }
+
+ for( a=0; a < deviceInfo->maxOutputChannels; ++a ){
+ int b = deviceInfo->maxInputChannels + a;
+ asioDeviceInfo->asioChannelInfos[b].channel = a;
+ asioDeviceInfo->asioChannelInfos[b].isInput = ASIOFalse;
+ ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[b] );
+ if( asioError != ASE_OK )
+ {
+ result = paUnanticipatedHostError;
+ PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+ goto error;
+ }
+ }
+
+
+ /* unload the driver */
+ ASIOExit();
+
+ (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;
+ ++(*hostApi)->info.deviceCount;
+ }
+ }
+ }
+
+ if( (*hostApi)->info.deviceCount > 0 )
+ {
+ (*hostApi)->info.defaultInputDevice = 0;
+ (*hostApi)->info.defaultOutputDevice = 0;
+ }
+ else
+ {
+ (*hostApi)->info.defaultInputDevice = paNoDevice;
+ (*hostApi)->info.defaultOutputDevice = paNoDevice;
+ }
+
+
+ (*hostApi)->Terminate = Terminate;
+ (*hostApi)->OpenStream = OpenStream;
+ (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+ PaUtil_InitializeStreamInterface( &asioHostApi->callbackStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, GetStreamCpuLoad,
+ PaUtil_DummyRead, PaUtil_DummyWrite,
+ PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+ PaUtil_InitializeStreamInterface( &asioHostApi->blockingStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, PaUtil_DummyGetCpuLoad,
+ ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+ return result;
+
+error:
+ if( asioHostApi )
+ {
+ if( asioHostApi->allocations )
+ {
+ PaUtil_FreeAllAllocations( asioHostApi->allocations );
+ PaUtil_DestroyAllocationGroup( asioHostApi->allocations );
+ }
+
+ PaUtil_FreeMemory( asioHostApi );
+ }
+ return result;
+}
+
+
+
+void JackASIODriverTerminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+ PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
+
+ /*
+ IMPLEMENT ME:
+ - clean up any resources not handled by the allocation group
+ */
+
+ if( asioHostApi->allocations )
+ {
+ PaUtil_FreeAllAllocations( asioHostApi->allocations );
+ PaUtil_DestroyAllocationGroup( asioHostApi->allocations );
+ }
+
+ PaUtil_FreeMemory( asioHostApi );
+}
+
+
+int JackASIODriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_uid,
+ const char* playback_driver_uid,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ return 0;
+
+error:
+ return -1;
+}
+
+int JackASIODriver::Close()
+{
+ return 0;
+}
+
+int JackASIODriver::Start()
+{
+ JackLog("JackASIODriver::Start\n");
+ return 0;
+}
+
+int JackASIODriver::Stop()
+{
+ JackLog("JackASIODriver::Stop\n");
+ return 0;
+}
+
+int JackASIODriver::SetBufferSize(jack_nframes_t nframes)
+{
+ return 0;
+}
+
+void JackASIODriver::PrintState()
+{
+ int i;
+ std::cout << "JackASIODriver state" << std::endl;
+
+ jack_port_id_t port_index;
+
+ std::cout << "Input ports" << std::endl;
+
+ /*
+ for (i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+ */
+}
+
+} // end of namespace
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "JackExports.h"
+
+ EXPORT jack_driver_desc_t* driver_get_descriptor() {
+ jack_driver_desc_t *desc;
+ unsigned int i;
+ desc = (jack_driver_desc_t*)calloc(1, sizeof(jack_driver_desc_t));
+
+ strcpy(desc->name, "ASIO");
+
+ desc->nparams = 13;
+ desc->params = (jack_driver_param_desc_t*)calloc(desc->nparams, sizeof(jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy(desc->params[i].name, "channels");
+ desc->params[i].character = 'c';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "inchannels");
+ desc->params[i].character = 'i';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of input channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "outchannels");
+ desc->params[i].character = 'o';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of output channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "capture");
+ desc->params[i].character = 'C';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default PortAudio input device");
+ strcpy(desc->params[i].short_desc, "Provide capture ports. Optionally set PortAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "playback");
+ desc->params[i].character = 'P';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default PortAudio output device");
+ strcpy(desc->params[i].short_desc, "Provide playback ports. Optionally set PortAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy (desc->params[i].name, "monitor");
+ desc->params[i].character = 'm';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Provide monitor ports for the output");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "duplex");
+ desc->params[i].character = 'D';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Provide both capture and playback ports");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "rate");
+ desc->params[i].character = 'r';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 44100U;
+ strcpy(desc->params[i].short_desc, "Sample rate");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "period");
+ desc->params[i].character = 'p';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].short_desc, "Frames per period");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "device");
+ desc->params[i].character = 'd';
+ desc->params[i].type = JackDriverParamString;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].value.str, "will take default CoreAudio device name");
+ strcpy(desc->params[i].short_desc, "CoreAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "input-latency");
+ desc->params[i].character = 'I';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra input latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "output-latency");
+ desc->params[i].character = 'O';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra output latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "list-devices");
+ desc->params[i].character = 'l';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Display available CoreAudio devices");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ return desc;
+ }
+
+ EXPORT Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params)
+ {
+ jack_nframes_t srate = 44100;
+ jack_nframes_t frames_per_interrupt = 512;
+ int capture = FALSE;
+ int playback = FALSE;
+ int chan_in = 0;
+ int chan_out = 0;
+ bool monitor = false;
+ char* capture_pcm_name = "";
+ char* playback_pcm_name = "";
+ const JSList *node;
+ const jack_driver_param_t *param;
+ jack_nframes_t systemic_input_latency = 0;
+ jack_nframes_t systemic_output_latency = 0;
+
+ for (node = params; node; node = jack_slist_next(node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'd':
+ capture_pcm_name = strdup(param->value.str);
+ playback_pcm_name = strdup(param->value.str);
+ break;
+
+ case 'D':
+ capture = TRUE;
+ playback = TRUE;
+ break;
+
+ case 'c':
+ chan_in = chan_out = (int) param->value.ui;
+ break;
+
+ case 'i':
+ chan_in = (int) param->value.ui;
+ break;
+
+ case 'o':
+ chan_out = (int) param->value.ui;
+ break;
+
+ case 'C':
+ capture = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ capture_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'P':
+ playback = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ playback_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'm':
+ monitor = param->value.i;
+ break;
+
+ case 'r':
+ srate = param->value.ui;
+ break;
+
+ case 'p':
+ frames_per_interrupt = (unsigned int) param->value.ui;
+ break;
+
+ case 'I':
+ systemic_input_latency = param->value.ui;
+ break;
+
+ case 'O':
+ systemic_output_latency = param->value.ui;
+ break;
+
+ case 'l':
+ Jack::DisplayDeviceNames();
+ break;
+ }
+ }
+
+ // duplex is the default
+ if (!capture && !playback) {
+ capture = TRUE;
+ playback = TRUE;
+ }
+
+ Jack::JackDriverClientInterface* driver = new Jack::JackASIODriver("ASIO", engine, table);
+ if (driver->Open(frames_per_interrupt, srate, capture, playback, chan_in, chan_out, monitor, capture_pcm_name, playback_pcm_name, systemic_input_latency, systemic_output_latency) == 0) {
+ return driver;
+ } else {
+ delete driver;
+ return NULL;
+ }
+ }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/windows/JackASIODriver.h b/windows/JackASIODriver.h
new file mode 100644
index 00000000..794971a9
--- /dev/null
+++ b/windows/JackASIODriver.h
@@ -0,0 +1,92 @@
+/*
+Copyright (C) 2006 Grame
+
+Portable Audio I/O Library for ASIO Drivers
+Author: Stephane Letz
+Based on the Open Source API proposed by Ross Bencina
+Copyright (c) 2000-2002 Stephane Letz, Phil Burk, Ross Bencina
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackASIODriver__
+#define __JackASIODriver__
+
+#include "JackAudioDriver.h"
+#include "portaudio.h"
+
+namespace Jack
+{
+
+/*!
+\brief The ASIO driver.
+*/
+
+class JackASIODriver : public JackAudioDriver
+{
+
+ private:
+
+ PaStream* fStream;
+ float** fInputBuffer;
+ float** fOutputBuffer;
+ PaDeviceIndex fInputDevice;
+ PaDeviceIndex fOutputDevice;
+
+ static int Render(const void* inputBuffer, void* outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void* userData);
+
+ public:
+
+ JackASIODriver(const char* name, JackEngine* engine, JackSynchro** table)
+ : JackAudioDriver(name, engine, table), fStream(NULL), fInputBuffer(NULL), fOutputBuffer(NULL),
+ fInputDevice(paNoDevice), fOutputDevice(paNoDevice)
+ {}
+
+ virtual ~JackASIODriver()
+ {}
+
+ int Open(jack_nframes_t frames_per_cycle,
+ jack_nframes_t rate,
+ int capturing,
+ int playing,
+ int chan_in,
+ int chan_out,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Close();
+
+ int Start();
+ int Stop();
+
+ int Read();
+ int Write();
+
+ int SetBufferSize(jack_nframes_t nframes);
+
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/windows/JackPortAudioDriver.cpp b/windows/JackPortAudioDriver.cpp
new file mode 100644
index 00000000..e14a2783
--- /dev/null
+++ b/windows/JackPortAudioDriver.cpp
@@ -0,0 +1,696 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifdef __APPLE__
+#include "JackMachThread.h"
+#endif
+
+#include "pa_asio.h"
+#include "JackDriverLoader.h"
+#include "driver_interface.h"
+
+#include "JackPortAudioDriver.h"
+#include "JackEngineControl.h"
+#include "JackGraphManager.h"
+#include "JackError.h"
+#include "JackClientControl.h"
+#include "JackGlobals.h"
+#include <iostream>
+
+namespace Jack
+{
+
+void JackPortAudioDriver::PrintSupportedStandardSampleRates(const PaStreamParameters* inputParameters, const PaStreamParameters* outputParameters)
+{
+ static double standardSampleRates[] = {
+ 8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0,
+ 44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1 /* negative terminated list */
+ };
+ int i, printCount;
+ PaError err;
+
+ printCount = 0;
+ for (i = 0; standardSampleRates[i] > 0; i++) {
+ err = Pa_IsFormatSupported(inputParameters, outputParameters, standardSampleRates[i]);
+ if (err == paFormatIsSupported) {
+ if (printCount == 0) {
+ printf("\t%8.2f", standardSampleRates[i]);
+ printCount = 1;
+ } else if (printCount == 4) {
+ printf(",\n\t%8.2f", standardSampleRates[i]);
+ printCount = 1;
+ } else {
+ printf(", %8.2f", standardSampleRates[i]);
+ ++printCount;
+ }
+ }
+ }
+ if (!printCount)
+ printf("None\n");
+ else
+ printf("\n");
+}
+
+bool JackPortAudioDriver::GetInputDeviceFromName(const char* name, PaDeviceIndex* device, int* in_max)
+{
+ const PaDeviceInfo* deviceInfo;
+ PaDeviceIndex numDevices = Pa_GetDeviceCount();
+
+ for (int i = 0; i < numDevices; i++) {
+ deviceInfo = Pa_GetDeviceInfo(i);
+ if (strcmp(name, deviceInfo->name) == 0) {
+ *device = i;
+ *in_max = deviceInfo->maxInputChannels;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool JackPortAudioDriver::GetOutputDeviceFromName(const char* name, PaDeviceIndex* device, int* out_max)
+{
+ const PaDeviceInfo* deviceInfo;
+ PaDeviceIndex numDevices = Pa_GetDeviceCount();
+
+ for (int i = 0; i < numDevices; i++) {
+ deviceInfo = Pa_GetDeviceInfo(i);
+ if (strcmp(name, deviceInfo->name) == 0) {
+ *device = i;
+ *out_max = deviceInfo->maxOutputChannels;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+static void DisplayDeviceNames()
+{
+ PaError err;
+ const PaDeviceInfo* deviceInfo;
+ PaStreamParameters inputParameters, outputParameters;
+ int defaultDisplayed;
+
+ err = Pa_Initialize();
+ if (err != paNoError)
+ return ;
+
+ PaDeviceIndex numDevices = Pa_GetDeviceCount();
+ printf("Number of devices = %d\n", numDevices);
+
+ for (int i = 0; i < numDevices; i++) {
+ deviceInfo = Pa_GetDeviceInfo(i);
+ printf( "--------------------------------------- device #%d\n", i );
+
+ /* Mark global and API specific default devices */
+ defaultDisplayed = 0;
+ if (i == Pa_GetDefaultInputDevice()) {
+ printf("[ Default Input");
+ defaultDisplayed = 1;
+ } else if (i == Pa_GetHostApiInfo(deviceInfo->hostApi)->defaultInputDevice) {
+ const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo(deviceInfo->hostApi);
+ printf("[ Default %s Input", hostInfo->name);
+ defaultDisplayed = 1;
+ }
+
+ if (i == Pa_GetDefaultOutputDevice()) {
+ printf((defaultDisplayed ? "," : "["));
+ printf(" Default Output");
+ defaultDisplayed = 1;
+ } else if (i == Pa_GetHostApiInfo(deviceInfo->hostApi)->defaultOutputDevice) {
+ const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo(deviceInfo->hostApi);
+ printf((defaultDisplayed ? "," : "["));
+ printf(" Default %s Output", hostInfo->name);
+ defaultDisplayed = 1;
+ }
+
+ if (defaultDisplayed)
+ printf(" ]\n");
+
+ /* print device info fields */
+ printf("Name = %s\n", deviceInfo->name);
+ printf("Host API = %s\n", Pa_GetHostApiInfo(deviceInfo->hostApi)->name);
+ printf("Max inputs = %d", deviceInfo->maxInputChannels);
+ printf(", Max outputs = %d\n", deviceInfo->maxOutputChannels);
+ /*
+ printf("Default low input latency = %8.3f\n", deviceInfo->defaultLowInputLatency);
+ printf("Default low output latency = %8.3f\n", deviceInfo->defaultLowOutputLatency);
+ printf("Default high input latency = %8.3f\n", deviceInfo->defaultHighInputLatency);
+ printf("Default high output latency = %8.3f\n", deviceInfo->defaultHighOutputLatency);
+ */
+
+#ifdef WIN32
+#ifndef PA_NO_ASIO
+ /* ASIO specific latency information */
+ if (Pa_GetHostApiInfo(deviceInfo->hostApi)->type == paASIO) {
+ long minLatency, maxLatency, preferredLatency, granularity;
+
+ err = PaAsio_GetAvailableLatencyValues(i, &minLatency, &maxLatency, &preferredLatency, &granularity);
+
+ printf("ASIO minimum buffer size = %ld\n", minLatency);
+ printf("ASIO maximum buffer size = %ld\n", maxLatency);
+ printf("ASIO preferred buffer size = %ld\n", preferredLatency);
+
+ if (granularity == -1)
+ printf("ASIO buffer granularity = power of 2\n");
+ else
+ printf("ASIO buffer granularity = %ld\n", granularity);
+ }
+#endif /* !PA_NO_ASIO */
+#endif /* WIN32 */
+
+ printf("Default sample rate = %8.2f\n", deviceInfo->defaultSampleRate);
+
+ /* poll for standard sample rates */
+ inputParameters.device = i;
+ inputParameters.channelCount = deviceInfo->maxInputChannels;
+ inputParameters.sampleFormat = paInt16;
+ inputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ outputParameters.device = i;
+ outputParameters.channelCount = deviceInfo->maxOutputChannels;
+ outputParameters.sampleFormat = paInt16;
+ outputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /*
+ if (inputParameters.channelCount > 0) {
+ printf("Supported standard sample rates\n for half-duplex 16 bit %d channel input = \n", inputParameters.channelCount);
+ PrintSupportedStandardSampleRates(&inputParameters, NULL);
+ }
+
+ if (outputParameters.channelCount > 0) {
+ printf("Supported standard sample rates\n for half-duplex 16 bit %d channel output = \n", outputParameters.channelCount);
+ PrintSupportedStandardSampleRates(NULL, &outputParameters);
+ }
+
+ if (inputParameters.channelCount > 0 && outputParameters.channelCount > 0) {
+ printf("Supported standard sample rates\n for full-duplex 16 bit %d channel input, %d channel output = \n",
+ inputParameters.channelCount, outputParameters.channelCount );
+ PrintSupportedStandardSampleRates(&inputParameters, &outputParameters);
+ }
+ */
+ }
+
+ Pa_Terminate();
+}
+
+int JackPortAudioDriver::Render(const void* inputBuffer, void* outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void* userData)
+{
+ JackPortAudioDriver* driver = (JackPortAudioDriver*)userData;
+ driver->fLastWaitUst = GetMicroSeconds(); // Take callback date here
+ driver->fInputBuffer = (float**)inputBuffer;
+ driver->fOutputBuffer = (float**)outputBuffer;
+ return driver->Process();
+}
+
+int JackPortAudioDriver::Read()
+{
+ for (int i = 0; i < fCaptureChannels; i++) {
+ memcpy(GetInputBuffer(i), fInputBuffer[i], sizeof(float) * fEngineControl->fBufferSize);
+ }
+ return 0;
+}
+
+int JackPortAudioDriver::Write()
+{
+ for (int i = 0; i < fPlaybackChannels; i++) {
+ memcpy(fOutputBuffer[i], GetOutputBuffer(i), sizeof(float) * fEngineControl->fBufferSize);
+ }
+ return 0;
+}
+
+int JackPortAudioDriver::Open(jack_nframes_t nframes,
+ jack_nframes_t samplerate,
+ int capturing,
+ int playing,
+ int inchannels,
+ int outchannels,
+ bool monitor,
+ const char* capture_driver_uid,
+ const char* playback_driver_uid,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency)
+{
+ PaError err;
+ PaStreamParameters inputParameters;
+ PaStreamParameters outputParameters;
+ const PaDeviceInfo* deviceInfo;
+ 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",
+ nframes, inchannels, outchannels, capture_driver_uid, playback_driver_uid, samplerate);
+
+ // Generic JackAudioDriver Open
+ if (JackAudioDriver::Open(nframes, samplerate, capturing, playing, inchannels, outchannels, monitor, capture_driver_uid, playback_driver_uid, capture_latency, playback_latency) != 0) {
+ return -1;
+ }
+
+ err = Pa_Initialize();
+ if (err != paNoError) {
+ jack_error("JackPortAudioDriver::Pa_Initialize error = %s\n", Pa_GetErrorText(err));
+ goto error;
+ }
+
+ JackLog("JackPortAudioDriver::Pa_GetDefaultInputDevice %ld\n", Pa_GetDefaultInputDevice());
+ JackLog("JackPortAudioDriver::Pa_GetDefaultOutputDevice %ld\n", Pa_GetDefaultOutputDevice());
+
+ if (capturing) {
+ if (!GetInputDeviceFromName(capture_driver_uid, &fInputDevice, &in_max)) {
+ JackLog("JackPortAudioDriver::GetInputDeviceFromName cannot open %s\n", capture_driver_uid);
+ fInputDevice = Pa_GetDefaultInputDevice();
+ deviceInfo = Pa_GetDeviceInfo(fInputDevice);
+ in_max = deviceInfo->maxInputChannels;
+ capture_driver_uid = strdup(deviceInfo->name);
+ }
+ }
+
+ if (inchannels > in_max) {
+ jack_error("This device hasn't required input channels inchannels = %ld in_max = %ld", inchannels, in_max);
+ goto error;
+ }
+
+ if (playing) {
+ if (!GetOutputDeviceFromName(playback_driver_uid, &fOutputDevice, &out_max)) {
+ JackLog("JackPortAudioDriver::GetOutputDeviceFromName cannot open %s\n", playback_driver_uid);
+ fOutputDevice = Pa_GetDefaultOutputDevice();
+ deviceInfo = Pa_GetDeviceInfo(fOutputDevice);
+ out_max = deviceInfo->maxOutputChannels;
+ playback_driver_uid = strdup(deviceInfo->name);
+ }
+ }
+
+ if (outchannels > out_max) {
+ jack_error("This device hasn't required output channels outchannels = %ld out_max = %ld", outchannels, out_max);
+ goto error;
+ }
+
+ if (inchannels == 0) {
+ JackLog("JackPortAudioDriver::Open setup max in channels = %ld\n", in_max);
+ inchannels = in_max;
+ }
+
+ if (outchannels == 0) {
+ JackLog("JackPortAudioDriver::Open setup max out channels = %ld\n", out_max);
+ outchannels = out_max;
+ }
+
+ inputParameters.device = fInputDevice;
+ inputParameters.channelCount = inchannels;
+ inputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output
+ inputParameters.suggestedLatency = (fInputDevice != paNoDevice) // TODO: check how to setup this on ASIO
+ ? Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency
+ : 0;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ outputParameters.device = fOutputDevice;
+ outputParameters.channelCount = outchannels;
+ outputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output
+ outputParameters.suggestedLatency = (fOutputDevice != paNoDevice) // TODO: check how to setup this on ASIO
+ ? Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency
+ : 0;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ err = Pa_OpenStream(&fStream,
+ (fInputDevice == paNoDevice) ? 0 : &inputParameters,
+ (fOutputDevice == paNoDevice) ? 0 : &outputParameters,
+ samplerate,
+ nframes,
+ paNoFlag, // Clipping is on...
+ Render,
+ this);
+ if (err != paNoError) {
+ jack_error("Pa_OpenStream error = %s\n", Pa_GetErrorText(err));
+ goto error;
+ }
+
+#ifdef __APPLE__
+ fEngineControl->fPeriod = fEngineControl->fPeriodUsecs * 1000;
+ fEngineControl->fComputation = 500 * 1000;
+ fEngineControl->fConstraint = fEngineControl->fPeriodUsecs * 1000;
+#endif
+
+ // Core driver may have changed the in/out values
+ fCaptureChannels = inchannels;
+ fPlaybackChannels = outchannels;
+
+ assert(strlen(capture_driver_uid) < JACK_CLIENT_NAME_SIZE);
+ assert(strlen(playback_driver_uid) < JACK_CLIENT_NAME_SIZE);
+
+ strcpy(fCaptureDriverName, capture_driver_uid);
+ strcpy(fPlaybackDriverName, playback_driver_uid);
+
+ return 0;
+
+error:
+ Pa_Terminate();
+ return -1;
+}
+
+int JackPortAudioDriver::Close()
+{
+ JackAudioDriver::Close();
+ Pa_CloseStream(fStream);
+ Pa_Terminate();
+ return 0;
+}
+
+int JackPortAudioDriver::Start()
+{
+ JackLog("JackPortAudioDriver::Start\n");
+ JackAudioDriver::Start();
+ PaError err = Pa_StartStream(fStream);
+ return (err == paNoError) ? 0 : -1;
+}
+
+int JackPortAudioDriver::Stop()
+{
+ JackLog("JackPortAudioDriver::Stop\n");
+ PaError err = Pa_StopStream(fStream);
+ return (err == paNoError) ? 0 : -1;
+}
+
+int JackPortAudioDriver::SetBufferSize(jack_nframes_t nframes)
+{
+ PaError err;
+ PaStreamParameters inputParameters;
+ PaStreamParameters outputParameters;
+
+ if ((err = Pa_CloseStream(fStream)) != paNoError) {
+ jack_error("Pa_CloseStream error = %s\n", Pa_GetErrorText(err));
+ return -1;
+ }
+
+ inputParameters.device = fInputDevice;
+ inputParameters.channelCount = fCaptureChannels;
+ inputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output
+ inputParameters.suggestedLatency = (fInputDevice != paNoDevice) // TODO: check how to setup this on ASIO
+ ? Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency
+ : 0;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ outputParameters.device = fOutputDevice;
+ outputParameters.channelCount = fPlaybackChannels;
+ outputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output
+ outputParameters.suggestedLatency = (fOutputDevice != paNoDevice) // TODO: check how to setup this on ASIO
+ ? Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency
+ : 0;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ err = Pa_OpenStream(&fStream,
+ (fInputDevice == paNoDevice) ? 0 : &inputParameters,
+ (fOutputDevice == paNoDevice) ? 0 : &outputParameters,
+ fEngineControl->fSampleRate,
+ nframes,
+ paNoFlag, // Clipping is on...
+ Render,
+ this);
+ if (err != paNoError) {
+ jack_error("Pa_OpenStream error = %s\n", Pa_GetErrorText(err));
+ return -1;
+ } else {
+ // Only done when success
+ fEngineControl->fBufferSize = nframes;
+ fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // In microsec
+ return 0;
+ }
+}
+
+void JackPortAudioDriver::PrintState()
+{
+ int i;
+ std::cout << "JackPortAudioDriver state" << std::endl;
+
+ jack_port_id_t port_index;
+
+ std::cout << "Input ports" << std::endl;
+
+ /*
+ for (i = 0; i < fPlaybackChannels; i++) {
+ port_index = fCapturePortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+
+ std::cout << "Output ports" << std::endl;
+
+ for (i = 0; i < fCaptureChannels; i++) {
+ port_index = fPlaybackPortList[i];
+ JackPort* port = fGraphManager->GetPort(port_index);
+ std::cout << port->GetName() << std::endl;
+ if (fGraphManager->GetConnectionsNum(port_index)) {}
+ }
+ */
+}
+
+} // end of namespace
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "JackExports.h"
+
+ EXPORT jack_driver_desc_t* driver_get_descriptor() {
+ jack_driver_desc_t *desc;
+ unsigned int i;
+ desc = (jack_driver_desc_t*)calloc(1, sizeof(jack_driver_desc_t));
+
+ strcpy(desc->name, "portaudio");
+
+ desc->nparams = 13;
+ desc->params = (jack_driver_param_desc_t*)calloc(desc->nparams, sizeof(jack_driver_param_desc_t));
+
+ i = 0;
+ strcpy(desc->params[i].name, "channels");
+ desc->params[i].character = 'c';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "inchannels");
+ desc->params[i].character = 'i';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of input channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "outchannels");
+ desc->params[i].character = 'o';
+ desc->params[i].type = JackDriverParamInt;
+ desc->params[i].value.ui = 0;
+ strcpy(desc->params[i].short_desc, "Maximum number of output channels");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "capture");
+ desc->params[i].character = 'C';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default PortAudio input device");
+ strcpy(desc->params[i].short_desc, "Provide capture ports. Optionally set PortAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "playback");
+ desc->params[i].character = 'P';
+ desc->params[i].type = JackDriverParamString;
+ strcpy(desc->params[i].value.str, "will take default PortAudio output device");
+ strcpy(desc->params[i].short_desc, "Provide playback ports. Optionally set PortAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy (desc->params[i].name, "monitor");
+ desc->params[i].character = 'm';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Provide monitor ports for the output");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "duplex");
+ desc->params[i].character = 'D';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Provide both capture and playback ports");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "rate");
+ desc->params[i].character = 'r';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 44100U;
+ strcpy(desc->params[i].short_desc, "Sample rate");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "period");
+ desc->params[i].character = 'p';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].short_desc, "Frames per period");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "device");
+ desc->params[i].character = 'd';
+ desc->params[i].type = JackDriverParamString;
+ desc->params[i].value.ui = 128U;
+ strcpy(desc->params[i].value.str, "will take default CoreAudio device name");
+ strcpy(desc->params[i].short_desc, "CoreAudio device name");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "input-latency");
+ desc->params[i].character = 'I';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra input latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "output-latency");
+ desc->params[i].character = 'O';
+ desc->params[i].type = JackDriverParamUInt;
+ desc->params[i].value.i = 0;
+ strcpy(desc->params[i].short_desc, "Extra output latency");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ i++;
+ strcpy(desc->params[i].name, "list-devices");
+ desc->params[i].character = 'l';
+ desc->params[i].type = JackDriverParamBool;
+ desc->params[i].value.i = TRUE;
+ strcpy(desc->params[i].short_desc, "Display available CoreAudio devices");
+ strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
+
+ return desc;
+ }
+
+ EXPORT Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngine* engine, Jack::JackSynchro** table, const JSList* params) {
+ jack_nframes_t srate = 44100;
+ jack_nframes_t frames_per_interrupt = 512;
+ int capture = FALSE;
+ int playback = FALSE;
+ int chan_in = 0;
+ int chan_out = 0;
+ bool monitor = false;
+ char* capture_pcm_name = "winmme";
+ char* playback_pcm_name = "winmme";
+ const JSList *node;
+ const jack_driver_param_t *param;
+ jack_nframes_t systemic_input_latency = 0;
+ jack_nframes_t systemic_output_latency = 0;
+
+ for (node = params; node; node = jack_slist_next(node)) {
+ param = (const jack_driver_param_t *) node->data;
+
+ switch (param->character) {
+
+ case 'd':
+ capture_pcm_name = strdup(param->value.str);
+ playback_pcm_name = strdup(param->value.str);
+ break;
+
+ case 'D':
+ capture = TRUE;
+ playback = TRUE;
+ break;
+
+ case 'c':
+ chan_in = chan_out = (int) param->value.ui;
+ break;
+
+ case 'i':
+ chan_in = (int) param->value.ui;
+ break;
+
+ case 'o':
+ chan_out = (int) param->value.ui;
+ break;
+
+ case 'C':
+ capture = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ capture_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'P':
+ playback = TRUE;
+ if (strcmp(param->value.str, "none") != 0) {
+ playback_pcm_name = strdup(param->value.str);
+ }
+ break;
+
+ case 'm':
+ monitor = param->value.i;
+ break;
+
+ case 'r':
+ srate = param->value.ui;
+ break;
+
+ case 'p':
+ frames_per_interrupt = (unsigned int) param->value.ui;
+ break;
+
+ case 'I':
+ systemic_input_latency = param->value.ui;
+ break;
+
+ case 'O':
+ systemic_output_latency = param->value.ui;
+ break;
+
+ case 'l':
+ Jack::DisplayDeviceNames();
+ break;
+ }
+ }
+
+ // duplex is the default
+ if (!capture && !playback) {
+ capture = TRUE;
+ playback = TRUE;
+ }
+
+ Jack::JackDriverClientInterface* driver = new Jack::JackPortAudioDriver("portaudio", engine, table);
+ if (driver->Open(frames_per_interrupt, srate, capture, playback, chan_in, chan_out, monitor, capture_pcm_name, playback_pcm_name, systemic_input_latency, systemic_output_latency) == 0) {
+ return driver;
+ } else {
+ delete driver;
+ return NULL;
+ }
+ }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/windows/JackPortAudioDriver.h b/windows/JackPortAudioDriver.h
new file mode 100644
index 00000000..cb565384
--- /dev/null
+++ b/windows/JackPortAudioDriver.h
@@ -0,0 +1,91 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackPortAudioDriver__
+#define __JackPortAudioDriver__
+
+#include "JackAudioDriver.h"
+#include "portaudio.h"
+
+namespace Jack
+{
+
+/*!
+\brief The PortAudio driver.
+*/
+
+class JackPortAudioDriver : public JackAudioDriver
+{
+
+ private:
+
+ PaStream* fStream;
+ float** fInputBuffer;
+ float** fOutputBuffer;
+ PaDeviceIndex fInputDevice;
+ PaDeviceIndex fOutputDevice;
+
+ void PrintSupportedStandardSampleRates(const PaStreamParameters* inputParameters, const PaStreamParameters* outputParameters);
+ bool GetInputDeviceFromName(const char* name, PaDeviceIndex* device, int* in_max);
+ bool GetOutputDeviceFromName(const char* name, PaDeviceIndex* device, int* out_max);
+
+ static int Render(const void* inputBuffer, void* outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void* userData);
+
+ public:
+
+ JackPortAudioDriver(const char* name, JackEngine* engine, JackSynchro** table)
+ : JackAudioDriver(name, engine, table), fStream(NULL), fInputBuffer(NULL), fOutputBuffer(NULL),
+ fInputDevice(paNoDevice), fOutputDevice(paNoDevice)
+ {}
+
+ virtual ~JackPortAudioDriver()
+ {}
+
+ int Open(jack_nframes_t frames_per_cycle,
+ jack_nframes_t rate,
+ int capturing,
+ int playing,
+ int chan_in,
+ int chan_out,
+ bool monitor,
+ const char* capture_driver_name,
+ const char* playback_driver_name,
+ jack_nframes_t capture_latency,
+ jack_nframes_t playback_latency);
+
+ int Close();
+
+ int Start();
+ int Stop();
+
+ int Read();
+ int Write();
+
+ int SetBufferSize(jack_nframes_t nframes);
+
+ void PrintState();
+};
+
+} // end of namespace
+
+#endif
diff --git a/windows/JackWinEvent.cpp b/windows/JackWinEvent.cpp
new file mode 100644
index 00000000..70126fd3
--- /dev/null
+++ b/windows/JackWinEvent.cpp
@@ -0,0 +1,153 @@
+/*
+Copyright (C) 2004-2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackWinEvent.h"
+#include "JackError.h"
+
+// http://www.codeproject.com/win32/Win32_Event_Handling.asp
+// http://www.codeproject.com/threads/Synchronization.asp
+
+namespace Jack
+{
+
+void JackWinEvent::BuildName(const char* name, char* res)
+{
+ sprintf(res, "jack_pipe.%s", name);
+}
+
+bool JackWinEvent::Signal()
+{
+ BOOL res;
+ assert(fEvent);
+
+ if (fFlush)
+ return true;
+
+ if (!(res = SetEvent(fEvent))) {
+ jack_error("JackWinEvent::Signal name = %s err = %ld", fName, GetLastError());
+ }
+ return res;
+}
+
+bool JackWinEvent::SignalAll()
+{
+ BOOL res;
+ assert(fEvent);
+
+ if (fFlush)
+ return true;
+
+ if (!(res = SetEvent(fEvent))) {
+ jack_error("JackWinEvent::SignalAll name = %s err = %ld", fName, GetLastError());
+ }
+ return res;
+}
+
+bool JackWinEvent::Wait()
+{
+ DWORD res;
+
+ if ((res = WaitForSingleObject(fEvent, INFINITE)) != WAIT_OBJECT_0) {
+ jack_error("JackWinEvent::Wait name = %s err = %ld", fName, GetLastError());
+ }
+
+ return (res == WAIT_OBJECT_0);
+}
+
+bool JackWinEvent::TimedWait(long usec)
+{
+ DWORD res;
+
+ if ((res = WaitForSingleObject(fEvent, usec / 1000)) != WAIT_OBJECT_0) {
+ jack_error("JackWinEvent::Wait name = %s err = %ld", fName, GetLastError());
+ }
+
+ return (res == WAIT_OBJECT_0);
+}
+
+// Client side : get the published semaphore from server
+bool JackWinEvent::ConnectInput(const char* name)
+{
+ BuildName(name, fName);
+ JackLog("JackWinEvent::Connect %s\n", fName);
+
+ // Temporary...
+ if (fEvent) {
+ JackLog("Already connected name = %s\n", name);
+ return true;
+ }
+
+ if ((fEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, fName)) == NULL) {
+ jack_error("Connect: can't check in named event name = %s err = %ld", fName, GetLastError());
+ return false;
+ } else {
+ return true;
+ }
+}
+
+bool JackWinEvent::Connect(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackWinEvent::ConnectOutput(const char* name)
+{
+ return ConnectInput(name);
+}
+
+bool JackWinEvent::Disconnect()
+{
+ if (fEvent) {
+ JackLog("JackWinEvent::Disconnect %s\n", fName);
+ CloseHandle(fEvent);
+ fEvent = NULL;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool JackWinEvent::Allocate(const char* name, int value)
+{
+ BuildName(name, fName);
+ JackLog("JackWinEvent::Allocate name = %s val = %ld\n", fName, value);
+
+ /* create an auto reset event */
+ if ((fEvent = CreateEvent(NULL, FALSE, FALSE, fName)) == NULL) {
+ jack_error("Allocate: can't check in named event name = %s err = %ld", fName, GetLastError());
+ return false;
+ } else {
+ return true;
+ }
+}
+
+void JackWinEvent::Destroy()
+{
+ if (fEvent != NULL) {
+ JackLog("JackWinEvent::Destroy %s\n", fName);
+ CloseHandle(fEvent);
+ fEvent = NULL;
+ } else {
+ jack_error("JackWinEvent::Destroy synchro == NULL");
+ }
+}
+
+
+} // end of namespace
+
diff --git a/windows/JackWinEvent.h b/windows/JackWinEvent.h
new file mode 100644
index 00000000..e443053f
--- /dev/null
+++ b/windows/JackWinEvent.h
@@ -0,0 +1,71 @@
+/*
+Copyright (C) 2004-2005 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackWinEvent__
+#define __JackWinEvent__
+
+#include "JackSynchro.h"
+#include <windows.h>
+#include <stdio.h>
+#include <assert.h>
+
+namespace Jack
+{
+
+//http://bob.developpez.com/tutapiwin/article_56.php
+
+/*!
+\brief Inter process synchronization using system wide events.
+*/
+
+class JackWinEvent : public JackSynchro
+{
+
+ private:
+
+ HANDLE fEvent;
+
+ protected:
+
+ void BuildName(const char* name, char* res);
+
+ public:
+
+ JackWinEvent(): JackSynchro(), fEvent(NULL)
+ {}
+ virtual ~JackWinEvent()
+ {}
+
+ bool Signal();
+ bool SignalAll();
+ bool Wait();
+ bool TimedWait(long usec);
+
+ bool Allocate(const char* name, int value);
+ bool Connect(const char* name);
+ bool ConnectInput(const char* name);
+ bool ConnectOutput(const char* name);
+ bool Disconnect();
+ void Destroy();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinNamedPipe.cpp b/windows/JackWinNamedPipe.cpp
new file mode 100755
index 00000000..243916ec
--- /dev/null
+++ b/windows/JackWinNamedPipe.cpp
@@ -0,0 +1,373 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackWinNamedPipe.h"
+#include "JackError.h"
+#include <assert.h>
+
+#define BUFSIZE 4096
+
+namespace Jack
+{
+
+int JackWinNamedPipe::Read(void* data, int len)
+{
+ DWORD read;
+ JackLog("JackWinNamedPipeClient::Read len = %ld\n", len);
+ BOOL res = ReadFile(fNamedPipe, data, len, &read, NULL);
+ JackLog("JackWinNamedPipeClient::Read res = %ld read %ld\n", res, read);
+ if (read != len) {
+ jack_error("Cannot read named pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinNamedPipe::Write(void* data, int len)
+{
+ DWORD written;
+ JackLog("JackWinNamedPipeClient::Write len = %ld\n", len);
+ BOOL res = WriteFile(fNamedPipe, data, len, &written, NULL);
+ if (written != len) {
+ jack_error("Cannot write named pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinNamedPipeClient::Connect(const char* dir, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which);
+ JackLog("Connect: fName %s\n", fName);
+
+ fNamedPipe = CreateFile(fName, // pipe name
+ GENERIC_READ | // read and write access
+ GENERIC_WRITE,
+ 0, // no sharing
+ NULL, // default security attributes
+ OPEN_EXISTING, // opens existing pipe
+ 0, // default attributes
+ NULL); // no template file
+
+ if (fNamedPipe == INVALID_HANDLE_VALUE) {
+ jack_error("Cannot connect to named pipe = %s err = %ld", fName, GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinNamedPipeClient::Connect(const char* dir, const char* name, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%s", dir, name);
+ JackLog("Connect: fName %s\n", fName);
+
+ fNamedPipe = CreateFile(fName, // pipe name
+ GENERIC_READ | // read and write access
+ GENERIC_WRITE,
+ 0, // no sharing
+ NULL, // default security attributes
+ OPEN_EXISTING, // opens existing pipe
+ 0, // default attributes
+ NULL); // no template file
+
+ if (fNamedPipe == INVALID_HANDLE_VALUE) {
+ jack_error("Cannot connect to named pipe = %s err = %ld", fName, GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinNamedPipeClient::Close()
+{
+ CloseHandle(fNamedPipe);
+ return 0;
+}
+
+void JackWinNamedPipeClient::SetReadTimeOut(long sec)
+{}
+
+void JackWinNamedPipeClient::SetWriteTimeOut(long sec)
+{}
+
+
+JackWinAsyncNamedPipeClient::JackWinAsyncNamedPipeClient()
+ : JackWinNamedPipeClient(), fIOState(kIdle), fPendingIO(false)
+{
+ fIOState = kIdle;
+ fOverlap.hEvent = CreateEvent(NULL, // default security attribute
+ TRUE, // manual-reset event
+ TRUE, // initial state = signaled
+ NULL); // unnamed event object
+}
+
+JackWinAsyncNamedPipeClient::JackWinAsyncNamedPipeClient(HANDLE pipe, bool pending)
+ : JackWinNamedPipeClient(pipe), fIOState(kIdle), fPendingIO(pending)
+{
+ fOverlap.hEvent = CreateEvent(NULL, // default security attribute
+ TRUE, // manual-reset event
+ TRUE, // initial state = signaled
+ NULL); // unnamed event object
+
+ if (!fPendingIO)
+ SetEvent(fOverlap.hEvent);
+
+ fIOState = (fPendingIO) ? kConnecting : kReading;
+}
+
+JackWinAsyncNamedPipeClient::~JackWinAsyncNamedPipeClient()
+{
+ CloseHandle(fOverlap.hEvent);
+}
+
+int JackWinAsyncNamedPipeClient::FinishIO()
+{
+ DWORD success, ret;
+ success = GetOverlappedResult(fNamedPipe, // handle to pipe
+ &fOverlap, // OVERLAPPED structure
+ &ret, // bytes transferred
+ FALSE); // do not wait
+
+ switch (fIOState) {
+
+ case kConnecting:
+ if (!success) {
+ jack_error("Conection error");
+ return -1;
+ } else {
+ fIOState = kReading;
+ // Prepare connection for new client ??
+ }
+ break;
+
+ case kReading:
+ if (!success || ret == 0) {
+ return -1;
+ }
+ fIOState = kWriting;
+ break;
+
+ case kWriting:
+ if (!success || ret == 0) {
+ return -1;
+ }
+ fIOState = kReading;
+ break;
+ }
+
+ return 0;
+}
+
+int JackWinAsyncNamedPipeClient::Read(void* data, int len)
+{
+ DWORD read;
+ JackLog("JackWinNamedPipeClient::Read len = %ld\n", len);
+ BOOL res = ReadFile(fNamedPipe, data, len, &read, &fOverlap);
+ JackLog("JackWinNamedPipeClient::Read res = %ld read %ld\n", res, read);
+
+ if (res && read != 0) {
+ fPendingIO = false;
+ fIOState = kWriting;
+ return 0;
+ } else if (!res && GetLastError() == ERROR_IO_PENDING) {
+ fPendingIO = true;
+ return 0;
+ } else {
+ jack_error("Cannot read named pipe err = %ld", GetLastError());
+ return -1;
+ }
+}
+
+int JackWinAsyncNamedPipeClient::Write(void* data, int len)
+{
+ DWORD written;
+ JackLog("JackWinNamedPipeClient::Write len = %ld\n", len);
+ BOOL res = WriteFile(fNamedPipe, data, len, &written, &fOverlap);
+
+ if (res && written != 0) {
+ fPendingIO = false;
+ fIOState = kWriting;
+ return 0;
+ } else if (!res && GetLastError() == ERROR_IO_PENDING) {
+ fPendingIO = true;
+ return 0;
+ } else {
+ jack_error("Cannot write named pipe err = %ld", GetLastError());
+ return -1;
+ }
+}
+
+// Server side
+
+int JackWinNamedPipeServer::Bind(const char* dir, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which);
+ JackLog("Bind: fName %s\n", fName);
+
+ if ((fNamedPipe = CreateNamedPipe(fName,
+ PIPE_ACCESS_DUPLEX, // read/write access
+ PIPE_TYPE_MESSAGE | // message type pipe
+ PIPE_READMODE_MESSAGE | // message-read mode
+ PIPE_WAIT, // blocking mode
+ PIPE_UNLIMITED_INSTANCES, // max. instances
+ BUFSIZE, // output buffer size
+ BUFSIZE, // input buffer size
+ INFINITE, // client time-out
+ NULL)) == INVALID_HANDLE_VALUE) { // no security a
+ jack_error("Cannot bind server to pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinNamedPipeServer::Bind(const char* dir, const char* name, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%s", dir, name);
+ JackLog("Bind: fName %s\n", fName);
+
+ if ((fNamedPipe = CreateNamedPipe(fName,
+ PIPE_ACCESS_DUPLEX, // read/write access
+ PIPE_TYPE_MESSAGE | // message type pipe
+ PIPE_READMODE_MESSAGE | // message-read mode
+ PIPE_WAIT, // blocking mode
+ PIPE_UNLIMITED_INSTANCES, // max. instances
+ BUFSIZE, // output buffer size
+ BUFSIZE, // input buffer size
+ INFINITE, // client time-out
+ NULL)) == INVALID_HANDLE_VALUE) { // no security a
+ jack_error("Cannot bind server to pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+bool JackWinNamedPipeServer::Accept()
+{
+ if (ConnectNamedPipe(fNamedPipe, NULL)) {
+ return true;
+ } else {
+ jack_error("Cannot bind server pipe name = %s err = %ld", fName, GetLastError());
+ if (GetLastError() == ERROR_PIPE_CONNECTED) {
+ jack_error("pipe already connnected = %s ", fName);
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
+
+JackWinNamedPipeClient* JackWinNamedPipeServer::AcceptClient()
+{
+ if (ConnectNamedPipe(fNamedPipe, NULL)) {
+ return new JackWinNamedPipeClient(fNamedPipe);
+ } else {
+ switch (GetLastError()) {
+
+ case ERROR_PIPE_CONNECTED:
+ return new JackWinNamedPipeClient(fNamedPipe);
+
+ default:
+ jack_error("Cannot connect server pipe name = %s err = %ld", fName, GetLastError());
+ return NULL;
+ break;
+ }
+ }
+}
+
+int JackWinNamedPipeServer::Close()
+{
+ DisconnectNamedPipe(fNamedPipe);
+ CloseHandle(fNamedPipe);
+ return 0;
+}
+
+// Server side
+
+int JackWinAsyncNamedPipeServer::Bind(const char* dir, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%d", dir, which);
+ JackLog("Bind: fName %s\n", fName);
+
+ if ((fNamedPipe = CreateNamedPipe(fName,
+ PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
+ PIPE_TYPE_MESSAGE | // message type pipe
+ PIPE_READMODE_MESSAGE | // message-read mode
+ PIPE_WAIT, // blocking mode
+ PIPE_UNLIMITED_INSTANCES, // max. instances
+ BUFSIZE, // output buffer size
+ BUFSIZE, // input buffer size
+ INFINITE, // client time-out
+ NULL)) == INVALID_HANDLE_VALUE) { // no security a
+ jack_error("Cannot bind server to pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+int JackWinAsyncNamedPipeServer::Bind(const char* dir, const char* name, int which)
+{
+ sprintf(fName, "\\\\.\\pipe\\%s_jack_%s", dir, name);
+ JackLog("Bind: fName %s\n", fName);
+
+ if ((fNamedPipe = CreateNamedPipe(fName,
+ PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
+ PIPE_TYPE_MESSAGE | // message type pipe
+ PIPE_READMODE_MESSAGE | // message-read mode
+ PIPE_WAIT, // blocking mode
+ PIPE_UNLIMITED_INSTANCES, // max. instances
+ BUFSIZE, // output buffer size
+ BUFSIZE, // input buffer size
+ INFINITE, // client time-out
+ NULL)) == INVALID_HANDLE_VALUE) { // no security a
+ jack_error("Cannot bind server to pipe err = %ld", GetLastError());
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+JackWinNamedPipeClient* JackWinAsyncNamedPipeServer::AcceptClient()
+{
+ if (ConnectNamedPipe(fNamedPipe, NULL)) {
+ return new JackWinAsyncNamedPipeClient(fNamedPipe, false);
+ } else {
+ switch (GetLastError()) {
+
+ case ERROR_IO_PENDING:
+ return new JackWinAsyncNamedPipeClient(fNamedPipe, true);
+
+ case ERROR_PIPE_CONNECTED:
+ return new JackWinAsyncNamedPipeClient(fNamedPipe, false);
+
+ default:
+ jack_error("Cannot connect server pipe name = %s err = %ld", fName, GetLastError());
+ return NULL;
+ break;
+ }
+ }
+}
+
+} // end of namespace
+
diff --git a/windows/JackWinNamedPipe.h b/windows/JackWinNamedPipe.h
new file mode 100755
index 00000000..dd540c4b
--- /dev/null
+++ b/windows/JackWinNamedPipe.h
@@ -0,0 +1,159 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackWinNamedPipe__
+#define __JackWinNamedPipe__
+
+#include "JackChannelTransaction.h"
+#include <assert.h>
+#include <stdio.h>
+#include <windows.h>
+
+namespace Jack
+{
+
+class JackWinNamedPipe : public JackChannelTransaction
+{
+
+ protected:
+
+ HANDLE fNamedPipe;
+ char fName[256];
+
+ public:
+
+ JackWinNamedPipe(): fNamedPipe(NULL)
+ {}
+ JackWinNamedPipe(HANDLE pipe): fNamedPipe(pipe)
+ {}
+ virtual ~JackWinNamedPipe()
+ {}
+
+ virtual int Read(void* data, int len);
+ virtual int Write(void* data, int len);
+};
+
+/*!
+\brief Client named pipe.
+*/
+
+class JackWinNamedPipeClient : public JackWinNamedPipe
+{
+
+ public:
+
+ JackWinNamedPipeClient(): JackWinNamedPipe()
+ {}
+ JackWinNamedPipeClient(HANDLE pipe): JackWinNamedPipe(pipe)
+ {}
+
+ virtual ~JackWinNamedPipeClient()
+ {}
+
+ virtual int Connect(const char* dir, int which);
+ virtual int Connect(const char* dir, const char* name, int which);
+ virtual int Close();
+ virtual void SetReadTimeOut(long sec);
+ virtual void SetWriteTimeOut(long sec);
+};
+
+class JackWinAsyncNamedPipeClient : public JackWinNamedPipeClient
+{
+ enum kIOState {kIdle = 0, kConnecting, kReading, kWriting};
+
+ private:
+
+ bool fPendingIO;
+ kIOState fIOState;
+ OVERLAPPED fOverlap;
+
+ public:
+
+ JackWinAsyncNamedPipeClient();
+ JackWinAsyncNamedPipeClient(HANDLE pipe, bool pending);
+ virtual ~JackWinAsyncNamedPipeClient();
+
+ virtual int Read(void* data, int len);
+ virtual int Write(void* data, int len);
+
+ HANDLE GetEvent()
+ {
+ return fOverlap.hEvent;
+ }
+
+ kIOState GetIOState()
+ {
+ return fIOState;
+ }
+
+ bool GetPending()
+ {
+ return fPendingIO;
+ }
+
+ int FinishIO();
+};
+
+/*!
+\brief Server named pipe.
+*/
+
+class JackWinNamedPipeServer : public JackWinNamedPipe
+{
+
+ public:
+
+ JackWinNamedPipeServer(): JackWinNamedPipe()
+ {}
+ virtual ~JackWinNamedPipeServer()
+ {}
+
+ virtual int Bind(const char* dir, int which);
+ virtual int Bind(const char* dir, const char* name, int which);
+ virtual bool Accept();
+ virtual JackWinNamedPipeClient* AcceptClient();
+ int Close();
+};
+
+/*!
+\brief Server async named pipe.
+*/
+
+class JackWinAsyncNamedPipeServer : public JackWinNamedPipeServer
+{
+
+ public:
+
+ JackWinAsyncNamedPipeServer(): JackWinNamedPipeServer()
+ {}
+ virtual ~JackWinAsyncNamedPipeServer()
+ {}
+
+ int Bind(const char* dir, int which);
+ int Bind(const char* dir, const char* name, int which);
+ bool Accept();
+ JackWinNamedPipeClient* AcceptClient();
+ int Close();
+};
+
+} // end of namespace
+
+
+#endif
+
diff --git a/windows/JackWinNamedPipeClientChannel.cpp b/windows/JackWinNamedPipeClientChannel.cpp
new file mode 100644
index 00000000..e1001e6e
--- /dev/null
+++ b/windows/JackWinNamedPipeClientChannel.cpp
@@ -0,0 +1,258 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackWinNamedPipeClientChannel.h"
+#include "JackRequest.h"
+#include "JackClient.h"
+#include "JackGlobals.h"
+
+namespace Jack
+{
+
+JackWinNamedPipeClientChannel::JackWinNamedPipeClientChannel()
+{
+ fThread = JackGlobals::MakeThread(this);
+ fClient = NULL;
+}
+
+JackWinNamedPipeClientChannel::~JackWinNamedPipeClientChannel()
+{
+ delete fThread;
+}
+
+int JackWinNamedPipeClientChannel::Open(const char* name, JackClient* obj)
+{
+ JackLog("JackWinNamedPipeClientChannel::Open name = %s\n", name);
+
+ if (fNotificationListenPipe.Bind(jack_client_dir, name, 0) < 0) {
+ jack_error("Cannot bind pipe");
+ goto error;
+ }
+
+ if (fRequestPipe.Connect(jack_server_dir, 0) < 0) {
+ jack_error("Cannot connect to server pipe");
+ goto error;
+ }
+
+ fClient = obj;
+ return 0;
+
+error:
+ fRequestPipe.Close();
+ fNotificationListenPipe.Close();
+ return -1;
+}
+
+void JackWinNamedPipeClientChannel::Close()
+{
+ fRequestPipe.Close();
+ fNotificationListenPipe.Close();
+}
+
+int JackWinNamedPipeClientChannel::Start()
+{
+ JackLog("JackWinNamedPipeClientChannel::Start\n");
+
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack client listener");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackWinNamedPipeClientChannel::Stop()
+{
+ JackLog("JackWinNamedPipeClientChannel::Stop\n");
+ fThread->Kill();
+}
+
+void JackWinNamedPipeClientChannel::ServerSyncCall(JackRequest* req, JackResult* res, int* result)
+{
+ if (req->Write(&fRequestPipe) < 0) {
+ jack_error("Could not write request type = %ld", req->fType);
+ *result = -1;
+ return ;
+ }
+
+ if (res->Read(&fRequestPipe) < 0) {
+ jack_error("Could not read result type = %ld", req->fType);
+ *result = -1;
+ return ;
+ }
+
+ *result = res->fResult;
+}
+
+void JackWinNamedPipeClientChannel::ServerAsyncCall(JackRequest* req, JackResult* res, int* result)
+{
+ if (req->Write(&fRequestPipe) < 0) {
+ jack_error("Could not write request type = %ld", req->fType);
+ *result = -1;
+ } else {
+ *result = 0;
+ }
+}
+
+void JackWinNamedPipeClientChannel::ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ JackClientNewRequest req(name);
+ JackClientNewResult res;
+ ServerSyncCall(&req, &res, result);
+ *shared_engine = res.fSharedEngine;
+ *shared_client = res.fSharedClient;
+ *shared_ports = res.fSharedPorts;
+}
+
+void JackWinNamedPipeClientChannel::ClientClose(int refnum, int* result)
+{
+ JackClientCloseRequest req(refnum);
+ JackResult res;
+ ServerAsyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::ClientActivate(int refnum, int* result)
+{
+ JackActivateRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::ClientDeactivate(int refnum, int* result)
+{
+ JackDeactivateRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
+{
+ JackPortRegisterRequest req(refnum, name, "audio", flags, buffer_size);
+ JackPortRegisterResult res;
+ ServerSyncCall(&req, &res, result);
+ *port_index = res.fPortIndex;
+}
+
+void JackWinNamedPipeClientChannel::PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
+{
+ JackPortUnRegisterRequest req(refnum, port_index);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::PortConnect(int refnum, const char* src, const char* dst, int* result)
+{
+ JackPortConnectNameRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::PortDisconnect(int refnum, const char* src, const char* dst, int* result)
+{
+ JackPortDisconnectNameRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ JackPortConnectRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
+{
+ JackPortDisconnectRequest req(refnum, src, dst);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::SetBufferSize(jack_nframes_t nframes, int* result)
+{
+ JackSetBufferSizeRequest req(nframes);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::SetFreewheel(int onoff, int* result)
+{
+ JackSetFreeWheelRequest req(onoff);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::ReleaseTimebase(int refnum, int* result)
+{
+ JackReleaseTimebaseRequest req(refnum);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+void JackWinNamedPipeClientChannel::SetTimebaseCallback(int refnum, int conditional, int* result)
+{
+ JackSetTimebaseCallbackRequest req(refnum, conditional);
+ JackResult res;
+ ServerSyncCall(&req, &res, result);
+}
+
+bool JackWinNamedPipeClientChannel::Init()
+{
+ JackLog("JackWinNamedPipeClientChannel::Init \n");
+
+ if (!fNotificationListenPipe.Accept()) {
+ jack_error("JackWinNamedPipeClientChannel: cannot establish notification pipe");
+ return false;
+ } else {
+ return true;
+ }
+}
+
+bool JackWinNamedPipeClientChannel::Execute()
+{
+ JackClientNotification event;
+ JackResult res;
+
+ //fClient->Init(); // To be checked
+
+ if (event.Read(&fNotificationListenPipe) < 0) {
+ fNotificationListenPipe.Close();
+ jack_error("JackWinNamedPipeClientChannel read fail");
+ goto error;
+ }
+
+ res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fValue);
+
+ if (event.fSync) {
+ if (res.Write(&fNotificationListenPipe) < 0) {
+ fNotificationListenPipe.Close();
+ jack_error("JackWinNamedPipeClientChannel write fail");
+ goto error;
+ }
+ }
+ return true;
+
+error:
+ fClient->ShutDown();
+ return false;
+}
+
+} // end of namespace
+
+
diff --git a/windows/JackWinNamedPipeClientChannel.h b/windows/JackWinNamedPipeClientChannel.h
new file mode 100644
index 00000000..dc519a4e
--- /dev/null
+++ b/windows/JackWinNamedPipeClientChannel.h
@@ -0,0 +1,88 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackWinNamedPipeClientChannel__
+#define __JackWinNamedPipeClientChannel__
+
+#include "JackChannel.h"
+#include "JackWinNamedPipe.h"
+#include "JackThread.h"
+#include "JackRequest.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackClientChannel using pipes.
+*/
+
+class JackWinNamedPipeClientChannel : public JackClientChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackWinNamedPipeClient fRequestPipe; // Pipe to communicate with the server
+ JackWinNamedPipeServer fNotificationListenPipe; // Pipe listener for server notification
+ JackThread* fThread; // Thread to execute the event loop
+ JackClient* fClient;
+
+ void ServerSyncCall(JackRequest* req, JackResult* res, int* result);
+ void ServerAsyncCall(JackRequest* req, JackResult* res, int* result);
+
+ public:
+
+ JackWinNamedPipeClientChannel();
+ virtual ~JackWinNamedPipeClientChannel();
+
+ int Open(const char* name, JackClient* obj);
+ void Close();
+
+ int Start();
+ void Stop();
+
+ void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void ClientClose(int refnum, int* result);
+
+ void ClientActivate(int refnum, int* result);
+ void ClientDeactivate(int refnum, int* result);
+
+ void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
+ void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
+
+ void PortConnect(int refnum, const char* src, const char* dst, int* result);
+ void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
+
+ void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+ void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
+
+ void SetBufferSize(jack_nframes_t nframes, int* result);
+ void SetFreewheel(int onoff, int* result);
+
+ void ReleaseTimebase(int refnum, int* result);
+ void SetTimebaseCallback(int refnum, int conditional, int* result);
+
+ // JackRunnableInterface interface
+ bool Init();
+ bool Execute();
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinNamedPipeNotifyChannel.cpp b/windows/JackWinNamedPipeNotifyChannel.cpp
new file mode 100644
index 00000000..6368ca72
--- /dev/null
+++ b/windows/JackWinNamedPipeNotifyChannel.cpp
@@ -0,0 +1,79 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackRequest.h"
+#include "JackWinNamedPipeNotifyChannel.h"
+#include "JackError.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+// Server to client
+int JackWinNamedPipeNotifyChannel::Open(const char* name)
+{
+ JackLog("JackWinNamedPipeNotifyChannel::Open name = %s\n", name);
+
+ // Connect to client listen pipe
+ if (fNotifyPipe.Connect(jack_client_dir, name, 0) < 0) {
+ jack_error("Cannot connect client socket");
+ return -1;
+ }
+ // TODO : use a time out for notifications
+ fNotifyPipe.SetReadTimeOut(SOCKET_TIME_OUT);
+ return 0;
+}
+
+void JackWinNamedPipeNotifyChannel::Close()
+{
+ JackLog("JackWinNamedPipeNotifyChannel::Close\n");
+ fNotifyPipe.Close();
+}
+
+void JackWinNamedPipeNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result)
+{
+ JackClientNotification event(name, refnum, notify, sync, value);
+ JackResult res;
+
+ // Send notification
+ if (event.Write(&fNotifyPipe) < 0) {
+ jack_error("Could not write notification");
+ fNotifyPipe.Close();
+ *result = -1;
+ return;
+ }
+
+ // Read the result in "synchronous" mode only
+ if (sync) {
+ // Get result : use a time out
+ if (res.Read(&fNotifyPipe) < 0) {
+ jack_error("Could not read result");
+ fNotifyPipe.Close();
+ *result = -1;
+ } else {
+ *result = res.fResult;
+ }
+ } else {
+ *result = 0;
+ }
+}
+
+} // end of namespace
+
+
diff --git a/windows/JackWinNamedPipeNotifyChannel.h b/windows/JackWinNamedPipeNotifyChannel.h
new file mode 100644
index 00000000..d0dde9a9
--- /dev/null
+++ b/windows/JackWinNamedPipeNotifyChannel.h
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackWinNamedPipeNotifyChannel__
+#define __JackWinNamedPipeNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackWinNamedPipe.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackNotifyChannel using named pipe.
+*/
+
+class JackWinNamedPipeNotifyChannel : public JackNotifyChannelInterface
+{
+
+ private:
+
+ JackWinNamedPipeClient fNotifyPipe; // Pipe to communicate with the server : from server to client
+
+ public:
+
+ JackWinNamedPipeNotifyChannel()
+ {}
+ virtual ~JackWinNamedPipeNotifyChannel()
+ {}
+
+ int Open(const char* name); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ void ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinNamedPipeServerChannel.cpp b/windows/JackWinNamedPipeServerChannel.cpp
new file mode 100644
index 00000000..8901df7f
--- /dev/null
+++ b/windows/JackWinNamedPipeServerChannel.cpp
@@ -0,0 +1,390 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "JackWinNamedPipeServerChannel.h"
+#include "JackRequest.h"
+#include "JackServer.h"
+#include "JackEngine.h"
+#include "JackGlobals.h"
+#include "JackClient.h"
+#include <assert.h>
+
+using namespace std;
+
+namespace Jack
+{
+
+HANDLE JackClientPipeThread::fMutex = NULL; // never released....
+
+// fRefNum = 0 is used as a "running" state for the JackWinNamedPipeServerNotifyChannel object
+// fRefNum = -1 correspond to a not running client
+
+JackClientPipeThread::JackClientPipeThread(JackWinNamedPipeClient* pipe)
+ : fPipe(pipe), fServer(NULL), fRefNum(0)
+{
+ fThread = JackGlobals::MakeThread(this);
+ if (fMutex == NULL)
+ fMutex = CreateMutex(NULL, FALSE, NULL);
+}
+
+JackClientPipeThread::~JackClientPipeThread()
+{
+ delete fPipe;
+ delete fThread;
+}
+
+int JackClientPipeThread::Open(JackServer* server) // Open the Server/Client connection
+{
+ fServer = server;
+
+ // Start listening
+ if (fThread->Start() != 0){
+ jack_error("Cannot start Jack server listener\n");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackClientPipeThread::Close() // Close the Server/Client connection
+{
+ fThread->Kill();
+}
+
+bool JackClientPipeThread::Execute()
+{
+ JackLog("JackClientPipeThread::Execute\n");
+
+ if (HandleRequest(fPipe) < 0) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+int JackClientPipeThread::HandleRequest(JackWinNamedPipeClient* pipe)
+{
+ // Read header
+ JackRequest header;
+ if (header.Read(pipe) < 0) {
+ jack_error("HandleRequest: cannot read header");
+ // Lock the global mutex
+ if (WaitForSingleObject(fMutex, INFINITE) == WAIT_FAILED)
+ jack_error("JackClientPipeThread::HandleRequest: mutex wait error");
+ KillClient(fPipe);
+ // Unlock the global mutex
+ ReleaseMutex(fMutex);
+ return -1;
+ }
+
+ // Lock the global mutex
+ if (WaitForSingleObject(fMutex, INFINITE) == WAIT_FAILED)
+ jack_error("JackClientPipeThread::HandleRequest: mutex wait error");
+
+ // Read data
+ switch (header.fType) {
+
+ case JackRequest::kClientNew: {
+ JackLog("JackRequest::ClientNew\n");
+ JackClientNewRequest req;
+ JackClientNewResult res;
+ req.Read(pipe);
+ AddClient(pipe, req.fName, &res.fSharedEngine, &res.fSharedClient, &res.fSharedPorts, &res.fResult);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kClientClose: {
+ JackLog("JackRequest::ClientClose\n");
+ JackClientCloseRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->ClientClose(req.fRefNum);
+ res.Write(pipe);
+ RemoveClient(pipe, req.fRefNum);
+ break;
+ }
+
+ case JackRequest::kActivateClient: {
+ JackActivateRequest req;
+ JackResult res;
+ JackLog("JackRequest::ActivateClient\n");
+ req.Read(pipe);
+ res.fResult = fServer->Activate(req.fRefNum);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kDeactivateClient: {
+ JackLog("JackRequest::DeactivateClient\n");
+ JackDeactivateRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->Deactivate(req.fRefNum);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kRegisterPort: {
+ JackLog("JackRequest::RegisterPort\n");
+ JackPortRegisterRequest req;
+ JackPortRegisterResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortRegister(req.fRefNum, req.fName, req.fFlags, req.fBufferSize, &res.fPortIndex);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kUnRegisterPort: {
+ JackLog("JackRequest::UnRegisterPort\n");
+ JackPortUnRegisterRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortUnRegister(req.fRefNum, req.fPortIndex);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kConnectNamePorts: {
+ JackLog("JackRequest::ConnectPorts\n");
+ JackPortConnectNameRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortConnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kDisconnectNamePorts: {
+ JackLog("JackRequest::DisconnectPorts\n");
+ JackPortDisconnectNameRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortDisconnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kConnectPorts: {
+ JackLog("JackRequest::ConnectPorts\n");
+ JackPortConnectRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortConnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kDisconnectPorts: {
+ JackLog("JackRequest::DisconnectPorts\n");
+ JackPortDisconnectRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->PortDisconnect(req.fRefNum, req.fSrc, req.fDst);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kSetBufferSize: {
+ JackLog("JackRequest::SetBufferSize\n");
+ JackSetBufferSizeRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->SetBufferSize(req.fBufferSize);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kSetFreeWheel: {
+ JackLog("JackRequest::SetFreeWheel\n");
+ JackSetFreeWheelRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->SetFreewheel(req.fOnOff);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kReleaseTimebase: {
+ JackLog("JackRequest::kReleaseTimebase\n");
+ JackReleaseTimebaseRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->ReleaseTimebase(req.fRefNum);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kSetTimebaseCallback: {
+ JackLog("JackRequest::kSetTimebaseCallback\n");
+ JackSetTimebaseCallbackRequest req;
+ JackResult res;
+ req.Read(pipe);
+ res.fResult = fServer->GetEngine()->SetTimebaseCallback(req.fRefNum, req.fConditionnal);
+ res.Write(pipe);
+ break;
+ }
+
+ case JackRequest::kNotification: {
+ JackLog("JackRequest::Notification\n");
+ JackClientNotificationRequest req;
+ req.Read(pipe);
+ fServer->Notify(req.fRefNum, req.fNotify, req.fValue);
+ break;
+ }
+
+ default:
+ JackLog("Unknown request %ld\n", header.fType);
+ break;
+ }
+
+ // Unlock the global mutex
+ ReleaseMutex(fMutex);
+ return 0;
+}
+
+void JackClientPipeThread::AddClient(JackWinNamedPipeClient* pipe, char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result)
+{
+ JackLog("JackWinNamedPipeServerChannel::AddClient %s\n", name);
+ fRefNum = -1;
+ *result = fServer->GetEngine()->ClientNew(name, &fRefNum, shared_engine, shared_client, shared_ports);
+}
+
+void JackClientPipeThread::RemoveClient(JackWinNamedPipeClient* pipe, int refnum)
+{
+ JackLog("JackWinNamedPipeServerChannel::RemoveClient ref = %d\n", refnum);
+ fRefNum = -1;
+ pipe->Close();
+}
+
+void JackClientPipeThread::KillClient(JackWinNamedPipeClient* pipe)
+{
+ JackLog("JackClientPipeThread::KillClient \n");
+ JackLog("JackWinNamedPipeServerChannel::KillClient ref = %d\n", fRefNum);
+
+ if (fRefNum == -1) { // Correspond to an already removed client.
+ JackLog("Kill a closed client\n");
+ } else if (fRefNum == 0) { // Correspond to a still not opened client.
+ JackLog("Kill a not opened client\n");
+ } else {
+ fServer->Notify(fRefNum, JackNotifyChannelInterface::kDeadClient, 0);
+ }
+
+ fRefNum = -1;
+ pipe->Close();
+}
+
+JackWinNamedPipeServerChannel::JackWinNamedPipeServerChannel()
+{
+ fThread = JackGlobals::MakeThread(this);
+}
+
+JackWinNamedPipeServerChannel::~JackWinNamedPipeServerChannel()
+{
+ delete fThread;
+}
+
+int JackWinNamedPipeServerChannel::Open(JackServer* server)
+{
+ JackLog("JackWinNamedPipeServerChannel::Open \n");
+
+ fServer = server;
+
+ // Needed for internal connection from JackWinNamedPipeServerNotifyChannel object
+ if (fRequestListenPipe.Bind(jack_server_dir, 0) < 0) {
+ jack_error("JackWinNamedPipeServerChannel::Open : cannot create result listen pipe");
+ return false;
+ }
+
+ // Start listening
+ if (fThread->Start() != 0) {
+ jack_error("Cannot start Jack server listener\n");
+ goto error;
+ }
+
+ return 0;
+
+error:
+ fRequestListenPipe.Close();
+ return -1;
+}
+
+void JackWinNamedPipeServerChannel::Close()
+{
+ fThread->Kill();
+ fRequestListenPipe.Close();
+}
+
+bool JackWinNamedPipeServerChannel::Init()
+{
+ JackLog("JackWinNamedPipeServerChannel::Init \n");
+ JackWinNamedPipeClient* pipe;
+
+ // Accept first client, that is the JackWinNamedPipeServerNotifyChannel object
+ if ((pipe = fRequestListenPipe.AcceptClient()) == NULL) {
+ jack_error("JackWinNamedPipeServerChannel::Init : cannot connect pipe");
+ return false;
+ } else {
+ AddClient(pipe);
+ return true;
+ }
+}
+
+bool JackWinNamedPipeServerChannel::Execute()
+{
+ JackWinNamedPipeClient* pipe;
+
+ if (fRequestListenPipe.Bind(jack_server_dir, 0) < 0) {
+ jack_error("JackWinNamedPipeServerChannel::Open : cannot create result listen pipe");
+ return false;
+ }
+
+ if ((pipe = fRequestListenPipe.AcceptClient()) == NULL) {
+ jack_error("JackWinNamedPipeServerChannel::Open : cannot connect pipe");
+ return false;
+ }
+
+ AddClient(pipe);
+ return true;
+}
+
+void JackWinNamedPipeServerChannel::AddClient(JackWinNamedPipeClient* pipe)
+{
+ // Remove dead clients
+ std::list<JackClientPipeThread*>::iterator it = fClientList.begin();
+ JackClientPipeThread* client;
+ while (it != fClientList.end()) {
+ client = *it;
+ if (!client->IsRunning()) { // Dead client
+ JackLog("Remove client from list\n");
+ it = fClientList.erase(it);
+ delete(client);
+ } else {
+ it++;
+ }
+ }
+
+ client = new JackClientPipeThread(pipe);
+ client->Open(fServer);
+ fClientList.push_back(client);
+}
+
+} // end of namespace
+
+
diff --git a/windows/JackWinNamedPipeServerChannel.h b/windows/JackWinNamedPipeServerChannel.h
new file mode 100644
index 00000000..07f33d43
--- /dev/null
+++ b/windows/JackWinNamedPipeServerChannel.h
@@ -0,0 +1,101 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackWinNamedPipeServerChannel__
+#define __JackWinNamedPipeServerChannel__
+
+#include "JackChannel.h"
+#include "JackWinNamedPipe.h"
+#include "JackThread.h"
+#include <map>
+#include <list>
+
+namespace Jack
+{
+
+class JackClientPipeThread : public JackRunnableInterface
+{
+
+ private:
+
+ JackWinNamedPipeClient* fPipe;
+ JackServer* fServer;
+ JackThread* fThread;
+ int fRefNum;
+
+ void AddClient(JackWinNamedPipeClient* pipe, char* name, int* shared_engine, int* shared_client, int* shared_ports, int* result);
+ void RemoveClient(JackWinNamedPipeClient* pipe, int refnum);
+ void KillClient(JackWinNamedPipeClient* pipe);
+
+ static HANDLE fMutex;
+
+ public:
+
+ JackClientPipeThread(JackWinNamedPipeClient* pipe);
+ virtual ~JackClientPipeThread();
+
+ int Open(JackServer* server); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ int HandleRequest(JackWinNamedPipeClient* pipe);
+
+ // JackRunnableInterface interface
+ bool Execute();
+
+ bool IsRunning()
+ {
+ return (fRefNum >= 0);
+ }
+};
+
+/*!
+\brief JackServerChannel using pipe.
+*/
+
+class JackWinNamedPipeServerChannel : public JackServerChannelInterface, public JackRunnableInterface
+{
+
+ private:
+
+ JackWinNamedPipeServer fRequestListenPipe; // Pipe to create request socket for the client
+ JackServer* fServer;
+ JackThread* fThread; // Thread to execute the event loop
+
+ std::list<JackClientPipeThread*> fClientList;
+
+ void AddClient(JackWinNamedPipeClient* pipe);
+
+ public:
+
+ JackWinNamedPipeServerChannel();
+ virtual ~JackWinNamedPipeServerChannel();
+
+ int Open(JackServer* server); // Open the Server/Client connection
+ void Close(); // Close the Server/Client connection
+
+ // JackRunnableInterface interface
+ bool Init();
+ bool Execute();
+};
+
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinNamedPipeServerNotifyChannel.cpp b/windows/JackWinNamedPipeServerNotifyChannel.cpp
new file mode 100644
index 00000000..c116807f
--- /dev/null
+++ b/windows/JackWinNamedPipeServerNotifyChannel.cpp
@@ -0,0 +1,59 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackWinNamedPipeServerNotifyChannel.h"
+#include "JackError.h"
+#include "JackRequest.h"
+#include "JackConstants.h"
+
+namespace Jack
+{
+
+int JackWinNamedPipeServerNotifyChannel::Open()
+{
+ if (fRequestPipe.Connect(jack_server_dir, 0) < 0) {
+ jack_error("Cannot connect to server pipe");
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+void JackWinNamedPipeServerNotifyChannel::Close()
+{
+ fRequestPipe.Close();
+}
+
+/*
+The requirement is that the Notification from RT thread can be delivered... not sure using a pipe is adequate here...
+Can the write operation block?
+A non blocking write operation shoud be used : check if write can succeed, and ignore the notification otherwise
+(since its mainly used for XRun, ignoring a notification is OK, successive XRun will come...)
+*/
+void JackWinNamedPipeServerNotifyChannel::ClientNotify(int refnum, int notify, int value)
+{
+ JackClientNotificationRequest req(refnum, notify, value);
+ if (req.Write(&fRequestPipe) < 0) {
+ jack_error("Could not write request type = %ld", req.fType);
+ }
+}
+
+} // end of namespace
+
+
diff --git a/windows/JackWinNamedPipeServerNotifyChannel.h b/windows/JackWinNamedPipeServerNotifyChannel.h
new file mode 100644
index 00000000..91498bf9
--- /dev/null
+++ b/windows/JackWinNamedPipeServerNotifyChannel.h
@@ -0,0 +1,55 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef __JackWinNamedPipeServerNotifyChannel__
+#define __JackWinNamedPipeServerNotifyChannel__
+
+#include "JackChannel.h"
+#include "JackWinNamedPipe.h"
+
+namespace Jack
+{
+
+/*!
+\brief JackServerNotifyChannel using pipes.
+*/
+
+class JackWinNamedPipeServerNotifyChannel : public JackServerNotifyChannelInterface
+{
+ private:
+
+ JackWinNamedPipeClient fRequestPipe;
+
+ public:
+
+ JackWinNamedPipeServerNotifyChannel()
+ {}
+ virtual ~JackWinNamedPipeServerNotifyChannel()
+ {}
+
+ int Open();
+ void Close();
+
+ void ClientNotify(int refnum, int notify, int value);
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinProcessSync.h b/windows/JackWinProcessSync.h
new file mode 100644
index 00000000..f652e486
--- /dev/null
+++ b/windows/JackWinProcessSync.h
@@ -0,0 +1,92 @@
+/*
+Copyright (C) 2004-2006 Grame
+
+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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __JackWinProcessSync__
+#define __JackWinProcessSync__
+
+#include "JackSyncInterface.h"
+#include <windows.h>
+#include <new>
+
+namespace Jack
+{
+
+/*!
+\brief A synchronization primitive built using a condition variable.
+*/
+
+class JackWinProcessSync : public JackSyncInterface
+{
+
+ private:
+
+ HANDLE fEvent;
+
+ public:
+
+ JackWinProcessSync()
+ {
+ fEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (fEvent == NULL)
+ throw new std::bad_alloc;
+ }
+ virtual ~JackWinProcessSync()
+ {
+ CloseHandle(fEvent);
+ }
+
+ bool Allocate(const char* name)
+ {
+ return true;
+ }
+
+ bool Connect(const char* name)
+ {
+ return true;
+ }
+
+ void Destroy()
+ {}
+
+ bool TimedWait(long usec)
+ {
+ JackLog("JackWinProcessSync::Wait time out = %ld\n", usec);
+ DWORD res = WaitForSingleObject(fEvent, usec / 1000);
+ JackLog("JackWinProcessSync::Wait finished res = %ld\n", res == WAIT_OBJECT_0);
+ return (res == WAIT_OBJECT_0);
+ }
+
+ void Wait()
+ {
+ JackLog("JackWinProcessSync::Wait...\n");
+ WaitForSingleObject(fEvent, INFINITE);
+ JackLog("JackWinProcessSync::Wait finished\n");
+ }
+
+ void SignalAll()
+ {
+ SetEvent(fEvent);
+ }
+
+};
+
+} // end of namespace
+
+#endif
+
diff --git a/windows/JackWinThread.cpp b/windows/JackWinThread.cpp
new file mode 100644
index 00000000..8e39c507
--- /dev/null
+++ b/windows/JackWinThread.cpp
@@ -0,0 +1,223 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackWinThread.h"
+#include "JackError.h"
+
+namespace Jack
+{
+
+DWORD WINAPI JackWinThread::ThreadHandler(void* arg)
+{
+ JackWinThread* obj = (JackWinThread*)arg;
+ JackRunnableInterface* runnable = obj->fRunnable;
+
+ // Call Init method
+ if (!runnable->Init()) {
+ jack_error("Thread init fails: thread quits");
+ return 0;
+ }
+
+ // Signal creation thread when started with StartSync
+ if (!obj->fRunning) {
+ obj->fRunning = true;
+ SetEvent(obj->fEvent);
+ }
+
+ JackLog("ThreadHandler: start\n");
+
+ // If Init succeed start the thread loop
+ bool res = true;
+ while (obj->fRunning && res) {
+ res = runnable->Execute();
+ }
+
+ SetEvent(obj->fEvent);
+ JackLog("ThreadHandler: exit\n");
+ return 0;
+}
+
+int JackWinThread::Start()
+{
+ DWORD id;
+
+ fEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (fEvent == NULL) {
+ jack_error("Cannot create event error = %d", GetLastError());
+ return -1;
+ }
+
+ fRunning = true;
+
+ if (fRealTime) {
+
+ JackLog("Create RT thread\n");
+ fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id);
+
+ if (fThread == NULL) {
+ jack_error("Cannot create thread error = %d", GetLastError());
+ return -1;
+ }
+
+ if (!SetThreadPriority(fThread, THREAD_PRIORITY_TIME_CRITICAL)) {
+ jack_error("Cannot set priority class = %d", GetLastError());
+ return -1;
+ }
+
+ return 0;
+
+ } else {
+
+ JackLog("Create non RT thread\n");
+ fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id);
+
+ if (fThread == NULL) {
+ jack_error("Cannot create thread error = %d", GetLastError());
+ return -1;
+ }
+
+ return 0;
+ }
+}
+
+int JackWinThread::StartSync()
+{
+ DWORD id;
+
+ fEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (fEvent == NULL) {
+ jack_error("Cannot create event error = %d", GetLastError());
+ return -1;
+ }
+
+ if (fRealTime) {
+
+ JackLog("Create RT thread\n");
+ fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id);
+
+ if (fThread == NULL) {
+ jack_error("Cannot create thread error = %d", GetLastError());
+ return -1;
+ }
+
+ if (WaitForSingleObject(fEvent, 3000) != WAIT_OBJECT_0) { // wait 3 sec
+ jack_error("Thread has not started");
+ return -1;
+ }
+
+ if (!SetThreadPriority(fThread, THREAD_PRIORITY_TIME_CRITICAL)) {
+ jack_error("Cannot set priority class = %d", GetLastError());
+ return -1;
+ }
+
+ return 0;
+
+ } else {
+
+ JackLog("Create non RT thread\n");
+ fThread = CreateThread(NULL, 0, ThreadHandler, (void*)this, 0, &id);
+
+ if (fThread == NULL) {
+ jack_error("Cannot create thread error = %d", GetLastError());
+ return -1;
+ }
+
+ if (WaitForSingleObject(fEvent, 3000) != WAIT_OBJECT_0) { // wait 3 sec
+ jack_error("Thread has not started");
+ return -1;
+ }
+
+ return 0;
+ }
+}
+
+// voir http://www.microsoft.com/belux/msdn/nl/community/columns/ldoc/multithread1.mspx
+
+int JackWinThread::Kill()
+{
+ if (fThread) { // If thread has been started
+ JackLog("JackWinThread::Kill\n");
+ TerminateThread(fThread, 0); /// TO CHECK : dangerous
+ CloseHandle(fThread);
+ CloseHandle(fEvent);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int JackWinThread::Stop()
+{
+ if (fThread) { // If thread has been started
+ JackLog("JackWinThread::Stop\n");
+ fRunning = false; // Request for the thread to stop
+ WaitForSingleObject(fEvent, INFINITE);
+ CloseHandle(fThread);
+ CloseHandle(fEvent);
+ return 0;
+ } else {
+ CloseHandle(fEvent);
+ return -1;
+ }
+}
+
+int JackWinThread::AcquireRealTime()
+{
+ JackLog("JackWinThread::AcquireRealTime\n");
+
+ if (fThread) {
+ if (!SetThreadPriority(fThread, THREAD_PRIORITY_TIME_CRITICAL)) {
+ jack_error("Cannot set thread priority = %d", GetLastError());
+ return -1;
+ }
+ JackLog("JackWinThread::AcquireRealTime OK\n");
+ return 0;
+ } else {
+ CloseHandle(fEvent);
+ return -1;
+ }
+}
+
+int JackWinThread::AcquireRealTime(int priority)
+{
+ JackLog("JackWinThread::AcquireRealTime priority = %ld\n", priority);
+ return AcquireRealTime();
+}
+
+int JackWinThread::DropRealTime()
+{
+ if (fThread) {
+ if (!SetThreadPriority(fThread, THREAD_PRIORITY_NORMAL)) {
+ jack_error("Cannot set thread priority = %d", GetLastError());
+ return -1;
+ }
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+pthread_t JackWinThread::GetThreadID()
+{
+ return fThread;
+}
+
+} // end of namespace
+
diff --git a/windows/JackWinThread.h b/windows/JackWinThread.h
new file mode 100644
index 00000000..0391e276
--- /dev/null
+++ b/windows/JackWinThread.h
@@ -0,0 +1,68 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+
+#ifndef __JackWinThread__
+#define __JackWinThread__
+
+#include "JackThread.h"
+#include <windows.h>
+
+namespace Jack
+{
+
+/*!
+\brief Windows threads.
+*/
+
+class JackWinThread : public JackThread
+{
+
+ private:
+
+ HANDLE fThread;
+ HANDLE fEvent;
+
+ static DWORD WINAPI ThreadHandler(void* arg);
+
+ public:
+
+ JackWinThread(JackRunnableInterface* runnable)
+ : JackThread(runnable, 0, false, 0)
+ {}
+
+ virtual ~JackWinThread()
+ {}
+
+ int Start();
+ int StartSync();
+ int Kill();
+ int Stop();
+
+ int AcquireRealTime();
+ int AcquireRealTime(int priority) ;
+ int DropRealTime();
+
+ pthread_t GetThreadID();
+};
+
+} // end of namespace
+
+#endif
diff --git a/windows/JackdmpWIN32.cpp b/windows/JackdmpWIN32.cpp
new file mode 100644
index 00000000..9fb5bbca
--- /dev/null
+++ b/windows/JackdmpWIN32.cpp
@@ -0,0 +1,401 @@
+/*
+Copyright (C) 2001 Paul Davis
+Copyright (C) 2004-2006 Grame
+
+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
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iostream>
+#include <assert.h>
+#include <process.h>
+#include <getopt.h>
+
+#include "JackServer.h"
+#include "JackConstants.h"
+#include "driver_interface.h"
+#include "JackDriverLoader.h"
+#include "shm.h"
+
+using namespace Jack;
+
+static JackServer* fServer;
+static char *server_name = "default";
+static int realtime_priority = 10;
+static int do_mlock = 1;
+static unsigned int port_max = 128;
+static int realtime = 0;
+static int loopback = 0;
+static int temporary = 0;
+static int client_timeout = 0; /* msecs; if zero, use period size. */
+static int do_unlock = 0;
+static JSList* drivers = NULL;
+static int sync = 0;
+static int xverbose = 0;
+
+#define DEFAULT_TMP_DIR "/tmp"
+char *jack_tmpdir = DEFAULT_TMP_DIR;
+
+void jack_print_driver_options (jack_driver_desc_t * desc, FILE *file);
+void jack_print_driver_param_usage (jack_driver_desc_t * desc, unsigned long param, FILE *file);
+int jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr);
+static void silent_jack_error_callback (const char *desc)
+{}
+
+static void copyright(FILE* file)
+{
+ fprintf (file, "jackdmp " VERSION "\n"
+ "Copyright 2001-2005 Paul Davis and others.\n"
+ "Copyright 2004-2006 Grame.\n"
+ "jackdmp comes with ABSOLUTELY NO WARRANTY\n"
+ "This is free software, and you are welcome to redistribute it\n"
+ "under certain conditions; see the file COPYING for details\n");
+}
+
+static void usage (FILE *file)
+{
+ copyright (file);
+ fprintf (file, "\n"
+ "usage: jackdmp [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
+ " [ --name OR -n server-name ]\n"
+ // " [ --no-mlock OR -m ]\n"
+ // " [ --unlock OR -u ]\n"
+ " [ --timeout OR -t client-timeout-in-msecs ]\n"
+ " [ --loopback OR -L loopback-port-number ]\n"
+ // " [ --port-max OR -p maximum-number-of-ports]\n"
+ " [ --verbose OR -v ]\n"
+ " [ --silent OR -s ]\n"
+ " [ --sync OR -S ]\n"
+ " [ --version OR -V ]\n"
+ " -d driver [ ... driver args ... ]\n"
+ " where driver can be `alsa', `coreaudio', 'portaudio' or `dummy'\n"
+ " jackdmp -d driver --help\n"
+ " to display options for each driver\n\n");
+}
+
+static int JackStart(jack_driver_desc_t* driver_desc, JSList* driver_params, int sync, int time_out_ms, int rt, int priority, int loopback, int verbose)
+{
+ printf("Jackdmp: sync = %ld timeout = %ld rt = %ld priority = %ld verbose = %ld \n", sync, time_out_ms, rt, priority, verbose);
+ fServer = new JackServer(sync, time_out_ms, rt, priority, loopback, verbose);
+ int res = fServer->Open(driver_desc, driver_params);
+ return (res < 0) ? res : fServer->Start();
+}
+
+static int JackStop()
+{
+ fServer->Stop();
+ fServer->Close();
+ printf("Jackdmp: server close\n");
+ delete fServer;
+ printf("Jackdmp: delete server\n");
+ return 0;
+}
+
+static int JackDelete()
+{
+ delete fServer;
+ printf("Jackdmp: delete server\n");
+ return 0;
+}
+
+/*
+static char* jack_default_server_name(void)
+{
+ char *server_name;
+ if ((server_name = getenv("JACK_DEFAULT_SERVER")) == NULL)
+ server_name = "default";
+ return server_name;
+}
+
+// returns the name of the per-user subdirectory of jack_tmpdir
+static char* jack_user_dir(void)
+{
+ static char user_dir[PATH_MAX] = "";
+
+ // format the path name on the first call
+ if (user_dir[0] == '\0') {
+ snprintf (user_dir, sizeof (user_dir), "%s/jack-%d",
+ jack_tmpdir, _getuid ());
+ }
+
+ return user_dir;
+}
+
+// returns the name of the per-server subdirectory of jack_user_dir()
+
+static char* get_jack_server_dir(const char * toto)
+{
+ static char server_dir[PATH_MAX] = "";
+
+ // format the path name on the first call
+ if (server_dir[0] == '\0') {
+ snprintf (server_dir, sizeof (server_dir), "%s/%s",
+ jack_user_dir (), server_name);
+ }
+
+ return server_dir;
+}
+
+static void jack_cleanup_files (const char *server_name)
+{
+ DIR *dir;
+ struct dirent *dirent;
+ char *dir_name = get_jack_server_dir (server_name);
+
+ // nothing to do if the server directory does not exist
+ if ((dir = opendir (dir_name)) == NULL) {
+ return;
+ }
+
+ // unlink all the files in this directory, they are mine
+ while ((dirent = readdir (dir)) != NULL) {
+
+ char fullpath[PATH_MAX];
+
+ if ((strcmp (dirent->d_name, ".") == 0)
+ || (strcmp (dirent->d_name, "..") == 0)) {
+ continue;
+ }
+
+ snprintf (fullpath, sizeof (fullpath), "%s/%s",
+ dir_name, dirent->d_name);
+
+ if (unlink (fullpath)) {
+ jack_error ("cannot unlink `%s' (%s)", fullpath,
+ strerror (errno));
+ }
+ }
+
+ closedir (dir);
+
+ // now, delete the per-server subdirectory, itself
+ if (rmdir (dir_name)) {
+ jack_error ("cannot remove `%s' (%s)", dir_name,
+ strerror (errno));
+ }
+
+ // finally, delete the per-user subdirectory, if empty
+ if (rmdir (jack_user_dir ())) {
+ if (errno != ENOTEMPTY) {
+ jack_error ("cannot remove `%s' (%s)",
+ jack_user_dir (), strerror (errno));
+ }
+ }
+}
+*/
+
+int main(int argc, char* argv[])
+{
+ jack_driver_desc_t * driver_desc;
+ const char *options = "-ad:P:uvshVRL:STFl:t:mn:p:";
+ struct option long_options[] = {
+ { "driver", 1, 0, 'd'
+ },
+ { "verbose", 0, 0, 'v' },
+ { "help", 0, 0, 'h' },
+ { "port-max", 1, 0, 'p' },
+ { "no-mlock", 0, 0, 'm' },
+ { "name", 0, 0, 'n' },
+ { "unlock", 0, 0, 'u' },
+ { "realtime", 0, 0, 'R' },
+ { "loopback", 0, 0, 'L' },
+ { "realtime-priority", 1, 0, 'P' },
+ { "timeout", 1, 0, 't' },
+ { "temporary", 0, 0, 'T' },
+ { "version", 0, 0, 'V' },
+ { "silent", 0, 0, 's' },
+ { "sync", 0, 0, 'S' },
+ { 0, 0, 0, 0 }
+ };
+ int opt = 0;
+ int option_index = 0;
+ int seen_driver = 0;
+ char *driver_name = NULL;
+ char **driver_args = NULL;
+ JSList * driver_params;
+ int driver_nargs = 1;
+ int show_version = 0;
+ int sync = 0;
+ int i;
+ int rc;
+ char c;
+
+ opterr = 0;
+ while (!seen_driver &&
+ (opt = getopt_long(argc, argv, options,
+ long_options, &option_index)) != EOF) {
+ switch (opt) {
+
+ case 'd':
+ seen_driver = 1;
+ driver_name = optarg;
+ break;
+
+ case 'v':
+ xverbose = 1;
+ break;
+
+ case 's':
+ // steph
+ //jack_set_error_function(silent_jack_error_callback);
+ break;
+
+ case 'S':
+ sync = 1;
+ break;
+
+ case 'n':
+ server_name = optarg;
+ break;
+
+ case 'm':
+ do_mlock = 0;
+ break;
+
+ case 'p':
+ port_max = (unsigned int)atol(optarg);
+ break;
+
+ case 'P':
+ realtime_priority = atoi(optarg);
+ break;
+
+ case 'R':
+ realtime = 1;
+ break;
+
+ case 'L':
+ loopback = atoi(optarg);
+ break;
+
+ case 'T':
+ temporary = 1;
+ break;
+
+ case 't':
+ client_timeout = atoi(optarg);
+ break;
+
+ case 'u':
+ do_unlock = 1;
+ break;
+
+ case 'V':
+ show_version = 1;
+ break;
+
+ default:
+ fprintf(stderr, "unknown option character %c\n",
+ optopt);
+ /*fallthru*/
+ case 'h':
+ usage(stdout);
+ return -1;
+ }
+ }
+
+ if (!seen_driver) {
+ usage (stderr);
+ exit (1);
+ }
+
+ drivers = jack_drivers_load (drivers);
+ if (!drivers) {
+ fprintf (stderr, "jackdmp: no drivers found; exiting\n");
+ exit (1);
+ }
+
+ driver_desc = jack_find_driver_descriptor (drivers, driver_name);
+ if (!driver_desc) {
+ fprintf (stderr, "jackdmp: unknown driver '%s'\n", driver_name);
+ exit (1);
+ }
+
+ if (optind < argc) {
+ driver_nargs = 1 + argc - optind;
+ } else {
+ driver_nargs = 1;
+ }
+
+ if (driver_nargs == 0) {
+ fprintf (stderr, "No driver specified ... hmm. JACK won't do"
+ " anything when run like this.\n");
+ return -1;
+ }
+
+ driver_args = (char **) malloc (sizeof (char *) * driver_nargs);
+ driver_args[0] = driver_name;
+
+ for (i = 1; i < driver_nargs; i++) {
+ driver_args[i] = argv[optind++];
+ }
+
+ if (jack_parse_driver_params (driver_desc, driver_nargs,
+ driver_args, &driver_params)) {
+ exit (0);
+ }
+
+ //if (server_name == NULL)
+ // server_name = jack_default_server_name ();
+
+ copyright (stdout);
+
+ rc = jack_register_server (server_name);
+ switch (rc) {
+ case EEXIST:
+ fprintf (stderr, "`%s' server already active\n", server_name);
+ exit (1);
+ case ENOSPC:
+ fprintf (stderr, "too many servers already active\n");
+ exit (2);
+ case ENOMEM:
+ fprintf (stderr, "no access to shm registry\n");
+ exit (3);
+ default:
+ if (xverbose)
+ fprintf (stderr, "server `%s' registered\n",
+ server_name);
+ }
+
+
+ /* clean up shared memory and files from any previous
+ * instance of this server name */
+ jack_cleanup_shm();
+ // jack_cleanup_files(server_name);
+
+ if (!realtime && client_timeout == 0)
+ client_timeout = 500; /* 0.5 sec; usable when non realtime. */
+
+ int res = JackStart(driver_desc, driver_params, sync, client_timeout, realtime, realtime_priority, loopback, xverbose);
+ if (res < 0) {
+ printf("Cannot start server... exit\n");
+ JackDelete();
+ return 0;
+ }
+
+ printf("Type 'q' to quit\n");
+
+ while ((c = getchar()) != 'q') {}
+
+ JackStop();
+
+ jack_cleanup_shm();
+ // jack_cleanup_files(server_name);
+ jack_unregister_server(server_name);
+
+ return 1;
+}
+
+
diff --git a/windows/getopt.c b/windows/getopt.c
new file mode 100644
index 00000000..ca5cb5ce
--- /dev/null
+++ b/windows/getopt.c
@@ -0,0 +1,1047 @@
+/* Getopt for GNU.
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
+ Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+ Ditto for AIX 3.2 and <stdlib.h>. */
+#ifndef _NO_PROTO
+# define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+ reject `defined (const)'. */
+# ifndef const
+# define const
+# endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+# include <gnu-versions.h>
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+ contain conflicting prototypes for getopt. */
+# include <stdlib.h>
+# include <unistd.h>
+#endif /* GNU C library. */
+
+#ifdef VMS
+# include <unixlib.h>
+# if HAVE_STRING_H - 0
+# include <string.h>
+# endif
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+ When compiling libc, the _ macro is predefined. */
+# ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+# else
+# define _(msgid) (msgid)
+# endif
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Setting the environment variable POSIXLY_CORRECT disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+ causes problems with re-calling getopt as programs generally don't
+ know that. */
+
+int __getopt_initialized;
+
+/* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters.
+
+ PERMUTE is the default. We permute the contents of ARGV as we scan,
+ so that eventually all the non-options are at the end. This allows options
+ to be given in any order, even with programs that were not written to
+ expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were written
+ to expect options and other ARGV-elements in any order and that care about
+ the ordering of the two. We describe each non-option ARGV-element
+ as if it were the argument of an option with character code 1.
+ Using `-' as the first character of the list of option characters
+ selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable. */
+static char *posixly_correct;
+
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+ because there are many ways it can cause trouble.
+ On some systems, it contains special magic macros that don't work
+ in GCC. */
+# include <string.h>
+# define my_index strchr
+#else
+
+#include <string.h>
+
+/* Avoid depending on library functions or files
+ whose names are inconsistent. */
+
+#ifndef getenv
+extern char *getenv ();
+#endif
+
+static char *
+my_index (str, chr)
+ const char *str;
+ int chr;
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *) str;
+ str++;
+ }
+ return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+ If not using GCC, it is ok not to declare it. */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+ That was relevant to code that was here before. */
+# if (!defined __STDC__ || !__STDC__) && !defined strlen
+/* gcc with -traditional declares the built-in strlen to return int,
+ and has done so at least since version 2.4.5. -- rms. */
+extern int strlen (const char *);
+# endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* Handle permutation of arguments. */
+
+/* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first of them;
+ `last_nonopt' is the index after the last of them. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+
+static int nonoption_flags_max_len;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+ is valid for the getopt call we must make sure that the ARGV passed
+ to getopt is that one passed to the process. */
+static void
+__attribute__ ((unused))
+store_args_and_env (int argc, char *const *argv)
+{
+ /* XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+ original_argc = argc;
+ original_argv = argv;
+}
+# ifdef text_set_element
+text_set_element (__libc_subinit, store_args_and_env);
+# endif /* text_set_element */
+
+# define SWAP_FLAGS(ch1, ch2) \
+ if (nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved. */
+
+#if defined __STDC__ && __STDC__
+static void exchange (char **);
+#endif
+
+static void
+exchange (argv)
+ char **argv;
+{
+ int bottom = first_nonopt;
+ int middle = last_nonopt;
+ int top = optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+#ifdef _LIBC
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc (top + 1);
+ if (new_str == NULL)
+ nonoption_flags_len = nonoption_flags_max_len = 0;
+ else
+ {
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
+ '\0', top + 1 - nonoption_flags_max_len);
+ nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ SWAP_FLAGS (bottom + i, middle + i);
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ first_nonopt += (optind - last_nonopt);
+ last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+#if defined __STDC__ && __STDC__
+static const char *_getopt_initialize (int, char *const *, const char *);
+#endif
+static const char *
+_getopt_initialize (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ first_nonopt = last_nonopt = optind;
+
+ nextchar = NULL;
+
+ posixly_correct = getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (posixly_correct != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+
+#ifdef _LIBC
+ if (posixly_correct == NULL
+ && argc == original_argc && argv == original_argv)
+ {
+ if (nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = nonoption_flags_max_len = strlen (orig_str);
+ if (nonoption_flags_max_len < argc)
+ nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *) malloc (nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ nonoption_flags_max_len = -1;
+ else
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', nonoption_flags_max_len - len);
+ }
+ }
+ nonoption_flags_len = nonoption_flags_max_len;
+ }
+ else
+ nonoption_flags_len = 0;
+#endif
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns -1.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+ const struct option *longopts;
+ int *longind;
+ int long_only;
+{
+ optarg = NULL;
+
+ if (optind == 0 || !__getopt_initialized)
+ {
+ if (optind == 0)
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring);
+ __getopt_initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#ifdef _LIBC
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && __getopt_nonoption_flags[optind] == '1'))
+#else
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+ if (nextchar == NULL || *nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (last_nonopt > optind)
+ last_nonopt = optind;
+ if (first_nonopt > optind)
+ first_nonopt = optind;
+
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc && NONOPTION_P)
+ optind++;
+ last_nonopt = optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (optind != argc && !strcmp (argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = first_nonopt;
+ return -1;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if (NONOPTION_P)
+ {
+ if (ordering == REQUIRE_ORDER)
+ return -1;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[optind][1] == '-'
+ || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - nextchar)
+ == (unsigned int) strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ {
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+ }
+
+ nextchar += strlen (nextchar);
+
+ optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[optind][1] == '-'
+ || my_index (optstring, *nextchar) == NULL)
+ {
+ if (opterr)
+ {
+ if (argv[optind][1] == '-')
+ /* --option */
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+ else
+ /* +option or -option */
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+ }
+ nextchar = (char *) "";
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (opterr)
+ {
+ if (posixly_correct)
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+ else
+ fprintf (stderr, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+
+ nextchar += strlen (nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = NULL;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+getopt (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0);
+}
+
+#endif /* Not ELIDE_CODE. */
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `getopt'. */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt (argc, argv, "abc:d:0123456789");
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/windows/getopt.h b/windows/getopt.h
new file mode 100644
index 00000000..73cb3ffd
--- /dev/null
+++ b/windows/getopt.h
@@ -0,0 +1,177 @@
+/* Declarations for getopt.
+ Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+# define _GETOPT_H 1
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+ extern char *optarg;
+
+ /* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+ extern int optind;
+
+ /* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+ extern int opterr;
+
+ /* Set to an option character which was unrecognized. */
+
+ extern int optopt;
+
+#ifndef __need_getopt
+ /* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+ struct option {
+# if defined __STDC__ && __STDC__
+ const char *name;
+# else
+
+ char *name;
+# endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+ };
+
+ /* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+ /* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+
+ If OPTS begins with `--', then non-option arguments are treated as
+ arguments to the option '\0'. This behavior is specific to the GNU
+ `getopt'. */
+
+#if defined __STDC__ && __STDC__
+# ifdef __GNU_LIBRARY__
+ /* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+ extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
+# else /* not __GNU_LIBRARY__ */
+ extern int getopt ();
+# endif /* __GNU_LIBRARY__ */
+
+# ifndef __need_getopt
+
+ // steph
+ /*
+ extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+ */
+ extern int getopt_long (int argc, char ** argv, const char * shortopts,
+ const struct option * longopts, int * longind);
+
+ extern int getopt_long_only (int __argc, char *const *__argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+
+ /* Internal only. Users should not call this directly. */
+ extern int _getopt_internal (int __argc, char *const *__argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only);
+# endif
+#else /* not __STDC__ */
+ extern int getopt ();
+# ifndef __need_getopt
+ extern int getopt_long ();
+ extern int getopt_long_only ();
+
+ extern int _getopt_internal ();
+# endif
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
diff --git a/windows/getopt1.c b/windows/getopt1.c
new file mode 100644
index 00000000..cbea3035
--- /dev/null
+++ b/windows/getopt1.c
@@ -0,0 +1,188 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "getopt.h"
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+ reject `defined (const)'. */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (argc, argv, options, long_options, opt_index)
+ int argc;
+ char *const *argv;
+ const char *options;
+ const struct option *long_options;
+ int *opt_index;
+{
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+ If an option that starts with '-' (not '--') doesn't match a long option,
+ but does match a short option, it is parsed as a short option
+ instead. */
+
+int
+getopt_long_only (argc, argv, options, long_options, opt_index)
+ int argc;
+ char *const *argv;
+ const char *options;
+ const struct option *long_options;
+ int *opt_index;
+{
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif /* Not ELIDE_CODE. */
+
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+ int option_index = 0;
+ static struct option long_options[] =
+ {
+ {"add", 1, 0, 0},
+ {"append", 0, 0, 0},
+ {"delete", 1, 0, 0},
+ {"verbose", 0, 0, 0},
+ {"create", 0, 0, 0},
+ {"file", 1, 0, 0},
+ {0, 0, 0, 0}
+ };
+
+ c = getopt_long (argc, argv, "abc:d:0123456789",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case 0:
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case 'd':
+ printf ("option d with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/windows/jack_connect.dsp b/windows/jack_connect.dsp
new file mode 100644
index 00000000..8ce13384
--- /dev/null
+++ b/windows/jack_connect.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="jack_connect" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_connect - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_connect.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_connect.mak" CFG="jack_connect - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_connect - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_connect - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_connect - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_connect - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_connect - Win32 Release"
+# Name "jack_connect - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\connect.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_freeverb.dsp b/windows/jack_freeverb.dsp
new file mode 100644
index 00000000..a3a35652
--- /dev/null
+++ b/windows/jack_freeverb.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="jack_freeverb" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_freeverb - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_freeverb.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_freeverb.mak" CFG="jack_freeverb - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_freeverb - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_freeverb - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_freeverb - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_freeverb - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../common" /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_freeverb - Win32 Release"
+# Name "jack_freeverb - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\freeverb.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_lsp.dsp b/windows/jack_lsp.dsp
new file mode 100644
index 00000000..6d0cf107
--- /dev/null
+++ b/windows/jack_lsp.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="jack_lsp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_lsp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_lsp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_lsp.mak" CFG="jack_lsp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_lsp - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_lsp - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_lsp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_lsp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_lsp - Win32 Release"
+# Name "jack_lsp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\lsp.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_metro.dsp b/windows/jack_metro.dsp
new file mode 100644
index 00000000..1f9faabc
--- /dev/null
+++ b/windows/jack_metro.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="jack_metro" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_metro - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_metro.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_metro.mak" CFG="jack_metro - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_metro - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_metro - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_metro - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_metro - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_metro - Win32 Release"
+# Name "jack_metro - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\metro.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_portaudio.dsp b/windows/jack_portaudio.dsp
new file mode 100644
index 00000000..03cd57b7
--- /dev/null
+++ b/windows/jack_portaudio.dsp
@@ -0,0 +1,137 @@
+# Microsoft Developer Studio Project File - Name="jack_portaudio" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=jack_portaudio - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_portaudio.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_portaudio.mak" CFG="jack_portaudio - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_portaudio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "jack_portaudio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_portaudio - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACK_PORTAUDIO_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACK_PORTAUDIO_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_portaudio - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACK_PORTAUDIO_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JACK_PORTAUDIO_EXPORTS" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/jack_portaudio_debug.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_portaudio - Win32 Release"
+# Name "jack_portaudio - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\JackPortAudioDriver.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\portaudio.lib
+# End Source File
+# Begin Source File
+
+SOURCE=.\Release\libjackdmp.lib
+
+!IF "$(CFG)" == "jack_portaudio - Win32 Release"
+
+!ELSEIF "$(CFG)" == "jack_portaudio - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\Debug\libjackdmp_debug.lib
+
+!IF "$(CFG)" == "jack_portaudio - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "jack_portaudio - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_simple_client.dsp b/windows/jack_simple_client.dsp
new file mode 100644
index 00000000..80fbfac3
--- /dev/null
+++ b/windows/jack_simple_client.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="jack_simple_client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_simple_client - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_simple_client.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_simple_client.mak" CFG="jack_simple_client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_simple_client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_simple_client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_simple_client - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_simple_client - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_simple_client - Win32 Release"
+# Name "jack_simple_client - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\simple_client.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jack_test.dsp b/windows/jack_test.dsp
new file mode 100644
index 00000000..d5b9dec8
--- /dev/null
+++ b/windows/jack_test.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="jack_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jack_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jack_test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jack_test.mak" CFG="jack_test - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jack_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jack_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jack_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jack_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jack_test - Win32 Release"
+# Name "jack_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\jack_test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jackdmp.dsp b/windows/jackdmp.dsp
new file mode 100644
index 00000000..3b835a96
--- /dev/null
+++ b/windows/jackdmp.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="jackdmp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jackdmp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jackdmp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jackdmp.mak" CFG="jackdmp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jackdmp - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jackdmp - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jackdmp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jackdmp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jackdmp - Win32 Release"
+# Name "jackdmp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackdmpWIN32.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackdmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/jackdmp.dsw b/windows/jackdmp.dsw
new file mode 100644
index 00000000..776dba50
--- /dev/null
+++ b/windows/jackdmp.dsw
@@ -0,0 +1,185 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "jack_connect"=".\jack_connect.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_freeverb"=".\jack_freeverb.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_lsp"=".\jack_lsp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_metro"=".\jack_metro.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_portaudio"=".\jack_portaudio.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_simple_client"=".\jack_simple_client.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jack_test"=".\jack_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jackdmp"=".\jackdmp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jdelay"=".\jdelay\jdelay.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libjackdmp"=".\libjackdmp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libjackmp"=".\libjackmp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "testSynchoServerClient"=".\testSynchoServerClient.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "testSynchroClient"=".\testSynchroClient.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "testSynchroServer"=".\testSynchroServer.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/windows/jdelay.dsp b/windows/jdelay.dsp
new file mode 100644
index 00000000..4698f35c
--- /dev/null
+++ b/windows/jdelay.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="jdelay" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jdelay - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jdelay.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jdelay.mak" CFG="jdelay - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jdelay - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "jdelay - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jdelay - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../common" /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "jdelay - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../common" /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "jdelay - Win32 Release"
+# Name "jdelay - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\jdelay.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\Release\libjackmp.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/libjackdmp.dsp b/windows/libjackdmp.dsp
new file mode 100644
index 00000000..89ae793b
--- /dev/null
+++ b/windows/libjackdmp.dsp
@@ -0,0 +1,258 @@
+# Microsoft Developer Studio Project File - Name="libjackdmp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=libjackdmp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libjackdmp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libjackdmp.mak" CFG="libjackdmp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libjackdmp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libjackdmp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libjackdmp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKDMP_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKDMP_EXPORTS" /D "__STDC__" /D "REGEX_MALLOC" /D "STDC_HEADERS" /D "__SMP__" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "libjackdmp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKDMP_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKDMP_EXPORTS" /D "__STDC__" /D "REGEX_MALLOC" /D "STDC_HEADERS" /D "__SMP__" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/libjackdmp_debug.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "libjackdmp - Win32 Release"
+# Name "libjackdmp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\getopt1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackActivationCount.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackAPI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackAudioDriver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackConnectionManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackDriver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackDriverLoader.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackEngine.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackEngineTiming.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackError.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackExternalClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackFrameTimer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackFreewheelDriver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGlobals.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGlobalsServer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGraphManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackInternalClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackLoopbackDriver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackPort.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackServer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackServerAPI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackServerGlobals.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackShmMem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackThreadedDriver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackTime.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackTransportEngine.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipe.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipeClientChannel.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipeNotifyChannel.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipeServerChannel.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipeServerNotifyChannel.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\regex.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\shm.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\portaudio.lib
+# End Source File
+# End Target
+# End Project
diff --git a/windows/libjackmp.dsp b/windows/libjackmp.dsp
new file mode 100644
index 00000000..834e94dd
--- /dev/null
+++ b/windows/libjackmp.dsp
@@ -0,0 +1,190 @@
+# Microsoft Developer Studio Project File - Name="libjackmp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=libjackmp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libjackmp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libjackmp.mak" CFG="libjackmp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libjackmp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libjackmp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libjackmp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKMP_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKMP_EXPORTS" /D "__STDC__" /D "REGEX_MALLOC" /D "STDC_HEADERS" /D "__SMP__" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "libjackmp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKMP_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBJACKMP_EXPORTS" /D "__STDC__" /D "REGEX_MALLOC" /D "STDC_HEADERS" /D "__SMP__" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/libjackmp_debug.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "libjackmp - Win32 Release"
+# Name "libjackmp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\JackActivationCount.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackAPI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackConnectionManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackError.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackFrameTimer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGlobals.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGlobalsClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackGraphManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackLibAPI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackLibClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackPort.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackShmMem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackTime.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\JackTransportEngine.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipe.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinNamedPipeClientChannel.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\regex.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\shm.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/windows/libportaudio.a b/windows/libportaudio.a
new file mode 100644
index 00000000..cbf792a9
--- /dev/null
+++ b/windows/libportaudio.a
Binary files differ
diff --git a/windows/pa_asio.h b/windows/pa_asio.h
new file mode 100644
index 00000000..941d419d
--- /dev/null
+++ b/windows/pa_asio.h
@@ -0,0 +1,123 @@
+#ifndef PA_ASIO_H
+#define PA_ASIO_H
+/*
+ * $Id: pa_asio.h,v 1.1.2.2 2006/06/20 14:44:48 letz Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * ASIO specific extensions
+ *
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/** @file
+ @brief ASIO-specific PortAudio API extension header file.
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+ /** Retrieve legal latency settings for the specificed device, in samples.
+
+ @param device The global index of the device about which the query is being made.
+ @param minLatency A pointer to the location which will recieve the minimum latency value.
+ @param maxLatency A pointer to the location which will recieve the maximum latency value.
+ @param preferredLatency A pointer to the location which will recieve the preferred latency value.
+ @param granularity A pointer to the location which will recieve the granularity. This value
+ determines which values between minLatency and maxLatency are available. ie the step size,
+ if granularity is -1 then available latency settings are powers of two.
+
+ @see ASIOGetBufferSize in the ASIO SDK.
+
+ @todo This function should have a better name, any suggestions?
+ */
+ PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
+ long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
+
+
+ /** Display the ASIO control panel for the specified device.
+
+ @param device The global index of the device whose control panel is to be displayed.
+ @param systemSpecific On Windows, the calling application's main window handle,
+ on Macintosh this value should be zero.
+ */
+ PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
+
+
+
+
+ /** Retrieve a pointer to a string containing the name of the specified
+ input channel. The string is valid until Pa_Terminate is called.
+
+ The string will be no longer than 32 characters including the null terminator.
+ */
+ PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
+ const char** channelName );
+
+
+ /** Retrieve a pointer to a string containing the name of the specified
+ input channel. The string is valid until Pa_Terminate is called.
+
+ The string will be no longer than 32 characters including the null terminator.
+ */
+ PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
+ const char** channelName );
+
+
+#define paAsioUseChannelSelectors (0x01)
+
+ typedef struct PaAsioStreamInfo {
+ unsigned long size; /**< sizeof(PaAsioStreamInfo) */
+ PaHostApiTypeId hostApiType; /**< paASIO */
+ unsigned long version; /**< 1 */
+
+ unsigned long flags;
+
+ /* Support for opening only specific channels of an ASIO device.
+ If the paAsioUseChannelSelectors flag is set, channelSelectors is a
+ pointer to an array of integers specifying the device channels to use.
+ When used, the length of the channelSelectors array must match the
+ corresponding channelCount parameter to Pa_OpenStream() otherwise a
+ crash may result.
+ The values in the selectors array must specify channels within the
+ range of supported channels for the device or paInvalidChannelCount will
+ result.
+ */
+ int *channelSelectors;
+ }
+ PaAsioStreamInfo;
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_ASIO_H */
diff --git a/windows/portaudio.h b/windows/portaudio.h
new file mode 100644
index 00000000..57ccc36f
--- /dev/null
+++ b/windows/portaudio.h
@@ -0,0 +1,1127 @@
+
+#ifndef PORTAUDIO_H
+#define PORTAUDIO_H
+/*
+ * $Id: portaudio.h,v 1.1.2.2 2006/06/20 14:44:48 letz Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * PortAudio API Header File
+ * Latest version available at: http://www.portaudio.com/
+ *
+ * Copyright (c) 1999-2002 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief The PortAudio API.
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+ /** Retrieve the release number of the currently running PortAudio build,
+ eg 1900.
+ */
+ int Pa_GetVersion( void );
+
+
+ /** Retrieve a textual description of the current PortAudio build,
+ eg "PortAudio V19-devel 13 October 2002".
+ */
+ const char* Pa_GetVersionText( void );
+
+
+ /** Error codes returned by PortAudio functions.
+ Note that with the exception of paNoError, all PaErrorCodes are negative.
+ */
+
+ typedef int PaError;
+ typedef enum PaErrorCode
+ {
+ paNoError = 0,
+
+ paNotInitialized = -10000,
+ paUnanticipatedHostError,
+ paInvalidChannelCount,
+ paInvalidSampleRate,
+ paInvalidDevice,
+ paInvalidFlag,
+ paSampleFormatNotSupported,
+ paBadIODeviceCombination,
+ paInsufficientMemory,
+ paBufferTooBig,
+ paBufferTooSmall,
+ paNullCallback,
+ paBadStreamPtr,
+ paTimedOut,
+ paInternalError,
+ paDeviceUnavailable,
+ paIncompatibleHostApiSpecificStreamInfo,
+ paStreamIsStopped,
+ paStreamIsNotStopped,
+ paInputOverflowed,
+ paOutputUnderflowed,
+ paHostApiNotFound,
+ paInvalidHostApi,
+ paCanNotReadFromACallbackStream, /**< @todo review error code name */
+ paCanNotWriteToACallbackStream, /**< @todo review error code name */
+ paCanNotReadFromAnOutputOnlyStream, /**< @todo review error code name */
+ paCanNotWriteToAnInputOnlyStream, /**< @todo review error code name */
+ paIncompatibleStreamHostApi,
+ paBadBufferPtr
+ } PaErrorCode;
+
+
+ /** Translate the supplied PortAudio error code into a human readable
+ message.
+ */
+ const char *Pa_GetErrorText( PaError errorCode );
+
+
+ /** Library initialization function - call this before using PortAudio.
+ This function initialises internal data structures and prepares underlying
+ host APIs for use. This function MUST be called before using any other
+ PortAudio API functions.
+
+ If Pa_Initialize() is called multiple times, each successful
+ call must be matched with a corresponding call to Pa_Terminate().
+ Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not
+ required to be fully nested.
+
+ Note that if Pa_Initialize() returns an error code, Pa_Terminate() should
+ NOT be called.
+
+ @return paNoError if successful, otherwise an error code indicating the cause
+ of failure.
+
+ @see Pa_Terminate
+ */
+ PaError Pa_Initialize( void );
+
+
+ /** Library termination function - call this when finished using PortAudio.
+ This function deallocates all resources allocated by PortAudio since it was
+ initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
+ been called multiple times, each call must be matched with a corresponding call
+ to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
+ close any PortAudio streams that are still open.
+
+ Pa_Terminate() MUST be called before exiting a program which uses PortAudio.
+ Failure to do so may result in serious resource leaks, such as audio devices
+ not being available until the next reboot.
+
+ @return paNoError if successful, otherwise an error code indicating the cause
+ of failure.
+
+ @see Pa_Initialize
+ */
+ PaError Pa_Terminate( void );
+
+
+
+ /** The type used to refer to audio devices. Values of this type usually
+ range from 0 to (Pa_DeviceCount-1), and may also take on the PaNoDevice
+ and paUseHostApiSpecificDeviceSpecification values.
+
+ @see Pa_DeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification
+ */
+ typedef int PaDeviceIndex;
+
+
+ /** A special PaDeviceIndex value indicating that no device is available,
+ or should be used.
+
+ @see PaDeviceIndex
+ */
+#define paNoDevice ((PaDeviceIndex)-1)
+
+
+ /** A special PaDeviceIndex value indicating that the device(s) to be used
+ are specified in the host api specific stream info structure.
+
+ @see PaDeviceIndex
+ */
+#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)
+
+
+ /* Host API enumeration mechanism */
+
+ /** The type used to enumerate to host APIs at runtime. Values of this type
+ range from 0 to (Pa_GetHostApiCount()-1).
+
+ @see Pa_GetHostApiCount
+ */
+ typedef int PaHostApiIndex;
+
+
+ /** Retrieve the number of available host APIs. Even if a host API is
+ available it may have no devices available.
+
+ @return A non-negative value indicating the number of available host APIs
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ @see PaHostApiIndex
+ */
+ PaHostApiIndex Pa_GetHostApiCount( void );
+
+
+ /** Retrieve the index of the default host API. The default host API will be
+ the lowest common denominator host API on the current platform and is
+ unlikely to provide the best performance.
+
+ @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)
+ indicating the default host API index or, a PaErrorCode (which are always
+ negative) if PortAudio is not initialized or an error is encountered.
+ */
+ PaHostApiIndex Pa_GetDefaultHostApi( void );
+
+
+ /** Unchanging unique identifiers for each supported host API. This type
+ is used in the PaHostApiInfo structure. The values are guaranteed to be
+ unique and to never change, thus allowing code to be written that
+ conditionally uses host API specific extensions.
+
+ New type ids will be allocated when support for a host API reaches
+ "public alpha" status, prior to that developers should use the
+ paInDevelopment type id.
+
+ @see PaHostApiInfo
+ */
+ typedef enum PaHostApiTypeId
+ {
+ paInDevelopment = 0, /* use while developing support for a new host API */
+ paDirectSound = 1,
+ paMME = 2,
+ paASIO = 3,
+ paSoundManager = 4,
+ paCoreAudio = 5,
+ paOSS = 7,
+ paALSA = 8,
+ paAL = 9,
+ paBeOS = 10,
+ paWDMKS = 11,
+ paJACK = 12,
+ paWASAPI = 13
+ } PaHostApiTypeId;
+
+
+ /** A structure containing information about a particular host API. */
+
+ typedef struct PaHostApiInfo {
+ /** this is struct version 1 */
+ int structVersion;
+ /** The well known unique identifier of this host API @see PaHostApiTypeId */
+ PaHostApiTypeId type;
+ /** A textual description of the host API for display on user interfaces. */
+ const char *name;
+
+ /** The number of devices belonging to this host API. This field may be
+ used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate
+ all devices for this host API.
+ @see Pa_HostApiDeviceIndexToDeviceIndex
+ */
+ int deviceCount;
+
+ /** The default input device for this host API. The value will be a
+ device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
+ if no default input device is available.
+ */
+ PaDeviceIndex defaultInputDevice;
+
+ /** The default output device for this host API. The value will be a
+ device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
+ if no default output device is available.
+ */
+ PaDeviceIndex defaultOutputDevice;
+
+ }
+ PaHostApiInfo;
+
+
+ /** Retrieve a pointer to a structure containing information about a specific
+ host Api.
+
+ @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
+
+ @return A pointer to an immutable PaHostApiInfo structure describing
+ a specific host API. If the hostApi parameter is out of range or an error
+ is encountered, the function returns NULL.
+
+ The returned structure is owned by the PortAudio implementation and must not
+ be manipulated or freed. The pointer is only guaranteed to be valid between
+ calls to Pa_Initialize() and Pa_Terminate().
+ */
+ const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );
+
+
+ /** Convert a static host API unique identifier, into a runtime
+ host API index.
+
+ @param type A unique host API identifier belonging to the PaHostApiTypeId
+ enumeration.
+
+ @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,
+ a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ The paHostApiNotFound error code indicates that the host API specified by the
+ type parameter is not available.
+
+ @see PaHostApiTypeId
+ */
+ PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );
+
+
+ /** Convert a host-API-specific device index to standard PortAudio device index.
+ This function may be used in conjunction with the deviceCount field of
+ PaHostApiInfo to enumerate all devices for the specified host API.
+
+ @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
+
+ @param hostApiDeviceIndex A valid per-host device index in the range
+ 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)
+
+ @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ A paInvalidHostApi error code indicates that the host API index specified by
+ the hostApi parameter is out of range.
+
+ A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter
+ is out of range.
+
+ @see PaHostApiInfo
+ */
+ PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
+ int hostApiDeviceIndex );
+
+
+
+ /** Structure used to return information about a host error condition.
+ */
+ typedef struct PaHostErrorInfo {
+ PaHostApiTypeId hostApiType; /**< the host API which returned the error code */
+ long errorCode; /**< the error code returned */
+ const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */
+ }
+ PaHostErrorInfo;
+
+
+ /** Return information about the last host error encountered. The error
+ information returned by Pa_GetLastHostErrorInfo() will never be modified
+ asyncronously by errors occurring in other PortAudio owned threads
+ (such as the thread that manages the stream callback.)
+
+ This function is provided as a last resort, primarily to enhance debugging
+ by providing clients with access to all available error information.
+
+ @return A pointer to an immutable structure constaining information about
+ the host error. The values in this structure will only be valid if a
+ PortAudio function has previously returned the paUnanticipatedHostError
+ error code.
+ */
+ const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );
+
+
+
+ /* Device enumeration and capabilities */
+
+ /** Retrieve the number of available devices. The number of available devices
+ may be zero.
+
+ @return A non-negative value indicating the number of available devices or,
+ a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+ */
+ PaDeviceIndex Pa_GetDeviceCount( void );
+
+
+ /** Retrieve the index of the default input device. The result can be
+ used in the inputDevice parameter to Pa_OpenStream().
+
+ @return The default input device index for the default host API, or paNoDevice
+ if no default input device is available or an error was encountered.
+ */
+ PaDeviceIndex Pa_GetDefaultInputDevice( void );
+
+
+ /** Retrieve the index of the default output device. The result can be
+ used in the outputDevice parameter to Pa_OpenStream().
+
+ @return The default output device index for the defualt host API, or paNoDevice
+ if no default output device is available or an error was encountered.
+
+ @note
+ On the PC, the user can specify a default device by
+ setting an environment variable. For example, to use device #1.
+ <pre>
+ set PA_RECOMMENDED_OUTPUT_DEVICE=1
+ </pre>
+ The user should first determine the available device ids by using
+ the supplied application "pa_devs".
+ */
+ PaDeviceIndex Pa_GetDefaultOutputDevice( void );
+
+
+ /** The type used to represent monotonic time in seconds that can be used
+ for syncronisation. The type is used for the outTime argument to the
+ PaStreamCallback and as the result of Pa_GetStreamTime().
+
+ @see PaStreamCallback, Pa_GetStreamTime
+ */
+ typedef double PaTime;
+
+
+ /** A type used to specify one or more sample formats. Each value indicates
+ a possible format for sound data passed to and from the stream callback,
+ Pa_ReadStream and Pa_WriteStream.
+
+ The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8
+ and aUInt8 are usually implemented by all implementations.
+
+ The floating point representation (paFloat32) uses +1.0 and -1.0 as the
+ maximum and minimum respectively.
+
+ paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
+
+ The paNonInterleaved flag indicates that a multichannel buffer is passed
+ as a set of non-interleaved pointers.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo
+ @see paFloat32, paInt16, paInt32, paInt24, paInt8
+ @see paUInt8, paCustomFormat, paNonInterleaved
+ */
+ typedef unsigned long PaSampleFormat;
+
+
+#define paFloat32 ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */
+#define paInt32 ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */
+#define paInt24 ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */
+#define paInt16 ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */
+#define paInt8 ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */
+#define paUInt8 ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */
+#define paCustomFormat ((PaSampleFormat) 0x00010000)/**< @see PaSampleFormat */
+
+#define paNonInterleaved ((PaSampleFormat) 0x80000000)
+
+ /** A structure providing information and capabilities of PortAudio devices.
+ Devices may support input, output or both input and output.
+ */
+ typedef struct PaDeviceInfo {
+ int structVersion; /* this is struct version 2 */
+ const char *name;
+ PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/
+
+ int maxInputChannels;
+ int maxOutputChannels;
+
+ /* Default latency values for interactive performance. */
+ PaTime defaultLowInputLatency;
+ PaTime defaultLowOutputLatency;
+ /* Default latency values for robust non-interactive applications (eg. playing sound files). */
+ PaTime defaultHighInputLatency;
+ PaTime defaultHighOutputLatency;
+
+ double defaultSampleRate;
+ }
+ PaDeviceInfo;
+
+
+ /** Retrieve a pointer to a PaDeviceInfo structure containing information
+ about the specified device.
+ @return A pointer to an immutable PaDeviceInfo structure. If the device
+ parameter is out of range the function returns NULL.
+
+ @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
+
+ @note PortAudio manages the memory referenced by the returned pointer,
+ the client must not manipulate or free the memory. The pointer is only
+ guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().
+
+ @see PaDeviceInfo, PaDeviceIndex
+ */
+ const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );
+
+
+ /** Parameters for one direction (input or output) of a stream.
+ */
+ typedef struct PaStreamParameters {
+ /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
+ specifying the device to be used or the special constant
+ paUseHostApiSpecificDeviceSpecification which indicates that the actual
+ device(s) to use are specified in hostApiSpecificStreamInfo.
+ This field must not be set to paNoDevice.
+ */
+ PaDeviceIndex device;
+
+ /** The number of channels of sound to be delivered to the
+ stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().
+ It can range from 1 to the value of maxInputChannels in the
+ PaDeviceInfo record for the device specified by the device parameter.
+ */
+ int channelCount;
+
+ /** The sample format of the buffer provided to the stream callback,
+ a_ReadStream() or Pa_WriteStream(). It may be any of the formats described
+ by the PaSampleFormat enumeration.
+ */
+ PaSampleFormat sampleFormat;
+
+ /** The desired latency in seconds. Where practical, implementations should
+ configure their latency based on these parameters, otherwise they may
+ choose the closest viable latency instead. Unless the suggested latency
+ is greater than the absolute upper limit for the device implementations
+ should round the suggestedLatency up to the next practial value - ie to
+ provide an equal or higher latency than suggestedLatency wherever possibe.
+ Actual latency values for an open stream may be retrieved using the
+ inputLatency and outputLatency fields of the PaStreamInfo structure
+ returned by Pa_GetStreamInfo().
+ @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo
+ */
+ PaTime suggestedLatency;
+
+ /** An optional pointer to a host api specific data structure
+ containing additional information for device setup and/or stream processing.
+ hostApiSpecificStreamInfo is never required for correct operation,
+ if not used it should be set to NULL.
+ */
+ void *hostApiSpecificStreamInfo;
+
+ }
+ PaStreamParameters;
+
+
+ /** Return code for Pa_IsFormatSupported indicating success. */
+#define paFormatIsSupported (0)
+
+ /** Determine whether it would be possible to open a stream with the specified
+ parameters.
+
+ @param inputParameters A structure that describes the input parameters used to
+ open a stream. The suggestedLatency field is ignored. See PaStreamParameters
+ for a description of these parameters. inputParameters must be NULL for
+ output-only streams.
+
+ @param outputParameters A structure that describes the output parameters used
+ to open a stream. The suggestedLatency field is ignored. See PaStreamParameters
+ for a description of these parameters. outputParameters must be NULL for
+ input-only streams.
+
+ @param sampleRate The required sampleRate. For full-duplex streams it is the
+ sample rate for both input and output
+
+ @return Returns 0 if the format is supported, and an error code indicating why
+ the format is not supported otherwise. The constant paFormatIsSupported is
+ provided to compare with the return value for success.
+
+ @see paFormatIsSupported, PaStreamParameters
+ */
+ PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate );
+
+
+
+ /* Streaming types and functions */
+
+
+ /**
+ A single PaStream can provide multiple channels of real-time
+ streaming audio input and output to a client application. A stream
+ provides access to audio hardware represented by one or more
+ PaDevices. Depending on the underlying Host API, it may be possible
+ to open multiple streams using the same device, however this behavior
+ is implementation defined. Portable applications should assume that
+ a PaDevice may be simultaneously used by at most one PaStream.
+
+ Pointers to PaStream objects are passed between PortAudio functions that
+ operate on streams.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,
+ Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,
+ Pa_GetStreamTime, Pa_GetStreamCpuLoad
+
+ */
+ typedef void PaStream;
+
+
+ /** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()
+ or Pa_OpenDefaultStream() to indicate that the stream callback will
+ accept buffers of any size.
+ */
+#define paFramesPerBufferUnspecified (0)
+
+
+ /** Flags used to control the behavior of a stream. They are passed as
+ parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be
+ ORed together.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream
+ @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,
+ paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags
+ */
+ typedef unsigned long PaStreamFlags;
+
+ /** @see PaStreamFlags */
+#define paNoFlag ((PaStreamFlags) 0)
+
+ /** Disable default clipping of out of range samples.
+ @see PaStreamFlags
+ */
+#define paClipOff ((PaStreamFlags) 0x00000001)
+
+ /** Disable default dithering.
+ @see PaStreamFlags
+ */
+#define paDitherOff ((PaStreamFlags) 0x00000002)
+
+ /** Flag requests that where possible a full duplex stream will not discard
+ overflowed input samples without calling the stream callback. This flag is
+ only valid for full duplex callback streams and only when used in combination
+ with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using
+ this flag incorrectly results in a paInvalidFlag error being returned from
+ Pa_OpenStream and Pa_OpenDefaultStream.
+
+ @see PaStreamFlags, paFramesPerBufferUnspecified
+ */
+#define paNeverDropInput ((PaStreamFlags) 0x00000004)
+
+ /** Call the stream callback to fill initial output buffers, rather than the
+ default behavior of priming the buffers with zeros (silence). This flag has
+ no effect for input-only and blocking read/write streams.
+
+ @see PaStreamFlags
+ */
+#define paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)
+
+ /** A mask specifying the platform specific bits.
+ @see PaStreamFlags
+ */
+#define paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)
+
+ /**
+ Timing information for the buffers passed to the stream callback.
+ */
+ typedef struct PaStreamCallbackTimeInfo {
+ PaTime inputBufferAdcTime;
+ PaTime currentTime;
+ PaTime outputBufferDacTime;
+ }
+ PaStreamCallbackTimeInfo;
+
+
+ /**
+ Flag bit constants for the statusFlags to PaStreamCallback.
+
+ @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,
+ paPrimingOutput
+ */
+ typedef unsigned long PaStreamCallbackFlags;
+
+ /** In a stream opened with paFramesPerBufferUnspecified, indicates that
+ input data is all silence (zeros) because no real data is available. In a
+ stream opened without paFramesPerBufferUnspecified, it indicates that one or
+ more zero samples have been inserted into the input buffer to compensate
+ for an input underflow.
+ @see PaStreamCallbackFlags
+ */
+#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001)
+
+ /** In a stream opened with paFramesPerBufferUnspecified, indicates that data
+ prior to the first sample of the input buffer was discarded due to an
+ overflow, possibly because the stream callback is using too much CPU time.
+ Otherwise indicates that data prior to one or more samples in the
+ input buffer was discarded.
+ @see PaStreamCallbackFlags
+ */
+#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002)
+
+ /** Indicates that output data (or a gap) was inserted, possibly because the
+ stream callback is using too much CPU time.
+ @see PaStreamCallbackFlags
+ */
+#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004)
+
+ /** Indicates that output data will be discarded because no room is available.
+ @see PaStreamCallbackFlags
+ */
+#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008)
+
+ /** Some of all of the output data will be used to prime the stream, input
+ data may be zero.
+ @see PaStreamCallbackFlags
+ */
+#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010)
+
+ /**
+ Allowable return values for the PaStreamCallback.
+ @see PaStreamCallback
+ */
+ typedef enum PaStreamCallbackResult
+ {
+ paContinue = 0,
+ paComplete = 1,
+ paAbort = 2
+ } PaStreamCallbackResult;
+
+
+ /**
+ Functions of type PaStreamCallback are implemented by PortAudio clients.
+ They consume, process or generate audio in response to requests from an
+ active PortAudio stream.
+
+ @param input and @param output are arrays of interleaved samples,
+ the format, packing and number of channels used by the buffers are
+ determined by parameters to Pa_OpenStream().
+
+ @param frameCount The number of sample frames to be processed by
+ the stream callback.
+
+ @param timeInfo The time in seconds when the first sample of the input
+ buffer was received at the audio input, the time in seconds when the first
+ sample of the output buffer will begin being played at the audio output, and
+ the time in seconds when the stream callback was called.
+ See also Pa_GetStreamTime()
+
+ @param statusFlags Flags indicating whether input and/or output buffers
+ have been inserted or will be dropped to overcome underflow or overflow
+ conditions.
+
+ @param userData The value of a user supplied pointer passed to
+ Pa_OpenStream() intended for storing synthesis data etc.
+
+ @return
+ The stream callback should return one of the values in the
+ PaStreamCallbackResult enumeration. To ensure that the callback continues
+ to be called, it should return paContinue (0). Either paComplete or paAbort
+ can be returned to finish stream processing, after either of these values is
+ returned the callback will not be called again. If paAbort is returned the
+ stream will finish as soon as possible. If paComplete is returned, the stream
+ will continue until all buffers generated by the callback have been played.
+ This may be useful in applications such as soundfile players where a specific
+ duration of output is required. However, it is not necessary to utilise this
+ mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
+ be used to stop the stream. The callback must always fill the entire output
+ buffer irrespective of its return value.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream
+
+ @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
+ PortAudio API functions from within the stream callback.
+ */
+ typedef int PaStreamCallback(
+ const void *input, void *output,
+ unsigned long frameCount,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData );
+
+
+ /** Opens a stream for either input, output or both.
+
+ @param stream The address of a PaStream pointer which will receive
+ a pointer to the newly opened stream.
+
+ @param inputParameters A structure that describes the input parameters used by
+ the opened stream. See PaStreamParameters for a description of these parameters.
+ inputParameters must be NULL for output-only streams.
+
+ @param outputParameters A structure that describes the output parameters used by
+ the opened stream. See PaStreamParameters for a description of these parameters.
+ outputParameters must be NULL for input-only streams.
+
+ @param sampleRate The desired sampleRate. For full-duplex streams it is the
+ sample rate for both input and output
+
+ @param framesPerBuffer The number of frames passed to the stream callback
+ function, or the preferred block granularity for a blocking read/write stream.
+ The special value paFramesPerBufferUnspecified (0) may be used to request that
+ the stream callback will recieve an optimal (and possibly varying) number of
+ frames based on host requirements and the requested latency settings.
+ Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
+ stream may introduce an additional layer of buffering which could introduce
+ additional latency. PortAudio guarantees that the additional latency
+ will be kept to the theoretical minimum however, it is strongly recommended
+ that a non-zero framesPerBuffer value only be used when your algorithm
+ requires a fixed number of frames per stream callback.
+
+ @param streamFlags Flags which modify the behaviour of the streaming process.
+ This parameter may contain a combination of flags ORed together. Some flags may
+ only be relevant to certain buffer formats.
+
+ @param streamCallback A pointer to a client supplied function that is responsible
+ for processing and filling input and output buffers. If this parameter is NULL
+ the stream will be opened in 'blocking read/write' mode. In blocking mode,
+ the client can receive sample data using Pa_ReadStream and write sample data
+ using Pa_WriteStream, the number of samples that may be read or written
+ without blocking is returned by Pa_GetStreamReadAvailable and
+ Pa_GetStreamWriteAvailable respectively.
+
+ @param userData A client supplied pointer which is passed to the stream callback
+ function. It could for example, contain a pointer to instance data necessary
+ for processing the audio buffers. This parameter is ignored if streamCallback
+ is NULL.
+
+ @return
+ Upon success Pa_OpenStream() returns paNoError and places a pointer to a
+ valid PaStream in the stream argument. The stream is inactive (stopped).
+ If a call to Pa_OpenStream() fails, a non-zero error code is returned (see
+ PaError for possible error codes) and the value of stream is invalid.
+
+ @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,
+ Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable
+ */
+ PaError Pa_OpenStream( PaStream** stream,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamFlags streamFlags,
+ PaStreamCallback *streamCallback,
+ void *userData );
+
+
+ /** A simplified version of Pa_OpenStream() that opens the default input
+ and/or output devices.
+
+ @param stream The address of a PaStream pointer which will receive
+ a pointer to the newly opened stream.
+
+ @param numInputChannels The number of channels of sound that will be supplied
+ to the stream callback or returned by Pa_ReadStream. It can range from 1 to
+ the value of maxInputChannels in the PaDeviceInfo record for the default input
+ device. If 0 the stream is opened as an output-only stream.
+
+ @param numOutputChannels The number of channels of sound to be delivered to the
+ stream callback or passed to Pa_WriteStream. It can range from 1 to the value
+ of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
+ If 0 the stream is opened as an output-only stream.
+
+ @param sampleFormat The sample format of both the input and output buffers
+ provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.
+ sampleFormat may be any of the formats described by the PaSampleFormat
+ enumeration.
+
+ @param sampleRate Same as Pa_OpenStream parameter of the same name.
+ @param framesPerBuffer Same as Pa_OpenStream parameter of the same name.
+ @param streamCallback Same as Pa_OpenStream parameter of the same name.
+ @param userData Same as Pa_OpenStream parameter of the same name.
+
+ @return As for Pa_OpenStream
+
+ @see Pa_OpenStream, PaStreamCallback
+ */
+ PaError Pa_OpenDefaultStream( PaStream** stream,
+ int numInputChannels,
+ int numOutputChannels,
+ PaSampleFormat sampleFormat,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamCallback *streamCallback,
+ void *userData );
+
+
+ /** Closes an audio stream. If the audio stream is active it
+ discards any pending buffers as if Pa_AbortStream() had been called.
+ */
+ PaError Pa_CloseStream( PaStream *stream );
+
+
+ /** Functions of type PaStreamFinishedCallback are implemented by PortAudio
+ clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback
+ function. Once registered they are called when the stream becomes inactive
+ (ie once a call to Pa_StopStream() will not block).
+ A stream will become inactive after the stream callback returns non-zero,
+ or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
+ output, if the stream callback returns paComplete, or Pa_StopStream is called,
+ the stream finished callback will not be called until all generated sample data
+ has been played.
+
+ @param userData The userData parameter supplied to Pa_OpenStream()
+
+ @see Pa_SetStreamFinishedCallback
+ */
+ typedef void PaStreamFinishedCallback( void *userData );
+
+
+ /** Register a stream finished callback function which will be called when the
+ stream becomes inactive. See the description of PaStreamFinishedCallback for
+ further details about when the callback will be called.
+
+ @param stream a pointer to a PaStream that is in the stopped state - if the
+ stream is not stopped, the stream's finished callback will remain unchanged
+ and an error code will be returned.
+
+ @param streamFinishedCallback a pointer to a function with the same signature
+ as PaStreamFinishedCallback, that will be called when the stream becomes
+ inactive. Passing NULL for this parameter will un-register a previously
+ registered stream finished callback function.
+
+ @return on success returns paNoError, otherwise an error code indicating the cause
+ of the error.
+
+ @see PaStreamFinishedCallback
+ */
+ PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );
+
+
+ /** Commences audio processing.
+ */
+ PaError Pa_StartStream( PaStream *stream );
+
+
+ /** Terminates audio processing. It waits until all pending
+ audio buffers have been played before it returns.
+ */
+ PaError Pa_StopStream( PaStream *stream );
+
+
+ /** Terminates audio processing immediately without waiting for pending
+ buffers to complete.
+ */
+ PaError Pa_AbortStream( PaStream *stream );
+
+
+ /** Determine whether the stream is stopped.
+ A stream is considered to be stopped prior to a successful call to
+ Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.
+ If a stream callback returns a value other than paContinue the stream is NOT
+ considered to be stopped.
+
+ @return Returns one (1) when the stream is stopped, zero (0) when
+ the stream is running or, a PaErrorCode (which are always negative) if
+ PortAudio is not initialized or an error is encountered.
+
+ @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive
+ */
+ PaError Pa_IsStreamStopped( PaStream *stream );
+
+
+ /** Determine whether the stream is active.
+ A stream is active after a successful call to Pa_StartStream(), until it
+ becomes inactive either as a result of a call to Pa_StopStream() or
+ Pa_AbortStream(), or as a result of a return value other than paContinue from
+ the stream callback. In the latter case, the stream is considered inactive
+ after the last buffer has finished playing.
+
+ @return Returns one (1) when the stream is active (ie playing or recording
+ audio), zero (0) when not playing or, a PaErrorCode (which are always negative)
+ if PortAudio is not initialized or an error is encountered.
+
+ @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped
+ */
+ PaError Pa_IsStreamActive( PaStream *stream );
+
+
+
+ /** A structure containing unchanging information about an open stream.
+ @see Pa_GetStreamInfo
+ */
+
+ typedef struct PaStreamInfo {
+ /** this is struct version 1 */
+ int structVersion;
+
+ /** The input latency of the stream in seconds. This value provides the most
+ accurate estimate of input latency available to the implementation. It may
+ differ significantly from the suggestedLatency value passed to Pa_OpenStream().
+ The value of this field will be zero (0.) for output-only streams.
+ @see PaTime
+ */
+ PaTime inputLatency;
+
+ /** The output latency of the stream in seconds. This value provides the most
+ accurate estimate of output latency available to the implementation. It may
+ differ significantly from the suggestedLatency value passed to Pa_OpenStream().
+ The value of this field will be zero (0.) for input-only streams.
+ @see PaTime
+ */
+ PaTime outputLatency;
+
+ /** The sample rate of the stream in Hertz (samples per second). In cases
+ where the hardware sample rate is inaccurate and PortAudio is aware of it,
+ the value of this field may be different from the sampleRate parameter
+ passed to Pa_OpenStream(). If information about the actual hardware sample
+ rate is not available, this field will have the same value as the sampleRate
+ parameter passed to Pa_OpenStream().
+ */
+ double sampleRate;
+
+ }
+ PaStreamInfo;
+
+
+ /** Retrieve a pointer to a PaStreamInfo structure containing information
+ about the specified stream.
+ @return A pointer to an immutable PaStreamInfo structure. If the stream
+ parameter invalid, or an error is encountered, the function returns NULL.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+
+ @note PortAudio manages the memory referenced by the returned pointer,
+ the client must not manipulate or free the memory. The pointer is only
+ guaranteed to be valid until the specified stream is closed.
+
+ @see PaStreamInfo
+ */
+ const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
+
+
+ /** Determine the current time for the stream according to the same clock used
+ to generate buffer timestamps. This time may be used for syncronising other
+ events to the audio stream, for example synchronizing audio to MIDI.
+
+ @return The stream's current time in seconds, or 0 if an error occurred.
+
+ @see PaTime, PaStreamCallback
+ */
+ PaTime Pa_GetStreamTime( PaStream *stream );
+
+
+ /** Retrieve CPU usage information for the specified stream.
+ The "CPU Load" is a fraction of total CPU time consumed by a callback stream's
+ audio processing routines including, but not limited to the client supplied
+ stream callback. This function does not work with blocking read/write streams.
+
+ This function may be called from the stream callback function or the
+ application.
+
+ @return
+ A floating point value, typically between 0.0 and 1.0, where 1.0 indicates
+ that the stream callback is consuming the maximum number of CPU cycles possible
+ to maintain real-time operation. A value of 0.5 would imply that PortAudio and
+ the stream callback was consuming roughly 50% of the available CPU time. The
+ return value may exceed 1.0. A value of 0.0 will always be returned for a
+ blocking read/write stream, or if an error occurrs.
+ */
+ double Pa_GetStreamCpuLoad( PaStream* stream );
+
+
+ /** Read samples from an input stream. The function doesn't return until
+ the entire buffer has been filled - this may involve waiting for the operating
+ system to supply the data.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+
+ @param buffer A pointer to a buffer of sample frames. The buffer contains
+ samples in the format specified by the inputParameters->sampleFormat field
+ used to open the stream, and the number of channels specified by
+ inputParameters->numChannels. If non-interleaved samples were requested,
+ buffer is a pointer to the first element of an array of non-interleaved
+ buffer pointers, one for each channel.
+
+ @param frames The number of frames to be read into buffer. This parameter
+ is not constrained to a specific range, however high performance applications
+ will want to match this parameter to the framesPerBuffer parameter used
+ when opening the stream.
+
+ @return On success PaNoError will be returned, or PaInputOverflowed if input
+ data was discarded by PortAudio after the previous call and before this call.
+ */
+ PaError Pa_ReadStream( PaStream* stream,
+ void *buffer,
+ unsigned long frames );
+
+
+ /** Write samples to an output stream. This function doesn't return until the
+ entire buffer has been consumed - this may involve waiting for the operating
+ system to consume the data.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+
+ @param buffer A pointer to a buffer of sample frames. The buffer contains
+ samples in the format specified by the outputParameters->sampleFormat field
+ used to open the stream, and the number of channels specified by
+ outputParameters->numChannels. If non-interleaved samples were requested,
+ buffer is a pointer to the first element of an array of non-interleaved
+ buffer pointers, one for each channel.
+
+ @param frames The number of frames to be written from buffer. This parameter
+ is not constrained to a specific range, however high performance applications
+ will want to match this parameter to the framesPerBuffer parameter used
+ when opening the stream.
+
+ @return On success PaNoError will be returned, or paOutputUnderflowed if
+ additional output data was inserted after the previous call and before this
+ call.
+ */
+ PaError Pa_WriteStream( PaStream* stream,
+ const void *buffer,
+ unsigned long frames );
+
+
+ /** Retrieve the number of frames that can be read from the stream without
+ waiting.
+
+ @return Returns a non-negative value representing the maximum number of frames
+ that can be read from the stream without blocking or busy waiting or, a
+ PaErrorCode (which are always negative) if PortAudio is not initialized or an
+ error is encountered.
+ */
+ signed long Pa_GetStreamReadAvailable( PaStream* stream );
+
+
+ /** Retrieve the number of frames that can be written to the stream without
+ waiting.
+
+ @return Returns a non-negative value representing the maximum number of frames
+ that can be written to the stream without blocking or busy waiting or, a
+ PaErrorCode (which are always negative) if PortAudio is not initialized or an
+ error is encountered.
+ */
+ signed long Pa_GetStreamWriteAvailable( PaStream* stream );
+
+
+ /* Miscellaneous utilities */
+
+
+ /** Retrieve the size of a given sample format in bytes.
+
+ @return The size in bytes of a single sample in the specified format,
+ or paSampleFormatNotSupported if the format is not supported.
+ */
+ PaError Pa_GetSampleSize( PaSampleFormat format );
+
+
+ /** Put the caller to sleep for at least 'msec' milliseconds. This function is
+ provided only as a convenience for authors of portable code (such as the tests
+ and examples in the PortAudio distribution.)
+
+ The function may sleep longer than requested so don't rely on this for accurate
+ musical timing.
+ */
+ void Pa_Sleep( long msec );
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PORTAUDIO_H */
diff --git a/windows/portaudio.lib b/windows/portaudio.lib
new file mode 100644
index 00000000..de306d43
--- /dev/null
+++ b/windows/portaudio.lib
Binary files differ
diff --git a/windows/regex.c b/windows/regex.c
new file mode 100644
index 00000000..8169880d
--- /dev/null
+++ b/windows/regex.c
@@ -0,0 +1,4948 @@
+/* Extended regular expression matching and search library,
+ version 0.12.
+ (Implements POSIX draft P10003.2/D11.2, except for
+ internationalization features.)
+
+ Copyright (C) 1993 Free Software Foundation, Inc.
+
+ 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, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* AIX requires this to be the first thing in the file. */
+#if defined (_AIX) && !defined (REGEX_MALLOC)
+ #pragma alloca
+#endif
+
+#define _GNU_SOURCE
+
+/* We need this for `regex.h', and perhaps for the Emacs include files. */
+#include <sys/types.h>
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* The `emacs' switch turns on certain matching commands
+ that make sense only in Emacs. */
+#ifdef emacs
+
+#include "lisp.h"
+#include "buffer.h"
+#include "syntax.h"
+
+/* Emacs uses `NULL' as a predicate. */
+#undef NULL
+
+#else /* not emacs */
+
+/* We used to test for `BSTRING' here, but only GCC and Emacs define
+ `BSTRING', as far as I know, and neither of them use this code. */
+#if HAVE_STRING_H || STDC_HEADERS
+#include <string.h>
+#ifndef bcmp
+#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
+#endif
+#ifndef bcopy
+#define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+#ifndef bzero
+#define bzero(s, n) memset ((s), 0, (n))
+#endif
+#else
+#include <strings.h>
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#else
+char *malloc ();
+char *realloc ();
+#endif
+
+
+/* Define the syntax stuff for \<, \>, etc. */
+
+/* This must be nonzero for the wordchar and notwordchar pattern
+ commands in re_match_2. */
+#ifndef Sword
+#define Sword 1
+#endif
+
+#ifdef SYNTAX_TABLE
+
+extern char *re_syntax_table;
+
+#else /* not SYNTAX_TABLE */
+
+/* How many characters in the character set. */
+#define CHAR_SET_SIZE 256
+
+static char re_syntax_table[CHAR_SET_SIZE];
+
+static void
+init_syntax_once ()
+{
+ register int c;
+ static int done = 0;
+
+ if (done)
+ return;
+
+ bzero (re_syntax_table, sizeof re_syntax_table);
+
+ for (c = 'a'; c <= 'z'; c++)
+ re_syntax_table[c] = Sword;
+
+ for (c = 'A'; c <= 'Z'; c++)
+ re_syntax_table[c] = Sword;
+
+ for (c = '0'; c <= '9'; c++)
+ re_syntax_table[c] = Sword;
+
+ re_syntax_table['_'] = Sword;
+
+ done = 1;
+}
+
+#endif /* not SYNTAX_TABLE */
+
+#define SYNTAX(c) re_syntax_table[c]
+
+#endif /* not emacs */
+
+/* Get the interface, including the syntax bits. */
+#include "regex.h"
+
+/* isalpha etc. are used for the character classes. */
+#include <ctype.h>
+
+#ifndef isascii
+#define isascii(c) 1
+#endif
+
+#ifdef isblank
+#define ISBLANK(c) (isascii (c) && isblank (c))
+#else
+#define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+#endif
+#ifdef isgraph
+#define ISGRAPH(c) (isascii (c) && isgraph (c))
+#else
+#define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c))
+#endif
+
+#define ISPRINT(c) (isascii (c) && isprint (c))
+#define ISDIGIT(c) (isascii (c) && isdigit (c))
+#define ISALNUM(c) (isascii (c) && isalnum (c))
+#define ISALPHA(c) (isascii (c) && isalpha (c))
+#define ISCNTRL(c) (isascii (c) && iscntrl (c))
+#define ISLOWER(c) (isascii (c) && islower (c))
+#define ISPUNCT(c) (isascii (c) && ispunct (c))
+#define ISSPACE(c) (isascii (c) && isspace (c))
+#define ISUPPER(c) (isascii (c) && isupper (c))
+#define ISXDIGIT(c) (isascii (c) && isxdigit (c))
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+/* We remove any previous definition of `SIGN_EXTEND_CHAR',
+ since ours (we hope) works properly with all combinations of
+ machines, compilers, `char' and `unsigned char' argument types.
+ (Per Bothner suggested the basic approach.) */
+#undef SIGN_EXTEND_CHAR
+#if __STDC__
+#define SIGN_EXTEND_CHAR(c) ((signed char) (c))
+#else /* not __STDC__ */
+/* As in Harbison and Steele. */
+#define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
+#endif
+
+/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
+ use `alloca' instead of `malloc'. This is because using malloc in
+ re_search* or re_match* could cause memory leaks when C-g is used in
+ Emacs; also, malloc is slower and causes storage fragmentation. On
+ the other hand, malloc is more portable, and easier to debug.
+
+ Because we sometimes use alloca, some routines have to be macros,
+ not functions -- `alloca'-allocated space disappears at the end of the
+ function it is called in. */
+
+#ifdef REGEX_MALLOC
+
+#define REGEX_ALLOCATE malloc
+#define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
+
+#else /* not REGEX_MALLOC */
+
+/* Emacs already defines alloca, sometimes. */
+#ifndef alloca
+
+/* Make alloca work the best possible way. */
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not __GNUC__ */
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#else /* not __GNUC__ or HAVE_ALLOCA_H */
+#ifndef _AIX /* Already did AIX, up at the top. */
+char *alloca ();
+#endif /* not _AIX */
+#endif /* not HAVE_ALLOCA_H */
+#endif /* not __GNUC__ */
+
+#endif /* not alloca */
+
+#define REGEX_ALLOCATE alloca
+
+/* Assumes a `char *destination' variable. */
+#define REGEX_REALLOCATE(source, osize, nsize) \
+ (destination = (char *) alloca (nsize), \
+ bcopy (source, destination, osize), \
+ destination)
+
+#endif /* not REGEX_MALLOC */
+
+
+/* True if `size1' is non-NULL and PTR is pointing anywhere inside
+ `string1' or just past its end. This works if PTR is NULL, which is
+ a good thing. */
+#define FIRST_STRING_P(ptr) \
+ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
+
+/* (Re)Allocate N items of type T using malloc, or fail. */
+#define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
+#define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
+#define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
+
+#define BYTEWIDTH 8 /* In bits. */
+
+#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
+
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+typedef char boolean;
+#define false 0
+#define true 1
+
+/* These are the command codes that appear in compiled regular
+ expressions. Some opcodes are followed by argument bytes. A
+ command code can specify any interpretation whatsoever for its
+ arguments. Zero bytes may appear in the compiled regular expression.
+
+ The value of `exactn' is needed in search.c (search_buffer) in Emacs.
+ So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of
+ `exactn' we use here must also be 1. */
+
+typedef enum
+{
+ no_op = 0,
+
+ /* Followed by one byte giving n, then by n literal bytes. */
+ exactn = 1,
+
+ /* Matches any (more or less) character. */
+ anychar,
+
+ /* Matches any one char belonging to specified set. First
+ following byte is number of bitmap bytes. Then come bytes
+ for a bitmap saying which chars are in. Bits in each byte
+ are ordered low-bit-first. A character is in the set if its
+ bit is 1. A character too large to have a bit in the map is
+ automatically not in the set. */
+ charset,
+
+ /* Same parameters as charset, but match any character that is
+ not one of those specified. */
+ charset_not,
+
+ /* Start remembering the text that is matched, for storing in a
+ register. Followed by one byte with the register number, in
+ the range 0 to one less than the pattern buffer's re_nsub
+ field. Then followed by one byte with the number of groups
+ inner to this one. (This last has to be part of the
+ start_memory only because we need it in the on_failure_jump
+ of re_match_2.) */
+ start_memory,
+
+ /* Stop remembering the text that is matched and store it in a
+ memory register. Followed by one byte with the register
+ number, in the range 0 to one less than `re_nsub' in the
+ pattern buffer, and one byte with the number of inner groups,
+ just like `start_memory'. (We need the number of inner
+ groups here because we don't have any easy way of finding the
+ corresponding start_memory when we're at a stop_memory.) */
+ stop_memory,
+
+ /* Match a duplicate of something remembered. Followed by one
+ byte containing the register number. */
+ duplicate,
+
+ /* Fail unless at beginning of line. */
+ begline,
+
+ /* Fail unless at end of line. */
+ endline,
+
+ /* Succeeds if at beginning of buffer (if emacs) or at beginning
+ of string to be matched (if not). */
+ begbuf,
+
+ /* Analogously, for end of buffer/string. */
+ endbuf,
+
+ /* Followed by two byte relative address to which to jump. */
+ jump,
+
+ /* Same as jump, but marks the end of an alternative. */
+ jump_past_alt,
+
+ /* Followed by two-byte relative address of place to resume at
+ in case of failure. */
+ on_failure_jump,
+
+ /* Like on_failure_jump, but pushes a placeholder instead of the
+ current string position when executed. */
+ on_failure_keep_string_jump,
+
+ /* Throw away latest failure point and then jump to following
+ two-byte relative address. */
+ pop_failure_jump,
+
+ /* Change to pop_failure_jump if know won't have to backtrack to
+ match; otherwise change to jump. This is used to jump
+ back to the beginning of a repeat. If what follows this jump
+ clearly won't match what the repeat does, such that we can be
+ sure that there is no use backtracking out of repetitions
+ already matched, then we change it to a pop_failure_jump.
+ Followed by two-byte address. */
+ maybe_pop_jump,
+
+ /* Jump to following two-byte address, and push a dummy failure
+ point. This failure point will be thrown away if an attempt
+ is made to use it for a failure. A `+' construct makes this
+ before the first repeat. Also used as an intermediary kind
+ of jump when compiling an alternative. */
+ dummy_failure_jump,
+
+ /* Push a dummy failure point and continue. Used at the end of
+ alternatives. */
+ push_dummy_failure,
+
+ /* Followed by two-byte relative address and two-byte number n.
+ After matching N times, jump to the address upon failure. */
+ succeed_n,
+
+ /* Followed by two-byte relative address, and two-byte number n.
+ Jump to the address N times, then fail. */
+ jump_n,
+
+ /* Set the following two-byte relative address to the
+ subsequent two-byte number. The address *includes* the two
+ bytes of number. */
+ set_number_at,
+
+ wordchar, /* Matches any word-constituent character. */
+ notwordchar, /* Matches any char that is not a word-constituent. */
+
+ wordbeg, /* Succeeds if at word beginning. */
+ wordend, /* Succeeds if at word end. */
+
+ wordbound, /* Succeeds if at a word boundary. */
+ notwordbound /* Succeeds if not at a word boundary. */
+
+#ifdef emacs
+ ,before_dot, /* Succeeds if before point. */
+ at_dot, /* Succeeds if at point. */
+ after_dot, /* Succeeds if after point. */
+
+ /* Matches any character whose syntax is specified. Followed by
+ a byte which contains a syntax code, e.g., Sword. */
+ syntaxspec,
+
+ /* Matches any character whose syntax is not that specified. */
+ notsyntaxspec
+#endif /* emacs */
+} re_opcode_t;
+
+/* Common operations on the compiled pattern. */
+
+/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
+
+#define STORE_NUMBER(destination, number) \
+ do { \
+ (destination)[0] = (number) & 0377; \
+ (destination)[1] = (number) >> 8; \
+ } while (0)
+
+/* Same as STORE_NUMBER, except increment DESTINATION to
+ the byte after where the number is stored. Therefore, DESTINATION
+ must be an lvalue. */
+
+#define STORE_NUMBER_AND_INCR(destination, number) \
+ do { \
+ STORE_NUMBER (destination, number); \
+ (destination) += 2; \
+ } while (0)
+
+/* Put into DESTINATION a number stored in two contiguous bytes starting
+ at SOURCE. */
+
+#define EXTRACT_NUMBER(destination, source) \
+ do { \
+ (destination) = *(source) & 0377; \
+ (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
+ } while (0)
+
+#ifdef DEBUG
+static void
+extract_number (dest, source)
+ int *dest;
+ unsigned char *source;
+{
+ int temp = SIGN_EXTEND_CHAR (*(source + 1));
+ *dest = *source & 0377;
+ *dest += temp << 8;
+}
+
+#ifndef EXTRACT_MACROS /* To debug the macros. */
+#undef EXTRACT_NUMBER
+#define EXTRACT_NUMBER(dest, src) extract_number (&dest, src)
+#endif /* not EXTRACT_MACROS */
+
+#endif /* DEBUG */
+
+/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
+ SOURCE must be an lvalue. */
+
+#define EXTRACT_NUMBER_AND_INCR(destination, source) \
+ do { \
+ EXTRACT_NUMBER (destination, source); \
+ (source) += 2; \
+ } while (0)
+
+#ifdef DEBUG
+static void
+extract_number_and_incr (destination, source)
+ int *destination;
+ unsigned char **source;
+{
+ extract_number (destination, *source);
+ *source += 2;
+}
+
+#ifndef EXTRACT_MACROS
+#undef EXTRACT_NUMBER_AND_INCR
+#define EXTRACT_NUMBER_AND_INCR(dest, src) \
+ extract_number_and_incr (&dest, &src)
+#endif /* not EXTRACT_MACROS */
+
+#endif /* DEBUG */
+
+/* If DEBUG is defined, Regex prints many voluminous messages about what
+ it is doing (if the variable `debug' is nonzero). If linked with the
+ main program in `iregex.c', you can enter patterns and strings
+ interactively. And if linked with the main program in `main.c' and
+ the other test files, you can run the already-written tests. */
+
+#ifdef DEBUG
+
+/* We use standard I/O for debugging. */
+#include <stdio.h>
+
+/* It is useful to test things that ``must'' be true when debugging. */
+#include <assert.h>
+
+static int debug = 0;
+
+#define DEBUG_STATEMENT(e) e
+#define DEBUG_PRINT1(x) if (debug) printf (x)
+#define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
+#define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
+#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
+#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
+ if (debug) print_partial_compiled_pattern (s, e)
+#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
+ if (debug) print_double_string (w, s1, sz1, s2, sz2)
+
+
+extern void printchar ();
+
+/* Print the fastmap in human-readable form. */
+
+void
+print_fastmap (fastmap)
+ char *fastmap;
+{
+ unsigned was_a_range = 0;
+ unsigned i = 0;
+
+ while (i < (1 << BYTEWIDTH))
+ {
+ if (fastmap[i++])
+ {
+ was_a_range = 0;
+ printchar (i - 1);
+ while (i < (1 << BYTEWIDTH) && fastmap[i])
+ {
+ was_a_range = 1;
+ i++;
+ }
+ if (was_a_range)
+ {
+ printf ("-");
+ printchar (i - 1);
+ }
+ }
+ }
+ putchar ('\n');
+}
+
+
+/* Print a compiled pattern string in human-readable form, starting at
+ the START pointer into it and ending just before the pointer END. */
+
+void
+print_partial_compiled_pattern (start, end)
+ unsigned char *start;
+ unsigned char *end;
+{
+ int mcnt, mcnt2;
+ unsigned char *p = start;
+ unsigned char *pend = end;
+
+ if (start == NULL)
+ {
+ printf ("(null)\n");
+ return;
+ }
+
+ /* Loop over pattern commands. */
+ while (p < pend)
+ {
+ switch ((re_opcode_t) *p++)
+ {
+ case no_op:
+ printf ("/no_op");
+ break;
+
+ case exactn:
+ mcnt = *p++;
+ printf ("/exactn/%d", mcnt);
+ do
+ {
+ putchar ('/');
+ printchar (*p++);
+ }
+ while (--mcnt);
+ break;
+
+ case start_memory:
+ mcnt = *p++;
+ printf ("/start_memory/%d/%d", mcnt, *p++);
+ break;
+
+ case stop_memory:
+ mcnt = *p++;
+ printf ("/stop_memory/%d/%d", mcnt, *p++);
+ break;
+
+ case duplicate:
+ printf ("/duplicate/%d", *p++);
+ break;
+
+ case anychar:
+ printf ("/anychar");
+ break;
+
+ case charset:
+ case charset_not:
+ {
+ register int c;
+
+ printf ("/charset%s",
+ (re_opcode_t) *(p - 1) == charset_not ? "_not" : "");
+
+ assert (p + *p < pend);
+
+ for (c = 0; c < *p; c++)
+ {
+ unsigned bit;
+ unsigned char map_byte = p[1 + c];
+
+ putchar ('/');
+
+ for (bit = 0; bit < BYTEWIDTH; bit++)
+ if (map_byte & (1 << bit))
+ printchar (c * BYTEWIDTH + bit);
+ }
+ p += 1 + *p;
+ break;
+ }
+
+ case begline:
+ printf ("/begline");
+ break;
+
+ case endline:
+ printf ("/endline");
+ break;
+
+ case on_failure_jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/on_failure_jump/0/%d", mcnt);
+ break;
+
+ case on_failure_keep_string_jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/on_failure_keep_string_jump/0/%d", mcnt);
+ break;
+
+ case dummy_failure_jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/dummy_failure_jump/0/%d", mcnt);
+ break;
+
+ case push_dummy_failure:
+ printf ("/push_dummy_failure");
+ break;
+
+ case maybe_pop_jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/maybe_pop_jump/0/%d", mcnt);
+ break;
+
+ case pop_failure_jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/pop_failure_jump/0/%d", mcnt);
+ break;
+
+ case jump_past_alt:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/jump_past_alt/0/%d", mcnt);
+ break;
+
+ case jump:
+ extract_number_and_incr (&mcnt, &p);
+ printf ("/jump/0/%d", mcnt);
+ break;
+
+ case succeed_n:
+ extract_number_and_incr (&mcnt, &p);
+ extract_number_and_incr (&mcnt2, &p);
+ printf ("/succeed_n/0/%d/0/%d", mcnt, mcnt2);
+ break;
+
+ case jump_n:
+ extract_number_and_incr (&mcnt, &p);
+ extract_number_and_incr (&mcnt2, &p);
+ printf ("/jump_n/0/%d/0/%d", mcnt, mcnt2);
+ break;
+
+ case set_number_at:
+ extract_number_and_incr (&mcnt, &p);
+ extract_number_and_incr (&mcnt2, &p);
+ printf ("/set_number_at/0/%d/0/%d", mcnt, mcnt2);
+ break;
+
+ case wordbound:
+ printf ("/wordbound");
+ break;
+
+ case notwordbound:
+ printf ("/notwordbound");
+ break;
+
+ case wordbeg:
+ printf ("/wordbeg");
+ break;
+
+ case wordend:
+ printf ("/wordend");
+
+#ifdef emacs
+ case before_dot:
+ printf ("/before_dot");
+ break;
+
+ case at_dot:
+ printf ("/at_dot");
+ break;
+
+ case after_dot:
+ printf ("/after_dot");
+ break;
+
+ case syntaxspec:
+ printf ("/syntaxspec");
+ mcnt = *p++;
+ printf ("/%d", mcnt);
+ break;
+
+ case notsyntaxspec:
+ printf ("/notsyntaxspec");
+ mcnt = *p++;
+ printf ("/%d", mcnt);
+ break;
+#endif /* emacs */
+
+ case wordchar:
+ printf ("/wordchar");
+ break;
+
+ case notwordchar:
+ printf ("/notwordchar");
+ break;
+
+ case begbuf:
+ printf ("/begbuf");
+ break;
+
+ case endbuf:
+ printf ("/endbuf");
+ break;
+
+ default:
+ printf ("?%d", *(p-1));
+ }
+ }
+ printf ("/\n");
+}
+
+
+void
+print_compiled_pattern (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ unsigned char *buffer = bufp->buffer;
+
+ print_partial_compiled_pattern (buffer, buffer + bufp->used);
+ printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated);
+
+ if (bufp->fastmap_accurate && bufp->fastmap)
+ {
+ printf ("fastmap: ");
+ print_fastmap (bufp->fastmap);
+ }
+
+ printf ("re_nsub: %d\t", bufp->re_nsub);
+ printf ("regs_alloc: %d\t", bufp->regs_allocated);
+ printf ("can_be_null: %d\t", bufp->can_be_null);
+ printf ("newline_anchor: %d\n", bufp->newline_anchor);
+ printf ("no_sub: %d\t", bufp->no_sub);
+ printf ("not_bol: %d\t", bufp->not_bol);
+ printf ("not_eol: %d\t", bufp->not_eol);
+ printf ("syntax: %d\n", bufp->syntax);
+ /* Perhaps we should print the translate table? */
+}
+
+
+void
+print_double_string (where, string1, size1, string2, size2)
+ const char *where;
+ const char *string1;
+ const char *string2;
+ int size1;
+ int size2;
+{
+ unsigned this_char;
+
+ if (where == NULL)
+ printf ("(null)");
+ else
+ {
+ if (FIRST_STRING_P (where))
+ {
+ for (this_char = where - string1; this_char < size1; this_char++)
+ printchar (string1[this_char]);
+
+ where = string2;
+ }
+
+ for (this_char = where - string2; this_char < size2; this_char++)
+ printchar (string2[this_char]);
+ }
+}
+
+#else /* not DEBUG */
+
+#undef assert
+#define assert(e)
+
+#define DEBUG_STATEMENT(e)
+#define DEBUG_PRINT1(x)
+#define DEBUG_PRINT2(x1, x2)
+#define DEBUG_PRINT3(x1, x2, x3)
+#define DEBUG_PRINT4(x1, x2, x3, x4)
+#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
+#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
+
+#endif /* not DEBUG */
+
+/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+ also be assigned to arbitrarily: each pattern buffer stores its own
+ syntax, so it can be changed between regex compilations. */
+reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS;
+
+
+/* Specify the precise syntax of regexps for compilation. This provides
+ for compatibility for various utilities which historically have
+ different, incompatible syntaxes.
+
+ The argument SYNTAX is a bit mask comprised of the various bits
+ defined in regex.h. We return the old syntax. */
+
+reg_syntax_t
+re_set_syntax (syntax)
+ reg_syntax_t syntax;
+{
+ reg_syntax_t ret = re_syntax_options;
+
+ re_syntax_options = syntax;
+ return ret;
+}
+
+/* This table gives an error message for each of the error codes listed
+ in regex.h. Obviously the order here has to be same as there. */
+
+static const char *re_error_msg[] =
+ { NULL, /* REG_NOERROR */
+ "No match", /* REG_NOMATCH */
+ "Invalid regular expression", /* REG_BADPAT */
+ "Invalid collation character", /* REG_ECOLLATE */
+ "Invalid character class name", /* REG_ECTYPE */
+ "Trailing backslash", /* REG_EESCAPE */
+ "Invalid back reference", /* REG_ESUBREG */
+ "Unmatched [ or [^", /* REG_EBRACK */
+ "Unmatched ( or \\(", /* REG_EPAREN */
+ "Unmatched \\{", /* REG_EBRACE */
+ "Invalid content of \\{\\}", /* REG_BADBR */
+ "Invalid range end", /* REG_ERANGE */
+ "Memory exhausted", /* REG_ESPACE */
+ "Invalid preceding regular expression", /* REG_BADRPT */
+ "Premature end of regular expression", /* REG_EEND */
+ "Regular expression too big", /* REG_ESIZE */
+ "Unmatched ) or \\)", /* REG_ERPAREN */
+ };
+
+/* Subroutine declarations and macros for regex_compile. */
+
+static void store_op1 (), store_op2 ();
+static void insert_op1 (), insert_op2 ();
+static boolean at_begline_loc_p (), at_endline_loc_p ();
+static boolean group_in_compile_stack ();
+static reg_errcode_t compile_range ();
+
+/* Fetch the next character in the uncompiled pattern---translating it
+ if necessary. Also cast from a signed character in the constant
+ string passed to us by the user to an unsigned char that we can use
+ as an array index (in, e.g., `translate'). */
+#define PATFETCH(c) \
+ do {if (p == pend) return REG_EEND; \
+ c = (unsigned char) *p++; \
+ if (translate) c = translate[c]; \
+ } while (0)
+
+/* Fetch the next character in the uncompiled pattern, with no
+ translation. */
+#define PATFETCH_RAW(c) \
+ do {if (p == pend) return REG_EEND; \
+ c = (unsigned char) *p++; \
+ } while (0)
+
+/* Go backwards one character in the pattern. */
+#define PATUNFETCH p--
+
+
+/* If `translate' is non-null, return translate[D], else just D. We
+ cast the subscript to translate because some data is declared as
+ `char *', to avoid warnings when a string constant is passed. But
+ when we use a character as a subscript we must make it unsigned. */
+#define TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d))
+
+
+/* Macros for outputting the compiled pattern into `buffer'. */
+
+/* If the buffer isn't allocated when it comes in, use this. */
+#define INIT_BUF_SIZE 32
+
+/* Make sure we have at least N more bytes of space in buffer. */
+#define GET_BUFFER_SPACE(n) \
+ while (b - bufp->buffer + (n) > bufp->allocated) \
+ EXTEND_BUFFER ()
+
+/* Make sure we have one more byte of buffer space and then add C to it. */
+#define BUF_PUSH(c) \
+ do { \
+ GET_BUFFER_SPACE (1); \
+ *b++ = (unsigned char) (c); \
+ } while (0)
+
+
+/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
+#define BUF_PUSH_2(c1, c2) \
+ do { \
+ GET_BUFFER_SPACE (2); \
+ *b++ = (unsigned char) (c1); \
+ *b++ = (unsigned char) (c2); \
+ } while (0)
+
+
+/* As with BUF_PUSH_2, except for three bytes. */
+#define BUF_PUSH_3(c1, c2, c3) \
+ do { \
+ GET_BUFFER_SPACE (3); \
+ *b++ = (unsigned char) (c1); \
+ *b++ = (unsigned char) (c2); \
+ *b++ = (unsigned char) (c3); \
+ } while (0)
+
+
+/* Store a jump with opcode OP at LOC to location TO. We store a
+ relative address offset by the three bytes the jump itself occupies. */
+#define STORE_JUMP(op, loc, to) \
+ store_op1 (op, loc, (to) - (loc) - 3)
+
+/* Likewise, for a two-argument jump. */
+#define STORE_JUMP2(op, loc, to, arg) \
+ store_op2 (op, loc, (to) - (loc) - 3, arg)
+
+/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
+#define INSERT_JUMP(op, loc, to) \
+ insert_op1 (op, loc, (to) - (loc) - 3, b)
+
+/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
+#define INSERT_JUMP2(op, loc, to, arg) \
+ insert_op2 (op, loc, (to) - (loc) - 3, arg, b)
+
+
+/* This is not an arbitrary limit: the arguments which represent offsets
+ into the pattern are two bytes long. So if 2^16 bytes turns out to
+ be too small, many things would have to change. */
+#define MAX_BUF_SIZE (1L << 16)
+
+
+/* Extend the buffer by twice its current size via realloc and
+ reset the pointers that pointed into the old block to point to the
+ correct places in the new one. If extending the buffer results in it
+ being larger than MAX_BUF_SIZE, then flag memory exhausted. */
+#define EXTEND_BUFFER() \
+ do { \
+ unsigned char *old_buffer = bufp->buffer; \
+ if (bufp->allocated == MAX_BUF_SIZE) \
+ return REG_ESIZE; \
+ bufp->allocated <<= 1; \
+ if (bufp->allocated > MAX_BUF_SIZE) \
+ bufp->allocated = MAX_BUF_SIZE; \
+ bufp->buffer = (unsigned char *) realloc (bufp->buffer, bufp->allocated);\
+ if (bufp->buffer == NULL) \
+ return REG_ESPACE; \
+ /* If the buffer moved, move all the pointers into it. */ \
+ if (old_buffer != bufp->buffer) \
+ { \
+ b = (b - old_buffer) + bufp->buffer; \
+ begalt = (begalt - old_buffer) + bufp->buffer; \
+ if (fixup_alt_jump) \
+ fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\
+ if (laststart) \
+ laststart = (laststart - old_buffer) + bufp->buffer; \
+ if (pending_exact) \
+ pending_exact = (pending_exact - old_buffer) + bufp->buffer; \
+ } \
+ } while (0)
+
+
+/* Since we have one byte reserved for the register number argument to
+ {start,stop}_memory, the maximum number of groups we can report
+ things about is what fits in that byte. */
+#define MAX_REGNUM 255
+
+/* But patterns can have more than `MAX_REGNUM' registers. We just
+ ignore the excess. */
+typedef unsigned regnum_t;
+
+
+/* Macros for the compile stack. */
+
+/* Since offsets can go either forwards or backwards, this type needs to
+ be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
+typedef int pattern_offset_t;
+
+typedef struct
+{
+ pattern_offset_t begalt_offset;
+ pattern_offset_t fixup_alt_jump;
+ pattern_offset_t inner_group_offset;
+ pattern_offset_t laststart_offset;
+ regnum_t regnum;
+} compile_stack_elt_t;
+
+
+typedef struct
+{
+ compile_stack_elt_t *stack;
+ unsigned size;
+ unsigned avail; /* Offset of next open position. */
+} compile_stack_type;
+
+
+#define INIT_COMPILE_STACK_SIZE 32
+
+#define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
+#define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
+
+/* The next available element. */
+#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
+
+
+/* Set the bit for character C in a list. */
+#define SET_LIST_BIT(c) \
+ (b[((unsigned char) (c)) / BYTEWIDTH] \
+ |= 1 << (((unsigned char) c) % BYTEWIDTH))
+
+
+/* Get the next unsigned number in the uncompiled pattern. */
+#define GET_UNSIGNED_NUMBER(num) \
+ { if (p != pend) \
+ { \
+ PATFETCH (c); \
+ while (ISDIGIT (c)) \
+ { \
+ if (num < 0) \
+ num = 0; \
+ num = num * 10 + c - '0'; \
+ if (p == pend) \
+ break; \
+ PATFETCH (c); \
+ } \
+ } \
+ }
+
+#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
+
+#define IS_CHAR_CLASS(string) \
+ (STREQ (string, "alpha") || STREQ (string, "upper") \
+ || STREQ (string, "lower") || STREQ (string, "digit") \
+ || STREQ (string, "alnum") || STREQ (string, "xdigit") \
+ || STREQ (string, "space") || STREQ (string, "print") \
+ || STREQ (string, "punct") || STREQ (string, "graph") \
+ || STREQ (string, "cntrl") || STREQ (string, "blank"))
+
+/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
+ Returns one of error codes defined in `regex.h', or zero for success.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate'
+ fields are set in BUFP on entry.
+
+ If it succeeds, results are put in BUFP (if it returns an error, the
+ contents of BUFP are undefined):
+ `buffer' is the compiled pattern;
+ `syntax' is set to SYNTAX;
+ `used' is set to the length of the compiled pattern;
+ `fastmap_accurate' is zero;
+ `re_nsub' is the number of subexpressions in PATTERN;
+ `not_bol' and `not_eol' are zero;
+
+ The `fastmap' and `newline_anchor' fields are neither
+ examined nor set. */
+
+static reg_errcode_t
+regex_compile (pattern, size, syntax, bufp)
+ const char *pattern;
+ int size;
+ reg_syntax_t syntax;
+ struct re_pattern_buffer *bufp;
+{
+ /* We fetch characters from PATTERN here. Even though PATTERN is
+ `char *' (i.e., signed), we declare these variables as unsigned, so
+ they can be reliably used as array indices. */
+ register unsigned char c, c1;
+
+ /* A random tempory spot in PATTERN. */
+ const char *p1;
+
+ /* Points to the end of the buffer, where we should append. */
+ register unsigned char *b;
+
+ /* Keeps track of unclosed groups. */
+ compile_stack_type compile_stack;
+
+ /* Points to the current (ending) position in the pattern. */
+ const char *p = pattern;
+ const char *pend = pattern + size;
+
+ /* How to translate the characters in the pattern. */
+ char *translate = bufp->translate;
+
+ /* Address of the count-byte of the most recently inserted `exactn'
+ command. This makes it possible to tell if a new exact-match
+ character can be added to that command or if the character requires
+ a new `exactn' command. */
+ unsigned char *pending_exact = 0;
+
+ /* Address of start of the most recently finished expression.
+ This tells, e.g., postfix * where to find the start of its
+ operand. Reset at the beginning of groups and alternatives. */
+ unsigned char *laststart = 0;
+
+ /* Address of beginning of regexp, or inside of last group. */
+ unsigned char *begalt;
+
+ /* Place in the uncompiled pattern (i.e., the {) to
+ which to go back if the interval is invalid. */
+ const char *beg_interval;
+
+ /* Address of the place where a forward jump should go to the end of
+ the containing expression. Each alternative of an `or' -- except the
+ last -- ends with a forward jump of this sort. */
+ unsigned char *fixup_alt_jump = 0;
+
+ /* Counts open-groups as they are encountered. Remembered for the
+ matching close-group on the compile stack, so the same register
+ number is put in the stop_memory as the start_memory. */
+ regnum_t regnum = 0;
+
+#ifdef DEBUG
+ DEBUG_PRINT1 ("\nCompiling pattern: ");
+ if (debug)
+ {
+ unsigned debug_count;
+
+ for (debug_count = 0; debug_count < size; debug_count++)
+ printchar (pattern[debug_count]);
+ putchar ('\n');
+ }
+#endif /* DEBUG */
+
+ /* Initialize the compile stack. */
+ compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
+ if (compile_stack.stack == NULL)
+ return REG_ESPACE;
+
+ compile_stack.size = INIT_COMPILE_STACK_SIZE;
+ compile_stack.avail = 0;
+
+ /* Initialize the pattern buffer. */
+ bufp->syntax = syntax;
+ bufp->fastmap_accurate = 0;
+ bufp->not_bol = bufp->not_eol = 0;
+
+ /* Set `used' to zero, so that if we return an error, the pattern
+ printer (for debugging) will think there's no pattern. We reset it
+ at the end. */
+ bufp->used = 0;
+
+ /* Always count groups, whether or not bufp->no_sub is set. */
+ bufp->re_nsub = 0;
+
+#if !defined (emacs) && !defined (SYNTAX_TABLE)
+ /* Initialize the syntax table. */
+ init_syntax_once ();
+#endif
+
+ if (bufp->allocated == 0)
+ {
+ if (bufp->buffer)
+ { /* If zero allocated, but buffer is non-null, try to realloc
+ enough space. This loses if buffer's address is bogus, but
+ that is the user's responsibility. */
+ RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
+ }
+ else
+ { /* Caller did not allocate a buffer. Do it for them. */
+ bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
+ }
+ if (!bufp->buffer) return REG_ESPACE;
+
+ bufp->allocated = INIT_BUF_SIZE;
+ }
+
+ begalt = b = bufp->buffer;
+
+ /* Loop through the uncompiled pattern until we're at the end. */
+ while (p != pend)
+ {
+ PATFETCH (c);
+
+ switch (c)
+ {
+ case '^':
+ {
+ if ( /* If at start of pattern, it's an operator. */
+ p == pattern + 1
+ /* If context independent, it's an operator. */
+ || syntax & RE_CONTEXT_INDEP_ANCHORS
+ /* Otherwise, depends on what's come before. */
+ || at_begline_loc_p (pattern, p, syntax))
+ BUF_PUSH (begline);
+ else
+ goto normal_char;
+ }
+ break;
+
+
+ case '$':
+ {
+ if ( /* If at end of pattern, it's an operator. */
+ p == pend
+ /* If context independent, it's an operator. */
+ || syntax & RE_CONTEXT_INDEP_ANCHORS
+ /* Otherwise, depends on what's next. */
+ || at_endline_loc_p (p, pend, syntax))
+ BUF_PUSH (endline);
+ else
+ goto normal_char;
+ }
+ break;
+
+
+ case '+':
+ case '?':
+ if ((syntax & RE_BK_PLUS_QM)
+ || (syntax & RE_LIMITED_OPS))
+ goto normal_char;
+ handle_plus:
+ case '*':
+ /* If there is no previous pattern... */
+ if (!laststart)
+ {
+ if (syntax & RE_CONTEXT_INVALID_OPS)
+ return REG_BADRPT;
+ else if (!(syntax & RE_CONTEXT_INDEP_OPS))
+ goto normal_char;
+ }
+
+ {
+ /* Are we optimizing this jump? */
+ boolean keep_string_p = false;
+
+ /* 1 means zero (many) matches is allowed. */
+ char zero_times_ok = 0, many_times_ok = 0;
+
+ /* If there is a sequence of repetition chars, collapse it
+ down to just one (the right one). We can't combine
+ interval operators with these because of, e.g., `a{2}*',
+ which should only match an even number of `a's. */
+
+ for (;;)
+ {
+ zero_times_ok |= c != '+';
+ many_times_ok |= c != '?';
+
+ if (p == pend)
+ break;
+
+ PATFETCH (c);
+
+ if (c == '*'
+ || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
+ ;
+
+ else if (syntax & RE_BK_PLUS_QM && c == '\\')
+ {
+ if (p == pend) return REG_EESCAPE;
+
+ PATFETCH (c1);
+ if (!(c1 == '+' || c1 == '?'))
+ {
+ PATUNFETCH;
+ PATUNFETCH;
+ break;
+ }
+
+ c = c1;
+ }
+ else
+ {
+ PATUNFETCH;
+ break;
+ }
+
+ /* If we get here, we found another repeat character. */
+ }
+
+ /* Star, etc. applied to an empty pattern is equivalent
+ to an empty pattern. */
+ if (!laststart)
+ break;
+
+ /* Now we know whether or not zero matches is allowed
+ and also whether or not two or more matches is allowed. */
+ if (many_times_ok)
+ { /* More than one repetition is allowed, so put in at the
+ end a backward relative jump from `b' to before the next
+ jump we're going to put in below (which jumps from
+ laststart to after this jump).
+
+ But if we are at the `*' in the exact sequence `.*\n',
+ insert an unconditional jump backwards to the .,
+ instead of the beginning of the loop. This way we only
+ push a failure point once, instead of every time
+ through the loop. */
+ assert (p - 1 > pattern);
+
+ /* Allocate the space for the jump. */
+ GET_BUFFER_SPACE (3);
+
+ /* We know we are not at the first character of the pattern,
+ because laststart was nonzero. And we've already
+ incremented `p', by the way, to be the character after
+ the `*'. Do we have to do something analogous here
+ for null bytes, because of RE_DOT_NOT_NULL? */
+ if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
+ && zero_times_ok
+ && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
+ && !(syntax & RE_DOT_NEWLINE))
+ { /* We have .*\n. */
+ STORE_JUMP (jump, b, laststart);
+ keep_string_p = true;
+ }
+ else
+ /* Anything else. */
+ STORE_JUMP (maybe_pop_jump, b, laststart - 3);
+
+ /* We've added more stuff to the buffer. */
+ b += 3;
+ }
+
+ /* On failure, jump from laststart to b + 3, which will be the
+ end of the buffer after this jump is inserted. */
+ GET_BUFFER_SPACE (3);
+ INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
+ : on_failure_jump,
+ laststart, b + 3);
+ pending_exact = 0;
+ b += 3;
+
+ if (!zero_times_ok)
+ {
+ /* At least one repetition is required, so insert a
+ `dummy_failure_jump' before the initial
+ `on_failure_jump' instruction of the loop. This
+ effects a skip over that instruction the first time
+ we hit that loop. */
+ GET_BUFFER_SPACE (3);
+ INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6);
+ b += 3;
+ }
+ }
+ break;
+
+
+ case '.':
+ laststart = b;
+ BUF_PUSH (anychar);
+ break;
+
+
+ case '[':
+ {
+ boolean had_char_class = false;
+
+ if (p == pend) return REG_EBRACK;
+
+ /* Ensure that we have enough space to push a charset: the
+ opcode, the length count, and the bitset; 34 bytes in all. */
+ GET_BUFFER_SPACE (34);
+
+ laststart = b;
+
+ /* We test `*p == '^' twice, instead of using an if
+ statement, so we only need one BUF_PUSH. */
+ BUF_PUSH (*p == '^' ? charset_not : charset);
+ if (*p == '^')
+ p++;
+
+ /* Remember the first position in the bracket expression. */
+ p1 = p;
+
+ /* Push the number of bytes in the bitmap. */
+ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
+
+ /* Clear the whole map. */
+ bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
+
+ /* charset_not matches newline according to a syntax bit. */
+ if ((re_opcode_t) b[-2] == charset_not
+ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
+ SET_LIST_BIT ('\n');
+
+ /* Read in characters and ranges, setting map bits. */
+ for (;;)
+ {
+ if (p == pend) return REG_EBRACK;
+
+ PATFETCH (c);
+
+ /* \ might escape characters inside [...] and [^...]. */
+ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
+ {
+ if (p == pend) return REG_EESCAPE;
+
+ PATFETCH (c1);
+ SET_LIST_BIT (c1);
+ continue;
+ }
+
+ /* Could be the end of the bracket expression. If it's
+ not (i.e., when the bracket expression is `[]' so
+ far), the ']' character bit gets set way below. */
+ if (c == ']' && p != p1 + 1)
+ break;
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character class. */
+ if (had_char_class && c == '-' && *p != ']')
+ return REG_ERANGE;
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character: if this is a hyphen not at the
+ beginning or the end of a list, then it's the range
+ operator. */
+ if (c == '-'
+ && !(p - 2 >= pattern && p[-2] == '[')
+ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
+ && *p != ']')
+ {
+ reg_errcode_t ret
+ = compile_range (&p, pend, translate, syntax, b);
+ if (ret != REG_NOERROR) return ret;
+ }
+
+ else if (p[0] == '-' && p[1] != ']')
+ { /* This handles ranges made up of characters only. */
+ reg_errcode_t ret;
+
+ /* Move past the `-'. */
+ PATFETCH (c1);
+
+ ret = compile_range (&p, pend, translate, syntax, b);
+ if (ret != REG_NOERROR) return ret;
+ }
+
+ /* See if we're at the beginning of a possible character
+ class. */
+
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
+ { /* Leave room for the null. */
+ char str[CHAR_CLASS_MAX_LENGTH + 1];
+
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[:'. */
+ if (p == pend) return REG_EBRACK;
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if (c == ':' || c == ']' || p == pend
+ || c1 == CHAR_CLASS_MAX_LENGTH)
+ break;
+ str[c1++] = c;
+ }
+ str[c1] = '\0';
+
+ /* If isn't a word bracketed by `[:' and:`]':
+ undo the ending character, the letters, and leave
+ the leading `:' and `[' (but set bits for them). */
+ if (c == ':' && *p == ']')
+ {
+ int ch;
+ boolean is_alnum = STREQ (str, "alnum");
+ boolean is_alpha = STREQ (str, "alpha");
+ boolean is_blank = STREQ (str, "blank");
+ boolean is_cntrl = STREQ (str, "cntrl");
+ boolean is_digit = STREQ (str, "digit");
+ boolean is_graph = STREQ (str, "graph");
+ boolean is_lower = STREQ (str, "lower");
+ boolean is_print = STREQ (str, "print");
+ boolean is_punct = STREQ (str, "punct");
+ boolean is_space = STREQ (str, "space");
+ boolean is_upper = STREQ (str, "upper");
+ boolean is_xdigit = STREQ (str, "xdigit");
+
+ if (!IS_CHAR_CLASS (str)) return REG_ECTYPE;
+
+ /* Throw away the ] at the end of the character
+ class. */
+ PATFETCH (c);
+
+ if (p == pend) return REG_EBRACK;
+
+ for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
+ {
+ if ( (is_alnum && ISALNUM (ch))
+ || (is_alpha && ISALPHA (ch))
+ || (is_blank && ISBLANK (ch))
+ || (is_cntrl && ISCNTRL (ch))
+ || (is_digit && ISDIGIT (ch))
+ || (is_graph && ISGRAPH (ch))
+ || (is_lower && ISLOWER (ch))
+ || (is_print && ISPRINT (ch))
+ || (is_punct && ISPUNCT (ch))
+ || (is_space && ISSPACE (ch))
+ || (is_upper && ISUPPER (ch))
+ || (is_xdigit && ISXDIGIT (ch)))
+ SET_LIST_BIT (ch);
+ }
+ had_char_class = true;
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ SET_LIST_BIT ('[');
+ SET_LIST_BIT (':');
+ had_char_class = false;
+ }
+ }
+ else
+ {
+ had_char_class = false;
+ SET_LIST_BIT (c);
+ }
+ }
+
+ /* Discard any (non)matching list bytes that are all 0 at the
+ end of the map. Decrease the map-length byte too. */
+ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
+ b[-1]--;
+ b += b[-1];
+ }
+ break;
+
+
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ goto handle_open;
+ else
+ goto normal_char;
+
+
+ case ')':
+ if (syntax & RE_NO_BK_PARENS)
+ goto handle_close;
+ else
+ goto normal_char;
+
+
+ case '\n':
+ if (syntax & RE_NEWLINE_ALT)
+ goto handle_alt;
+ else
+ goto normal_char;
+
+
+ case '|':
+ if (syntax & RE_NO_BK_VBAR)
+ goto handle_alt;
+ else
+ goto normal_char;
+
+
+ case '{':
+ if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
+ goto handle_interval;
+ else
+ goto normal_char;
+
+
+ case '\\':
+ if (p == pend) return REG_EESCAPE;
+
+ /* Do not translate the character after the \, so that we can
+ distinguish, e.g., \B from \b, even if we normally would
+ translate, e.g., B to b. */
+ PATFETCH_RAW (c);
+
+ switch (c)
+ {
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ goto normal_backslash;
+
+ handle_open:
+ bufp->re_nsub++;
+ regnum++;
+
+ if (COMPILE_STACK_FULL)
+ {
+ RETALLOC (compile_stack.stack, compile_stack.size << 1,
+ compile_stack_elt_t);
+ if (compile_stack.stack == NULL) return REG_ESPACE;
+
+ compile_stack.size <<= 1;
+ }
+
+ /* These are the values to restore when we hit end of this
+ group. They are all relative offsets, so that if the
+ whole pattern moves because of realloc, they will still
+ be valid. */
+ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
+ COMPILE_STACK_TOP.fixup_alt_jump
+ = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
+ COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer;
+ COMPILE_STACK_TOP.regnum = regnum;
+
+ /* We will eventually replace the 0 with the number of
+ groups inner to this one. But do not push a
+ start_memory for groups beyond the last one we can
+ represent in the compiled pattern. */
+ if (regnum <= MAX_REGNUM)
+ {
+ COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2;
+ BUF_PUSH_3 (start_memory, regnum, 0);
+ }
+
+ compile_stack.avail++;
+
+ fixup_alt_jump = 0;
+ laststart = 0;
+ begalt = b;
+ /* If we've reached MAX_REGNUM groups, then this open
+ won't actually generate any code, so we'll have to
+ clear pending_exact explicitly. */
+ pending_exact = 0;
+ break;
+
+
+ case ')':
+ if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
+
+ if (COMPILE_STACK_EMPTY)
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ goto normal_backslash;
+ else
+ return REG_ERPAREN;
+
+ handle_close:
+ if (fixup_alt_jump)
+ { /* Push a dummy failure point at the end of the
+ alternative for a possible future
+ `pop_failure_jump' to pop. See comments at
+ `push_dummy_failure' in `re_match_2'. */
+ BUF_PUSH (push_dummy_failure);
+
+ /* We allocated space for this jump when we assigned
+ to `fixup_alt_jump', in the `handle_alt' case below. */
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
+ }
+
+ /* See similar code for backslashed left paren above. */
+ if (COMPILE_STACK_EMPTY)
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ goto normal_char;
+ else
+ return REG_ERPAREN;
+
+ /* Since we just checked for an empty stack above, this
+ ``can't happen''. */
+ assert (compile_stack.avail != 0);
+ {
+ /* We don't just want to restore into `regnum', because
+ later groups should continue to be numbered higher,
+ as in `(ab)c(de)' -- the second group is #2. */
+ regnum_t this_group_regnum;
+
+ compile_stack.avail--;
+ begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
+ fixup_alt_jump
+ = COMPILE_STACK_TOP.fixup_alt_jump
+ ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
+ : 0;
+ laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
+ this_group_regnum = COMPILE_STACK_TOP.regnum;
+ /* If we've reached MAX_REGNUM groups, then this open
+ won't actually generate any code, so we'll have to
+ clear pending_exact explicitly. */
+ pending_exact = 0;
+
+ /* We're at the end of the group, so now we know how many
+ groups were inside this one. */
+ if (this_group_regnum <= MAX_REGNUM)
+ {
+ unsigned char *inner_group_loc
+ = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
+
+ *inner_group_loc = regnum - this_group_regnum;
+ BUF_PUSH_3 (stop_memory, this_group_regnum,
+ regnum - this_group_regnum);
+ }
+ }
+ break;
+
+
+ case '|': /* `\|'. */
+ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
+ goto normal_backslash;
+ handle_alt:
+ if (syntax & RE_LIMITED_OPS)
+ goto normal_char;
+
+ /* Insert before the previous alternative a jump which
+ jumps to this alternative if the former fails. */
+ GET_BUFFER_SPACE (3);
+ INSERT_JUMP (on_failure_jump, begalt, b + 6);
+ pending_exact = 0;
+ b += 3;
+
+ /* The alternative before this one has a jump after it
+ which gets executed if it gets matched. Adjust that
+ jump so it will jump to this alternative's analogous
+ jump (put in below, which in turn will jump to the next
+ (if any) alternative's such jump, etc.). The last such
+ jump jumps to the correct final destination. A picture:
+ _____ _____
+ | | | |
+ | v | v
+ a | b | c
+
+ If we are at `b', then fixup_alt_jump right now points to a
+ three-byte space after `a'. We'll put in the jump, set
+ fixup_alt_jump to right after `b', and leave behind three
+ bytes which we'll fill in when we get to after `c'. */
+
+ if (fixup_alt_jump)
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+ /* Mark and leave space for a jump after this alternative,
+ to be filled in later either by next alternative or
+ when know we're at the end of a series of alternatives. */
+ fixup_alt_jump = b;
+ GET_BUFFER_SPACE (3);
+ b += 3;
+
+ laststart = 0;
+ begalt = b;
+ break;
+
+
+ case '{':
+ /* If \{ is a literal. */
+ if (!(syntax & RE_INTERVALS)
+ /* If we're at `\{' and it's not the open-interval
+ operator. */
+ || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+ || (p - 2 == pattern && p == pend))
+ goto normal_backslash;
+
+ handle_interval:
+ {
+ /* If got here, then the syntax allows intervals. */
+
+ /* At least (most) this many matches must be made. */
+ int lower_bound = -1, upper_bound = -1;
+
+ beg_interval = p - 1;
+
+ if (p == pend)
+ {
+ if (syntax & RE_NO_BK_BRACES)
+ goto unfetch_interval;
+ else
+ return REG_EBRACE;
+ }
+
+ GET_UNSIGNED_NUMBER (lower_bound);
+
+ if (c == ',')
+ {
+ GET_UNSIGNED_NUMBER (upper_bound);
+ if (upper_bound < 0) upper_bound = RE_DUP_MAX;
+ }
+ else
+ /* Interval such as `{1}' => match exactly once. */
+ upper_bound = lower_bound;
+
+ if (lower_bound < 0 || upper_bound > RE_DUP_MAX
+ || lower_bound > upper_bound)
+ {
+ if (syntax & RE_NO_BK_BRACES)
+ goto unfetch_interval;
+ else
+ return REG_BADBR;
+ }
+
+ if (!(syntax & RE_NO_BK_BRACES))
+ {
+ if (c != '\\') return REG_EBRACE;
+
+ PATFETCH (c);
+ }
+
+ if (c != '}')
+ {
+ if (syntax & RE_NO_BK_BRACES)
+ goto unfetch_interval;
+ else
+ return REG_BADBR;
+ }
+
+ /* We just parsed a valid interval. */
+
+ /* If it's invalid to have no preceding re. */
+ if (!laststart)
+ {
+ if (syntax & RE_CONTEXT_INVALID_OPS)
+ return REG_BADRPT;
+ else if (syntax & RE_CONTEXT_INDEP_OPS)
+ laststart = b;
+ else
+ goto unfetch_interval;
+ }
+
+ /* If the upper bound is zero, don't want to succeed at
+ all; jump from `laststart' to `b + 3', which will be
+ the end of the buffer after we insert the jump. */
+ if (upper_bound == 0)
+ {
+ GET_BUFFER_SPACE (3);
+ INSERT_JUMP (jump, laststart, b + 3);
+ b += 3;
+ }
+
+ /* Otherwise, we have a nontrivial interval. When
+ we're all done, the pattern will look like:
+ set_number_at <jump count> <upper bound>
+ set_number_at <succeed_n count> <lower bound>
+ succeed_n <after jump addr> <succed_n count>
+ <body of loop>
+ jump_n <succeed_n addr> <jump count>
+ (The upper bound and `jump_n' are omitted if
+ `upper_bound' is 1, though.) */
+ else
+ { /* If the upper bound is > 1, we need to insert
+ more at the end of the loop. */
+ unsigned nbytes = 10 + (upper_bound > 1) * 10;
+
+ GET_BUFFER_SPACE (nbytes);
+
+ /* Initialize lower bound of the `succeed_n', even
+ though it will be set during matching by its
+ attendant `set_number_at' (inserted next),
+ because `re_compile_fastmap' needs to know.
+ Jump to the `jump_n' we might insert below. */
+ INSERT_JUMP2 (succeed_n, laststart,
+ b + 5 + (upper_bound > 1) * 5,
+ lower_bound);
+ b += 5;
+
+ /* Code to initialize the lower bound. Insert
+ before the `succeed_n'. The `5' is the last two
+ bytes of this `set_number_at', plus 3 bytes of
+ the following `succeed_n'. */
+ insert_op2 (set_number_at, laststart, 5, lower_bound, b);
+ b += 5;
+
+ if (upper_bound > 1)
+ { /* More than one repetition is allowed, so
+ append a backward jump to the `succeed_n'
+ that starts this interval.
+
+ When we've reached this during matching,
+ we'll have matched the interval once, so
+ jump back only `upper_bound - 1' times. */
+ STORE_JUMP2 (jump_n, b, laststart + 5,
+ upper_bound - 1);
+ b += 5;
+
+ /* The location we want to set is the second
+ parameter of the `jump_n'; that is `b-2' as
+ an absolute address. `laststart' will be
+ the `set_number_at' we're about to insert;
+ `laststart+3' the number to set, the source
+ for the relative address. But we are
+ inserting into the middle of the pattern --
+ so everything is getting moved up by 5.
+ Conclusion: (b - 2) - (laststart + 3) + 5,
+ i.e., b - laststart.
+
+ We insert this at the beginning of the loop
+ so that if we fail during matching, we'll
+ reinitialize the bounds. */
+ insert_op2 (set_number_at, laststart, b - laststart,
+ upper_bound - 1, b);
+ b += 5;
+ }
+ }
+ pending_exact = 0;
+ beg_interval = NULL;
+ }
+ break;
+
+ unfetch_interval:
+ /* If an invalid interval, match the characters as literals. */
+ assert (beg_interval);
+ p = beg_interval;
+ beg_interval = NULL;
+
+ /* normal_char and normal_backslash need `c'. */
+ PATFETCH (c);
+
+ if (!(syntax & RE_NO_BK_BRACES))
+ {
+ if (p > pattern && p[-1] == '\\')
+ goto normal_backslash;
+ }
+ goto normal_char;
+
+#ifdef emacs
+ /* There is no way to specify the before_dot and after_dot
+ operators. rms says this is ok. --karl */
+ case '=':
+ BUF_PUSH (at_dot);
+ break;
+
+ case 's':
+ laststart = b;
+ PATFETCH (c);
+ BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
+ break;
+
+ case 'S':
+ laststart = b;
+ PATFETCH (c);
+ BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
+ break;
+#endif /* emacs */
+
+
+ case 'w':
+ laststart = b;
+ BUF_PUSH (wordchar);
+ break;
+
+
+ case 'W':
+ laststart = b;
+ BUF_PUSH (notwordchar);
+ break;
+
+
+ case '<':
+ BUF_PUSH (wordbeg);
+ break;
+
+ case '>':
+ BUF_PUSH (wordend);
+ break;
+
+ case 'b':
+ BUF_PUSH (wordbound);
+ break;
+
+ case 'B':
+ BUF_PUSH (notwordbound);
+ break;
+
+ case '`':
+ BUF_PUSH (begbuf);
+ break;
+
+ case '\'':
+ BUF_PUSH (endbuf);
+ break;
+
+ case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ if (syntax & RE_NO_BK_REFS)
+ goto normal_char;
+
+ c1 = c - '0';
+
+ if (c1 > regnum)
+ return REG_ESUBREG;
+
+ /* Can't back reference to a subexpression if inside of it. */
+ if (group_in_compile_stack (compile_stack, c1))
+ goto normal_char;
+
+ laststart = b;
+ BUF_PUSH_2 (duplicate, c1);
+ break;
+
+
+ case '+':
+ case '?':
+ if (syntax & RE_BK_PLUS_QM)
+ goto handle_plus;
+ else
+ goto normal_backslash;
+
+ default:
+ normal_backslash:
+ /* You might think it would be useful for \ to mean
+ not to translate; but if we don't translate it
+ it will never match anything. */
+ c = TRANSLATE (c);
+ goto normal_char;
+ }
+ break;
+
+
+ default:
+ /* Expects the character in `c'. */
+ normal_char:
+ /* If no exactn currently being built. */
+ if (!pending_exact
+
+ /* If last exactn not at current position. */
+ || pending_exact + *pending_exact + 1 != b
+
+ /* We have only one byte following the exactn for the count. */
+ || *pending_exact == (1 << BYTEWIDTH) - 1
+
+ /* If followed by a repetition operator. */
+ || *p == '*' || *p == '^'
+ || ((syntax & RE_BK_PLUS_QM)
+ ? *p == '\\' && (p[1] == '+' || p[1] == '?')
+ : (*p == '+' || *p == '?'))
+ || ((syntax & RE_INTERVALS)
+ && ((syntax & RE_NO_BK_BRACES)
+ ? *p == '{'
+ : (p[0] == '\\' && p[1] == '{'))))
+ {
+ /* Start building a new exactn. */
+
+ laststart = b;
+
+ BUF_PUSH_2 (exactn, 0);
+ pending_exact = b - 1;
+ }
+
+ BUF_PUSH (c);
+ (*pending_exact)++;
+ break;
+ } /* switch (c) */
+ } /* while p != pend */
+
+
+ /* Through the pattern now. */
+
+ if (fixup_alt_jump)
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+ if (!COMPILE_STACK_EMPTY)
+ return REG_EPAREN;
+
+ free (compile_stack.stack);
+
+ /* We have succeeded; set the length of the buffer. */
+ bufp->used = b - bufp->buffer;
+
+#ifdef DEBUG
+ if (debug)
+ {
+ DEBUG_PRINT1 ("\nCompiled pattern: ");
+ print_compiled_pattern (bufp);
+ }
+#endif /* DEBUG */
+
+ return REG_NOERROR;
+} /* regex_compile */
+
+/* Subroutines for `regex_compile'. */
+
+/* Store OP at LOC followed by two-byte integer parameter ARG. */
+
+static void
+store_op1 (op, loc, arg)
+ re_opcode_t op;
+ unsigned char *loc;
+ int arg;
+{
+ *loc = (unsigned char) op;
+ STORE_NUMBER (loc + 1, arg);
+}
+
+
+/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
+
+static void
+store_op2 (op, loc, arg1, arg2)
+ re_opcode_t op;
+ unsigned char *loc;
+ int arg1, arg2;
+{
+ *loc = (unsigned char) op;
+ STORE_NUMBER (loc + 1, arg1);
+ STORE_NUMBER (loc + 3, arg2);
+}
+
+
+/* Copy the bytes from LOC to END to open up three bytes of space at LOC
+ for OP followed by two-byte integer parameter ARG. */
+
+static void
+insert_op1 (op, loc, arg, end)
+ re_opcode_t op;
+ unsigned char *loc;
+ int arg;
+ unsigned char *end;
+{
+ register unsigned char *pfrom = end;
+ register unsigned char *pto = end + 3;
+
+ while (pfrom != loc)
+ *--pto = *--pfrom;
+
+ store_op1 (op, loc, arg);
+}
+
+
+/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
+
+static void
+insert_op2 (op, loc, arg1, arg2, end)
+ re_opcode_t op;
+ unsigned char *loc;
+ int arg1, arg2;
+ unsigned char *end;
+{
+ register unsigned char *pfrom = end;
+ register unsigned char *pto = end + 5;
+
+ while (pfrom != loc)
+ *--pto = *--pfrom;
+
+ store_op2 (op, loc, arg1, arg2);
+}
+
+
+/* P points to just after a ^ in PATTERN. Return true if that ^ comes
+ after an alternative or a begin-subexpression. We assume there is at
+ least one character before the ^. */
+
+static boolean
+at_begline_loc_p (pattern, p, syntax)
+ const char *pattern, *p;
+ reg_syntax_t syntax;
+{
+ const char *prev = p - 2;
+ boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
+
+ return
+ /* After a subexpression? */
+ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
+ /* After an alternative? */
+ || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
+}
+
+
+/* The dual of at_begline_loc_p. This one is for $. We assume there is
+ at least one character after the $, i.e., `P < PEND'. */
+
+static boolean
+at_endline_loc_p (p, pend, syntax)
+ const char *p, *pend;
+ int syntax;
+{
+ const char *next = p;
+ boolean next_backslash = *next == '\\';
+ const char *next_next = p + 1 < pend ? p + 1 : NULL;
+
+ return
+ /* Before a subexpression? */
+ (syntax & RE_NO_BK_PARENS ? *next == ')'
+ : next_backslash && next_next && *next_next == ')')
+ /* Before an alternative? */
+ || (syntax & RE_NO_BK_VBAR ? *next == '|'
+ : next_backslash && next_next && *next_next == '|');
+}
+
+
+/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
+ false if it's not. */
+
+static boolean
+group_in_compile_stack (compile_stack, regnum)
+ compile_stack_type compile_stack;
+ regnum_t regnum;
+{
+ int this_element;
+
+ for (this_element = compile_stack.avail - 1;
+ this_element >= 0;
+ this_element--)
+ if (compile_stack.stack[this_element].regnum == regnum)
+ return true;
+
+ return false;
+}
+
+
+/* Read the ending character of a range (in a bracket expression) from the
+ uncompiled pattern *P_PTR (which ends at PEND). We assume the
+ starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
+ Then we set the translation of all bits between the starting and
+ ending characters (inclusive) in the compiled pattern B.
+
+ Return an error code.
+
+ We use these short variable names so we can use the same macros as
+ `regex_compile' itself. */
+
+static reg_errcode_t
+compile_range (p_ptr, pend, translate, syntax, b)
+ const char **p_ptr, *pend;
+ char *translate;
+ reg_syntax_t syntax;
+ unsigned char *b;
+{
+ unsigned this_char;
+
+ const char *p = *p_ptr;
+ int range_start, range_end;
+
+ if (p == pend)
+ return REG_ERANGE;
+
+ /* Even though the pattern is a signed `char *', we need to fetch
+ with unsigned char *'s; if the high bit of the pattern character
+ is set, the range endpoints will be negative if we fetch using a
+ signed char *.
+
+ We also want to fetch the endpoints without translating them; the
+ appropriate translation is done in the bit-setting loop below. */
+ range_start = ((unsigned char *) p)[-2];
+ range_end = ((unsigned char *) p)[0];
+
+ /* Have to increment the pointer into the pattern string, so the
+ caller isn't still at the ending character. */
+ (*p_ptr)++;
+
+ /* If the start is after the end, the range is empty. */
+ if (range_start > range_end)
+ return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
+
+ /* Here we see why `this_char' has to be larger than an `unsigned
+ char' -- the range is inclusive, so if `range_end' == 0xff
+ (assuming 8-bit characters), we would otherwise go into an infinite
+ loop, since all characters <= 0xff. */
+ for (this_char = range_start; this_char <= range_end; this_char++)
+ {
+ SET_LIST_BIT (TRANSLATE (this_char));
+ }
+
+ return REG_NOERROR;
+}
+
+/* Failure stack declarations and macros; both re_compile_fastmap and
+ re_match_2 use a failure stack. These have to be macros because of
+ REGEX_ALLOCATE. */
+
+
+/* Number of failure points for which to initially allocate space
+ when matching. If this number is exceeded, we allocate more
+ space, so it is not a hard limit. */
+#ifndef INIT_FAILURE_ALLOC
+#define INIT_FAILURE_ALLOC 5
+#endif
+
+/* Roughly the maximum number of failure points on the stack. Would be
+ exactly that if always used MAX_FAILURE_SPACE each time we failed.
+ This is a variable only so users of regex can assign to it; we never
+ change it ourselves. */
+int re_max_failures = 2000;
+
+typedef const unsigned char *fail_stack_elt_t;
+
+typedef struct
+{
+ fail_stack_elt_t *stack;
+ unsigned size;
+ unsigned avail; /* Offset of next open position. */
+} fail_stack_type;
+
+#define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
+#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
+#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
+#define FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail])
+
+
+/* Initialize `fail_stack'. Do `return -2' if the alloc fails. */
+
+#define INIT_FAIL_STACK() \
+ do { \
+ fail_stack.stack = (fail_stack_elt_t *) \
+ REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \
+ \
+ if (fail_stack.stack == NULL) \
+ return -2; \
+ \
+ fail_stack.size = INIT_FAILURE_ALLOC; \
+ fail_stack.avail = 0; \
+ } while (0)
+
+
+/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
+
+ Return 1 if succeeds, and 0 if either ran out of memory
+ allocating space for it or it was already too large.
+
+ REGEX_REALLOCATE requires `destination' be declared. */
+
+#define DOUBLE_FAIL_STACK(fail_stack) \
+ ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS \
+ ? 0 \
+ : ((fail_stack).stack = (fail_stack_elt_t *) \
+ REGEX_REALLOCATE ((fail_stack).stack, \
+ (fail_stack).size * sizeof (fail_stack_elt_t), \
+ ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \
+ \
+ (fail_stack).stack == NULL \
+ ? 0 \
+ : ((fail_stack).size <<= 1, \
+ 1)))
+
+
+/* Push PATTERN_OP on FAIL_STACK.
+
+ Return 1 if was able to do so and 0 if ran out of memory allocating
+ space to do so. */
+#define PUSH_PATTERN_OP(pattern_op, fail_stack) \
+ ((FAIL_STACK_FULL () \
+ && !DOUBLE_FAIL_STACK (fail_stack)) \
+ ? 0 \
+ : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \
+ 1))
+
+/* This pushes an item onto the failure stack. Must be a four-byte
+ value. Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+#define PUSH_FAILURE_ITEM(item) \
+ fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
+
+/* The complement operation. Assumes `fail_stack' is nonempty. */
+#define POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail]
+
+/* Used to omit pushing failure point id's when we're not debugging. */
+#ifdef DEBUG
+#define DEBUG_PUSH PUSH_FAILURE_ITEM
+#define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_ITEM ()
+#else
+#define DEBUG_PUSH(item)
+#define DEBUG_POP(item_addr)
+#endif
+
+
+/* Push the information about the state we will need
+ if we ever fail back to it.
+
+ Requires variables fail_stack, regstart, regend, reg_info, and
+ num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be
+ declared.
+
+ Does `return FAILURE_CODE' if runs out of memory. */
+
+#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
+ do { \
+ char *destination; \
+ /* Must be int, so when we don't save any registers, the arithmetic \
+ of 0 + -1 isn't done as unsigned. */ \
+ int this_reg; \
+ \
+ DEBUG_STATEMENT (failure_id++); \
+ DEBUG_STATEMENT (nfailure_points_pushed++); \
+ DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
+ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
+ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
+ \
+ DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \
+ DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
+ \
+ /* Ensure we have enough space allocated for what we will push. */ \
+ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
+ { \
+ if (!DOUBLE_FAIL_STACK (fail_stack)) \
+ return failure_code; \
+ \
+ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
+ (fail_stack).size); \
+ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
+ } \
+ \
+ /* Push the info, starting with the registers. */ \
+ DEBUG_PRINT1 ("\n"); \
+ \
+ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
+ this_reg++) \
+ { \
+ DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \
+ DEBUG_STATEMENT (num_regs_pushed++); \
+ \
+ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
+ PUSH_FAILURE_ITEM (regstart[this_reg]); \
+ \
+ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
+ PUSH_FAILURE_ITEM (regend[this_reg]); \
+ \
+ DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \
+ DEBUG_PRINT2 (" match_null=%d", \
+ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" matched_something=%d", \
+ MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" ever_matched=%d", \
+ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT1 ("\n"); \
+ PUSH_FAILURE_ITEM (reg_info[this_reg].word); \
+ } \
+ \
+ DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\
+ PUSH_FAILURE_ITEM (lowest_active_reg); \
+ \
+ DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\
+ PUSH_FAILURE_ITEM (highest_active_reg); \
+ \
+ DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
+ PUSH_FAILURE_ITEM (pattern_place); \
+ \
+ DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \
+ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
+ size2); \
+ DEBUG_PRINT1 ("'\n"); \
+ PUSH_FAILURE_ITEM (string_place); \
+ \
+ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
+ DEBUG_PUSH (failure_id); \
+ } while (0)
+
+/* This is the number of items that are pushed and popped on the stack
+ for each register. */
+#define NUM_REG_ITEMS 3
+
+/* Individual items aside from the registers. */
+#ifdef DEBUG
+#define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
+#else
+#define NUM_NONREG_ITEMS 4
+#endif
+
+/* We push at most this many items on the stack. */
+#define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
+
+/* We actually push this many items. */
+#define NUM_FAILURE_ITEMS \
+ ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \
+ + NUM_NONREG_ITEMS)
+
+/* How many items can still be added to the stack without overflowing it. */
+#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
+
+
+/* Pops what PUSH_FAIL_STACK pushes.
+
+ We restore into the parameters, all of which should be lvalues:
+ STR -- the saved data position.
+ PAT -- the saved pattern position.
+ LOW_REG, HIGH_REG -- the highest and lowest active registers.
+ REGSTART, REGEND -- arrays of string positions.
+ REG_INFO -- array of information about each subexpression.
+
+ Also assumes the variables `fail_stack' and (if debugging), `bufp',
+ `pend', `string1', `size1', `string2', and `size2'. */
+
+#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
+{ \
+ DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \
+ int this_reg; \
+ const unsigned char *string_temp; \
+ \
+ assert (!FAIL_STACK_EMPTY ()); \
+ \
+ /* Remove failure points and point to how many regs pushed. */ \
+ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
+ DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
+ DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
+ \
+ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
+ \
+ DEBUG_POP (&failure_id); \
+ DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
+ \
+ /* If the saved string location is NULL, it came from an \
+ on_failure_keep_string_jump opcode, and we want to throw away the \
+ saved NULL, thus retaining our current position in the string. */ \
+ string_temp = POP_FAILURE_ITEM (); \
+ if (string_temp != NULL) \
+ str = (const char *) string_temp; \
+ \
+ DEBUG_PRINT2 (" Popping string 0x%x: `", str); \
+ DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
+ DEBUG_PRINT1 ("'\n"); \
+ \
+ pat = (unsigned char *) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
+ \
+ /* Restore register info. */ \
+ high_reg = (unsigned) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \
+ \
+ low_reg = (unsigned) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \
+ \
+ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
+ { \
+ DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \
+ \
+ reg_info[this_reg].word = POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \
+ \
+ regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
+ \
+ regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
+ } \
+ \
+ DEBUG_STATEMENT (nfailure_points_popped++); \
+} /* POP_FAILURE_POINT */
+
+/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
+ BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
+ characters can start a string that matches the pattern. This fastmap
+ is used by re_search to skip quickly over impossible starting points.
+
+ The caller must supply the address of a (1 << BYTEWIDTH)-byte data
+ area as BUFP->fastmap.
+
+ We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
+ the pattern buffer.
+
+ Returns 0 if we succeed, -2 if an internal error. */
+
+int
+re_compile_fastmap (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ int j, k;
+ fail_stack_type fail_stack;
+#ifndef REGEX_MALLOC
+ char *destination;
+#endif
+ /* We don't push any register information onto the failure stack. */
+ unsigned num_regs = 0;
+
+ register char *fastmap = bufp->fastmap;
+ unsigned char *pattern = bufp->buffer;
+ unsigned long size = bufp->used;
+ const unsigned char *p = pattern;
+ register unsigned char *pend = pattern + size;
+
+ /* Assume that each path through the pattern can be null until
+ proven otherwise. We set this false at the bottom of switch
+ statement, to which we get only if a particular path doesn't
+ match the empty string. */
+ boolean path_can_be_null = true;
+
+ /* We aren't doing a `succeed_n' to begin with. */
+ boolean succeed_n_p = false;
+
+ assert (fastmap != NULL && p != NULL);
+
+ INIT_FAIL_STACK ();
+ bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
+ bufp->fastmap_accurate = 1; /* It will be when we're done. */
+ bufp->can_be_null = 0;
+
+ while (p != pend || !FAIL_STACK_EMPTY ())
+ {
+ if (p == pend)
+ {
+ bufp->can_be_null |= path_can_be_null;
+
+ /* Reset for next path. */
+ path_can_be_null = true;
+
+ p = fail_stack.stack[--fail_stack.avail];
+ }
+
+ /* We should never be about to go beyond the end of the pattern. */
+ assert (p < pend);
+
+#ifdef SWITCH_ENUM_BUG
+ switch ((int) ((re_opcode_t) *p++))
+#else
+ switch ((re_opcode_t) *p++)
+#endif
+ {
+
+ /* I guess the idea here is to simply not bother with a fastmap
+ if a backreference is used, since it's too hard to figure out
+ the fastmap for the corresponding group. Setting
+ `can_be_null' stops `re_search_2' from using the fastmap, so
+ that is all we do. */
+ case duplicate:
+ bufp->can_be_null = 1;
+ return 0;
+
+
+ /* Following are the cases which match a character. These end
+ with `break'. */
+
+ case exactn:
+ fastmap[p[1]] = 1;
+ break;
+
+
+ case charset:
+ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+ if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
+ fastmap[j] = 1;
+ break;
+
+
+ case charset_not:
+ /* Chars beyond end of map must be allowed. */
+ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
+ fastmap[j] = 1;
+
+ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+ if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
+ fastmap[j] = 1;
+ break;
+
+
+ case wordchar:
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) == Sword)
+ fastmap[j] = 1;
+ break;
+
+
+ case notwordchar:
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) != Sword)
+ fastmap[j] = 1;
+ break;
+
+
+ case anychar:
+ /* `.' matches anything ... */
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ fastmap[j] = 1;
+
+ /* ... except perhaps newline. */
+ if (!(bufp->syntax & RE_DOT_NEWLINE))
+ fastmap['\n'] = 0;
+
+ /* Return if we have already set `can_be_null'; if we have,
+ then the fastmap is irrelevant. Something's wrong here. */
+ else if (bufp->can_be_null)
+ return 0;
+
+ /* Otherwise, have to check alternative paths. */
+ break;
+
+
+#ifdef emacs
+ case syntaxspec:
+ k = *p++;
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) == (enum syntaxcode) k)
+ fastmap[j] = 1;
+ break;
+
+
+ case notsyntaxspec:
+ k = *p++;
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) != (enum syntaxcode) k)
+ fastmap[j] = 1;
+ break;
+
+
+ /* All cases after this match the empty string. These end with
+ `continue'. */
+
+
+ case before_dot:
+ case at_dot:
+ case after_dot:
+ continue;
+#endif /* not emacs */
+
+
+ case no_op:
+ case begline:
+ case endline:
+ case begbuf:
+ case endbuf:
+ case wordbound:
+ case notwordbound:
+ case wordbeg:
+ case wordend:
+ case push_dummy_failure:
+ continue;
+
+
+ case jump_n:
+ case pop_failure_jump:
+ case maybe_pop_jump:
+ case jump:
+ case jump_past_alt:
+ case dummy_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (j, p);
+ p += j;
+ if (j > 0)
+ continue;
+
+ /* Jump backward implies we just went through the body of a
+ loop and matched nothing. Opcode jumped to should be
+ `on_failure_jump' or `succeed_n'. Just treat it like an
+ ordinary jump. For a * loop, it has pushed its failure
+ point already; if so, discard that as redundant. */
+ if ((re_opcode_t) *p != on_failure_jump
+ && (re_opcode_t) *p != succeed_n)
+ continue;
+
+ p++;
+ EXTRACT_NUMBER_AND_INCR (j, p);
+ p += j;
+
+ /* If what's on the stack is where we are now, pop it. */
+ if (!FAIL_STACK_EMPTY ()
+ && fail_stack.stack[fail_stack.avail - 1] == p)
+ fail_stack.avail--;
+
+ continue;
+
+
+ case on_failure_jump:
+ case on_failure_keep_string_jump:
+ handle_on_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (j, p);
+
+ /* For some patterns, e.g., `(a?)?', `p+j' here points to the
+ end of the pattern. We don't want to push such a point,
+ since when we restore it above, entering the switch will
+ increment `p' past the end of the pattern. We don't need
+ to push such a point since we obviously won't find any more
+ fastmap entries beyond `pend'. Such a pattern can match
+ the null string, though. */
+ if (p + j < pend)
+ {
+ if (!PUSH_PATTERN_OP (p + j, fail_stack))
+ return -2;
+ }
+ else
+ bufp->can_be_null = 1;
+
+ if (succeed_n_p)
+ {
+ EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
+ succeed_n_p = false;
+ }
+
+ continue;
+
+
+ case succeed_n:
+ /* Get to the number of times to succeed. */
+ p += 2;
+
+ /* Increment p past the n for when k != 0. */
+ EXTRACT_NUMBER_AND_INCR (k, p);
+ if (k == 0)
+ {
+ p -= 4;
+ succeed_n_p = true; /* Spaghetti code alert. */
+ goto handle_on_failure_jump;
+ }
+ continue;
+
+
+ case set_number_at:
+ p += 4;
+ continue;
+
+
+ case start_memory:
+ case stop_memory:
+ p += 2;
+ continue;
+
+
+ default:
+ abort (); /* We have listed all the cases. */
+ } /* switch *p++ */
+
+ /* Getting here means we have found the possible starting
+ characters for one path of the pattern -- and that the empty
+ string does not match. We need not follow this path further.
+ Instead, look at the next alternative (remembered on the
+ stack), or quit if no more. The test at the top of the loop
+ does these things. */
+ path_can_be_null = false;
+ p = pend;
+ } /* while p */
+
+ /* Set `can_be_null' for the last path (also the first path, if the
+ pattern is empty). */
+ bufp->can_be_null |= path_can_be_null;
+ return 0;
+} /* re_compile_fastmap */
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
+ this memory for recording register information. STARTS and ENDS
+ must be allocated using the malloc library routine, and must each
+ be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+ struct re_pattern_buffer *bufp;
+ struct re_registers *regs;
+ unsigned num_regs;
+ regoff_t *starts, *ends;
+{
+ if (num_regs)
+ {
+ bufp->regs_allocated = REGS_REALLOCATE;
+ regs->num_regs = num_regs;
+ regs->start = starts;
+ regs->end = ends;
+ }
+ else
+ {
+ bufp->regs_allocated = REGS_UNALLOCATED;
+ regs->num_regs = 0;
+ regs->start = regs->end = (regoff_t) 0;
+ }
+}
+
+/* Searching routines. */
+
+/* Like re_search_2, below, but only one string is specified, and
+ doesn't let you say where to stop matching. */
+
+int
+re_search (bufp, string, size, startpos, range, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ int size, startpos, range;
+ struct re_registers *regs;
+{
+ return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
+ regs, size);
+}
+
+
+/* Using the compiled pattern in BUFP->buffer, first tries to match the
+ virtual concatenation of STRING1 and STRING2, starting first at index
+ STARTPOS, then at STARTPOS + 1, and so on.
+
+ STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
+
+ RANGE is how far to scan while trying to match. RANGE = 0 means try
+ only at STARTPOS; in general, the last start tried is STARTPOS +
+ RANGE.
+
+ In REGS, return the indices of the virtual concatenation of STRING1
+ and STRING2 that matched the entire BUFP->buffer and its contained
+ subexpressions.
+
+ Do not consider matching one past the index STOP in the virtual
+ concatenation of STRING1 and STRING2.
+
+ We return either the position in the strings at which the match was
+ found, -1 if no match, or -2 if error (such as failure
+ stack overflow). */
+
+int
+re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int startpos;
+ int range;
+ struct re_registers *regs;
+ int stop;
+{
+ int val;
+ register char *fastmap = bufp->fastmap;
+ register char *translate = bufp->translate;
+ int total_size = size1 + size2;
+ int endpos = startpos + range;
+
+ /* Check for out-of-range STARTPOS. */
+ if (startpos < 0 || startpos > total_size)
+ return -1;
+
+ /* Fix up RANGE if it might eventually take us outside
+ the virtual concatenation of STRING1 and STRING2. */
+ if (endpos < -1)
+ range = -1 - startpos;
+ else if (endpos > total_size)
+ range = total_size - startpos;
+
+ /* If the search isn't to be a backwards one, don't waste time in a
+ search for a pattern that must be anchored. */
+ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0)
+ {
+ if (startpos > 0)
+ return -1;
+ else
+ range = 1;
+ }
+
+ /* Update the fastmap now if not correct already. */
+ if (fastmap && !bufp->fastmap_accurate)
+ if (re_compile_fastmap (bufp) == -2)
+ return -2;
+
+ /* Loop through the string, looking for a place to start matching. */
+ for (;;)
+ {
+ /* If a fastmap is supplied, skip quickly over characters that
+ cannot be the start of a match. If the pattern can match the
+ null string, however, we don't need to skip characters; we want
+ the first null string. */
+ if (fastmap && startpos < total_size && !bufp->can_be_null)
+ {
+ if (range > 0) /* Searching forwards. */
+ {
+ register const char *d;
+ register int lim = 0;
+ int irange = range;
+
+ if (startpos < size1 && startpos + range >= size1)
+ lim = range - (size1 - startpos);
+
+ d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
+
+ /* Written out as an if-else to avoid testing `translate'
+ inside the loop. */
+ if (translate)
+ while (range > lim
+ && !fastmap[(unsigned char)
+ translate[(unsigned char) *d++]])
+ range--;
+ else
+ while (range > lim && !fastmap[(unsigned char) *d++])
+ range--;
+
+ startpos += irange - range;
+ }
+ else /* Searching backwards. */
+ {
+ register char c = (size1 == 0 || startpos >= size1
+ ? string2[startpos - size1]
+ : string1[startpos]);
+
+ if (!fastmap[(unsigned char) TRANSLATE (c)])
+ goto advance;
+ }
+ }
+
+ /* If can't match the null string, and that's all we have left, fail. */
+ if (range >= 0 && startpos == total_size && fastmap
+ && !bufp->can_be_null)
+ return -1;
+
+ val = re_match_2 (bufp, string1, size1, string2, size2,
+ startpos, regs, stop);
+ if (val >= 0)
+ return startpos;
+
+ if (val == -2)
+ return -2;
+
+ advance:
+ if (!range)
+ break;
+ else if (range > 0)
+ {
+ range--;
+ startpos++;
+ }
+ else
+ {
+ range++;
+ startpos--;
+ }
+ }
+ return -1;
+} /* re_search_2 */
+
+/* Declarations and macros for re_match_2. */
+
+static int bcmp_translate ();
+static boolean alt_match_null_string_p (),
+ common_op_match_null_string_p (),
+ group_match_null_string_p ();
+
+/* Structure for per-register (a.k.a. per-group) information.
+ This must not be longer than one word, because we push this value
+ onto the failure stack. Other register information, such as the
+ starting and ending positions (which are addresses), and the list of
+ inner groups (which is a bits list) are maintained in separate
+ variables.
+
+ We are making a (strictly speaking) nonportable assumption here: that
+ the compiler will pack our bit fields into something that fits into
+ the type of `word', i.e., is something that fits into one item on the
+ failure stack. */
+typedef union
+{
+ fail_stack_elt_t word;
+ struct
+ {
+ /* This field is one if this group can match the empty string,
+ zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
+#define MATCH_NULL_UNSET_VALUE 3
+ unsigned match_null_string_p : 2;
+ unsigned is_active : 1;
+ unsigned matched_something : 1;
+ unsigned ever_matched_something : 1;
+ } bits;
+} register_info_type;
+
+#define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
+#define IS_ACTIVE(R) ((R).bits.is_active)
+#define MATCHED_SOMETHING(R) ((R).bits.matched_something)
+#define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
+
+
+/* Call this when have matched a real character; it sets `matched' flags
+ for the subexpressions which we are currently inside. Also records
+ that those subexprs have matched. */
+#define SET_REGS_MATCHED() \
+ do \
+ { \
+ unsigned r; \
+ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
+ { \
+ MATCHED_SOMETHING (reg_info[r]) \
+ = EVER_MATCHED_SOMETHING (reg_info[r]) \
+ = 1; \
+ } \
+ } \
+ while (0)
+
+
+/* This converts PTR, a pointer into one of the search strings `string1'
+ and `string2' into an offset from the beginning of that string. */
+#define POINTER_TO_OFFSET(ptr) \
+ (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1)
+
+/* Registers are set to a sentinel when they haven't yet matched. */
+#define REG_UNSET_VALUE ((char *) -1)
+#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
+
+
+/* Macros for dealing with the split strings in re_match_2. */
+
+#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
+
+/* Call before fetching a character with *d. This switches over to
+ string2 if necessary. */
+#define PREFETCH() \
+ while (d == dend) \
+ { \
+ /* End of string2 => fail. */ \
+ if (dend == end_match_2) \
+ goto fail; \
+ /* End of string1 => advance to string2. */ \
+ d = string2; \
+ dend = end_match_2; \
+ }
+
+
+/* Test if at very beginning or at very end of the virtual concatenation
+ of `string1' and `string2'. If only one string, it's `string2'. */
+#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
+#define AT_STRINGS_END(d) ((d) == end2)
+
+
+/* Test if D points to a character which is word-constituent. We have
+ two special cases to check for: if past the end of string1, look at
+ the first character in string2; and if before the beginning of
+ string2, look at the last character in string1. */
+#define WORDCHAR_P(d) \
+ (SYNTAX ((d) == end1 ? *string2 \
+ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
+ == Sword)
+
+/* Test if the character before D and the one at D differ with respect
+ to being word-constituent. */
+#define AT_WORD_BOUNDARY(d) \
+ (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
+ || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
+
+
+/* Free everything we malloc. */
+#ifdef REGEX_MALLOC
+#define FREE_VAR(var) if (var) free (var); var = NULL
+#define FREE_VARIABLES() \
+ do { \
+ FREE_VAR (fail_stack.stack); \
+ FREE_VAR (regstart); \
+ FREE_VAR (regend); \
+ FREE_VAR (old_regstart); \
+ FREE_VAR (old_regend); \
+ FREE_VAR (best_regstart); \
+ FREE_VAR (best_regend); \
+ FREE_VAR (reg_info); \
+ FREE_VAR (reg_dummy); \
+ FREE_VAR (reg_info_dummy); \
+ } while (0)
+#else /* not REGEX_MALLOC */
+/* Some MIPS systems (at least) want this to free alloca'd storage. */
+#define FREE_VARIABLES() alloca (0)
+#endif /* not REGEX_MALLOC */
+
+
+/* These values must meet several constraints. They must not be valid
+ register values; since we have a limit of 255 registers (because
+ we use only one byte in the pattern for the register number), we can
+ use numbers larger than 255. They must differ by 1, because of
+ NUM_FAILURE_ITEMS above. And the value for the lowest register must
+ be larger than the value for the highest register, so we do not try
+ to actually save any registers when none are active. */
+#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
+#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
+
+/* Matching routines. */
+
+#ifndef emacs /* Emacs never uses this. */
+/* re_match is like re_match_2 except it takes only a single string. */
+
+int
+re_match (bufp, string, size, pos, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ int size, pos;
+ struct re_registers *regs;
+ {
+ return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size);
+}
+#endif /* not emacs */
+
+
+/* re_match_2 matches the compiled pattern in BUFP against the
+ the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
+ and SIZE2, respectively). We start matching at POS, and stop
+ matching at STOP.
+
+ If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
+ store offsets for the substring each group matched in REGS. See the
+ documentation for exactly how many groups we fill.
+
+ We return -1 if no match, -2 if an internal error (such as the
+ failure stack overflowing). Otherwise, we return the length of the
+ matched substring. */
+
+int
+re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int pos;
+ struct re_registers *regs;
+ int stop;
+{
+ /* General temporaries. */
+ int mcnt;
+ unsigned char *p1;
+
+ /* Just past the end of the corresponding string. */
+ const char *end1, *end2;
+
+ /* Pointers into string1 and string2, just past the last characters in
+ each to consider matching. */
+ const char *end_match_1, *end_match_2;
+
+ /* Where we are in the data, and the end of the current string. */
+ const char *d, *dend;
+
+ /* Where we are in the pattern, and the end of the pattern. */
+ unsigned char *p = bufp->buffer;
+ register unsigned char *pend = p + bufp->used;
+
+ /* We use this to map every character in the string. */
+ char *translate = bufp->translate;
+
+ /* Failure point stack. Each place that can handle a failure further
+ down the line pushes a failure point on this stack. It consists of
+ restart, regend, and reg_info for all registers corresponding to
+ the subexpressions we're currently inside, plus the number of such
+ registers, and, finally, two char *'s. The first char * is where
+ to resume scanning the pattern; the second one is where to resume
+ scanning the strings. If the latter is zero, the failure point is
+ a ``dummy''; if a failure happens and the failure point is a dummy,
+ it gets discarded and the next next one is tried. */
+ fail_stack_type fail_stack;
+#ifdef DEBUG
+ static unsigned failure_id = 0;
+ unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
+#endif
+
+ /* We fill all the registers internally, independent of what we
+ return, for use in backreferences. The number here includes
+ an element for register zero. */
+ unsigned num_regs = bufp->re_nsub + 1;
+
+ /* The currently active registers. */
+ unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+
+ /* Information on the contents of registers. These are pointers into
+ the input strings; they record just what was matched (on this
+ attempt) by a subexpression part of the pattern, that is, the
+ regnum-th regstart pointer points to where in the pattern we began
+ matching and the regnum-th regend points to right after where we
+ stopped matching the regnum-th subexpression. (The zeroth register
+ keeps track of what the whole pattern matches.) */
+ const char **regstart, **regend;
+
+ /* If a group that's operated upon by a repetition operator fails to
+ match anything, then the register for its start will need to be
+ restored because it will have been set to wherever in the string we
+ are when we last see its open-group operator. Similarly for a
+ register's end. */
+ const char **old_regstart, **old_regend;
+
+ /* The is_active field of reg_info helps us keep track of which (possibly
+ nested) subexpressions we are currently in. The matched_something
+ field of reg_info[reg_num] helps us tell whether or not we have
+ matched any of the pattern so far this time through the reg_num-th
+ subexpression. These two fields get reset each time through any
+ loop their register is in. */
+ register_info_type *reg_info;
+
+ /* The following record the register info as found in the above
+ variables when we find a match better than any we've seen before.
+ This happens as we backtrack through the failure points, which in
+ turn happens only if we have not yet matched the entire string. */
+ unsigned best_regs_set = false;
+ const char **best_regstart, **best_regend;
+
+ /* Logically, this is `best_regend[0]'. But we don't want to have to
+ allocate space for that if we're not allocating space for anything
+ else (see below). Also, we never need info about register 0 for
+ any of the other register vectors, and it seems rather a kludge to
+ treat `best_regend' differently than the rest. So we keep track of
+ the end of the best match so far in a separate variable. We
+ initialize this to NULL so that when we backtrack the first time
+ and need to test it, it's not garbage. */
+ const char *match_end = NULL;
+
+ /* Used when we pop values we don't care about. */
+ const char **reg_dummy;
+ register_info_type *reg_info_dummy;
+
+#ifdef DEBUG
+ /* Counts the total number of registers pushed. */
+ unsigned num_regs_pushed = 0;
+#endif
+
+ DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
+
+ INIT_FAIL_STACK ();
+
+ /* Do not bother to initialize all the register variables if there are
+ no groups in the pattern, as it takes a fair amount of time. If
+ there are groups, we include space for register 0 (the whole
+ pattern), even though we never use it, since it simplifies the
+ array indexing. We should fix this. */
+ if (bufp->re_nsub)
+ {
+ regstart = REGEX_TALLOC (num_regs, const char *);
+ regend = REGEX_TALLOC (num_regs, const char *);
+ old_regstart = REGEX_TALLOC (num_regs, const char *);
+ old_regend = REGEX_TALLOC (num_regs, const char *);
+ best_regstart = REGEX_TALLOC (num_regs, const char *);
+ best_regend = REGEX_TALLOC (num_regs, const char *);
+ reg_info = REGEX_TALLOC (num_regs, register_info_type);
+ reg_dummy = REGEX_TALLOC (num_regs, const char *);
+ reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
+
+ if (!(regstart && regend && old_regstart && old_regend && reg_info
+ && best_regstart && best_regend && reg_dummy && reg_info_dummy))
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
+ }
+#ifdef REGEX_MALLOC
+ else
+ {
+ /* We must initialize all our variables to NULL, so that
+ `FREE_VARIABLES' doesn't try to free them. */
+ regstart = regend = old_regstart = old_regend = best_regstart
+ = best_regend = reg_dummy = NULL;
+ reg_info = reg_info_dummy = (register_info_type *) NULL;
+ }
+#endif /* REGEX_MALLOC */
+
+ /* The starting position is bogus. */
+ if (pos < 0 || pos > size1 + size2)
+ {
+ FREE_VARIABLES ();
+ return -1;
+ }
+
+ /* Initialize subexpression text positions to -1 to mark ones that no
+ start_memory/stop_memory has been seen for. Also initialize the
+ register information struct. */
+ for (mcnt = 1; mcnt < num_regs; mcnt++)
+ {
+ regstart[mcnt] = regend[mcnt]
+ = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
+
+ REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
+ IS_ACTIVE (reg_info[mcnt]) = 0;
+ MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+ EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+ }
+
+ /* We move `string1' into `string2' if the latter's empty -- but not if
+ `string1' is null. */
+ if (size2 == 0 && string1 != NULL)
+ {
+ string2 = string1;
+ size2 = size1;
+ string1 = 0;
+ size1 = 0;
+ }
+ end1 = string1 + size1;
+ end2 = string2 + size2;
+
+ /* Compute where to stop matching, within the two strings. */
+ if (stop <= size1)
+ {
+ end_match_1 = string1 + stop;
+ end_match_2 = string2;
+ }
+ else
+ {
+ end_match_1 = end1;
+ end_match_2 = string2 + stop - size1;
+ }
+
+ /* `p' scans through the pattern as `d' scans through the data.
+ `dend' is the end of the input string that `d' points within. `d'
+ is advanced into the following input string whenever necessary, but
+ this happens before fetching; therefore, at the beginning of the
+ loop, `d' can be pointing at the end of a string, but it cannot
+ equal `string2'. */
+ if (size1 > 0 && pos <= size1)
+ {
+ d = string1 + pos;
+ dend = end_match_1;
+ }
+ else
+ {
+ d = string2 + pos - size1;
+ dend = end_match_2;
+ }
+
+ DEBUG_PRINT1 ("The compiled pattern is: ");
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
+ DEBUG_PRINT1 ("The string to match is: `");
+ DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
+ DEBUG_PRINT1 ("'\n");
+
+ /* This loops over pattern commands. It exits by returning from the
+ function if the match is complete, or it drops through if the match
+ fails at this starting point in the input data. */
+ for (;;)
+ {
+ DEBUG_PRINT2 ("\n0x%x: ", p);
+
+ if (p == pend)
+ { /* End of pattern means we might have succeeded. */
+ DEBUG_PRINT1 ("end of pattern ... ");
+
+ /* If we haven't matched the entire string, and we want the
+ longest match, try backtracking. */
+ if (d != end_match_2)
+ {
+ DEBUG_PRINT1 ("backtracking.\n");
+
+ if (!FAIL_STACK_EMPTY ())
+ { /* More failure points to try. */
+ boolean same_str_p = (FIRST_STRING_P (match_end)
+ == MATCHING_IN_FIRST_STRING);
+
+ /* If exceeds best match so far, save it. */
+ if (!best_regs_set
+ || (same_str_p && d > match_end)
+ || (!same_str_p && !MATCHING_IN_FIRST_STRING))
+ {
+ best_regs_set = true;
+ match_end = d;
+
+ DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
+
+ for (mcnt = 1; mcnt < num_regs; mcnt++)
+ {
+ best_regstart[mcnt] = regstart[mcnt];
+ best_regend[mcnt] = regend[mcnt];
+ }
+ }
+ goto fail;
+ }
+
+ /* If no failure points, don't restore garbage. */
+ else if (best_regs_set)
+ {
+ restore_best_regs:
+ /* Restore best match. It may happen that `dend ==
+ end_match_1' while the restored d is in string2.
+ For example, the pattern `x.*y.*z' against the
+ strings `x-' and `y-z-', if the two strings are
+ not consecutive in memory. */
+ DEBUG_PRINT1 ("Restoring best registers.\n");
+
+ d = match_end;
+ dend = ((d >= string1 && d <= end1)
+ ? end_match_1 : end_match_2);
+
+ for (mcnt = 1; mcnt < num_regs; mcnt++)
+ {
+ regstart[mcnt] = best_regstart[mcnt];
+ regend[mcnt] = best_regend[mcnt];
+ }
+ }
+ } /* d != end_match_2 */
+
+ DEBUG_PRINT1 ("Accepting match.\n");
+
+ /* If caller wants register contents data back, do it. */
+ if (regs && !bufp->no_sub)
+ {
+ /* Have the register data arrays been allocated? */
+ if (bufp->regs_allocated == REGS_UNALLOCATED)
+ { /* No. So allocate them with malloc. We need one
+ extra element beyond `num_regs' for the `-1' marker
+ GNU code uses. */
+ regs->num_regs = MAX (RE_NREGS, num_regs + 1);
+ regs->start = TALLOC (regs->num_regs, regoff_t);
+ regs->end = TALLOC (regs->num_regs, regoff_t);
+ if (regs->start == NULL || regs->end == NULL)
+ return -2;
+ bufp->regs_allocated = REGS_REALLOCATE;
+ }
+ else if (bufp->regs_allocated == REGS_REALLOCATE)
+ { /* Yes. If we need more elements than were already
+ allocated, reallocate them. If we need fewer, just
+ leave it alone. */
+ if (regs->num_regs < num_regs + 1)
+ {
+ regs->num_regs = num_regs + 1;
+ RETALLOC (regs->start, regs->num_regs, regoff_t);
+ RETALLOC (regs->end, regs->num_regs, regoff_t);
+ if (regs->start == NULL || regs->end == NULL)
+ return -2;
+ }
+ }
+ else
+ assert (bufp->regs_allocated == REGS_FIXED);
+
+ /* Convert the pointer data in `regstart' and `regend' to
+ indices. Register zero has to be set differently,
+ since we haven't kept track of any info for it. */
+ if (regs->num_regs > 0)
+ {
+ regs->start[0] = pos;
+ regs->end[0] = (MATCHING_IN_FIRST_STRING ? d - string1
+ : d - string2 + size1);
+ }
+
+ /* Go through the first `min (num_regs, regs->num_regs)'
+ registers, since that is all we initialized. */
+ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++)
+ {
+ if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
+ regs->start[mcnt] = regs->end[mcnt] = -1;
+ else
+ {
+ regs->start[mcnt] = POINTER_TO_OFFSET (regstart[mcnt]);
+ regs->end[mcnt] = POINTER_TO_OFFSET (regend[mcnt]);
+ }
+ }
+
+ /* If the regs structure we return has more elements than
+ were in the pattern, set the extra elements to -1. If
+ we (re)allocated the registers, this is the case,
+ because we always allocate enough to have at least one
+ -1 at the end. */
+ for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++)
+ regs->start[mcnt] = regs->end[mcnt] = -1;
+ } /* regs && !bufp->no_sub */
+
+ FREE_VARIABLES ();
+ DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
+ nfailure_points_pushed, nfailure_points_popped,
+ nfailure_points_pushed - nfailure_points_popped);
+ DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
+
+ mcnt = d - pos - (MATCHING_IN_FIRST_STRING
+ ? string1
+ : string2 - size1);
+
+ DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
+
+ return mcnt;
+ }
+
+ /* Otherwise match next pattern command. */
+#ifdef SWITCH_ENUM_BUG
+ switch ((int) ((re_opcode_t) *p++))
+#else
+ switch ((re_opcode_t) *p++)
+#endif
+ {
+ /* Ignore these. Used to ignore the n of succeed_n's which
+ currently have n == 0. */
+ case no_op:
+ DEBUG_PRINT1 ("EXECUTING no_op.\n");
+ break;
+
+
+ /* Match the next n pattern characters exactly. The following
+ byte in the pattern defines n, and the n bytes after that
+ are the characters to match. */
+ case exactn:
+ mcnt = *p++;
+ DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
+
+ /* This is written out as an if-else so we don't waste time
+ testing `translate' inside the loop. */
+ if (translate)
+ {
+ do
+ {
+ PREFETCH ();
+ if (translate[(unsigned char) *d++] != (char) *p++)
+ goto fail;
+ }
+ while (--mcnt);
+ }
+ else
+ {
+ do
+ {
+ PREFETCH ();
+ if (*d++ != (char) *p++) goto fail;
+ }
+ while (--mcnt);
+ }
+ SET_REGS_MATCHED ();
+ break;
+
+
+ /* Match any character except possibly a newline or a null. */
+ case anychar:
+ DEBUG_PRINT1 ("EXECUTING anychar.\n");
+
+ PREFETCH ();
+
+ if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
+ || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
+ goto fail;
+
+ SET_REGS_MATCHED ();
+ DEBUG_PRINT2 (" Matched `%d'.\n", *d);
+ d++;
+ break;
+
+
+ case charset:
+ case charset_not:
+ {
+ register unsigned char c;
+ boolean not = (re_opcode_t) *(p - 1) == charset_not;
+
+ DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
+
+ PREFETCH ();
+ c = TRANSLATE (*d); /* The character to match. */
+
+ /* Cast to `unsigned' instead of `unsigned char' in case the
+ bit list is a full 32 bytes long. */
+ if (c < (unsigned) (*p * BYTEWIDTH)
+ && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+ not = !not;
+
+ p += 1 + *p;
+
+ if (!not) goto fail;
+
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+ }
+
+
+ /* The beginning of a group is represented by start_memory.
+ The arguments are the register number in the next byte, and the
+ number of groups inner to this one in the next. The text
+ matched within the group is recorded (in the internal
+ registers data structure) under the register number. */
+ case start_memory:
+ DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]);
+
+ /* Find out if this group can match the empty string. */
+ p1 = p; /* To send to group_match_null_string_p. */
+
+ if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
+ REG_MATCH_NULL_STRING_P (reg_info[*p])
+ = group_match_null_string_p (&p1, pend, reg_info);
+
+ /* Save the position in the string where we were the last time
+ we were at this open-group operator in case the group is
+ operated upon by a repetition operator, e.g., with `(a*)*b'
+ against `ab'; then we want to ignore where we are now in
+ the string in case this attempt to match fails. */
+ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+ ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
+ : regstart[*p];
+ DEBUG_PRINT2 (" old_regstart: %d\n",
+ POINTER_TO_OFFSET (old_regstart[*p]));
+
+ regstart[*p] = d;
+ DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
+
+ IS_ACTIVE (reg_info[*p]) = 1;
+ MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+ /* This is the new highest active register. */
+ highest_active_reg = *p;
+
+ /* If nothing was active before, this is the new lowest active
+ register. */
+ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+ lowest_active_reg = *p;
+
+ /* Move past the register number and inner group count. */
+ p += 2;
+ break;
+
+
+ /* The stop_memory opcode represents the end of a group. Its
+ arguments are the same as start_memory's: the register
+ number, and the number of inner groups. */
+ case stop_memory:
+ DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]);
+
+ /* We need to save the string position the last time we were at
+ this close-group operator in case the group is operated
+ upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
+ against `aba'; then we want to ignore where we are now in
+ the string in case this attempt to match fails. */
+ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+ ? REG_UNSET (regend[*p]) ? d : regend[*p]
+ : regend[*p];
+ DEBUG_PRINT2 (" old_regend: %d\n",
+ POINTER_TO_OFFSET (old_regend[*p]));
+
+ regend[*p] = d;
+ DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
+
+ /* This register isn't active anymore. */
+ IS_ACTIVE (reg_info[*p]) = 0;
+
+ /* If this was the only register active, nothing is active
+ anymore. */
+ if (lowest_active_reg == highest_active_reg)
+ {
+ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+ }
+ else
+ { /* We must scan for the new highest active register, since
+ it isn't necessarily one less than now: consider
+ (a(b)c(d(e)f)g). When group 3 ends, after the f), the
+ new highest active register is 1. */
+ unsigned char r = *p - 1;
+ while (r > 0 && !IS_ACTIVE (reg_info[r]))
+ r--;
+
+ /* If we end up at register zero, that means that we saved
+ the registers as the result of an `on_failure_jump', not
+ a `start_memory', and we jumped to past the innermost
+ `stop_memory'. For example, in ((.)*) we save
+ registers 1 and 2 as a result of the *, but when we pop
+ back to the second ), we are at the stop_memory 1.
+ Thus, nothing is active. */
+ if (r == 0)
+ {
+ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+ }
+ else
+ highest_active_reg = r;
+ }
+
+ /* If just failed to match something this time around with a
+ group that's operated on by a repetition operator, try to
+ force exit from the ``loop'', and restore the register
+ information for this group that we had before trying this
+ last match. */
+ if ((!MATCHED_SOMETHING (reg_info[*p])
+ || (re_opcode_t) p[-3] == start_memory)
+ && (p + 2) < pend)
+ {
+ boolean is_a_jump_n = false;
+
+ p1 = p + 2;
+ mcnt = 0;
+ switch ((re_opcode_t) *p1++)
+ {
+ case jump_n:
+ is_a_jump_n = true;
+ case pop_failure_jump:
+ case maybe_pop_jump:
+ case jump:
+ case dummy_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if (is_a_jump_n)
+ p1 += 2;
+ break;
+
+ default:
+ /* do nothing */ ;
+ }
+ p1 += mcnt;
+
+ /* If the next operation is a jump backwards in the pattern
+ to an on_failure_jump right before the start_memory
+ corresponding to this stop_memory, exit from the loop
+ by forcing a failure after pushing on the stack the
+ on_failure_jump's jump in the pattern, and d. */
+ if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
+ && (re_opcode_t) p1[3] == start_memory && p1[4] == *p)
+ {
+ /* If this group ever matched anything, then restore
+ what its registers were before trying this last
+ failed match, e.g., with `(a*)*b' against `ab' for
+ regstart[1], and, e.g., with `((a*)*(b*)*)*'
+ against `aba' for regend[3].
+
+ Also restore the registers for inner groups for,
+ e.g., `((a*)(b*))*' against `aba' (register 3 would
+ otherwise get trashed). */
+
+ if (EVER_MATCHED_SOMETHING (reg_info[*p]))
+ {
+ unsigned r;
+
+ EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+ /* Restore this and inner groups' (if any) registers. */
+ for (r = *p; r < *p + *(p + 1); r++)
+ {
+ regstart[r] = old_regstart[r];
+
+ /* xx why this test? */
+ if ((int) old_regend[r] >= (int) regstart[r])
+ regend[r] = old_regend[r];
+ }
+ }
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
+
+ goto fail;
+ }
+ }
+
+ /* Move past the register number and the inner group count. */
+ p += 2;
+ break;
+
+
+ /* \<digit> has been turned into a `duplicate' command which is
+ followed by the numeric value of <digit> as the register number. */
+ case duplicate:
+ {
+ register const char *d2, *dend2;
+ int regno = *p++; /* Get which register to match against. */
+ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
+
+ /* Can't back reference a group which we've never matched. */
+ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
+ goto fail;
+
+ /* Where in input to try to start matching. */
+ d2 = regstart[regno];
+
+ /* Where to stop matching; if both the place to start and
+ the place to stop matching are in the same string, then
+ set to the place to stop, otherwise, for now have to use
+ the end of the first string. */
+
+ dend2 = ((FIRST_STRING_P (regstart[regno])
+ == FIRST_STRING_P (regend[regno]))
+ ? regend[regno] : end_match_1);
+ for (;;)
+ {
+ /* If necessary, advance to next segment in register
+ contents. */
+ while (d2 == dend2)
+ {
+ if (dend2 == end_match_2) break;
+ if (dend2 == regend[regno]) break;
+
+ /* End of string1 => advance to string2. */
+ d2 = string2;
+ dend2 = regend[regno];
+ }
+ /* At end of register contents => success */
+ if (d2 == dend2) break;
+
+ /* If necessary, advance to next segment in data. */
+ PREFETCH ();
+
+ /* How many characters left in this segment to match. */
+ mcnt = dend - d;
+
+ /* Want how many consecutive characters we can match in
+ one shot, so, if necessary, adjust the count. */
+ if (mcnt > dend2 - d2)
+ mcnt = dend2 - d2;
+
+ /* Compare that many; failure if mismatch, else move
+ past them. */
+ if (translate
+ ? bcmp_translate (d, d2, mcnt, translate)
+ : bcmp (d, d2, mcnt))
+ goto fail;
+ d += mcnt, d2 += mcnt;
+ }
+ }
+ break;
+
+
+ /* begline matches the empty string at the beginning of the string
+ (unless `not_bol' is set in `bufp'), and, if
+ `newline_anchor' is set, after newlines. */
+ case begline:
+ DEBUG_PRINT1 ("EXECUTING begline.\n");
+
+ if (AT_STRINGS_BEG (d))
+ {
+ if (!bufp->not_bol) break;
+ }
+ else if (d[-1] == '\n' && bufp->newline_anchor)
+ {
+ break;
+ }
+ /* In all other cases, we fail. */
+ goto fail;
+
+
+ /* endline is the dual of begline. */
+ case endline:
+ DEBUG_PRINT1 ("EXECUTING endline.\n");
+
+ if (AT_STRINGS_END (d))
+ {
+ if (!bufp->not_eol) break;
+ }
+
+ /* We have to ``prefetch'' the next character. */
+ else if ((d == end1 ? *string2 : *d) == '\n'
+ && bufp->newline_anchor)
+ {
+ break;
+ }
+ goto fail;
+
+
+ /* Match at the very beginning of the data. */
+ case begbuf:
+ DEBUG_PRINT1 ("EXECUTING begbuf.\n");
+ if (AT_STRINGS_BEG (d))
+ break;
+ goto fail;
+
+
+ /* Match at the very end of the data. */
+ case endbuf:
+ DEBUG_PRINT1 ("EXECUTING endbuf.\n");
+ if (AT_STRINGS_END (d))
+ break;
+ goto fail;
+
+
+ /* on_failure_keep_string_jump is used to optimize `.*\n'. It
+ pushes NULL as the value for the string on the stack. Then
+ `pop_failure_point' will keep the current value for the
+ string, instead of restoring it. To see why, consider
+ matching `foo\nbar' against `.*\n'. The .* matches the foo;
+ then the . fails against the \n. But the next thing we want
+ to do is match the \n against the \n; if we restored the
+ string value, we would be back at the foo.
+
+ Because this is used only in specific cases, we don't need to
+ check all the things that `on_failure_jump' does, to make
+ sure the right things get saved on the stack. Hence we don't
+ share its code. The only reason to push anything on the
+ stack at all is that otherwise we would have to change
+ `anychar's code to do something besides goto fail in this
+ case; that seems worse than this. */
+ case on_failure_keep_string_jump:
+ DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
+
+ PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
+ break;
+
+
+ /* Uses of on_failure_jump:
+
+ Each alternative starts with an on_failure_jump that points
+ to the beginning of the next alternative. Each alternative
+ except the last ends with a jump that in effect jumps past
+ the rest of the alternatives. (They really jump to the
+ ending jump of the following alternative, because tensioning
+ these jumps is a hassle.)
+
+ Repeats start with an on_failure_jump that points past both
+ the repetition text and either the following jump or
+ pop_failure_jump back to this on_failure_jump. */
+ case on_failure_jump:
+ on_failure:
+ DEBUG_PRINT1 ("EXECUTING on_failure_jump");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
+
+ /* If this on_failure_jump comes right before a group (i.e.,
+ the original * applied to a group), save the information
+ for that group and all inner ones, so that if we fail back
+ to this point, the group's information will be correct.
+ For example, in \(a*\)*\1, we need the preceding group,
+ and in \(\(a*\)b*\)\2, we need the inner group. */
+
+ /* We can't use `p' to check ahead because we push
+ a failure point to `p + mcnt' after we do this. */
+ p1 = p;
+
+ /* We need to skip no_op's before we look for the
+ start_memory in case this on_failure_jump is happening as
+ the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
+ against aba. */
+ while (p1 < pend && (re_opcode_t) *p1 == no_op)
+ p1++;
+
+ if (p1 < pend && (re_opcode_t) *p1 == start_memory)
+ {
+ /* We have a new highest active register now. This will
+ get reset at the start_memory we are about to get to,
+ but we will have saved all the registers relevant to
+ this repetition op, as described above. */
+ highest_active_reg = *(p1 + 1) + *(p1 + 2);
+ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+ lowest_active_reg = *(p1 + 1);
+ }
+
+ DEBUG_PRINT1 (":\n");
+ PUSH_FAILURE_POINT (p + mcnt, d, -2);
+ break;
+
+
+ /* A smart repeat ends with `maybe_pop_jump'.
+ We change it to either `pop_failure_jump' or `jump'. */
+ case maybe_pop_jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
+ {
+ register unsigned char *p2 = p;
+
+ /* Compare the beginning of the repeat with what in the
+ pattern follows its end. If we can establish that there
+ is nothing that they would both match, i.e., that we
+ would have to backtrack because of (as in, e.g., `a*a')
+ then we can change to pop_failure_jump, because we'll
+ never have to backtrack.
+
+ This is not true in the case of alternatives: in
+ `(a|ab)*' we do need to backtrack to the `ab' alternative
+ (e.g., if the string was `ab'). But instead of trying to
+ detect that here, the alternative has put on a dummy
+ failure point which is what we will end up popping. */
+
+ /* Skip over open/close-group commands. */
+ while (p2 + 2 < pend
+ && ((re_opcode_t) *p2 == stop_memory
+ || (re_opcode_t) *p2 == start_memory))
+ p2 += 3; /* Skip over args, too. */
+
+ /* If we're at the end of the pattern, we can change. */
+ if (p2 == pend)
+ {
+ /* Consider what happens when matching ":\(.*\)"
+ against ":/". I don't really understand this code
+ yet. */
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1
+ (" End of pattern: change to `pop_failure_jump'.\n");
+ }
+
+ else if ((re_opcode_t) *p2 == exactn
+ || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
+ {
+ register unsigned char c
+ = *p2 == (unsigned char) endline ? '\n' : p2[2];
+ p1 = p + mcnt;
+
+ /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
+ to the `maybe_finalize_jump' of this case. Examine what
+ follows. */
+ if ((re_opcode_t) p1[3] == exactn && p1[5] != c)
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
+ c, p1[5]);
+ }
+
+ else if ((re_opcode_t) p1[3] == charset
+ || (re_opcode_t) p1[3] == charset_not)
+ {
+ int not = (re_opcode_t) p1[3] == charset_not;
+
+ if (c < (unsigned char) (p1[4] * BYTEWIDTH)
+ && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+ not = !not;
+
+ /* `not' is equal to 1 if c would match, which means
+ that we can't change to pop_failure_jump. */
+ if (!not)
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
+ }
+ }
+ }
+ }
+ p -= 2; /* Point at relative address again. */
+ if ((re_opcode_t) p[-1] != pop_failure_jump)
+ {
+ p[-1] = (unsigned char) jump;
+ DEBUG_PRINT1 (" Match => jump.\n");
+ goto unconditional_jump;
+ }
+ /* Note fall through. */
+
+
+ /* The end of a simple repeat has a pop_failure_jump back to
+ its matching on_failure_jump, where the latter will push a
+ failure point. The pop_failure_jump takes off failure
+ points put on by this pop_failure_jump's matching
+ on_failure_jump; we got through the pattern to here from the
+ matching on_failure_jump, so didn't fail. */
+ case pop_failure_jump:
+ {
+ /* We need to pass separate storage for the lowest and
+ highest registers, even though we don't care about the
+ actual values. Otherwise, we will restore only one
+ register from the stack, since lowest will == highest in
+ `pop_failure_point'. */
+ unsigned dummy_low_reg, dummy_high_reg;
+ unsigned char *pdummy;
+ const char *sdummy;
+
+ DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
+ POP_FAILURE_POINT (sdummy, pdummy,
+ dummy_low_reg, dummy_high_reg,
+ reg_dummy, reg_dummy, reg_info_dummy);
+ }
+ /* Note fall through. */
+
+
+ /* Unconditionally jump (without popping any failure points). */
+ case jump:
+ unconditional_jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
+ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
+ p += mcnt; /* Do the jump. */
+ DEBUG_PRINT2 ("(to 0x%x).\n", p);
+ break;
+
+
+ /* We need this opcode so we can detect where alternatives end
+ in `group_match_null_string_p' et al. */
+ case jump_past_alt:
+ DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
+ goto unconditional_jump;
+
+
+ /* Normally, the on_failure_jump pushes a failure point, which
+ then gets popped at pop_failure_jump. We will end up at
+ pop_failure_jump, also, and with a pattern of, say, `a+', we
+ are skipping over the on_failure_jump, so we have to push
+ something meaningless for pop_failure_jump to pop. */
+ case dummy_failure_jump:
+ DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
+ /* It doesn't matter what we push for the string here. What
+ the code at `fail' tests is the value for the pattern. */
+ PUSH_FAILURE_POINT (0, 0, -2);
+ goto unconditional_jump;
+
+
+ /* At the end of an alternative, we need to push a dummy failure
+ point in case we are followed by a `pop_failure_jump', because
+ we don't want the failure point for the alternative to be
+ popped. For example, matching `(a|ab)*' against `aab'
+ requires that we match the `ab' alternative. */
+ case push_dummy_failure:
+ DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
+ /* See comments just above at `dummy_failure_jump' about the
+ two zeroes. */
+ PUSH_FAILURE_POINT (0, 0, -2);
+ break;
+
+ /* Have to succeed matching what follows at least n times.
+ After that, handle like `on_failure_jump'. */
+ case succeed_n:
+ EXTRACT_NUMBER (mcnt, p + 2);
+ DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
+
+ assert (mcnt >= 0);
+ /* Originally, this is how many times we HAVE to succeed. */
+ if (mcnt > 0)
+ {
+ mcnt--;
+ p += 2;
+ STORE_NUMBER_AND_INCR (p, mcnt);
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p, mcnt);
+ }
+ else if (mcnt == 0)
+ {
+ DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2);
+ p[2] = (unsigned char) no_op;
+ p[3] = (unsigned char) no_op;
+ goto on_failure;
+ }
+ break;
+
+ case jump_n:
+ EXTRACT_NUMBER (mcnt, p + 2);
+ DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
+
+ /* Originally, this is how many times we CAN jump. */
+ if (mcnt)
+ {
+ mcnt--;
+ STORE_NUMBER (p + 2, mcnt);
+ goto unconditional_jump;
+ }
+ /* If don't have to jump any more, skip over the rest of command. */
+ else
+ p += 4;
+ break;
+
+ case set_number_at:
+ {
+ DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ p1 = p + mcnt;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
+ STORE_NUMBER (p1, mcnt);
+ break;
+ }
+
+ case wordbound:
+ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+ if (AT_WORD_BOUNDARY (d))
+ break;
+ goto fail;
+
+ case notwordbound:
+ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+ if (AT_WORD_BOUNDARY (d))
+ goto fail;
+ break;
+
+ case wordbeg:
+ DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
+ if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
+ break;
+ goto fail;
+
+ case wordend:
+ DEBUG_PRINT1 ("EXECUTING wordend.\n");
+ if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
+ && (!WORDCHAR_P (d) || AT_STRINGS_END (d)))
+ break;
+ goto fail;
+
+#ifdef emacs
+#ifdef emacs19
+ case before_dot:
+ DEBUG_PRINT1 ("EXECUTING before_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) >= point)
+ goto fail;
+ break;
+
+ case at_dot:
+ DEBUG_PRINT1 ("EXECUTING at_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) != point)
+ goto fail;
+ break;
+
+ case after_dot:
+ DEBUG_PRINT1 ("EXECUTING after_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) <= point)
+ goto fail;
+ break;
+#else /* not emacs19 */
+ case at_dot:
+ DEBUG_PRINT1 ("EXECUTING at_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point)
+ goto fail;
+ break;
+#endif /* not emacs19 */
+
+ case syntaxspec:
+ DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
+ mcnt = *p++;
+ goto matchsyntax;
+
+ case wordchar:
+ DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
+ mcnt = (int) Sword;
+ matchsyntax:
+ PREFETCH ();
+ if (SYNTAX (*d++) != (enum syntaxcode) mcnt)
+ goto fail;
+ SET_REGS_MATCHED ();
+ break;
+
+ case notsyntaxspec:
+ DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
+ mcnt = *p++;
+ goto matchnotsyntax;
+
+ case notwordchar:
+ DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
+ mcnt = (int) Sword;
+ matchnotsyntax:
+ PREFETCH ();
+ if (SYNTAX (*d++) == (enum syntaxcode) mcnt)
+ goto fail;
+ SET_REGS_MATCHED ();
+ break;
+
+#else /* not emacs */
+ case wordchar:
+ DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
+ PREFETCH ();
+ if (!WORDCHAR_P (d))
+ goto fail;
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+
+ case notwordchar:
+ DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
+ PREFETCH ();
+ if (WORDCHAR_P (d))
+ goto fail;
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+#endif /* not emacs */
+
+ default:
+ abort ();
+ }
+ continue; /* Successfully executed one pattern command; keep going. */
+
+
+ /* We goto here if a matching operation fails. */
+ fail:
+ if (!FAIL_STACK_EMPTY ())
+ { /* A restart point is known. Restore to that state. */
+ DEBUG_PRINT1 ("\nFAIL:\n");
+ POP_FAILURE_POINT (d, p,
+ lowest_active_reg, highest_active_reg,
+ regstart, regend, reg_info);
+
+ /* If this failure point is a dummy, try the next one. */
+ if (!p)
+ goto fail;
+
+ /* If we failed to the end of the pattern, don't examine *p. */
+ assert (p <= pend);
+ if (p < pend)
+ {
+ boolean is_a_jump_n = false;
+
+ /* If failed to a backwards jump that's part of a repetition
+ loop, need to pop this failure point and use the next one. */
+ switch ((re_opcode_t) *p)
+ {
+ case jump_n:
+ is_a_jump_n = true;
+ case maybe_pop_jump:
+ case pop_failure_jump:
+ case jump:
+ p1 = p + 1;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+
+ if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
+ || (!is_a_jump_n
+ && (re_opcode_t) *p1 == on_failure_jump))
+ goto fail;
+ break;
+ default:
+ /* do nothing */ ;
+ }
+ }
+
+ if (d >= string1 && d <= end1)
+ dend = end_match_1;
+ }
+ else
+ break; /* Matching at this starting point really fails. */
+ } /* for (;;) */
+
+ if (best_regs_set)
+ goto restore_best_regs;
+
+ FREE_VARIABLES ();
+
+ return -1; /* Failure to match. */
+} /* re_match_2 */
+
+/* Subroutine definitions for re_match_2. */
+
+
+/* We are passed P pointing to a register number after a start_memory.
+
+ Return true if the pattern up to the corresponding stop_memory can
+ match the empty string, and false otherwise.
+
+ If we find the matching stop_memory, sets P to point to one past its number.
+ Otherwise, sets P to an undefined byte less than or equal to END.
+
+ We don't handle duplicates properly (yet). */
+
+static boolean
+group_match_null_string_p (p, end, reg_info)
+ unsigned char **p, *end;
+ register_info_type *reg_info;
+{
+ int mcnt;
+ /* Point to after the args to the start_memory. */
+ unsigned char *p1 = *p + 2;
+
+ while (p1 < end)
+ {
+ /* Skip over opcodes that can match nothing, and return true or
+ false, as appropriate, when we get to one that can't, or to the
+ matching stop_memory. */
+
+ switch ((re_opcode_t) *p1)
+ {
+ /* Could be either a loop or a series of alternatives. */
+ case on_failure_jump:
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+ /* If the next operation is not a jump backwards in the
+ pattern. */
+
+ if (mcnt >= 0)
+ {
+ /* Go through the on_failure_jumps of the alternatives,
+ seeing if any of the alternatives cannot match nothing.
+ The last alternative starts with only a jump,
+ whereas the rest start with on_failure_jump and end
+ with a jump, e.g., here is the pattern for `a|b|c':
+
+ /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
+ /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
+ /exactn/1/c
+
+ So, we have to first go through the first (n-1)
+ alternatives and then deal with the last one separately. */
+
+
+ /* Deal with the first (n-1) alternatives, which start
+ with an on_failure_jump (see above) that jumps to right
+ past a jump_past_alt. */
+
+ while ((re_opcode_t) p1[mcnt-3] == jump_past_alt)
+ {
+ /* `mcnt' holds how many bytes long the alternative
+ is, including the ending `jump_past_alt' and
+ its number. */
+
+ if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
+ reg_info))
+ return false;
+
+ /* Move to right after this alternative, including the
+ jump_past_alt. */
+ p1 += mcnt;
+
+ /* Break if it's the beginning of an n-th alternative
+ that doesn't begin with an on_failure_jump. */
+ if ((re_opcode_t) *p1 != on_failure_jump)
+ break;
+
+ /* Still have to check that it's not an n-th
+ alternative that starts with an on_failure_jump. */
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if ((re_opcode_t) p1[mcnt-3] != jump_past_alt)
+ {
+ /* Get to the beginning of the n-th alternative. */
+ p1 -= 3;
+ break;
+ }
+ }
+
+ /* Deal with the last alternative: go back and get number
+ of the `jump_past_alt' just before it. `mcnt' contains
+ the length of the alternative. */
+ EXTRACT_NUMBER (mcnt, p1 - 2);
+
+ if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info))
+ return false;
+
+ p1 += mcnt; /* Get past the n-th alternative. */
+ } /* if mcnt > 0 */
+ break;
+
+
+ case stop_memory:
+ assert (p1[1] == **p);
+ *p = p1 + 2;
+ return true;
+
+
+ default:
+ if (!common_op_match_null_string_p (&p1, end, reg_info))
+ return false;
+ }
+ } /* while p1 < end */
+
+ return false;
+} /* group_match_null_string_p */
+
+
+/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
+ It expects P to be the first byte of a single alternative and END one
+ byte past the last. The alternative can contain groups. */
+
+static boolean
+alt_match_null_string_p (p, end, reg_info)
+ unsigned char *p, *end;
+ register_info_type *reg_info;
+{
+ int mcnt;
+ unsigned char *p1 = p;
+
+ while (p1 < end)
+ {
+ /* Skip over opcodes that can match nothing, and break when we get
+ to one that can't. */
+
+ switch ((re_opcode_t) *p1)
+ {
+ /* It's a loop. */
+ case on_failure_jump:
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+ break;
+
+ default:
+ if (!common_op_match_null_string_p (&p1, end, reg_info))
+ return false;
+ }
+ } /* while p1 < end */
+
+ return true;
+} /* alt_match_null_string_p */
+
+
+/* Deals with the ops common to group_match_null_string_p and
+ alt_match_null_string_p.
+
+ Sets P to one after the op and its arguments, if any. */
+
+static boolean
+common_op_match_null_string_p (p, end, reg_info)
+ unsigned char **p, *end;
+ register_info_type *reg_info;
+{
+ int mcnt;
+ boolean ret;
+ int reg_no;
+ unsigned char *p1 = *p;
+
+ switch ((re_opcode_t) *p1++)
+ {
+ case no_op:
+ case begline:
+ case endline:
+ case begbuf:
+ case endbuf:
+ case wordbeg:
+ case wordend:
+ case wordbound:
+ case notwordbound:
+#ifdef emacs
+ case before_dot:
+ case at_dot:
+ case after_dot:
+#endif
+ break;
+
+ case start_memory:
+ reg_no = *p1;
+ assert (reg_no > 0 && reg_no <= MAX_REGNUM);
+ ret = group_match_null_string_p (&p1, end, reg_info);
+
+ /* Have to set this here in case we're checking a group which
+ contains a group and a back reference to it. */
+
+ if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
+ REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
+
+ if (!ret)
+ return false;
+ break;
+
+ /* If this is an optimized succeed_n for zero times, make the jump. */
+ case jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if (mcnt >= 0)
+ p1 += mcnt;
+ else
+ return false;
+ break;
+
+ case succeed_n:
+ /* Get to the number of times to succeed. */
+ p1 += 2;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+ if (mcnt == 0)
+ {
+ p1 -= 4;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+ }
+ else
+ return false;
+ break;
+
+ case duplicate:
+ if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
+ return false;
+ break;
+
+ case set_number_at:
+ p1 += 4;
+
+ default:
+ /* All other opcodes mean we cannot match the empty string. */
+ return false;
+ }
+
+ *p = p1;
+ return true;
+} /* common_op_match_null_string_p */
+
+
+/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
+ bytes; nonzero otherwise. */
+
+static int
+bcmp_translate (s1, s2, len, translate)
+ unsigned char *s1, *s2;
+ register int len;
+ char *translate;
+{
+ register unsigned char *p1 = s1, *p2 = s2;
+ while (len)
+ {
+ if (translate[*p1++] != translate[*p2++]) return 1;
+ len--;
+ }
+ return 0;
+}
+
+/* Entry points for GNU code. */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+ compiles PATTERN (of length SIZE) and puts the result in BUFP.
+ Returns 0 if the pattern was valid, otherwise an error string.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ are set in BUFP on entry.
+
+ We call regex_compile to do the actual compilation. */
+
+const char *
+re_compile_pattern (pattern, length, bufp)
+ const char *pattern;
+ int length;
+ struct re_pattern_buffer *bufp;
+{
+ reg_errcode_t ret;
+
+ /* GNU code is written to assume at least RE_NREGS registers will be set
+ (and at least one extra will be -1). */
+ bufp->regs_allocated = REGS_UNALLOCATED;
+
+ /* And GNU code determines whether or not to get register information
+ by passing null for the REGS argument to re_match, etc., not by
+ setting no_sub. */
+ bufp->no_sub = 0;
+
+ /* Match anchors at newline. */
+ bufp->newline_anchor = 1;
+
+ ret = regex_compile (pattern, length, re_syntax_options, bufp);
+
+ return re_error_msg[(int) ret];
+}
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them if this is an Emacs or POSIX compilation. */
+
+#if !defined (emacs) && !defined (_POSIX_SOURCE)
+
+/* BSD has one and only one pattern buffer. */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+re_comp (s)
+ const char *s;
+{
+ reg_errcode_t ret;
+
+ if (!s)
+ {
+ if (!re_comp_buf.buffer)
+ return "No previous regular expression";
+ return 0;
+ }
+
+ if (!re_comp_buf.buffer)
+ {
+ re_comp_buf.buffer = (unsigned char *) malloc (200);
+ if (re_comp_buf.buffer == NULL)
+ return "Memory exhausted";
+ re_comp_buf.allocated = 200;
+
+ re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
+ if (re_comp_buf.fastmap == NULL)
+ return "Memory exhausted";
+ }
+
+ /* Since `re_exec' always passes NULL for the `regs' argument, we
+ don't need to initialize the pattern buffer fields which affect it. */
+
+ /* Match anchors at newlines. */
+ re_comp_buf.newline_anchor = 1;
+
+ ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
+
+ /* Yes, we're discarding `const' here. */
+ return (char *) re_error_msg[(int) ret];
+}
+
+
+int
+re_exec (s)
+ const char *s;
+{
+ const int len = strlen (s);
+ return
+ 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
+}
+#endif /* not emacs and not _POSIX_SOURCE */
+
+/* POSIX.2 functions. Don't define these for Emacs. */
+
+#ifndef emacs
+
+/* regcomp takes a regular expression as a string and compiles it.
+
+ PREG is a regex_t *. We do not expect any fields to be initialized,
+ since POSIX says we shouldn't. Thus, we set
+
+ `buffer' to the compiled pattern;
+ `used' to the length of the compiled pattern;
+ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ REG_EXTENDED bit in CFLAGS is set; otherwise, to
+ RE_SYNTAX_POSIX_BASIC;
+ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ `fastmap' and `fastmap_accurate' to zero;
+ `re_nsub' to the number of subexpressions in PATTERN.
+
+ PATTERN is the address of the pattern string.
+
+ CFLAGS is a series of bits which affect compilation.
+
+ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+ use POSIX basic syntax.
+
+ If REG_NEWLINE is set, then . and [^...] don't match newline.
+ Also, regexec will try a match beginning after every newline.
+
+ If REG_ICASE is set, then we considers upper- and lowercase
+ versions of letters to be equivalent when matching.
+
+ If REG_NOSUB is set, then when PREG is passed to regexec, that
+ routine will report only success or failure, and nothing about the
+ registers.
+
+ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
+ the return codes and their meanings.) */
+
+int
+regcomp (preg, pattern, cflags)
+ regex_t *preg;
+ const char *pattern;
+ int cflags;
+{
+ reg_errcode_t ret;
+ unsigned syntax
+ = (cflags & REG_EXTENDED) ?
+ RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
+
+ /* regex_compile will allocate the space for the compiled pattern. */
+ preg->buffer = 0;
+ preg->allocated = 0;
+
+ /* Don't bother to use a fastmap when searching. This simplifies the
+ REG_NEWLINE case: if we used a fastmap, we'd have to put all the
+ characters after newlines into the fastmap. This way, we just try
+ every character. */
+ preg->fastmap = 0;
+
+ if (cflags & REG_ICASE)
+ {
+ unsigned i;
+
+ preg->translate = (char *) malloc (CHAR_SET_SIZE);
+ if (preg->translate == NULL)
+ return (int) REG_ESPACE;
+
+ /* Map uppercase characters to corresponding lowercase ones. */
+ for (i = 0; i < CHAR_SET_SIZE; i++)
+ preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
+ }
+ else
+ preg->translate = NULL;
+
+ /* If REG_NEWLINE is set, newlines are treated differently. */
+ if (cflags & REG_NEWLINE)
+ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
+ syntax &= ~RE_DOT_NEWLINE;
+ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+ /* It also changes the matching behavior. */
+ preg->newline_anchor = 1;
+ }
+ else
+ preg->newline_anchor = 0;
+
+ preg->no_sub = !!(cflags & REG_NOSUB);
+
+ /* POSIX says a null character in the pattern terminates it, so we
+ can use strlen here in compiling the pattern. */
+ ret = regex_compile (pattern, strlen (pattern), syntax, preg);
+
+ /* POSIX doesn't distinguish between an unmatched open-group and an
+ unmatched close-group: both are REG_EPAREN. */
+ if (ret == REG_ERPAREN) ret = REG_EPAREN;
+
+ return (int) ret;
+}
+
+
+/* regexec searches for a given pattern, specified by PREG, in the
+ string STRING.
+
+ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
+ least NMATCH elements, and we set them to the offsets of the
+ corresponding matched substrings.
+
+ EFLAGS specifies `execution flags' which affect matching: if
+ REG_NOTBOL is set, then ^ does not match at the beginning of the
+ string; if REG_NOTEOL is set, then $ does not match at the end.
+
+ We return 0 if we find a match and REG_NOMATCH if not. */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+ const regex_t *preg;
+ const char *string;
+ size_t nmatch;
+ regmatch_t pmatch[];
+ int eflags;
+{
+ int ret;
+ struct re_registers regs;
+ regex_t private_preg;
+ int len = strlen (string);
+ boolean want_reg_info = !preg->no_sub && nmatch > 0;
+
+ private_preg = *preg;
+
+ private_preg.not_bol = !!(eflags & REG_NOTBOL);
+ private_preg.not_eol = !!(eflags & REG_NOTEOL);
+
+ /* The user has told us exactly how many registers to return
+ information about, via `nmatch'. We have to pass that on to the
+ matching routines. */
+ private_preg.regs_allocated = REGS_FIXED;
+
+ if (want_reg_info)
+ {
+ regs.num_regs = nmatch;
+ regs.start = TALLOC (nmatch, regoff_t);
+ regs.end = TALLOC (nmatch, regoff_t);
+ if (regs.start == NULL || regs.end == NULL)
+ return (int) REG_NOMATCH;
+ }
+
+ /* Perform the searching operation. */
+ ret = re_search (&private_preg, string, len,
+ /* start: */ 0, /* range: */ len,
+ want_reg_info ? &regs : (struct re_registers *) 0);
+
+ /* Copy the register information to the POSIX structure. */
+ if (want_reg_info)
+ {
+ if (ret >= 0)
+ {
+ unsigned r;
+
+ for (r = 0; r < nmatch; r++)
+ {
+ pmatch[r].rm_so = regs.start[r];
+ pmatch[r].rm_eo = regs.end[r];
+ }
+ }
+
+ /* If we needed the temporary register info, free the space now. */
+ free (regs.start);
+ free (regs.end);
+ }
+
+ /* We want zero return to mean success, unlike `re_search'. */
+ return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
+}
+
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+ from either regcomp or regexec. We don't use PREG here. */
+
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+ int errcode;
+ const regex_t *preg;
+ char *errbuf;
+ size_t errbuf_size;
+{
+ const char *msg;
+ size_t msg_size;
+
+ if (errcode < 0
+ || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0])))
+ /* Only error codes returned by the rest of the code should be passed
+ to this routine. If we are given anything else, or if other regex
+ code generates an invalid error code, then the program has a bug.
+ Dump core so we can fix it. */
+ abort ();
+
+ msg = re_error_msg[errcode];
+
+ /* POSIX doesn't require that we do anything in this case, but why
+ not be nice. */
+ if (! msg)
+ msg = "Success";
+
+ msg_size = strlen (msg) + 1; /* Includes the null. */
+
+ if (errbuf_size != 0)
+ {
+ if (msg_size > errbuf_size)
+ {
+ strncpy (errbuf, msg, errbuf_size - 1);
+ errbuf[errbuf_size - 1] = 0;
+ }
+ else
+ strcpy (errbuf, msg);
+ }
+
+ return msg_size;
+}
+
+
+/* Free dynamically allocated space used by PREG. */
+
+void
+regfree (preg)
+ regex_t *preg;
+{
+ if (preg->buffer != NULL)
+ free (preg->buffer);
+ preg->buffer = NULL;
+
+ preg->allocated = 0;
+ preg->used = 0;
+
+ if (preg->fastmap != NULL)
+ free (preg->fastmap);
+ preg->fastmap = NULL;
+ preg->fastmap_accurate = 0;
+
+ if (preg->translate != NULL)
+ free (preg->translate);
+ preg->translate = NULL;
+}
+
+#endif /* not emacs */
+
+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/windows/regex.h b/windows/regex.h
new file mode 100644
index 00000000..10cf8f03
--- /dev/null
+++ b/windows/regex.h
@@ -0,0 +1,506 @@
+/* Definitions for data structures and routines for the regular
+ expression library, version 0.12.
+
+ Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+ 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, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef __REGEXP_LIBRARY_H__
+#define __REGEXP_LIBRARY_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /* POSIX says that <sys/types.h> must be included (by the caller) before
+ <regex.h>. */
+
+#ifdef VMS
+ /* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
+ should be there. */
+#include <stddef.h>
+#endif
+
+
+ /* The following bits are used to determine the regexp syntax we
+ recognize. The set/not-set meanings are chosen so that Emacs syntax
+ remains the value 0. The bits are given in alphabetical order, and
+ the definitions shifted by one from the previous bit; thus, when we
+ add or remove a bit, only one other definition need change. */
+ typedef unsigned reg_syntax_t;
+
+ /* If this bit is not set, then \ inside a bracket expression is literal.
+ If set, then such a \ quotes the following character. */
+#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
+
+ /* If this bit is not set, then + and ? are operators, and \+ and \? are
+ literals.
+ If set, then \+ and \? are operators and + and ? are literals. */
+#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+ /* If this bit is set, then character classes are supported. They are:
+ [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
+ [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+ If not set, then character classes are not supported. */
+#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+ /* If this bit is set, then ^ and $ are always anchors (outside bracket
+ expressions, of course).
+ If this bit is not set, then it depends:
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
+
+ This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+ POSIX draft 11.2 says that * etc. in leading positions is undefined.
+ We already implemented a previous draft which made those constructs
+ invalid, though, so we haven't changed the code back. */
+#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+ /* If this bit is set, then special characters are always special
+ regardless of where they are in the pattern.
+ If this bit is not set, then special characters are special only in
+ some contexts; otherwise they are ordinary. Specifically,
+ * + ? and intervals are only special when not after the beginning,
+ open-group, or alternation operator. */
+#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+ /* If this bit is set, then *, +, ?, and { cannot be first in an re or
+ immediately after an alternation or begin-group operator. */
+#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+ /* If this bit is set, then . matches newline.
+ If not set, then it doesn't. */
+#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+ /* If this bit is set, then . doesn't match NUL.
+ If not set, then it does. */
+#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+ /* If this bit is set, nonmatching lists [^...] do not match newline.
+ If not set, they do. */
+#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+ /* If this bit is set, either \{...\} or {...} defines an
+ interval, depending on RE_NO_BK_BRACES.
+ If not set, \{, \}, {, and } are literals. */
+#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+ /* If this bit is set, +, ? and | aren't recognized as operators.
+ If not set, they are. */
+#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+ /* If this bit is set, newline is an alternation operator.
+ If not set, newline is literal. */
+#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+ /* If this bit is set, then `{...}' defines an interval, and \{ and \}
+ are literals.
+ If not set, then `\{...\}' defines an interval. */
+#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+ /* If this bit is set, (...) defines a group, and \( and \) are literals.
+ If not set, \(...\) defines a group, and ( and ) are literals. */
+#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+ /* If this bit is set, then \<digit> matches <digit>.
+ If not set, then \<digit> is a back-reference. */
+#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+ /* If this bit is set, then | is an alternation operator, and \| is literal.
+ If not set, then \| is an alternation operator, and | is literal. */
+#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+ /* If this bit is set, then an ending range point collating higher
+ than the starting range point, as in [z-a], is invalid.
+ If not set, then when ending range point collates higher than the
+ starting range point, the range is ignored. */
+#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+ /* If this bit is set, then an unmatched ) is ordinary.
+ If not set, then an unmatched ) is invalid. */
+#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+ /* This global variable defines the particular regexp syntax to use (for
+ some interfaces). When a regexp is compiled, the syntax used is
+ stored in the pattern buffer, so changing this does not affect
+ already-compiled regexps. */
+ extern reg_syntax_t re_syntax_options;
+
+ /* Define combinations of the above bits for the standard possibilities.
+ (The [[[ comments delimit what gets put into the Texinfo file, so
+ don't delete them!) */
+ /* [[[begin syntaxes]]] */
+#define RE_SYNTAX_EMACS 0
+
+#define RE_SYNTAX_AWK \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+#define RE_SYNTAX_POSIX_AWK \
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
+
+#define RE_SYNTAX_GREP \
+ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
+ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
+ | RE_NEWLINE_ALT)
+
+#define RE_SYNTAX_EGREP \
+ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
+ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
+ | RE_NO_BK_VBAR)
+
+#define RE_SYNTAX_POSIX_EGREP \
+ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
+
+ /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+ /* Syntax bits common to both basic and extended POSIX regex syntax. */
+#define _RE_SYNTAX_POSIX_COMMON \
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
+#define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
+
+ /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+ isn't minimal, since other operators, such as \`, aren't disabled. */
+#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+#define RE_SYNTAX_POSIX_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+ /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
+ replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
+#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
+ /* [[[end syntaxes]]] */
+
+ /* Maximum number of duplicates an interval can allow. Some systems
+ (erroneously) define this in other header files, but we want our
+ value, so remove any previous define. */
+#ifdef RE_DUP_MAX
+#undef RE_DUP_MAX
+#endif
+#define RE_DUP_MAX ((1 << 15) - 1)
+
+
+ /* POSIX `cflags' bits (i.e., information for `regcomp'). */
+
+ /* If this bit is set, then use extended regular expression syntax.
+ If not set, then use basic regular expression syntax. */
+#define REG_EXTENDED 1
+
+ /* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+#define REG_ICASE (REG_EXTENDED << 1)
+
+ /* If this bit is set, then anchors do not match at newline
+ characters in the string.
+ If not set, then anchors do match at newlines. */
+#define REG_NEWLINE (REG_ICASE << 1)
+
+ /* If this bit is set, then report only success or fail in regexec.
+ If not set, then returns differ between not matching and errors. */
+#define REG_NOSUB (REG_NEWLINE << 1)
+
+
+ /* POSIX `eflags' bits (i.e., information for regexec). */
+
+ /* If this bit is set, then the beginning-of-line operator doesn't match
+ the beginning of the string (presumably because it's not the
+ beginning of a line).
+ If not set, then the beginning-of-line operator does match the
+ beginning of the string. */
+#define REG_NOTBOL 1
+
+ /* Like REG_NOTBOL, except for the end-of-line. */
+#define REG_NOTEOL (1 << 1)
+
+
+ /* If any error codes are removed, changed, or added, update the
+ `re_error_msg' table in regex.c. */
+ typedef enum
+ {
+ REG_NOERROR = 0, /* Success. */
+ REG_NOMATCH, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ REG_BADPAT, /* Invalid pattern. */
+ REG_ECOLLATE, /* Not implemented. */
+ REG_ECTYPE, /* Invalid character class name. */
+ REG_EESCAPE, /* Trailing backslash. */
+ REG_ESUBREG, /* Invalid back reference. */
+ REG_EBRACK, /* Unmatched left bracket. */
+ REG_EPAREN, /* Parenthesis imbalance. */
+ REG_EBRACE, /* Unmatched \{. */
+ REG_BADBR, /* Invalid contents of \{\}. */
+ REG_ERANGE, /* Invalid range end. */
+ REG_ESPACE, /* Ran out of memory. */
+ REG_BADRPT, /* No preceding re for repetition op. */
+
+ /* Error codes we've added. */
+ REG_EEND, /* Premature end. */
+ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+ } reg_errcode_t;
+
+ /* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields `buffer', `allocated', `fastmap',
+ `translate', and `no_sub' can be set. After the pattern has been
+ compiled, the `re_nsub' field is available. All other fields are
+ private to the regex routines. */
+
+ struct re_pattern_buffer {
+ /* [[[begin pattern_buffer]]] */
+ /* Space that holds the compiled pattern. It is declared as
+ `unsigned char *' because its elements are
+ sometimes used as array indexes. */
+ unsigned char *buffer;
+
+ /* Number of bytes to which `buffer' points. */
+ unsigned long allocated;
+
+ /* Number of bytes actually used in `buffer'. */
+ unsigned long used;
+
+ /* Syntax setting with which the pattern was compiled. */
+ reg_syntax_t syntax;
+
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses
+ the fastmap, if there is one, to skip over impossible
+ starting points for matches. */
+ char *fastmap;
+
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation
+ is applied to a pattern when it is compiled and to a string
+ when it is matched. */
+ char *translate;
+
+ /* Number of subexpressions found by the compiler. */
+ size_t re_nsub;
+
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see
+ whether or not we should use the fastmap, so we don't set
+ this absolutely perfectly; see `re_compile_fastmap' (the
+ `duplicate' case). */
+unsigned can_be_null :
+ 1;
+
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
+#define REGS_UNALLOCATED 0
+#define REGS_REALLOCATE 1
+#define REGS_FIXED 2
+
+unsigned regs_allocated :
+ 2;
+
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
+unsigned fastmap_accurate :
+ 1;
+
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
+unsigned no_sub :
+ 1;
+
+ /* If set, a beginning-of-line anchor doesn't match at the
+ beginning of the string. */
+unsigned not_bol :
+ 1;
+
+ /* Similarly for an end-of-line anchor. */
+unsigned not_eol :
+ 1;
+
+ /* If true, an anchor at a newline matches. */
+unsigned newline_anchor :
+ 1;
+
+ /* [[[end pattern_buffer]]] */
+ };
+
+ typedef struct re_pattern_buffer regex_t;
+
+
+ /* search.c (search_buffer) in Emacs needs this one opcode value. It is
+ defined both in `regex.c' and here. */
+#define RE_EXACTN_VALUE 1
+
+ /* Type for byte offsets within the string. POSIX mandates this. */
+ typedef int regoff_t;
+
+
+ /* This is the structure we store register match data in. See
+ regex.texinfo for a full description of what registers match. */
+ struct re_registers {
+ unsigned num_regs;
+ regoff_t *start;
+ regoff_t *end;
+ };
+
+
+ /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ `re_match_2' returns information about at least this many registers
+ the first time a `regs' structure is passed. */
+#ifndef RE_NREGS
+#define RE_NREGS 30
+#endif
+
+
+ /* POSIX specification for registers. Aside from the different names than
+ `re_registers', POSIX uses an array of structures, instead of a
+ structure of arrays. */
+ typedef struct {
+ regoff_t rm_so; /* Byte offset from string's start to substring's start. */
+ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
+ }
+ regmatch_t;
+
+ /* Declarations for routines. */
+
+ /* To avoid duplicating every routine declaration -- once with a
+ prototype (if we are ANSI), and once without (if we aren't) -- we
+ use the following macro to declare argument types. This
+ unfortunately clutters up the declarations a bit, but I think it's
+ worth it. */
+
+#if __STDC__
+
+#define _RE_ARGS(args) args
+
+#else /* not __STDC__ */
+
+#define _RE_ARGS(args) ()
+
+#endif /* not __STDC__ */
+
+ /* Sets the current default syntax to SYNTAX, and return the old syntax.
+ You can also simply assign to the `re_syntax_options' variable. */
+ extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+
+ /* Compile the regular expression PATTERN, with length LENGTH
+ and syntax given by the global `re_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not. */
+ extern const char *re_compile_pattern
+ _RE_ARGS ((const char *pattern, int length,
+ struct re_pattern_buffer *buffer));
+
+
+ /* Compile a fastmap for the compiled pattern in BUFFER; used to
+ accelerate searches. Return 0 if successful and -2 if was an
+ internal error. */
+ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+
+
+ /* Search in the string STRING (with length LENGTH) for the pattern
+ compiled into BUFFER. Start searching at position START, for RANGE
+ characters. Return the starting position of the match, -1 for no
+ match, or -2 for an internal error. Also return register
+ information in REGS (if REGS and BUFFER->no_sub are nonzero). */
+ extern int re_search
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range, struct re_registers *regs));
+
+
+ /* Like `re_search', but search in the concatenation of STRING1 and
+ STRING2. Also, stop searching at index START + STOP. */
+ extern int re_search_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs, int stop));
+
+
+ /* Like `re_search', but return how many characters in STRING the regexp
+ in BUFFER matched, starting at position START. */
+ extern int re_match
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs));
+
+
+ /* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+ extern int re_match_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop));
+
+
+ /* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using BUFFER and REGS will use this memory
+ for recording register information. STARTS and ENDS must be
+ allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ (regoff_t)' bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+ extern void re_set_registers
+ _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends));
+
+ /* 4.2 bsd compatibility. */
+ extern char *re_comp _RE_ARGS ((const char *));
+ extern int re_exec _RE_ARGS ((const char *));
+
+ /* POSIX compatibility. */
+ extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
+ extern int regexec
+ _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
+ regmatch_t pmatch[], int eflags));
+ extern size_t regerror
+ _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
+ size_t errbuf_size));
+ extern void regfree _RE_ARGS ((regex_t *preg));
+
+#endif /* not __REGEXP_LIBRARY_H__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/windows/resource.h b/windows/resource.h
new file mode 100644
index 00000000..9916ed38
--- /dev/null
+++ b/windows/resource.h
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/windows/resource.rc b/windows/resource.rc
new file mode 100644
index 00000000..cdb829ea
--- /dev/null
+++ b/windows/resource.rc
@@ -0,0 +1,109 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,5,6,0
+ PRODUCTVERSION 0,5,6,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "Comments", "\0"
+ VALUE "CompanyName", "Grame\0"
+ VALUE "FileDescription", "Jackmp library for Windows\0"
+ VALUE "FileVersion", "0, 5, 6, 0\0"
+ VALUE "InternalName", "libjackmp\0"
+ VALUE "LegalCopyright", "Copyright Grame © 2006\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "libjackmp.dll\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "libjackmp\0"
+ VALUE "ProductVersion", "0, 5, 6, 0\0"
+ VALUE "SpecialBuild", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // !_MAC
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/windows/testSynchoServerClient.dsp b/windows/testSynchoServerClient.dsp
new file mode 100644
index 00000000..37e17ca7
--- /dev/null
+++ b/windows/testSynchoServerClient.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="testSynchoServerClient" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=testSynchoServerClient - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchoServerClient.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchoServerClient.mak" CFG="testSynchoServerClient - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testSynchoServerClient - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "testSynchoServerClient - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "testSynchoServerClient - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "testSynchoServerClient - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "testSynchoServerClient - Win32 Release"
+# Name "testSynchoServerClient - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\JackError.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\testSynchroServerClient.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/windows/testSynchroClient.dsp b/windows/testSynchroClient.dsp
new file mode 100644
index 00000000..0dcc6fa2
--- /dev/null
+++ b/windows/testSynchroClient.dsp
@@ -0,0 +1,149 @@
+# Microsoft Developer Studio Project File - Name="testSynchroClient" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=testSynchroClient - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchroClient.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchroClient.mak" CFG="testSynchroClient - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testSynchroClient - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "testSynchroClient - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "testSynchroClient - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "testSynchroClient - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "testSynchroClient - Win32 Release"
+# Name "testSynchroClient - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\JackError.c
+
+!IF "$(CFG)" == "testSynchroClient - Win32 Release"
+
+!ELSEIF "$(CFG)" == "testSynchroClient - Win32 Debug"
+
+# ADD CPP /U "." /U "../common"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinEvent.cpp
+
+!IF "$(CFG)" == "testSynchroClient - Win32 Release"
+
+!ELSEIF "$(CFG)" == "testSynchroClient - Win32 Debug"
+
+# ADD CPP /U "." /U "../common"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinThread.cpp
+
+!IF "$(CFG)" == "testSynchroClient - Win32 Release"
+
+!ELSEIF "$(CFG)" == "testSynchroClient - Win32 Debug"
+
+# ADD CPP /U "." /U "../common"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\testSynchroClient.cpp
+
+!IF "$(CFG)" == "testSynchroClient - Win32 Release"
+
+!ELSEIF "$(CFG)" == "testSynchroClient - Win32 Debug"
+
+# ADD CPP /U "." /U "../common"
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/windows/testSynchroServer.dsp b/windows/testSynchroServer.dsp
new file mode 100644
index 00000000..da5f77dd
--- /dev/null
+++ b/windows/testSynchroServer.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="testSynchroServer" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=testSynchroServer - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchroServer.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testSynchroServer.mak" CFG="testSynchroServer - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testSynchroServer - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "testSynchroServer - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "testSynchroServer - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "testSynchroServer - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "../common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "testSynchroServer - Win32 Release"
+# Name "testSynchroServer - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\common\JackError.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\JackWinThread.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\common\testSynchroServer.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project