git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3685 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.9.8
@@ -25,35 +25,98 @@ Paul Davis | |||
Jackdmp changes log | |||
--------------------------- | |||
2009-08-28 Stephane Letz <letz@grame.fr> | |||
2009-10-30 Stephane Letz <letz@grame.fr> | |||
* Correct monitor port naming in JackAudioDriver and JackCoreAudioDriver. | |||
* Big endian bug fix in memops.c (http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=11_be24bit.patch;att=1;bug=486308) | |||
* In JackCoreAudioDriver, improve management of input/output channels: -1 is now used internally to indicate a wanted max value. | |||
* In JackCoreAudioDriver::OpenAUHAL, correct stream format setup and cleanup. | |||
* Correct crash bug in JackAudioAdapterInterface when not input is used in adapter (temporary fix...) | |||
* Sync JackCoreAudioAdapter code on JackCoreAudioDriver one. | |||
* JACK_SCHED_POLICY switched to SCHED_FIFO. | |||
2009-07-31 Stephane Letz <letz@grame.fr> | |||
2009-10-29 Stephane Letz <letz@grame.fr> | |||
* Use SNDCTL_DSP_SYNCGROUP/SNDCTL_DSP_SYNCSTART API to synchronize input and output in Solaris boomer backend. | |||
* In JackCoreAudioDriver::Start, wait for the audio driver to effectively start (use the MeasureCallback). | |||
2009-10-28 Stephane Letz <letz@grame.fr> | |||
* In JackCoreAudioDriver, force the SR value to the wanted one *before* creating aggregate device (otherwise creation will fail). | |||
* In JackCoreAudioDriver, better cleanup of AD when intermediate open failure. | |||
2009-07-29 Stephane Letz <letz@grame.fr> | |||
2009-10-27 Stephane Letz <letz@grame.fr> | |||
* Add a -G parameter in CoreAudio backend (the computation value in RT thread expressed as percent of period). | |||
* Dynamic system version detection in JackCoreAudioDriver to either create public or private aggregate device. | |||
2009-07-28 Stephane Letz <letz@grame.fr> | |||
2009-10-26 Stephane Letz <letz@grame.fr> | |||
* Fix CopyAndConvertIn for Solaris backends. | |||
* Implement "hog mode" (exclusive access of the audio device) in JackCoreAudioDriver. | |||
* Fix jack_set_sample_rate_callback to have he same behavior as in JACK1. | |||
2009-10-25 Stephane Letz <letz@grame.fr> | |||
* Improve aggregate device management in JackCoreAudioDriver : now a "private" device only and cleanup properly. | |||
* Aggregate device code added to JackCoreAudioAdapter. | |||
2009-10-23 Stephane Letz <letz@grame.fr> | |||
* Correct JackProcessSync::LockedTimedWait. | |||
* Correct JACK_MESSAGE_SIZE value, particularly in OSX RPC code. | |||
* Now start server channel thread only when backend has been started (so in JackServer::Start). Should solve race conditions at start time. | |||
* jack_verbose moved to JackGlobals class. | |||
2009-10-22 Stephane Letz <letz@grame.fr> | |||
* Correct jackdmp.cpp (failures case were not correct..). Improve JackCoreAudioDriver code. Raise default port number to 2048. | |||
2009-10-20 Stephane Letz <letz@grame.fr> | |||
* Add a string parameter to server ==> client notification, add a new JackInfoShutdownCallback type. | |||
* CoreAudio backend now issue a JackInfoShutdownCallback when an unrecoverable error is detected (sampling rate change, stream configuration changeÉ) | |||
2009-10-17 Stephane Letz <letz@grame.fr> | |||
* Correct server temporary mode : now set a global and quit after server/client message handling is finished. | |||
2009-10-15 Stephane Letz <letz@grame.fr> | |||
* Change CoreAudio notification thread setup for OSX Snow Leopard. | |||
2009-09-18 Stephane Letz <letz@grame.fr> | |||
* Simplify transport in NetJack2: master only can control transport. | |||
2009-09-15 Stephane Letz <letz@grame.fr> | |||
* Correct CPU timing in JackNetDriver, now take cycle begin time after Read. | |||
* Fix issues in JackNetDriver::DecodeTransportData and JackNetDriver::Initialize. | |||
2009-08-28 Stephane Letz <letz@grame.fr> | |||
* Correct monitor port naming in JackAudioDriver and JackCoreAudioDriver. | |||
* Big endian bug fix in memops.c (http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=11_be24bit.patch;att=1;bug=486308) | |||
2009-07-31 Stephane Letz <letz@grame.fr> | |||
* Use SNDCTL_DSP_SYNCGROUP/SNDCTL_DSP_SYNCSTART API to synchronize input and output in Solaris boomer backend. | |||
2009-07-29 Stephane Letz <letz@grame.fr> | |||
* Add a -G parameter in CoreAudio backend (the computation value in RT thread expressed as percent of period). | |||
2009-07-28 Stephane Letz <letz@grame.fr> | |||
* Fix CopyAndConvertIn for Solaris backends. | |||
2009-07-22 Stephane Letz <letz@grame.fr> | |||
* Version 1.9.4 started. | |||
* Solaris boomer backend now working in capture or playback only mode. | |||
* Version 1.9.4 started. | |||
* Solaris boomer backend now working in capture or playback only mode. | |||
* Fix control.h for proper compilation on Solaris. | |||
2009-07-17 Stephane Letz <letz@grame.fr> | |||
* Loopback backend reborn as a dynamically loadable separated backend. | |||
* Loopback backend reborn as a dynamically loadable separated backend. | |||
* -L parameter for loopback backend activated again in jackd. | |||
2009-07-17 Stephane Letz <letz@grame.fr> | |||
* Big rewrite of Solaris boomer driver, seems to work in duplex mode at least. | |||
@@ -72,6 +72,8 @@ extern "C" | |||
EXPORT int jack_is_realtime (jack_client_t *client); | |||
EXPORT void jack_on_shutdown (jack_client_t *client, | |||
JackShutdownCallback shutdown_callback, void *arg); | |||
EXPORT void jack_on_info_shutdown (jack_client_t *client, | |||
JackInfoShutdownCallback shutdown_callback, void *arg); | |||
EXPORT int jack_set_process_callback (jack_client_t *client, | |||
JackProcessCallback process_callback, | |||
void *arg); | |||
@@ -812,6 +814,7 @@ EXPORT void jack_on_shutdown(jack_client_t* ext_client, JackShutdownCallback cal | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackClient* client = (JackClient*)ext_client; | |||
jack_error("jack_on_shutdown: deprecated, use jack_on_info_shutdown"); | |||
if (client == NULL) { | |||
jack_error("jack_on_shutdown called with a NULL client"); | |||
} else { | |||
@@ -819,6 +822,19 @@ EXPORT void jack_on_shutdown(jack_client_t* ext_client, JackShutdownCallback cal | |||
} | |||
} | |||
EXPORT void jack_on_info_shutdown(jack_client_t* ext_client, JackInfoShutdownCallback callback, void* arg) | |||
{ | |||
#ifdef __CLIENTDEBUG__ | |||
JackLibGlobals::CheckContext(); | |||
#endif | |||
JackClient* client = (JackClient*)ext_client; | |||
if (client == NULL) { | |||
jack_error("jack_on_info_shutdown called with a NULL client"); | |||
} else { | |||
client->OnInfoShutdown(callback, arg); | |||
} | |||
} | |||
EXPORT int jack_set_process_callback(jack_client_t* ext_client, JackProcessCallback callback, void* arg) | |||
{ | |||
#ifdef __CLIENTDEBUG__ | |||
@@ -240,10 +240,18 @@ namespace Jack | |||
// Finer estimation of the position in the ringbuffer | |||
int delta_frames = (fPullAndPushTime > 0) ? (int)((float(long(GetMicroSeconds() - fPullAndPushTime)) * float(fAdaptedSampleRate)) / 1000000.f) : 0; | |||
double ratio = fPIControler.GetRatio(fCaptureRingBuffer[0]->GetError() - delta_frames); | |||
double ratio = 1; | |||
// TODO : done like this just to avoid crash when input only or output only... | |||
if (fCaptureChannels > 0) | |||
ratio = fPIControler.GetRatio(fCaptureRingBuffer[0]->GetError() - delta_frames); | |||
else if (fPlaybackChannels > 0) | |||
ratio = fPIControler.GetRatio(fPlaybackRingBuffer[0]->GetError() - delta_frames); | |||
#ifdef JACK_MONITOR | |||
fTable.Write(fCaptureRingBuffer[0]->GetError(), fCaptureRingBuffer[0]->GetError() - delta_frames, ratio, 1/ratio, fCaptureRingBuffer[0]->ReadSpace(), fCaptureRingBuffer[0]->ReadSpace()); | |||
if (fCaptureRingBuffer[0] != NULL) | |||
fTable.Write(fCaptureRingBuffer[0]->GetError(), fCaptureRingBuffer[0]->GetError() - delta_frames, ratio, 1/ratio, fCaptureRingBuffer[0]->ReadSpace(), fCaptureRingBuffer[0]->ReadSpace()); | |||
#endif | |||
// Push/pull from ringbuffer | |||
@@ -82,7 +82,7 @@ class JackClientChannelInterface | |||
virtual void ClientClose(int refnum, int* result) | |||
{} | |||
virtual void ClientActivate(int refnum, int state, int* result) | |||
virtual void ClientActivate(int refnum, int is_real_time, int* result) | |||
{} | |||
virtual void ClientDeactivate(int refnum, int* result) | |||
{} | |||
@@ -49,6 +49,7 @@ JackClient::JackClient(JackSynchro* table):fThread(this) | |||
fGraphOrder = NULL; | |||
fXrun = NULL; | |||
fShutdown = NULL; | |||
fInfoShutdown = NULL; | |||
fInit = NULL; | |||
fBufferSize = NULL; | |||
fClientRegistration = NULL; | |||
@@ -63,6 +64,7 @@ JackClient::JackClient(JackSynchro* table):fThread(this) | |||
fGraphOrderArg = NULL; | |||
fXrunArg = NULL; | |||
fShutdownArg = NULL; | |||
fInfoShutdownArg = NULL; | |||
fInitArg = NULL; | |||
fBufferSizeArg = NULL; | |||
fFreewheelArg = NULL; | |||
@@ -132,12 +134,12 @@ void JackClient::SetupDriverSync(bool freewheel) | |||
\brief Notification received from the server. | |||
*/ | |||
int JackClient::ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackClient::ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
return 0; | |||
} | |||
int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
int res = 0; | |||
@@ -145,11 +147,11 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
switch (notify) { | |||
case kAddClient: | |||
res = ClientNotifyImp(refnum, name, notify, sync, value1, value2); | |||
res = ClientNotifyImp(refnum, name, notify, sync, message, value1, value2); | |||
break; | |||
case kRemoveClient: | |||
res = ClientNotifyImp(refnum, name, notify, sync, value1, value2); | |||
res = ClientNotifyImp(refnum, name, notify, sync, message, value1, value2); | |||
break; | |||
case kActivateClient: | |||
@@ -247,6 +249,14 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||
if (fXrun) | |||
res = fXrun(fXrunArg); | |||
break; | |||
case kShutDownCallback: | |||
jack_log("JackClient::kShutDownCallback"); | |||
if (fInfoShutdown) { | |||
fInfoShutdown(value1, message, fInfoShutdownArg); | |||
fInfoShutdown = NULL; | |||
} | |||
break; | |||
} | |||
} | |||
@@ -582,7 +592,10 @@ void JackClient::ShutDown() | |||
jack_log("ShutDown"); | |||
JackGlobals::fServerRunning = false; | |||
if (fShutdown) { | |||
if (fInfoShutdown) { | |||
fInfoShutdown(JackFailure, "JACK server has been closed", fInfoShutdownArg); | |||
fInfoShutdown = NULL; | |||
} else if (fShutdown) { | |||
fShutdown(fShutdownArg); | |||
fShutdown = NULL; | |||
} | |||
@@ -772,6 +785,17 @@ void JackClient::OnShutdown(JackShutdownCallback callback, void *arg) | |||
fShutdown = callback; | |||
} | |||
} | |||
void JackClient::OnInfoShutdown(JackInfoShutdownCallback callback, void *arg) | |||
{ | |||
if (IsActive()) { | |||
jack_error("You cannot set callbacks on an active client"); | |||
} else { | |||
GetClientControl()->fCallback[kShutDownCallback] = (callback != NULL); | |||
fInfoShutdownArg = arg; | |||
fInfoShutdown = callback; | |||
} | |||
} | |||
int JackClient::SetProcessCallback(JackProcessCallback callback, void *arg) | |||
{ | |||
@@ -850,6 +874,9 @@ int JackClient::SetSampleRateCallback(JackSampleRateCallback callback, void *arg | |||
GetClientControl()->fCallback[kSampleRateCallback] = (callback != NULL); | |||
fSampleRateArg = arg; | |||
fSampleRate = callback; | |||
// Now invoke it | |||
if (callback) | |||
callback(GetEngineControl()->fSampleRate, arg); | |||
return 0; | |||
} | |||
} | |||
@@ -54,6 +54,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface | |||
JackGraphOrderCallback fGraphOrder; | |||
JackXRunCallback fXrun; | |||
JackShutdownCallback fShutdown; | |||
JackInfoShutdownCallback fInfoShutdown; | |||
JackThreadInitCallback fInit; | |||
JackBufferSizeCallback fBufferSize; | |||
JackSampleRateCallback fSampleRate; | |||
@@ -70,6 +71,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface | |||
void* fGraphOrderArg; | |||
void* fXrunArg; | |||
void* fShutdownArg; | |||
void* fInfoShutdownArg; | |||
void* fInitArg; | |||
void* fBufferSizeArg; | |||
void* fSampleRateArg; | |||
@@ -95,7 +97,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface | |||
void CallSyncCallback(); | |||
void CallTimebaseCallback(); | |||
virtual int ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value1, int value); | |||
virtual int ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value); | |||
inline void DummyCycle(); | |||
inline void ExecuteThread(); | |||
@@ -123,7 +125,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface | |||
virtual JackEngineControl* GetEngineControl() const = 0; | |||
// Notifications | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
virtual int Activate(); | |||
virtual int Deactivate(); | |||
@@ -159,6 +161,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface | |||
// Callbacks | |||
virtual void OnShutdown(JackShutdownCallback callback, void *arg); | |||
virtual void OnInfoShutdown(JackInfoShutdownCallback callback, void *arg); | |||
virtual int SetProcessCallback(JackProcessCallback callback, void* arg); | |||
virtual int SetXRunCallback(JackXRunCallback callback, void* arg); | |||
virtual int SetInitCallback(JackThreadInitCallback callback, void* arg); | |||
@@ -44,7 +44,7 @@ class SERVER_EXPORT JackClientInterface | |||
virtual int Close() = 0; | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) = 0; | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) = 0; | |||
virtual JackClientControl* GetClientControl() const = 0; | |||
}; | |||
@@ -32,9 +32,10 @@ | |||
#define JACK_PORT_TYPE_SIZE 32 | |||
#define JACK_CLIENT_NAME_SIZE 64 | |||
#define JACK_MESSAGE_SIZE 256 | |||
#ifndef PORT_NUM | |||
#define PORT_NUM 1024 | |||
#define PORT_NUM 2048 | |||
#endif | |||
#define DRIVER_PORT_NUM 256 | |||
@@ -139,10 +139,10 @@ JackEngineControl* JackDebugClient::GetEngineControl() const | |||
\brief Notification received from the server. | |||
*/ | |||
int JackDebugClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackDebugClient::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
CheckClient(); | |||
return fClient->ClientNotify( refnum, name, notify, sync, value1, value2); | |||
return fClient->ClientNotify( refnum, name, notify, sync, message, value1, value2); | |||
} | |||
int JackDebugClient::Activate() | |||
@@ -416,6 +416,12 @@ void JackDebugClient::OnShutdown(JackShutdownCallback callback, void *arg) | |||
fClient->OnShutdown(callback, arg); | |||
} | |||
void JackDebugClient::OnInfoShutdown(JackInfoShutdownCallback callback, void *arg) | |||
{ | |||
CheckClient(); | |||
fClient->OnInfoShutdown(callback, arg); | |||
} | |||
int JackDebugClient::TimeCallback(jack_nframes_t nframes, void *arg) | |||
{ | |||
JackDebugClient* client = (JackDebugClient*)arg; | |||
@@ -75,7 +75,7 @@ class JackDebugClient : public JackClient | |||
virtual JackEngineControl* GetEngineControl() const; | |||
// Notifications | |||
int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
int Activate(); | |||
int Deactivate(); | |||
@@ -110,6 +110,7 @@ class JackDebugClient : public JackClient | |||
// Callbacks | |||
void OnShutdown(JackShutdownCallback callback, void *arg); | |||
void OnInfoShutdown(JackInfoShutdownCallback callback, void *arg); | |||
int SetProcessCallback(JackProcessCallback callback, void* arg); | |||
int SetXRunCallback(JackXRunCallback callback, void* arg); | |||
int SetInitCallback(JackThreadInitCallback callback, void* arg); | |||
@@ -167,11 +167,15 @@ int JackDriver::Open(jack_nframes_t buffer_size, | |||
int JackDriver::Close() | |||
{ | |||
jack_log("JackDriver::Close"); | |||
fGraphManager->DirectDisconnect(fClientControl.fRefNum, fClientControl.fRefNum); // Disconnect driver from itself for sync | |||
fClientControl.fActive = false; | |||
fEngineControl->fDriverNum--; | |||
return fEngine->ClientInternalClose(fClientControl.fRefNum, false); | |||
if (fClientControl.fRefNum > 0) { | |||
jack_log("JackDriver::Close"); | |||
fGraphManager->DirectDisconnect(fClientControl.fRefNum, fClientControl.fRefNum); // Disconnect driver from itself for sync | |||
fClientControl.fActive = false; | |||
fEngineControl->fDriverNum--; | |||
return fEngine->ClientInternalClose(fClientControl.fRefNum, false); | |||
} else { | |||
return -1; | |||
} | |||
} | |||
/*! | |||
@@ -190,7 +194,7 @@ void JackDriver::SetupDriverSync(int ref, bool freewheel) | |||
} | |||
} | |||
int JackDriver::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackDriver::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
switch (notify) { | |||
@@ -250,6 +254,11 @@ void JackDriver::NotifySampleRate(jack_nframes_t sample_rate) | |||
fEngine->NotifySampleRate(sample_rate); | |||
fEngineControl->InitFrameTime(); | |||
} | |||
void JackDriver::NotifyFailure(int code, const char* reason) | |||
{ | |||
fEngine->NotifyFailure(code, reason); | |||
} | |||
void JackDriver::SetMaster(bool onoff) | |||
{ | |||
@@ -140,6 +140,7 @@ class SERVER_EXPORT JackDriver : public JackDriverClientInterface | |||
void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs); // XRun notification sent by the driver | |||
void NotifyBufferSize(jack_nframes_t buffer_size); // BufferSize notification sent by the driver | |||
void NotifySampleRate(jack_nframes_t sample_rate); // SampleRate notification sent by the driver | |||
void NotifyFailure(int code, const char* reason); // Failure notification sent by the driver | |||
public: | |||
@@ -199,7 +200,7 @@ class SERVER_EXPORT JackDriver : public JackDriverClientInterface | |||
virtual int SetBufferSize(jack_nframes_t buffer_size); | |||
virtual int SetSampleRate(jack_nframes_t sample_rate); | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
virtual JackClientControl* GetClientControl() const; | |||
virtual bool IsRealTime() const; | |||
@@ -62,7 +62,7 @@ SERVER_EXPORT void jack_print_driver_options (jack_driver_desc_t* desc, FILE* fi | |||
fprintf (file, "\t-%c, --%s \t%s (default: %s)\n", | |||
desc->params[i].character, | |||
desc->params[i].name, | |||
desc->params[i].short_desc, | |||
desc->params[i].long_desc, | |||
arg_default); | |||
} | |||
} | |||
@@ -119,9 +119,7 @@ void JackEngine::ReleaseRefnum(int ref) | |||
// last client and temporay case: quit the server | |||
jack_log("JackEngine::ReleaseRefnum server quit"); | |||
fEngineControl->fTemporary = false; | |||
#ifndef WIN32 | |||
exit(0); | |||
#endif | |||
JackServerGlobals::fKilled = true; | |||
} | |||
} | |||
} | |||
@@ -205,7 +203,7 @@ void JackEngine::CheckXRun(jack_time_t callback_usecs) // REVOIR les conditions | |||
// Notifications | |||
//--------------- | |||
void JackEngine::NotifyClient(int refnum, int event, int sync, int value1, int value2) | |||
void JackEngine::NotifyClient(int refnum, int event, int sync, const char* message, int value1, int value2) | |||
{ | |||
JackClientInterface* client = fClientTable[refnum]; | |||
@@ -213,20 +211,20 @@ void JackEngine::NotifyClient(int refnum, int event, int sync, int value1, int v | |||
if (!client) { | |||
jack_log("JackEngine::NotifyClient: client not available anymore"); | |||
} else if (client->GetClientControl()->fCallback[event]) { | |||
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, value1, value2) < 0) | |||
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, message, value1, value2) < 0) | |||
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2); | |||
} else { | |||
jack_log("JackEngine::NotifyClient: no callback for event = %ld", event); | |||
} | |||
} | |||
void JackEngine::NotifyClients(int event, int sync, int value1, int value2) | |||
void JackEngine::NotifyClients(int event, int sync, const char* message, int value1, int value2) | |||
{ | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = fClientTable[i]; | |||
if (client) { | |||
if (client->GetClientControl()->fCallback[event]) { | |||
if (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, value1, value2) < 0) | |||
if (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, message, value1, value2) < 0) | |||
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2); | |||
} else { | |||
jack_log("JackEngine::NotifyClients: no callback for event = %ld", event); | |||
@@ -242,11 +240,11 @@ int JackEngine::NotifyAddClient(JackClientInterface* new_client, const char* nam | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
JackClientInterface* old_client = fClientTable[i]; | |||
if (old_client) { | |||
if (old_client->ClientNotify(refnum, name, kAddClient, true, 0, 0) < 0) { | |||
if (old_client->ClientNotify(refnum, name, kAddClient, true, "", 0, 0) < 0) { | |||
jack_error("NotifyAddClient old_client fails name = %s", old_client->GetClientControl()->fName); | |||
return -1; | |||
} | |||
if (new_client->ClientNotify(i, old_client->GetClientControl()->fName, kAddClient, true, 0, 0) < 0) { | |||
if (new_client->ClientNotify(i, old_client->GetClientControl()->fName, kAddClient, true, "", 0, 0) < 0) { | |||
jack_error("NotifyAddClient new_client fails name = %s", name); | |||
return -1; | |||
} | |||
@@ -262,7 +260,7 @@ void JackEngine::NotifyRemoveClient(const char* name, int refnum) | |||
for (int i = 0; i < CLIENT_NUM; i++) { | |||
JackClientInterface* client = fClientTable[i]; | |||
if (client) { | |||
client->ClientNotify(refnum, name, kRemoveClient, true, 0, 0); | |||
client->ClientNotify(refnum, name, kRemoveClient, true, "",0, 0); | |||
} | |||
} | |||
} | |||
@@ -279,51 +277,56 @@ void JackEngine::NotifyXRun(jack_time_t callback_usecs, float delayed_usecs) | |||
void JackEngine::NotifyXRun(int refnum) | |||
{ | |||
if (refnum == ALL_CLIENTS) { | |||
NotifyClients(kXRunCallback, false, 0, 0); | |||
NotifyClients(kXRunCallback, false, "", 0, 0); | |||
} else { | |||
NotifyClient(refnum, kXRunCallback, false, 0, 0); | |||
NotifyClient(refnum, kXRunCallback, false, "", 0, 0); | |||
} | |||
} | |||
void JackEngine::NotifyGraphReorder() | |||
{ | |||
NotifyClients(kGraphOrderCallback, false, 0, 0); | |||
NotifyClients(kGraphOrderCallback, false, "", 0, 0); | |||
} | |||
void JackEngine::NotifyBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
NotifyClients(kBufferSizeCallback, true, buffer_size, 0); | |||
NotifyClients(kBufferSizeCallback, true, "", buffer_size, 0); | |||
} | |||
void JackEngine::NotifySampleRate(jack_nframes_t sample_rate) | |||
{ | |||
NotifyClients(kSampleRateCallback, true, sample_rate, 0); | |||
NotifyClients(kSampleRateCallback, true, "", sample_rate, 0); | |||
} | |||
void JackEngine::NotifyFailure(int code, const char* reason) | |||
{ | |||
NotifyClients(kShutDownCallback, false, reason, code, 0); | |||
} | |||
void JackEngine::NotifyFreewheel(bool onoff) | |||
{ | |||
fEngineControl->fRealTime = !onoff; | |||
NotifyClients((onoff ? kStartFreewheelCallback : kStopFreewheelCallback), true, 0, 0); | |||
NotifyClients((onoff ? kStartFreewheelCallback : kStopFreewheelCallback), true, "", 0, 0); | |||
} | |||
void JackEngine::NotifyPortRegistation(jack_port_id_t port_index, bool onoff) | |||
{ | |||
NotifyClients((onoff ? kPortRegistrationOnCallback : kPortRegistrationOffCallback), false, port_index, 0); | |||
NotifyClients((onoff ? kPortRegistrationOnCallback : kPortRegistrationOffCallback), false, "", port_index, 0); | |||
} | |||
void JackEngine::NotifyPortRename(jack_port_id_t port) | |||
{ | |||
NotifyClients(kPortRenameCallback, false, port, 0); | |||
NotifyClients(kPortRenameCallback, false, "", port, 0); | |||
} | |||
void JackEngine::NotifyPortConnect(jack_port_id_t src, jack_port_id_t dst, bool onoff) | |||
{ | |||
NotifyClients((onoff ? kPortConnectCallback : kPortDisconnectCallback), false, src, dst); | |||
NotifyClients((onoff ? kPortConnectCallback : kPortDisconnectCallback), false, "", src, dst); | |||
} | |||
void JackEngine::NotifyActivate(int refnum) | |||
{ | |||
NotifyClient(refnum, kActivateClient, true, 0, 0); | |||
NotifyClient(refnum, kActivateClient, true, "", 0, 0); | |||
} | |||
//---------------------------- | |||
@@ -481,7 +484,7 @@ int JackEngine::GetClientRefNum(const char* name) | |||
// Used for external clients | |||
int JackEngine::ClientExternalOpen(const char* name, int pid, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager) | |||
{ | |||
jack_log("JackEngine::ClientOpen: name = %s ", name); | |||
jack_log("JackEngine::ClientExternalOpen: name = %s ", name); | |||
int refnum = AllocateRefnum(); | |||
if (refnum < 0) { | |||
@@ -533,7 +536,7 @@ error: | |||
// Used for server driver clients | |||
int JackEngine::ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, bool wait) | |||
{ | |||
jack_log("JackEngine::ClientInternalNew: name = %s", name); | |||
jack_log("JackEngine::ClientInternalOpen: name = %s", name); | |||
int refnum = AllocateRefnum(); | |||
if (refnum < 0) { | |||
@@ -638,14 +641,14 @@ int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wai | |||
return 0; | |||
} | |||
int JackEngine::ClientActivate(int refnum, bool state) | |||
int JackEngine::ClientActivate(int refnum, bool is_real_time) | |||
{ | |||
AssertRefnum(refnum); | |||
JackClientInterface* client = fClientTable[refnum]; | |||
assert(fClientTable[refnum]); | |||
jack_log("JackEngine::ClientActivate ref = %ld name = %s", refnum, client->GetClientControl()->fName); | |||
if (state) | |||
if (is_real_time) | |||
fGraphManager->Activate(refnum); | |||
// Wait for graph state change to be effective | |||
@@ -64,8 +64,9 @@ class SERVER_EXPORT JackEngine | |||
int AllocateRefnum(); | |||
void ReleaseRefnum(int ref); | |||
void NotifyClient(int refnum, int event, int sync, int value1, int value2); | |||
void NotifyClients(int event, int sync, int value1, int value2); | |||
void NotifyClient(int refnum, int event, int sync, const char* message, int value1, int value2); | |||
void NotifyClients(int event, int sync, const char* message, int value1, int value2); | |||
void NotifyPortRegistation(jack_port_id_t port_index, bool onoff); | |||
void NotifyPortConnect(jack_port_id_t src, jack_port_id_t dst, bool onoff); | |||
void NotifyPortRename(jack_port_id_t src); | |||
@@ -87,7 +88,7 @@ class SERVER_EXPORT JackEngine | |||
int ClientExternalClose(int refnum); | |||
int ClientInternalClose(int refnum, bool wait); | |||
int ClientActivate(int refnum, bool state); | |||
int ClientActivate(int refnum, bool is_real_time); | |||
int ClientDeactivate(int refnum); | |||
int GetClientPID(const char* name); | |||
@@ -115,6 +116,7 @@ class SERVER_EXPORT JackEngine | |||
// Notifications | |||
void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs); | |||
void NotifyFailure(int code, const char* reason); | |||
void NotifyXRun(int refnum); | |||
void NotifyGraphReorder(); | |||
void NotifyBufferSize(jack_nframes_t buffer_size); | |||
@@ -25,8 +25,6 @@ | |||
#include "JackGlobals.h" | |||
#include "JackMessageBuffer.h" | |||
int jack_verbose = 0; | |||
using namespace Jack; | |||
void change_thread_log_function(jack_log_function_t log_function) | |||
@@ -110,7 +108,7 @@ SERVER_EXPORT void jack_info(const char *fmt, ...) | |||
SERVER_EXPORT void jack_log(const char *fmt,...) | |||
{ | |||
if (jack_verbose) { | |||
if (JackGlobals::fVerbose) { | |||
va_list ap; | |||
va_start(ap, fmt); | |||
jack_format_and_log(LOG_LEVEL_INFO, "Jack: ", fmt, ap); | |||
@@ -58,8 +58,6 @@ extern "C" | |||
void jack_log_function(int level, const char *message); | |||
SERVER_EXPORT void set_threaded_log_function(); | |||
extern int jack_verbose; | |||
#ifdef __cplusplus | |||
} | |||
@@ -33,11 +33,11 @@ JackExternalClient::JackExternalClient(): fClientControl(NULL) | |||
JackExternalClient::~JackExternalClient() | |||
{} | |||
int JackExternalClient::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackExternalClient::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
int result = -1; | |||
jack_log("JackExternalClient::ClientNotify ref = %ld name = %s notify = %ld", refnum, name, notify); | |||
fChannel.ClientNotify(refnum, name, notify, sync, value1, value2, &result); | |||
fChannel.ClientNotify(refnum, name, notify, sync, message, value1, value2, &result); | |||
return result; | |||
} | |||
@@ -49,7 +49,7 @@ class JackExternalClient : public JackClientInterface | |||
int Open(const char* name, int pid, int refnum, int* shared_client); | |||
int Close(); | |||
int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
JackClientControl* GetClientControl() const; | |||
}; | |||
@@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
namespace Jack | |||
{ | |||
bool JackGlobals::fVerbose = 0; | |||
jack_tls_key JackGlobals::fRealTime; | |||
static bool gKeyRealtimeInitialized = jack_tls_allocate_key(&JackGlobals::fRealTime); | |||
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
namespace Jack | |||
{ | |||
// Globals used for client management on server or libray side. | |||
// Globals used for client management on server or library side. | |||
struct JackGlobals { | |||
static jack_tls_key fRealTime; | |||
@@ -34,10 +34,10 @@ struct JackGlobals { | |||
static JackMutex* fOpenMutex; | |||
static bool fServerRunning; | |||
static JackClient* fClientTable[]; | |||
static bool fVerbose; | |||
#ifndef WIN32 | |||
static jack_thread_creator_t fJackThreadCreator; | |||
#endif | |||
}; | |||
// Each "side" server and client will implement this to get the shared graph manager, engine control and inter-process synchro table. | |||
@@ -63,9 +63,9 @@ class JackInternalClientChannel : public detail::JackClientChannelInterface | |||
*result = fEngine->ClientInternalClose(refnum, true); | |||
} | |||
void ClientActivate(int refnum, int state, int* result) | |||
void ClientActivate(int refnum, int is_real_time, int* result) | |||
{ | |||
*result = fEngine->ClientActivate(refnum, state); | |||
*result = fEngine->ClientActivate(refnum, is_real_time); | |||
} | |||
void ClientDeactivate(int refnum, int* result) | |||
{ | |||
@@ -99,7 +99,7 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_ | |||
JackLibGlobals::fGlobals->fEngineControl.SetShmIndex(shared_engine, fServerName); | |||
JackLibGlobals::fGlobals->fGraphManager.SetShmIndex(shared_graph, fServerName); | |||
fClientControl.SetShmIndex(shared_client, fServerName); | |||
jack_verbose = GetEngineControl()->fVerbose; | |||
JackGlobals::fVerbose = GetEngineControl()->fVerbose; | |||
} catch (int n) { | |||
jack_error("Map shared memory segments exception %d", n); | |||
goto error; | |||
@@ -128,7 +128,7 @@ error: | |||
// 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 value1, int value2) | |||
int JackLibClient::ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
int res = 0; | |||
@@ -46,7 +46,7 @@ class JackLibClient : public JackClient | |||
int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status); | |||
int ClientNotifyImp(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
int ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
JackGraphManager* GetGraphManager() const; | |||
JackEngineControl* GetEngineControl() const; | |||
@@ -83,10 +83,10 @@ class SERVER_EXPORT JackLockedEngine : public JackLockAble | |||
return fEngine.ClientInternalClose(refnum, wait); | |||
} | |||
int ClientActivate(int refnum, bool state) | |||
int ClientActivate(int refnum, bool is_real_time) | |||
{ | |||
JackLock lock(this); | |||
return fEngine.ClientActivate(refnum, state); | |||
return fEngine.ClientActivate(refnum, is_real_time); | |||
} | |||
int ClientDeactivate(int refnum) | |||
{ | |||
@@ -191,6 +191,12 @@ class SERVER_EXPORT JackLockedEngine : public JackLockAble | |||
fEngine.NotifyFreewheel(onoff); | |||
} | |||
void NotifyFailure(int code, const char* reason) | |||
{ | |||
JackLock lock(this); | |||
fEngine.NotifyFailure(code, reason); | |||
} | |||
int GetClientPID(const char* name) | |||
{ | |||
JackLock lock(this); | |||
@@ -29,13 +29,19 @@ namespace Jack | |||
JackMessageBuffer* JackMessageBuffer::fInstance = NULL; | |||
JackMessageBuffer::JackMessageBuffer() | |||
:fThread(this),fInBuffer(0),fOutBuffer(0),fOverruns(0) | |||
:fThread(this),fInBuffer(0),fOutBuffer(0),fOverruns(0),fRunning(false) | |||
{} | |||
JackMessageBuffer::~JackMessageBuffer() | |||
{} | |||
void JackMessageBuffer::Start() | |||
{ | |||
fRunning = true; | |||
fThread.StartSync(); | |||
} | |||
JackMessageBuffer::~JackMessageBuffer() | |||
void JackMessageBuffer::Stop() | |||
{ | |||
if (fOverruns > 0) { | |||
jack_error("WARNING: %d message buffer overruns!", fOverruns); | |||
@@ -49,7 +55,7 @@ JackMessageBuffer::~JackMessageBuffer() | |||
fThread.Stop(); | |||
Flush(); | |||
} | |||
void JackMessageBuffer::Flush() | |||
{ | |||
while (fOutBuffer != fInBuffer) { | |||
@@ -86,12 +92,14 @@ void JackMessageBuffer::Create() | |||
{ | |||
if (fInstance == NULL) { | |||
fInstance = new JackMessageBuffer(); | |||
fInstance->Start(); | |||
} | |||
} | |||
void JackMessageBuffer::Destroy() | |||
{ | |||
if (fInstance != NULL) { | |||
fInstance->Stop(); | |||
delete fInstance; | |||
fInstance = NULL; | |||
} | |||
@@ -100,8 +108,7 @@ void JackMessageBuffer::Destroy() | |||
void JackMessageBufferAdd(int level, const char *message) | |||
{ | |||
if (Jack::JackMessageBuffer::fInstance == NULL) { | |||
/* Unable to print message with realtime safety. | |||
* Complain and print it anyway. */ | |||
/* Unable to print message with realtime safety. Complain and print it anyway. */ | |||
jack_log_function(LOG_LEVEL_ERROR, "messagebuffer not initialized, skip message"); | |||
} else { | |||
Jack::JackMessageBuffer::fInstance->AddMessage(level, message); | |||
@@ -66,10 +66,13 @@ class JackMessageBuffer : public JackRunnableInterface | |||
bool fRunning; | |||
void Flush(); | |||
void Start(); | |||
void Stop(); | |||
public: | |||
JackMessageBuffer(); | |||
JackMessageBuffer(); | |||
~JackMessageBuffer(); | |||
// JackRunnableInterface interface | |||
@@ -53,6 +53,7 @@ namespace Jack | |||
fMidiPlaybackPortList = NULL; | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon = NULL; | |||
fRcvSyncUst = 0; | |||
#endif | |||
} | |||
@@ -208,7 +209,7 @@ namespace Jack | |||
JackDriver::NotifySampleRate ( fParams.fSampleRate ); | |||
//transport engine parametering | |||
fEngineControl->fTransport.SetNetworkSync ( true ); | |||
fEngineControl->fTransport.SetNetworkSync ( fParams.fTransportSync ); | |||
return true; | |||
} | |||
@@ -418,6 +419,7 @@ namespace Jack | |||
break; | |||
case JackTransportRolling : | |||
//fEngineControl->fTransport.SetCommand ( TransportCommandStart ); | |||
fEngineControl->fTransport.SetState ( JackTransportRolling ); | |||
jack_info ( "Master is rolling." ); | |||
break; | |||
@@ -427,6 +429,7 @@ namespace Jack | |||
void JackNetDriver::EncodeTransportData() | |||
{ | |||
/* Desactivated | |||
//is there a timebase master change ? | |||
int refnum; | |||
bool conditional; | |||
@@ -449,12 +452,14 @@ namespace Jack | |||
} | |||
else | |||
fReturnTransportData.fTimebaseMaster = NO_CHANGE; | |||
*/ | |||
//update transport state and position | |||
fReturnTransportData.fState = fEngineControl->fTransport.Query ( &fReturnTransportData.fPosition ); | |||
//is it a new state (that the master need to know...) ? | |||
fReturnTransportData.fNewState = ( ( fReturnTransportData.fState != fLastTransportState ) && | |||
fReturnTransportData.fNewState = (( fReturnTransportData.fState == JackTransportNetStarting) && | |||
( fReturnTransportData.fState != fLastTransportState ) && | |||
( fReturnTransportData.fState != fSendTransportData.fState ) ); | |||
if ( fReturnTransportData.fNewState ) | |||
jack_info ( "Sending '%s'.", GetTransportState ( fReturnTransportData.fState ) ); | |||
@@ -481,22 +486,27 @@ namespace Jack | |||
if ( SyncRecv() == SOCKET_ERROR ) | |||
return 0; | |||
//take the time at the beginning of the cycle | |||
JackDriver::CycleTakeBeginTime(); | |||
#ifdef JACK_MONITOR | |||
// For timing | |||
fRcvSyncUst = GetMicroSeconds(); | |||
#endif | |||
//decode sync | |||
//if there is an error, don't return -1, it will skip Write() and the network error probably won't be identified | |||
DecodeSyncPacket(); | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - fRcvSyncUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
#endif | |||
//audio, midi or sync if driver is late | |||
if ( DataRecv() == SOCKET_ERROR ) | |||
return SOCKET_ERROR; | |||
//take the time at the beginning of the cycle | |||
JackDriver::CycleTakeBeginTime(); | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - fRcvSyncUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
#endif | |||
return 0; | |||
@@ -514,7 +524,7 @@ namespace Jack | |||
fNetAudioPlaybackBuffer->SetBuffer ( audio_port_index, GetOutputBuffer ( audio_port_index ) ); | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - fRcvSyncUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
#endif | |||
//sync | |||
@@ -525,7 +535,7 @@ namespace Jack | |||
return SOCKET_ERROR; | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
fNetTimeMon->Add ( ( ( float ) ( GetMicroSeconds() - fRcvSyncUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
#endif | |||
//send data | |||
@@ -533,7 +543,7 @@ namespace Jack | |||
return SOCKET_ERROR; | |||
#ifdef JACK_MONITOR | |||
fNetTimeMon->AddLast ( ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
fNetTimeMon->AddLast ( ( ( float ) ( GetMicroSeconds() - fRcvSyncUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f ); | |||
#endif | |||
return 0; | |||
@@ -40,15 +40,16 @@ namespace Jack | |||
//jack data | |||
jack_port_id_t* fMidiCapturePortList; | |||
jack_port_id_t* fMidiPlaybackPortList; | |||
//transport | |||
int fLastTransportState; | |||
int fLastTimebaseMaster; | |||
//monitoring | |||
#ifdef JACK_MONITOR | |||
#ifdef JACK_MONITOR | |||
JackGnuPlotMonitor<float>* fNetTimeMon; | |||
#endif | |||
jack_time_t fRcvSyncUst; | |||
#endif | |||
bool Initialize(); | |||
void FreeAll(); | |||
@@ -305,6 +305,7 @@ namespace Jack | |||
else | |||
jack_info ( "'%s' isn't the timebase master anymore.", fParams.fName ); | |||
break; | |||
case TIMEBASEMASTER : | |||
timebase = jack_set_timebase_callback ( fJackClient, 0, SetTimebaseCallback, this ); | |||
if ( timebase < 0 ) | |||
@@ -312,6 +313,7 @@ namespace Jack | |||
else | |||
jack_info ( "'%s' is the new timebase master.", fParams.fName ); | |||
break; | |||
case CONDITIONAL_TIMEBASEMASTER : | |||
timebase = jack_set_timebase_callback ( fJackClient, 1, SetTimebaseCallback, this ); | |||
if ( timebase != EBUSY ) | |||
@@ -334,15 +336,18 @@ namespace Jack | |||
jack_transport_stop ( fJackClient ); | |||
jack_info ( "'%s' stops transport.", fParams.fName ); | |||
break; | |||
case JackTransportStarting : | |||
if ( jack_transport_reposition ( fJackClient, &fReturnTransportData.fPosition ) == EINVAL ) | |||
jack_error ( "Can't set new position." ); | |||
jack_transport_start ( fJackClient ); | |||
jack_info ( "'%s' starts transport frame = %d frame = %d", fParams.fName, fReturnTransportData.fPosition.frame); | |||
jack_info ( "'%s' starts transport frame = %d", fParams.fName, fReturnTransportData.fPosition.frame); | |||
break; | |||
case JackTransportNetStarting : | |||
jack_info ( "'%s' is ready to roll..", fParams.fName ); | |||
break; | |||
case JackTransportRolling : | |||
jack_info ( "'%s' is rolling.", fParams.fName ); | |||
break; | |||
@@ -417,6 +417,7 @@ namespace Jack | |||
dst_params->fPosition.usecs = htonl(src_params->fPosition.usecs); | |||
dst_params->fPosition.frame_rate = htonl(src_params->fPosition.frame_rate); | |||
dst_params->fPosition.frame = htonl(src_params->fPosition.frame); | |||
dst_params->fPosition.valid = (jack_position_bits_t)htonl((uint32_t)src_params->fPosition.valid); | |||
dst_params->fPosition.bar = htonl(src_params->fPosition.bar); | |||
dst_params->fPosition.beat = htonl(src_params->fPosition.beat); | |||
dst_params->fPosition.tick = htonl(src_params->fPosition.tick); | |||
@@ -442,6 +443,7 @@ namespace Jack | |||
dst_params->fPosition.usecs = ntohl(src_params->fPosition.usecs); | |||
dst_params->fPosition.frame_rate = ntohl(src_params->fPosition.frame_rate); | |||
dst_params->fPosition.frame = ntohl(src_params->fPosition.frame); | |||
dst_params->fPosition.valid = (jack_position_bits_t)ntohl((uint32_t)src_params->fPosition.valid); | |||
dst_params->fPosition.bar = ntohl(src_params->fPosition.bar); | |||
dst_params->fPosition.beat = ntohl(src_params->fPosition.beat); | |||
dst_params->fPosition.tick = ntohl(src_params->fPosition.tick); | |||
@@ -43,6 +43,7 @@ enum NotificationType { | |||
kPortDisconnectCallback = 12, | |||
kPortRenameCallback = 13, | |||
kRealTimeCallback = 14, | |||
kShutDownCallback = 15, | |||
kMaxNotification | |||
}; | |||
@@ -297,25 +297,25 @@ struct JackActivateRequest : public JackRequest | |||
{ | |||
int fRefNum; | |||
int fState; | |||
int fIsRealTime; | |||
JackActivateRequest() | |||
{} | |||
JackActivateRequest(int refnum, int state) | |||
: JackRequest(JackRequest::kActivateClient), fRefNum(refnum), fState(state) | |||
JackActivateRequest(int refnum, int is_real_time) | |||
: JackRequest(JackRequest::kActivateClient), fRefNum(refnum), fIsRealTime(is_real_time) | |||
{} | |||
int Read(JackChannelTransaction* trans) | |||
{ | |||
CheckRes(trans->Read(&fRefNum, sizeof(int))); | |||
return trans->Read(&fState, sizeof(int)); | |||
return trans->Read(&fIsRealTime, sizeof(int)); | |||
} | |||
int Write(JackChannelTransaction* trans) | |||
{ | |||
CheckRes(JackRequest::Write(trans)); | |||
CheckRes(trans->Write(&fRefNum, sizeof(int))); | |||
return trans->Write(&fState, sizeof(int)); | |||
return trans->Write(&fIsRealTime, sizeof(int)); | |||
} | |||
} POST_PACKED_STRUCTURE; | |||
@@ -1079,13 +1079,15 @@ struct JackClientNotification | |||
int fValue1; | |||
int fValue2; | |||
int fSync; | |||
char fMessage[JACK_MESSAGE_SIZE + 1]; | |||
JackClientNotification(): fNotify(-1), fValue1(-1), fValue2(-1) | |||
{} | |||
JackClientNotification(const char* name, int refnum, int notify, int sync, int value1, int value2) | |||
JackClientNotification(const char* name, int refnum, int notify, int sync, const char* message, int value1, int value2) | |||
: fRefNum(refnum), fNotify(notify), fValue1(value1), fValue2(value2), fSync(sync) | |||
{ | |||
snprintf(fName, sizeof(fName), "%s", name); | |||
snprintf(fMessage, sizeof(fMessage), "%s", message); | |||
} | |||
int Read(JackChannelTransaction* trans) | |||
@@ -1096,6 +1098,7 @@ struct JackClientNotification | |||
CheckRes(trans->Read(&fValue1, sizeof(int))); | |||
CheckRes(trans->Read(&fValue2, sizeof(int))); | |||
CheckRes(trans->Read(&fSync, sizeof(int))); | |||
CheckRes(trans->Read(&fMessage, JACK_MESSAGE_SIZE + 1)); | |||
return 0; | |||
} | |||
@@ -1107,6 +1110,7 @@ struct JackClientNotification | |||
CheckRes(trans->Write(&fValue1, sizeof(int))); | |||
CheckRes(trans->Write(&fValue2, sizeof(int))); | |||
CheckRes(trans->Write(&fSync, sizeof(int))); | |||
CheckRes(trans->Write(&fMessage, JACK_MESSAGE_SIZE + 1)); | |||
return 0; | |||
} | |||
@@ -55,7 +55,7 @@ JackServer::JackServer(bool sync, bool temporary, long timeout, bool rt, long pr | |||
fFreewheel = false; | |||
JackServerGlobals::fInstance = this; // Unique instance | |||
JackServerGlobals::fUserCount = 1; // One user | |||
jack_verbose = verbose; | |||
JackGlobals::fVerbose = verbose; | |||
} | |||
JackServer::~JackServer() | |||
@@ -78,7 +78,7 @@ int JackServer::Open(jack_driver_desc_t* driver_desc, JSList* driver_params) | |||
goto fail_close1; | |||
} | |||
if (fEngine->Open() != 0) { | |||
if (fEngine->Open() < 0) { | |||
jack_error("Cannot open engine"); | |||
goto fail_close2; | |||
} | |||
@@ -88,12 +88,12 @@ int JackServer::Open(jack_driver_desc_t* driver_desc, JSList* driver_params) | |||
goto fail_close3; | |||
} | |||
if (fFreewheelDriver->Open() != 0) { // before engine open | |||
if (fFreewheelDriver->Open() < 0) { // before engine open | |||
jack_error("Cannot open driver"); | |||
goto fail_close4; | |||
} | |||
if (fAudioDriver->Attach() != 0) { | |||
if (fAudioDriver->Attach() < 0) { | |||
jack_error("Cannot attach audio driver"); | |||
goto fail_close5; | |||
} | |||
@@ -168,7 +168,10 @@ int JackServer::InternalClientLoadAux(JackLoadableInternalClient* client, const | |||
int JackServer::Start() | |||
{ | |||
jack_log("JackServer::Start"); | |||
return fAudioDriver->Start(); | |||
if (fAudioDriver->Start() < 0) { | |||
return -1; | |||
} | |||
return fChannel.Start(); | |||
} | |||
int JackServer::Stop() | |||
@@ -28,6 +28,7 @@ static char* server_name = NULL; | |||
namespace Jack | |||
{ | |||
bool JackServerGlobals::fKilled = false; | |||
JackServer* JackServerGlobals::fInstance; | |||
unsigned int JackServerGlobals::fUserCount; | |||
bool (* JackServerGlobals::on_device_acquire)(const char * device_name) = NULL; | |||
@@ -36,6 +36,7 @@ class JackClient; | |||
struct SERVER_EXPORT JackServerGlobals | |||
{ | |||
static bool fKilled; | |||
static JackServer* fInstance; | |||
static unsigned int fUserCount; | |||
static bool (* on_device_acquire)(const char * device_name); | |||
@@ -46,7 +47,7 @@ struct SERVER_EXPORT JackServerGlobals | |||
static bool Init(); | |||
static void Destroy(); | |||
static int Start (const char* server_name, | |||
static int Start(const char* server_name, | |||
jack_driver_desc_t* driver_desc, | |||
JSList* driver_params, | |||
int sync, | |||
@@ -137,9 +137,9 @@ std::list<JackDriverInterface*> JackThreadedDriver::GetSlaves() | |||
return fDriver->GetSlaves(); | |||
} | |||
int JackThreadedDriver::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2) | |||
int JackThreadedDriver::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2) | |||
{ | |||
return fDriver->ClientNotify(refnum, name, notify, sync, value1, value2); | |||
return fDriver->ClientNotify(refnum, name, notify, sync, message, value1, value2); | |||
} | |||
JackClientControl* JackThreadedDriver::GetClientControl() const | |||
@@ -94,7 +94,7 @@ class SERVER_EXPORT JackThreadedDriver : public JackDriverClientInterface, publi | |||
virtual std::list<JackDriverInterface*> GetSlaves(); | |||
virtual int ProcessSlaves(); | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); | |||
virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | |||
virtual JackClientControl* GetClientControl() const; | |||
virtual bool IsRealTime() const; | |||
@@ -247,7 +247,7 @@ int main(int argc, char* argv[]) | |||
jackctl_parameter_set_value(param, &value); | |||
} else { | |||
usage(stdout); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
} | |||
break; | |||
@@ -358,7 +358,7 @@ int main(int argc, char* argv[]) | |||
case 'h': | |||
usage(stdout); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
} | |||
@@ -372,14 +372,14 @@ int main(int argc, char* argv[]) | |||
if (!seen_audio_driver) { | |||
usage(stderr); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
// Audio driver | |||
audio_driver_ctl = jackctl_server_get_driver(server_ctl, audio_driver_name); | |||
if (audio_driver_ctl == NULL) { | |||
fprintf(stderr, "Unkown driver \"%s\"\n", audio_driver_name); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
if (optind < argc) { | |||
@@ -391,7 +391,7 @@ int main(int argc, char* argv[]) | |||
if (audio_driver_nargs == 0) { | |||
fprintf(stderr, "No driver specified ... hmm. JACK won't do" | |||
" anything when run like this.\n"); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
audio_driver_args = (char **) malloc(sizeof(char *) * audio_driver_nargs); | |||
@@ -402,13 +402,13 @@ int main(int argc, char* argv[]) | |||
} | |||
if (jackctl_parse_driver_params(audio_driver_ctl, audio_driver_nargs, audio_driver_args)) { | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
// Start server | |||
if (!jackctl_server_start(server_ctl, audio_driver_ctl)) { | |||
fprintf(stderr, "Failed to start server\n"); | |||
goto fail_free; | |||
goto fail_free1; | |||
} | |||
// MIDI driver | |||
@@ -417,7 +417,7 @@ int main(int argc, char* argv[]) | |||
midi_driver_ctl = jackctl_server_get_driver(server_ctl, midi_driver_name); | |||
if (midi_driver_ctl == NULL) { | |||
fprintf(stderr, "Unkown driver \"%s\"\n", midi_driver_name); | |||
goto fail_free; | |||
goto fail_free2; | |||
} | |||
jackctl_server_add_slave(server_ctl, midi_driver_ctl); | |||
@@ -445,10 +445,18 @@ int main(int argc, char* argv[]) | |||
if (!jackctl_server_stop(server_ctl)) | |||
fprintf(stderr, "Cannot stop server...\n"); | |||
jackctl_server_destroy(server_ctl); | |||
notify_server_stop(server_name); | |||
return 0; | |||
fail_free: | |||
fail_free1: | |||
jackctl_server_destroy(server_ctl); | |||
return -1; | |||
fail_free2: | |||
jackctl_server_stop(server_ctl); | |||
jackctl_server_destroy(server_ctl); | |||
notify_server_stop(server_name); | |||
return 1; | |||
return -1; | |||
} |
@@ -282,7 +282,7 @@ int jack_set_thread_init_callback (jack_client_t *client, | |||
* @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 | |||
* @deprecated 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 | |||
@@ -298,6 +298,27 @@ int jack_set_thread_init_callback (jack_client_t *client, | |||
void jack_on_shutdown (jack_client_t *client, | |||
JackShutdownCallback shutdown_callback, void *arg); | |||
/** | |||
* @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_info_shutdown (jack_client_t *client, | |||
JackInfoShutdownCallback shutdown_callback, void *arg); | |||
/** | |||
* Tell the Jack server to call @a process_callback whenever there is | |||
* work be done, passing @a arg as the second argument. | |||
@@ -214,7 +214,7 @@ typedef int (*JackPortRenameCallback)(jack_port_id_t port, const char* new_name, | |||
typedef void (*JackFreewheelCallback)(int starting, void *arg); | |||
/** | |||
* Prototype for the client supplied function that is called | |||
* @deprecated Prototype for the client supplied function that is called | |||
* whenever jackd is shutdown. Note that after server shutdown, | |||
* the client pointer is *not* deallocated by libjack, | |||
* the application is responsible to properly use jack_client_close() | |||
@@ -226,6 +226,21 @@ typedef void (*JackFreewheelCallback)(int starting, void *arg); | |||
*/ | |||
typedef void (*JackShutdownCallback)(void *arg); | |||
/** | |||
* Prototype for the client supplied function that is called | |||
* whenever jackd is shutdown. Note that after server shutdown, | |||
* the client pointer is *not* deallocated by libjack, | |||
* the application is responsible to properly use jack_client_close() | |||
* to release client ressources. Warning: jack_client_close() cannot be | |||
* safely used inside the shutdown callback and has to be called outside of | |||
* the callback context. | |||
* @param code a shuntdown code | |||
* @param reason a string discribing the shuntdown reason (backend failure, server crash... etc...) | |||
* @param arg pointer to a client supplied structure | |||
*/ | |||
typedef void (*JackInfoShutdownCallback)(int code, const char* reason, void *arg); | |||
/** | |||
* Used for the type argument of jack_port_register() for default | |||
* audio ports and midi ports. | |||
@@ -419,7 +434,12 @@ enum JackStatus { | |||
/** | |||
* Client's protocol version does not match | |||
*/ | |||
JackVersionError = 0x400 | |||
JackVersionError = 0x400, | |||
/** | |||
* Backend failure | |||
*/ | |||
JackBackendError = 0x800 | |||
}; | |||
/** | |||
@@ -37,6 +37,9 @@ | |||
#if defined (__SSE2__) && !defined (__sun__) | |||
#include <emmintrin.h> | |||
#ifdef __SSE4_1__ | |||
#include <smmintrin.h> | |||
#endif | |||
#endif | |||
/* Notes about these *_SCALING values. | |||
@@ -285,6 +288,12 @@ void sample_move_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigne | |||
__m128i y = _mm_cvttps_epi32(clipped); | |||
__m128i shifted = _mm_slli_epi32(y, 8); | |||
#ifdef __SSE4_1__ | |||
*(int32_t*)dst = _mm_extract_epi32(shifted, 0); | |||
*(int32_t*)(dst+dst_skip) = _mm_extract_epi32(shifted, 1); | |||
*(int32_t*)(dst+2*dst_skip) = _mm_extract_epi32(shifted, 2); | |||
*(int32_t*)(dst+3*dst_skip) = _mm_extract_epi32(shifted, 3); | |||
#else | |||
__m128i shuffled1 = _mm_shuffle_epi32(shifted, _MM_SHUFFLE(0, 3, 2, 1)); | |||
__m128i shuffled2 = _mm_shuffle_epi32(shifted, _MM_SHUFFLE(1, 0, 3, 2)); | |||
__m128i shuffled3 = _mm_shuffle_epi32(shifted, _MM_SHUFFLE(2, 1, 0, 3)); | |||
@@ -294,6 +303,7 @@ void sample_move_d32u24_sS (char *dst, jack_default_audio_sample_t *src, unsigne | |||
_mm_store_ss((float*)(dst+dst_skip), (__m128)shuffled1); | |||
_mm_store_ss((float*)(dst+2*dst_skip), (__m128)shuffled2); | |||
_mm_store_ss((float*)(dst+3*dst_skip), (__m128)shuffled3); | |||
#endif | |||
dst += 4*dst_skip; | |||
src+= 4; | |||
@@ -421,6 +431,12 @@ void sample_move_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned l | |||
__m128 samples = _mm_loadu_ps(src); | |||
__m128i converted = float_24_sse(samples); | |||
#ifdef __SSE4_1__ | |||
z[0] = _mm_extract_epi32(converted, 0); | |||
z[1] = _mm_extract_epi32(converted, 1); | |||
z[2] = _mm_extract_epi32(converted, 2); | |||
z[3] = _mm_extract_epi32(converted, 3); | |||
#else | |||
__m128i shuffled1 = _mm_shuffle_epi32(converted, _MM_SHUFFLE(0, 3, 2, 1)); | |||
__m128i shuffled2 = _mm_shuffle_epi32(converted, _MM_SHUFFLE(1, 0, 3, 2)); | |||
__m128i shuffled3 = _mm_shuffle_epi32(converted, _MM_SHUFFLE(2, 1, 0, 3)); | |||
@@ -431,13 +447,11 @@ void sample_move_d24_sS (char *dst, jack_default_audio_sample_t *src, unsigned l | |||
_mm_store_ss((float*)z+3, (__m128)shuffled3); | |||
for (i = 0; i != 4; ++i) { | |||
#if __BYTE_ORDER == __LITTLE_ENDIAN | |||
memcpy (dst, z+i, 3); | |||
#elif __BYTE_ORDER == __BIG_ENDIAN | |||
memcpy (dst, (float*)((char *)&z + 1)+i, 3); | |||
#endif | |||
dst += dst_skip; | |||
} | |||
#endif | |||
nsamples -= 4; | |||
src += 4; | |||
} | |||
@@ -500,17 +514,10 @@ void sample_move_dS_s24 (jack_default_audio_sample_t *dst, char *src, unsigned l | |||
while (nsamples >= 4) { | |||
int x0, x1, x2, x3; | |||
#if __BYTE_ORDER == __LITTLE_ENDIAN | |||
memcpy((char*)&x0 + 1, src, 3); | |||
memcpy((char*)&x1 + 1, src+src_skip, 3); | |||
memcpy((char*)&x2 + 1, src+2*src_skip, 3); | |||
memcpy((char*)&x3 + 1, src+3*src_skip, 3); | |||
#elif __BYTE_ORDER == __BIG_ENDIAN | |||
memcpy(&x0, src, 3); | |||
memcpy(&x1, src+src_skip, 3); | |||
memcpy(&x2, src+2*src_skip, 3); | |||
memcpy(&x3, src+3*src_skip, 3); | |||
#endif | |||
src += 4 * src_skip; | |||
const __m128i block_i = _mm_set_epi32(x3, x2, x1, x0); | |||
@@ -340,7 +340,7 @@ JACK_DBUS_METHOD_ARGUMENTS_BEGIN(LoadInternal) | |||
JACK_DBUS_METHOD_ARGUMENT("internal", "s", false) | |||
JACK_DBUS_METHOD_ARGUMENTS_END | |||
JACK_DBUS_METHOD_ARGUMENTS_BEGIN(UnlooadInternal) | |||
JACK_DBUS_METHOD_ARGUMENTS_BEGIN(UnloadInternal) | |||
JACK_DBUS_METHOD_ARGUMENT("internal", "s", false) | |||
JACK_DBUS_METHOD_ARGUMENTS_END | |||
@@ -366,7 +366,7 @@ JACK_DBUS_METHODS_BEGIN | |||
JACK_DBUS_METHOD_DESCRIBE(IsRealtime, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(ResetXruns, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(LoadInternal, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(UnlooadInternal, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(UnloadInternal, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(AddSlave, NULL) | |||
JACK_DBUS_METHOD_DESCRIBE(RemoveSlave, NULL) | |||
JACK_DBUS_METHODS_END | |||
@@ -59,12 +59,12 @@ rpc_type server_rpc_jack_client_close(mach_port_t private_port, int refnum, int* | |||
return KERN_SUCCESS; | |||
} | |||
rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int state, int* result) | |||
rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int is_real_time, int* result) | |||
{ | |||
jack_log("rpc_jack_client_activate"); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->ClientActivate(refnum, state); | |||
*result = channel->GetEngine()->ClientActivate(refnum, is_real_time); | |||
return KERN_SUCCESS; | |||
} | |||
@@ -83,7 +83,7 @@ rpc_type server_rpc_jack_client_deactivate(mach_port_t private_port, int refnum, | |||
rpc_type server_rpc_jack_port_register(mach_port_t private_port, int refnum, client_port_name_t name, client_port_type_t type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result) | |||
{ | |||
jack_log("rpc_jack_port_register ref = %ld name = %s", refnum, name); | |||
jack_log("rpc_jack_port_register ref = %d name = %s", refnum, name); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortRegister(refnum, name, type, flags, buffer_size, port_index); | |||
@@ -92,7 +92,7 @@ rpc_type server_rpc_jack_port_register(mach_port_t private_port, int refnum, cli | |||
rpc_type server_rpc_jack_port_unregister(mach_port_t private_port, int refnum, int port, int* result) | |||
{ | |||
jack_log("rpc_jack_port_unregister ref = %ld port = %ld ", refnum, port); | |||
jack_log("rpc_jack_port_unregister ref = %d port = %d ", refnum, port); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | |||
assert(channel); | |||
*result = channel->GetEngine()->PortUnRegister(refnum, port); | |||
@@ -234,7 +234,7 @@ rpc_type server_rpc_jack_internal_clientunload(mach_port_t private_port, int ref | |||
rpc_type server_rpc_jack_client_rt_notify(mach_port_t server_port, int refnum, int notify, int value) | |||
{ | |||
jack_log("rpc_jack_client_rt_notify ref = %ld notify = %ld value = %ld", refnum, notify, value); | |||
jack_log("rpc_jack_client_rt_notify ref = %d notify = %d value = %d", refnum, notify, value); | |||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[server_port]; | |||
assert(channel); | |||
assert(channel->GetServer()); | |||
@@ -27,21 +27,21 @@ 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 value1, int value2, int* result) | |||
rpc_type rpc_jack_client_sync_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, message_t message, int value1, int value2, int* result) | |||
{ | |||
jack_log("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld", refnum, name, notify, value1, value2); | |||
jack_log("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld message %s val1 = %ld val2 = %ld", refnum, name, notify, message, value1, value2); | |||
JackClient* client = gClientTable[client_port]; | |||
assert(client); | |||
*result = client->ClientNotify(refnum, name, notify, true, value1, value2); | |||
*result = client->ClientNotify(refnum, name, notify, true, message, value1, value2); | |||
return KERN_SUCCESS; | |||
} | |||
rpc_type rpc_jack_client_async_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, int value1, int value2) | |||
rpc_type rpc_jack_client_async_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, message_t message, int value1, int value2) | |||
{ | |||
jack_log("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld val1 = %ld val2 = %ld", refnum, name, notify, value1, value2); | |||
jack_log("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld message %s val1 = %ld val2 = %ld", refnum, name, notify, message, value1, value2); | |||
JackClient* client = gClientTable[client_port]; | |||
assert(client); | |||
client->ClientNotify(refnum, name, notify, false, value1, value2); | |||
client->ClientNotify(refnum, name, notify, false, message, value1, value2); | |||
return KERN_SUCCESS; | |||
} | |||
@@ -154,9 +154,9 @@ void JackMachClientChannel::ClientClose(int refnum, int* result) | |||
} | |||
} | |||
void JackMachClientChannel::ClientActivate(int refnum, int state, int* result) | |||
void JackMachClientChannel::ClientActivate(int refnum, int is_real_time, int* result) | |||
{ | |||
kern_return_t res = rpc_jack_client_activate(fPrivatePort, refnum, state, result); | |||
kern_return_t res = rpc_jack_client_activate(fPrivatePort, refnum, is_real_time, result); | |||
if (res != KERN_SUCCESS) { | |||
*result = -1; | |||
jack_error("JackMachClientChannel::ClientActivate err = %s", mach_error_string(res)); | |||
@@ -61,7 +61,7 @@ class JackMachClientChannel : public detail::JackClientChannelInterface, public | |||
{} | |||
void ClientClose(int refnum, int* result); | |||
void ClientActivate(int refnum, int state, int* result); | |||
void ClientActivate(int refnum, int is_real_time, int* result); | |||
void ClientDeactivate(int refnum, int* result); | |||
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result); | |||
@@ -49,11 +49,11 @@ void JackMachNotifyChannel::Close() | |||
fClientPort.DisconnectPort(); | |||
} | |||
void JackMachNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2, int* result) | |||
void JackMachNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result) | |||
{ | |||
kern_return_t res = (sync) | |||
? rpc_jack_client_sync_notify(fClientPort.GetPort(), refnum, (char*)name, notify, value1, value2, result) | |||
: rpc_jack_client_async_notify(fClientPort.GetPort(), refnum, (char*)name, notify, value1, value2); | |||
? rpc_jack_client_sync_notify(fClientPort.GetPort(), refnum, (char*)name, notify, (char*)message, value1, value2, result) | |||
: rpc_jack_client_async_notify(fClientPort.GetPort(), refnum, (char*)name, notify, (char*)message, value1, value2); | |||
if (res == KERN_SUCCESS) { | |||
*result = 0; | |||
} else { | |||
@@ -44,7 +44,7 @@ class 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 value1, int value2, int* result); | |||
void ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result); | |||
}; | |||
} // end of namespace | |||
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
#include "JackServer.h" | |||
#include "JackLockedEngine.h" | |||
#include "JackNotification.h" | |||
#include "JackServerGlobals.h" | |||
using namespace std; | |||
@@ -49,11 +50,6 @@ int JackMachServerChannel::Open(const char* server_name, JackServer* server) | |||
return -1; | |||
} | |||
if (fThread.Start() != 0) { | |||
jack_error("Cannot start Jack server listener"); | |||
return -1; | |||
} | |||
fServer = server; | |||
fPortTable[fServerPort.GetPort()] = this; | |||
return 0; | |||
@@ -65,6 +61,16 @@ void JackMachServerChannel::Close() | |||
fThread.Kill(); | |||
fServerPort.DestroyPort(); | |||
} | |||
int JackMachServerChannel::Start() | |||
{ | |||
if (fThread.Start() != 0) { | |||
jack_error("Cannot start Jack server listener"); | |||
return -1; | |||
} | |||
return 0; | |||
} | |||
JackLockedEngine* JackMachServerChannel::GetEngine() | |||
{ | |||
@@ -137,6 +143,10 @@ boolean_t JackMachServerChannel::MessageHandler(mach_msg_header_t* Request, mach | |||
channel->ClientKill(Request->msgh_local_port); | |||
} else { | |||
JackRPCEngine_server(Request, Reply); | |||
// Issued by JackEngine::ReleaseRefnum when temporary mode is used | |||
if (JackServerGlobals::fKilled) { | |||
kill(JackTools::GetPID(), SIGINT); | |||
} | |||
} | |||
return true; | |||
} | |||
@@ -53,7 +53,9 @@ class JackMachServerChannel : public JackRunnableInterface | |||
int Open(const char* server_name, JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Start(); | |||
JackLockedEngine* GetEngine(); | |||
JackServer* GetServer(); | |||
@@ -64,6 +66,7 @@ class JackMachServerChannel : public JackRunnableInterface | |||
bool Execute(); | |||
// Has to be public.. | |||
static std::map<mach_port_t, JackMachServerChannel*> fPortTable; | |||
}; | |||
@@ -86,7 +86,6 @@ | |||
4BFA99540AAAED90009E916C /* PBXTargetDependency */, | |||
4B363E750DEB0838001F72D9 /* PBXTargetDependency */, | |||
4B363E770DEB0838001F72D9 /* PBXTargetDependency */, | |||
4B363EF20DEB0965001F72D9 /* PBXTargetDependency */, | |||
4B363F250DEB0ABE001F72D9 /* PBXTargetDependency */, | |||
4B363F530DEB0CFE001F72D9 /* PBXTargetDependency */, | |||
4B363F780DEB0D85001F72D9 /* PBXTargetDependency */, | |||
@@ -845,13 +844,6 @@ | |||
remoteGlobalIDString = 4B363E440DEB0775001F72D9; | |||
remoteInfo = "jack_bufsize Universal"; | |||
}; | |||
4B363EF10DEB0965001F72D9 /* PBXContainerItemProxy */ = { | |||
isa = PBXContainerItemProxy; | |||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; | |||
proxyType = 1; | |||
remoteGlobalIDString = 4B363EDF0DEB091C001F72D9; | |||
remoteInfo = "jack_rec Universal"; | |||
}; | |||
4B363F240DEB0ABE001F72D9 /* PBXContainerItemProxy */ = { | |||
isa = PBXContainerItemProxy; | |||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; | |||
@@ -1233,7 +1225,7 @@ | |||
4B363EED0DEB094B001F72D9 /* capture_client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = capture_client.c; path = "../example-clients/capture_client.c"; sourceTree = SOURCE_ROOT; }; | |||
4B363F1E0DEB0A6A001F72D9 /* jack_midiseq */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_midiseq; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
4B363F220DEB0AB0001F72D9 /* monitor_client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = monitor_client.c; path = "../example-clients/monitor_client.c"; sourceTree = SOURCE_ROOT; }; | |||
4B363F350DEB0BD1001F72D9 /* jack_midiseq */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_midiseq; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
4B363F350DEB0BD1001F72D9 /* jack_showtime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_showtime; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
4B363F3D0DEB0C31001F72D9 /* showtime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = showtime.c; path = "../example-clients/showtime.c"; sourceTree = SOURCE_ROOT; }; | |||
4B363F720DEB0D4E001F72D9 /* jack_midiseq */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_midiseq; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
4B363F750DEB0D7D001F72D9 /* impulse_grabber.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = impulse_grabber.c; path = "../example-clients/impulse_grabber.c"; sourceTree = SOURCE_ROOT; }; | |||
@@ -2165,7 +2157,7 @@ | |||
4B363E4E0DEB0775001F72D9 /* jack_midiseq */, | |||
4B363EE90DEB091C001F72D9 /* jack_midiseq */, | |||
4B363F1E0DEB0A6A001F72D9 /* jack_midiseq */, | |||
4B363F350DEB0BD1001F72D9 /* jack_midiseq */, | |||
4B363F350DEB0BD1001F72D9 /* jack_showtime */, | |||
4B363F720DEB0D4E001F72D9 /* jack_midiseq */, | |||
4BFA5E980DEC4D9C00FA4CDB /* testSem */, | |||
4BFA828C0DF6A9E40087B4E1 /* jack_midiseq */, | |||
@@ -4186,7 +4178,7 @@ | |||
name = "jack_showtime Universal"; | |||
productInstallPath = /usr/local/bin; | |||
productName = jack_metro; | |||
productReference = 4B363F350DEB0BD1001F72D9 /* jack_midiseq */; | |||
productReference = 4B363F350DEB0BD1001F72D9 /* jack_showtime */; | |||
productType = "com.apple.product-type.tool"; | |||
}; | |||
4B363F680DEB0D4E001F72D9 /* jack_impulse_grabber Universal */ = { | |||
@@ -6588,11 +6580,6 @@ | |||
target = 4B363E440DEB0775001F72D9 /* jack_bufsize Universal */; | |||
targetProxy = 4B363E760DEB0838001F72D9 /* PBXContainerItemProxy */; | |||
}; | |||
4B363EF20DEB0965001F72D9 /* PBXTargetDependency */ = { | |||
isa = PBXTargetDependency; | |||
target = 4B363EDF0DEB091C001F72D9 /* jack_rec Universal */; | |||
targetProxy = 4B363EF10DEB0965001F72D9 /* PBXContainerItemProxy */; | |||
}; | |||
4B363F250DEB0ABE001F72D9 /* PBXTargetDependency */ = { | |||
isa = PBXTargetDependency; | |||
target = 4B363F140DEB0A6A001F72D9 /* jack_monitor_client Universal */; | |||
@@ -6923,12 +6910,8 @@ | |||
4B0A292B0D52108E002EFF74 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
i386, | |||
ppc, | |||
ppc64, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -7130,12 +7113,8 @@ | |||
4B35C4220D4731D1000DE7AE /* Development */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = NO; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
@@ -7191,12 +7170,8 @@ | |||
4B35C4230D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
@@ -7307,12 +7282,8 @@ | |||
4B35C4800D4731D1000DE7AE /* Development */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = NO; | |||
DEBUGGING_SYMBOLS = YES; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
@@ -7375,12 +7346,8 @@ | |||
4B35C4810D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DEAD_CODE_STRIPPING = YES; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
@@ -7506,12 +7473,8 @@ | |||
4B35C4F90D4731D1000DE7AE /* Development */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = NO; | |||
DEBUGGING_SYMBOLS = YES; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
@@ -7574,12 +7537,8 @@ | |||
4B35C4FA0D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DEAD_CODE_STRIPPING = YES; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
@@ -7744,12 +7703,8 @@ | |||
4B35C5120D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -7847,12 +7802,8 @@ | |||
4B35C51E0D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -7950,12 +7901,8 @@ | |||
4B35C52A0D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -8051,12 +7998,8 @@ | |||
4B35C5360D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -8148,12 +8091,8 @@ | |||
4B35C5420D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ../common; | |||
@@ -8244,12 +8183,8 @@ | |||
4B35C54E0D4731D1000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ../common; | |||
@@ -8340,12 +8275,8 @@ | |||
4B35C55C0D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ../common; | |||
@@ -8439,12 +8370,8 @@ | |||
4B35C5680D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -8539,12 +8466,8 @@ | |||
4B35C5740D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -8650,12 +8573,8 @@ | |||
4B35C5840D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 0; | |||
@@ -8763,12 +8682,8 @@ | |||
4B35C5980D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -8865,12 +8780,8 @@ | |||
4B35C5A40D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ../common; | |||
@@ -8961,12 +8872,8 @@ | |||
4B35C5B00D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -9057,12 +8964,8 @@ | |||
4B35C5BC0D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -9153,12 +9056,8 @@ | |||
4B35C5C80D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -9249,12 +9148,8 @@ | |||
4B35C5D40D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
GCC_OPTIMIZATION_LEVEL = 3; | |||
@@ -9354,12 +9249,8 @@ | |||
4B35C5E80D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ( | |||
@@ -9474,12 +9365,8 @@ | |||
4B35C5FC0D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ( | |||
@@ -9593,12 +9480,8 @@ | |||
4B35C6100D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
HEADER_SEARCH_PATHS = ( | |||
@@ -9724,12 +9607,8 @@ | |||
4B35C61C0D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -9879,12 +9758,8 @@ | |||
4B35C6270D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -10034,12 +9909,8 @@ | |||
4B35C6320D4731D2000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -10179,12 +10050,8 @@ | |||
4B35C63C0D4731D3000DE7AE /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -10775,7 +10642,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -10873,7 +10739,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -10971,7 +10836,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -11216,7 +11080,7 @@ | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -14419,7 +14283,7 @@ | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -14567,7 +14431,7 @@ | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -14709,7 +14573,7 @@ | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -14852,8 +14716,7 @@ | |||
4BDCDBFD1001FD7300B15929 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; | |||
ARCHS = "$(NATIVE_ARCH_ACTUAL)"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -14997,8 +14860,7 @@ | |||
4BDCDC231001FDE300B15929 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; | |||
ARCHS = "$(NATIVE_ARCH_ACTUAL)"; | |||
COPY_PHASE_STRIP = YES; | |||
DYLIB_COMPATIBILITY_VERSION = 1; | |||
DYLIB_CURRENT_VERSION = 1; | |||
@@ -15574,12 +15436,8 @@ | |||
4BFA828A0DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -15677,12 +15535,8 @@ | |||
4BFA829D0DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -15783,12 +15637,8 @@ | |||
4BFA82A90DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -15889,12 +15739,8 @@ | |||
4BFA82B50DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -15902,7 +15748,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -15991,12 +15836,8 @@ | |||
4BFA82C10DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -16004,7 +15845,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -16093,12 +15933,8 @@ | |||
4BFA82CD0DF6A9E40087B4E1 /* Deployment */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ARCHS = ( | |||
ppc64, | |||
ppc, | |||
i386, | |||
x86_64, | |||
); | |||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; | |||
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; | |||
COPY_PHASE_STRIP = YES; | |||
FRAMEWORK_SEARCH_PATHS = ""; | |||
GCC_ENABLE_FIX_AND_CONTINUE = NO; | |||
@@ -16106,7 +15942,6 @@ | |||
MACOSX_DEPLOYMENT_TARGET = 10.4; | |||
OTHER_CFLAGS = ""; | |||
OTHER_LDFLAGS = ( | |||
"-lsndfile", | |||
"-framework", | |||
Jackmp, | |||
"-framework", | |||
@@ -24,14 +24,15 @@ subsystem JackRPCClient 1000; | |||
import "Jackdefs.h"; | |||
waittime 5000; | |||
type client_name_t = c_string[128]; | |||
type client_port_name_t = c_string[128]; | |||
type client_name_t = c_string[64]; | |||
type message_t = c_string[256]; | |||
routine rpc_jack_client_sync_notify( | |||
client_port : mach_port_t; | |||
refnum : int; | |||
client_name : client_name_t; | |||
notify : int; | |||
message : message_t; | |||
value1 : int; | |||
value2 : int; | |||
out result : int); | |||
@@ -41,5 +42,6 @@ simpleroutine rpc_jack_client_async_notify( | |||
refnum : int; | |||
client_name : client_name_t; | |||
notify : int; | |||
message : message_t; | |||
value1 : int; | |||
value2 : int); |
@@ -21,7 +21,7 @@ typedef struct { | |||
char *name; | |||
function_ptr_t function; | |||
} function_table_entry; | |||
typedef function_table_entry *function_table_t; | |||
typedef function_table_entry *function_table_t; | |||
#endif /* FUNCTION_PTR_T */ | |||
#endif /* AUTOTEST */ | |||
@@ -55,6 +55,7 @@ kern_return_t rpc_jack_client_sync_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2, | |||
int *result | |||
@@ -72,6 +73,7 @@ kern_return_t rpc_jack_client_async_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2 | |||
); | |||
@@ -103,6 +105,7 @@ __END_DECLS | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} __Request__rpc_jack_client_sync_notify_t; | |||
@@ -119,6 +122,7 @@ __END_DECLS | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} __Request__rpc_jack_client_async_notify_t; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* IDENTIFICATION: | |||
* stub generated Mon Sep 1 17:42:27 2008 | |||
* with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local | |||
* stub generated Fri Oct 23 10:35:08 2009 | |||
* with a MiG generated Mon May 18 09:59:33 PDT 2009 by root@sulitlana.apple.com | |||
* OPTIONS: | |||
*/ | |||
@@ -113,6 +113,7 @@ | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} __Request__rpc_jack_client_sync_notify_t; | |||
@@ -129,6 +130,7 @@ | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} __Request__rpc_jack_client_async_notify_t; | |||
@@ -224,11 +226,11 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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) | |||
__NDR_convert__int_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */ | |||
@@ -252,6 +254,26 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__int_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__int_rep__message_t__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__int_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
@@ -324,11 +346,11 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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) | |||
__NDR_convert__char_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */ | |||
@@ -352,6 +374,26 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__char_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__char_rep__message_t__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__char_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
@@ -424,11 +466,11 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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) | |||
__NDR_convert__float_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__client_name__defined */ | |||
@@ -452,6 +494,26 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__float_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__float_rep__message_t__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__float_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1__defined | |||
@@ -503,9 +565,24 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->message), 256); | |||
if (( memchr(In0P->message, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value2__defined) | |||
if (In0P->NDR.int_rep != NDR_record.int_rep) { | |||
@@ -518,6 +595,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
#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__message__defined) | |||
__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message(&In0P->message, In0P->NDR.int_rep); | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) | |||
__NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1(&In0P->value1, In0P->NDR.int_rep); | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_sync_notify_t__value1__defined */ | |||
@@ -530,6 +610,7 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value2__defined) | |||
if (In0P->NDR.char_rep != NDR_record.char_rep) { | |||
@@ -542,6 +623,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
#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__message__defined) | |||
__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message(&In0P->message, In0P->NDR.char_rep); | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) | |||
__NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1(&In0P->value1, In0P->NDR.char_rep); | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_sync_notify_t__value1__defined */ | |||
@@ -554,6 +638,7 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value2__defined) | |||
if (In0P->NDR.float_rep != NDR_record.float_rep) { | |||
@@ -566,6 +651,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_sync_notify_t(_ | |||
#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__message__defined) | |||
__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message(&In0P->message, In0P->NDR.float_rep); | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__message__defined */ | |||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1__defined) | |||
__NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1(&In0P->value1, In0P->NDR.float_rep); | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_sync_notify_t__value1__defined */ | |||
@@ -594,6 +682,7 @@ kern_return_t rpc_jack_client_sync_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2, | |||
int *result | |||
@@ -613,6 +702,7 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
mach_msg_trailer_t trailer; | |||
@@ -646,7 +736,7 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
{ 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->value1, In0P->value2, &OutP->result); | |||
OutP->RetCode = rpc_jack_client_sync_notify(In0P->Head.msgh_request_port, In0P->refnum, In0P->client_name, In0P->notify, In0P->message, In0P->value1, In0P->value2, &OutP->result); | |||
if (OutP->RetCode != KERN_SUCCESS) { | |||
MIG_RETURN_ERROR(OutP, OutP->RetCode); | |||
} | |||
@@ -694,11 +784,11 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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) | |||
__NDR_convert__int_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */ | |||
@@ -722,6 +812,26 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__int_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__int_rep__message_t__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__int_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
#if defined(__NDR_convert__int_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
@@ -794,11 +904,11 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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) | |||
__NDR_convert__char_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */ | |||
@@ -822,6 +932,26 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__char_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__char_rep__message_t__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__char_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
#if defined(__NDR_convert__char_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
@@ -894,11 +1024,11 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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) | |||
__NDR_convert__float_rep__JackRPCClient__string(a, f, 64) | |||
#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) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__client_name__defined */ | |||
@@ -922,6 +1052,26 @@ mig_internal novalue _Xrpc_jack_client_sync_notify | |||
#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__message__defined | |||
#if defined(__NDR_convert__float_rep__JackRPCClient__message_t__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__JackRPCClient__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__float_rep__message_t__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__message_t((message_t *)(a), f) | |||
#elif defined(__NDR_convert__float_rep__JackRPCClient__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__JackRPCClient__string(a, f, 256) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
#if defined(__NDR_convert__float_rep__JackRPCClient__int__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1__defined | |||
@@ -973,9 +1123,24 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->message), 256); | |||
if (( memchr(In0P->message, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value2__defined) | |||
if (In0P->NDR.int_rep != NDR_record.int_rep) { | |||
@@ -988,6 +1153,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
#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__message__defined) | |||
__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message(&In0P->message, In0P->NDR.int_rep); | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1__defined) | |||
__NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1(&In0P->value1, In0P->NDR.int_rep); | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_async_notify_t__value1__defined */ | |||
@@ -1000,6 +1168,7 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value2__defined) | |||
if (In0P->NDR.char_rep != NDR_record.char_rep) { | |||
@@ -1012,6 +1181,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
#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__message__defined) | |||
__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message(&In0P->message, In0P->NDR.char_rep); | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1__defined) | |||
__NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1(&In0P->value1, In0P->NDR.char_rep); | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_async_notify_t__value1__defined */ | |||
@@ -1024,6 +1196,7 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
#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__message__defined) || \ | |||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1__defined) || \ | |||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value2__defined) | |||
if (In0P->NDR.float_rep != NDR_record.float_rep) { | |||
@@ -1036,6 +1209,9 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_async_notify_t( | |||
#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__message__defined) | |||
__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message(&In0P->message, In0P->NDR.float_rep); | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__message__defined */ | |||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1__defined) | |||
__NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1(&In0P->value1, In0P->NDR.float_rep); | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_async_notify_t__value1__defined */ | |||
@@ -1064,6 +1240,7 @@ kern_return_t rpc_jack_client_async_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2 | |||
); | |||
@@ -1082,6 +1259,7 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
mach_msg_trailer_t trailer; | |||
@@ -1115,7 +1293,7 @@ mig_internal novalue _Xrpc_jack_client_async_notify | |||
{ 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->value1, In0P->value2); | |||
OutP->RetCode = rpc_jack_client_async_notify(In0P->Head.msgh_request_port, In0P->refnum, In0P->client_name, In0P->notify, In0P->message, In0P->value1, In0P->value2); | |||
__AfterRcvSimple(1001, "rpc_jack_client_async_notify") | |||
} | |||
@@ -1145,9 +1323,9 @@ const struct JackRPCClient_subsystem { | |||
(vm_address_t)0, | |||
{ | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_client_sync_notify, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_sync_notify_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_client_sync_notify, 8, 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, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_async_notify_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_client_async_notify, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_async_notify_t)}, | |||
} | |||
}; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* IDENTIFICATION: | |||
* stub generated Mon Sep 1 17:42:27 2008 | |||
* with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local | |||
* stub generated Fri Oct 23 10:35:08 2009 | |||
* with a MiG generated Mon May 18 09:59:33 PDT 2009 by root@sulitlana.apple.com | |||
* OPTIONS: | |||
*/ | |||
#define __MIG_check__Reply__JackRPCClient_subsystem__ 1 | |||
@@ -50,15 +50,15 @@ | |||
#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); \ | |||
case MACH_SEND_INVALID_DATA: \ | |||
case MACH_SEND_INVALID_DEST: \ | |||
case MACH_SEND_INVALID_HEADER: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
break; \ | |||
case MACH_SEND_TIMED_OUT: \ | |||
case MACH_RCV_TIMED_OUT: \ | |||
default: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ | |||
} \ | |||
} | |||
#endif /* __MachMsgErrorWithTimeout */ | |||
@@ -66,14 +66,13 @@ | |||
#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); \ | |||
case MACH_SEND_INVALID_DATA: \ | |||
case MACH_SEND_INVALID_DEST: \ | |||
case MACH_SEND_INVALID_HEADER: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
break; \ | |||
default: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ | |||
} \ | |||
} | |||
#endif /* __MachMsgErrorWithoutTimeout */ | |||
@@ -265,6 +264,7 @@ mig_external kern_return_t rpc_jack_client_sync_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2, | |||
int *result | |||
@@ -280,6 +280,7 @@ mig_external kern_return_t rpc_jack_client_sync_notify | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} Request; | |||
@@ -341,10 +342,12 @@ mig_external kern_return_t rpc_jack_client_sync_notify | |||
InP->refnum = refnum; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
InP->notify = notify; | |||
(void) mig_strncpy(InP->message, message, 256); | |||
InP->value1 = value1; | |||
InP->value2 = value2; | |||
@@ -387,6 +390,7 @@ mig_external kern_return_t rpc_jack_client_async_notify | |||
int refnum, | |||
client_name_t client_name, | |||
int notify, | |||
message_t message, | |||
int value1, | |||
int value2 | |||
) | |||
@@ -401,6 +405,7 @@ mig_external kern_return_t rpc_jack_client_async_notify | |||
int refnum; | |||
client_name_t client_name; | |||
int notify; | |||
message_t message; | |||
int value1; | |||
int value2; | |||
} Request; | |||
@@ -433,10 +438,12 @@ mig_external kern_return_t rpc_jack_client_async_notify | |||
InP->refnum = refnum; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
InP->notify = notify; | |||
(void) mig_strncpy(InP->message, message, 256); | |||
InP->value1 = value1; | |||
InP->value2 = value2; | |||
@@ -25,11 +25,11 @@ import "Jackdefs.h"; | |||
ServerPrefix server_; | |||
type client_name_t = c_string[128]; | |||
type client_name_t = c_string[64]; | |||
type client_port_name_t = c_string[128]; | |||
type client_port_type_t = c_string[128]; | |||
type so_name_t = c_string[1024]; | |||
type objet_data_t = c_string[1024]; | |||
type so_name_t = c_string[256]; | |||
type objet_data_t = c_string[256]; | |||
routine rpc_jack_client_open( | |||
server_port : mach_port_t; | |||
@@ -21,7 +21,7 @@ typedef struct { | |||
char *name; | |||
function_ptr_t function; | |||
} function_table_entry; | |||
typedef function_table_entry *function_table_t; | |||
typedef function_table_entry *function_table_t; | |||
#endif /* FUNCTION_PTR_T */ | |||
#endif /* AUTOTEST */ | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* IDENTIFICATION: | |||
* stub generated Mon Sep 1 17:42:28 2008 | |||
* with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local | |||
* stub generated Fri Oct 23 10:35:08 2009 | |||
* with a MiG generated Mon May 18 09:59:33 PDT 2009 by root@sulitlana.apple.com | |||
* OPTIONS: | |||
*/ | |||
@@ -791,11 +791,11 @@ mig_internal novalue _Xrpc_jack_client_rt_notify | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name__defined */ | |||
@@ -831,11 +831,11 @@ mig_internal novalue _Xrpc_jack_client_rt_notify | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_open_t__client_name__defined */ | |||
@@ -871,11 +871,11 @@ mig_internal novalue _Xrpc_jack_client_rt_notify | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_open_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_open_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_open_t__client_name__defined */ | |||
@@ -910,6 +910,17 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_open_t(__attrib | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_open_t__client_name__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_open_t__pid__defined) | |||
if (In0P->NDR.int_rep != NDR_record.int_rep) { | |||
@@ -1064,11 +1075,11 @@ mig_internal novalue _Xrpc_jack_client_open | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined */ | |||
@@ -1124,11 +1135,11 @@ mig_internal novalue _Xrpc_jack_client_open | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined */ | |||
@@ -1184,11 +1195,11 @@ mig_internal novalue _Xrpc_jack_client_open | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined */ | |||
@@ -1243,6 +1254,17 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__attri | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined) | |||
@@ -2283,6 +2305,20 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_register_t(__attr | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->name), 128); | |||
if (( memchr(In0P->name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->port_type), 128); | |||
if (( memchr(In0P->port_type, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#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__port_type__defined) || \ | |||
@@ -3526,6 +3562,20 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_connect_name_t(__ | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->src), 128); | |||
if (( memchr(In0P->src, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->dst), 128); | |||
if (( memchr(In0P->dst, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#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) | |||
@@ -3848,6 +3898,20 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_disconnect_name_t | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->src), 128); | |||
if (( memchr(In0P->src, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->dst), 128); | |||
if (( memchr(In0P->dst, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#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) | |||
@@ -4170,6 +4234,17 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_port_rename_t(__attrib | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->name), 128); | |||
if (( memchr(In0P->name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_port_rename_t__refnum__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_port_rename_t__src__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_port_rename_t__name__defined) | |||
@@ -5352,11 +5427,11 @@ mig_internal novalue _Xrpc_jack_get_internal_clientname | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined */ | |||
@@ -5392,11 +5467,11 @@ mig_internal novalue _Xrpc_jack_get_internal_clientname | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined */ | |||
@@ -5432,11 +5507,11 @@ mig_internal novalue _Xrpc_jack_get_internal_clientname | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clienthandle_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined */ | |||
@@ -5451,6 +5526,17 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_internal_clienthandle_ | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__refnum__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_internal_clienthandle_t__client_name__defined) | |||
if (In0P->NDR.int_rep != NDR_record.int_rep) { | |||
@@ -5602,11 +5688,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name__defined */ | |||
@@ -5622,11 +5708,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 1024) | |||
__NDR_convert__int_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name__defined */ | |||
@@ -5642,11 +5728,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 1024) | |||
__NDR_convert__int_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined */ | |||
@@ -5702,11 +5788,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__client_name__defined */ | |||
@@ -5722,11 +5808,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 1024) | |||
__NDR_convert__char_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__so_name__defined */ | |||
@@ -5742,11 +5828,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 1024) | |||
__NDR_convert__char_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined */ | |||
@@ -5802,11 +5888,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__client_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__client_name(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__client_name__defined */ | |||
@@ -5822,11 +5908,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__so_name__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__so_name(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 1024) | |||
__NDR_convert__float_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__so_name__defined */ | |||
@@ -5842,11 +5928,11 @@ mig_internal novalue _Xrpc_jack_internal_clienthandle | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 1024) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 256) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined | |||
#define __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__objet_data(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 1024) | |||
__NDR_convert__float_rep__string(a, f, 256) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_internal_clientload_t__objet_data__defined */ | |||
@@ -5881,6 +5967,23 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_internal_clientload_t( | |||
return MIG_BAD_ARGUMENTS; | |||
#endif /* __MigTypeCheck */ | |||
#if __MigTypeCheck | |||
{ | |||
char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size; | |||
size_t memchr_limit; | |||
memchr_limit = min((msg_limit - In0P->client_name), 64); | |||
if (( memchr(In0P->client_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->so_name), 256); | |||
if (( memchr(In0P->so_name, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
memchr_limit = min((msg_limit - In0P->objet_data), 256); | |||
if (( memchr(In0P->objet_data, '\0', memchr_limit) == NULL )) | |||
return MIG_BAD_ARGUMENTS; // string length exceeds buffer length! | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__refnum__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__client_name__defined) || \ | |||
defined(__NDR_convert__int_rep__Request__rpc_jack_internal_clientload_t__so_name__defined) || \ | |||
@@ -6626,47 +6729,47 @@ const struct server_JackRPCEngine_subsystem { | |||
(vm_address_t)0, | |||
{ | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_client_open, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_open_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_client_open, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_open_t)}, | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_client_check, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_check_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_client_check, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_check_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_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, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_activate_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_client_activate, 4, 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_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, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_register_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_port_register, 8, 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_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_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_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_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_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_port_rename, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_rename_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_port_rename, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_port_rename_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_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_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_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_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_get_internal_clientname, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_get_internal_clientname_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_get_internal_clientname, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_get_internal_clientname_t)}, | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clienthandle, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clienthandle_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clienthandle, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clienthandle_t)}, | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clientload, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clientload_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clientload, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clientload_t)}, | |||
{ (mig_impl_routine_t) 0, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clientunload, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clientunload_t)}, | |||
(mig_stub_routine_t) _Xrpc_jack_internal_clientunload, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_internal_clientunload_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_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)}, | |||
} | |||
}; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* IDENTIFICATION: | |||
* stub generated Mon Sep 1 17:42:28 2008 | |||
* with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local | |||
* stub generated Fri Oct 23 10:35:08 2009 | |||
* with a MiG generated Mon May 18 09:59:33 PDT 2009 by root@sulitlana.apple.com | |||
* OPTIONS: | |||
*/ | |||
#define __MIG_check__Reply__JackRPCEngine_subsystem__ 1 | |||
@@ -50,15 +50,15 @@ | |||
#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); \ | |||
case MACH_SEND_INVALID_DATA: \ | |||
case MACH_SEND_INVALID_DEST: \ | |||
case MACH_SEND_INVALID_HEADER: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
break; \ | |||
case MACH_SEND_TIMED_OUT: \ | |||
case MACH_RCV_TIMED_OUT: \ | |||
default: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ | |||
} \ | |||
} | |||
#endif /* __MachMsgErrorWithTimeout */ | |||
@@ -66,14 +66,13 @@ | |||
#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); \ | |||
case MACH_SEND_INVALID_DATA: \ | |||
case MACH_SEND_INVALID_DEST: \ | |||
case MACH_SEND_INVALID_HEADER: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
break; \ | |||
default: \ | |||
mig_put_reply_port(InP->Head.msgh_reply_port); \ | |||
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ | |||
} \ | |||
} | |||
#endif /* __MachMsgErrorWithoutTimeout */ | |||
@@ -399,8 +398,9 @@ mig_internal kern_return_t __MIG_check__Reply__rpc_jack_client_open_t(__Reply__r | |||
#if __MigTypeCheck | |||
if (Out0P->private_port.type != MACH_MSG_PORT_DESCRIPTOR || | |||
Out0P->private_port.disposition != 17) | |||
{ return MIG_TYPE_ERROR; } | |||
Out0P->private_port.disposition != 17) { | |||
return MIG_TYPE_ERROR; | |||
} | |||
#endif /* __MigTypeCheck */ | |||
#if defined(__NDR_convert__int_rep__Reply__rpc_jack_client_open_t__shared_engine__defined) || \ | |||
@@ -561,7 +561,7 @@ mig_external kern_return_t rpc_jack_client_open | |||
InP->NDR = NDR_record; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
InP->pid = pid; | |||
@@ -628,11 +628,11 @@ mig_external kern_return_t rpc_jack_client_open | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Reply__rpc_jack_client_check_t__client_name_res__defined */ | |||
@@ -692,11 +692,11 @@ mig_external kern_return_t rpc_jack_client_open | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Reply__rpc_jack_client_check_t__client_name_res__defined */ | |||
@@ -756,11 +756,11 @@ mig_external kern_return_t rpc_jack_client_open | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_client_check_t__client_name_res__defined | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_client_check_t__client_name_res(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Reply__rpc_jack_client_check_t__client_name_res__defined */ | |||
@@ -983,7 +983,7 @@ mig_external kern_return_t rpc_jack_client_check | |||
InP->NDR = NDR_record; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
InP->protocol = protocol; | |||
@@ -1011,7 +1011,7 @@ mig_external kern_return_t rpc_jack_client_check | |||
{ return check_result; } | |||
#endif /* defined(__MIG_check__Reply__rpc_jack_client_check_t__defined) */ | |||
(void) mig_strncpy(client_name_res, Out0P->client_name_res, 128); | |||
(void) mig_strncpy(client_name_res, Out0P->client_name_res, 64); | |||
*status = Out0P->status; | |||
@@ -4739,11 +4739,11 @@ mig_external kern_return_t rpc_jack_set_timebase_callback | |||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__int_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__int_rep__string__defined) | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__int_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__int_rep__string(a, f, 128) | |||
__NDR_convert__int_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__int_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined */ | |||
@@ -4782,11 +4782,11 @@ mig_external kern_return_t rpc_jack_set_timebase_callback | |||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__char_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__char_rep__string__defined) | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__char_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__char_rep__string(a, f, 128) | |||
__NDR_convert__char_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__char_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined */ | |||
@@ -4825,11 +4825,11 @@ mig_external kern_return_t rpc_jack_set_timebase_callback | |||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__string__defined) | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 128) | |||
__NDR_convert__float_rep__JackRPCEngine__string(a, f, 64) | |||
#elif defined(__NDR_convert__float_rep__string__defined) | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined | |||
#define __NDR_convert__float_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res(a, f) \ | |||
__NDR_convert__float_rep__string(a, f, 128) | |||
__NDR_convert__float_rep__string(a, f, 64) | |||
#endif /* defined(__NDR_convert__*__defined) */ | |||
#endif /* __NDR_convert__float_rep__Reply__rpc_jack_get_internal_clientname_t__client_name_res__defined */ | |||
@@ -5040,7 +5040,7 @@ mig_external kern_return_t rpc_jack_get_internal_clientname | |||
{ return check_result; } | |||
#endif /* defined(__MIG_check__Reply__rpc_jack_get_internal_clientname_t__defined) */ | |||
(void) mig_strncpy(client_name_res, Out0P->client_name_res, 128); | |||
(void) mig_strncpy(client_name_res, Out0P->client_name_res, 64); | |||
*result = Out0P->result; | |||
@@ -5431,7 +5431,7 @@ mig_external kern_return_t rpc_jack_internal_clienthandle | |||
InP->refnum = refnum; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
InP->Head.msgh_bits = | |||
MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |||
@@ -5854,11 +5854,11 @@ mig_external kern_return_t rpc_jack_internal_clientload | |||
InP->refnum = refnum; | |||
(void) mig_strncpy(InP->client_name, client_name, 128); | |||
(void) mig_strncpy(InP->client_name, client_name, 64); | |||
(void) mig_strncpy(InP->so_name, so_name, 1024); | |||
(void) mig_strncpy(InP->so_name, so_name, 256); | |||
(void) mig_strncpy(InP->objet_data, objet_data, 1024); | |||
(void) mig_strncpy(InP->objet_data, objet_data, 256); | |||
InP->options = options; | |||
@@ -18,7 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
*/ | |||
typedef char client_name_t[64]; | |||
typedef char client_port_name_t[256]; | |||
typedef char client_port_name_t[128]; | |||
typedef char client_port_type_t[128]; | |||
typedef char so_name_t[256]; | |||
typedef char objet_data_t[256]; | |||
typedef char message_t[256]; |
@@ -26,6 +26,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
namespace Jack | |||
{ | |||
static void PrintStreamDesc(AudioStreamBasicDescription *inDesc) | |||
{ | |||
jack_log("- - - - - - - - - - - - - - - - - - - -"); | |||
jack_log(" Sample Rate:%f", inDesc->mSampleRate); | |||
jack_log(" Format ID:%.*s", (int) sizeof(inDesc->mFormatID), (char*)&inDesc->mFormatID); | |||
jack_log(" Format Flags:%lX", inDesc->mFormatFlags); | |||
jack_log(" Bytes per Packet:%ld", inDesc->mBytesPerPacket); | |||
jack_log(" Frames per Packet:%ld", inDesc->mFramesPerPacket); | |||
jack_log(" Bytes per Frame:%ld", inDesc->mBytesPerFrame); | |||
jack_log(" Channels per Frame:%ld", inDesc->mChannelsPerFrame); | |||
jack_log(" Bits per Channel:%ld", inDesc->mBitsPerChannel); | |||
jack_log("- - - - - - - - - - - - - - - - - - - -"); | |||
} | |||
static OSStatus DisplayDeviceNames() | |||
{ | |||
UInt32 size; | |||
@@ -164,70 +178,30 @@ OSStatus JackCoreAudioAdapter::SRNotificationCallback(AudioDeviceID inDevice, | |||
} | |||
// A better implementation would try to recover in case of hardware device change (see HALLAB HLFilePlayerWindowControllerAudioDevicePropertyListenerProc code) | |||
OSStatus JackCoreAudioAdapter::DeviceNotificationCallback(AudioDeviceID inDevice, | |||
UInt32 inChannel, | |||
Boolean isInput, | |||
AudioDevicePropertyID inPropertyID, | |||
void* inClientData) | |||
{ | |||
JackCoreAudioAdapter* driver = (JackCoreAudioAdapter*)inClientData; | |||
switch (inPropertyID) { | |||
case kAudioDeviceProcessorOverload: { | |||
jack_error("JackCoreAudioAdapter::DeviceNotificationCallback kAudioDeviceProcessorOverload"); | |||
break; | |||
} | |||
case kAudioDevicePropertyStreamConfiguration: | |||
case kAudioDevicePropertyStreamConfiguration: { | |||
jack_error("Cannot handle kAudioDevicePropertyStreamConfiguration"); | |||
return kAudioHardwareUnsupportedOperationError; | |||
} | |||
case kAudioDevicePropertyNominalSampleRate: { | |||
UInt32 outSize = sizeof(Float64); | |||
Float64 sampleRate; | |||
int in_nChannels = 0; | |||
int out_nChannels = 0; | |||
char capture_driver_name[256]; | |||
char playback_driver_name[256]; | |||
// Stop and restart | |||
AudioOutputUnitStop(driver->fAUHAL); | |||
driver->RemoveListeners(); | |||
driver->CloseAUHAL(); | |||
OSStatus err = AudioDeviceGetProperty(driver->fDeviceID, 0, kAudioDeviceSectionGlobal, kAudioDevicePropertyNominalSampleRate, &outSize, &sampleRate); | |||
if (err != noErr) { | |||
jack_error("Cannot get current sample rate"); | |||
printError(err); | |||
} | |||
jack_log("JackCoreAudioDriver::DeviceNotificationCallback kAudioDevicePropertyNominalSampleRate %ld", long(sampleRate)); | |||
if (driver->SetupDevices(driver->fCaptureUID, driver->fPlaybackUID, capture_driver_name, playback_driver_name) < 0) | |||
return -1; | |||
if (driver->SetupChannels(driver->fCapturing, driver->fPlaying, driver->fCaptureChannels, driver->fPlaybackChannels, in_nChannels, out_nChannels, false) < 0) | |||
return -1; | |||
if (driver->SetupBufferSizeAndSampleRate(driver->fAdaptedBufferSize, sampleRate) < 0) | |||
return -1; | |||
driver->SetAdaptedSampleRate(sampleRate); | |||
if (driver->OpenAUHAL(driver->fCapturing, | |||
driver->fPlaying, | |||
driver->fCaptureChannels, | |||
driver->fPlaybackChannels, | |||
in_nChannels, | |||
out_nChannels, | |||
driver->fAdaptedBufferSize, | |||
sampleRate, | |||
false) < 0) | |||
goto error; | |||
if (driver->AddListeners() < 0) | |||
goto error; | |||
AudioOutputUnitStart(driver->fAUHAL); | |||
return noErr; | |||
error: | |||
driver->CloseAUHAL(); | |||
break; | |||
jack_error("Cannot handle kAudioDevicePropertyNominalSampleRate"); | |||
return kAudioHardwareUnsupportedOperationError; | |||
} | |||
} | |||
return noErr; | |||
} | |||
@@ -237,7 +211,13 @@ int JackCoreAudioAdapter::AddListeners() | |||
OSStatus err = noErr; | |||
// Add listeners | |||
err = AudioDeviceAddPropertyListener(fDeviceID, 0, true, kAudioDeviceProcessorOverload, DeviceNotificationCallback, this); | |||
if (err != noErr) { | |||
jack_error("Error calling AudioDeviceAddPropertyListener with kAudioDeviceProcessorOverload"); | |||
printError(err); | |||
return -1; | |||
} | |||
err = AudioDeviceAddPropertyListener(fDeviceID, 0, true, kAudioHardwarePropertyDevices, DeviceNotificationCallback, this); | |||
if (err != noErr) { | |||
jack_error("Error calling AudioDeviceAddPropertyListener with kAudioHardwarePropertyDevices"); | |||
@@ -276,9 +256,9 @@ int JackCoreAudioAdapter::AddListeners() | |||
return 0; | |||
} | |||
void JackCoreAudioAdapter::RemoveListeners() | |||
{ | |||
AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioDeviceProcessorOverload, DeviceNotificationCallback); | |||
AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioHardwarePropertyDevices, DeviceNotificationCallback); | |||
AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioDevicePropertyNominalSampleRate, DeviceNotificationCallback); | |||
AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioDevicePropertyDeviceIsRunning, DeviceNotificationCallback); | |||
@@ -313,19 +293,33 @@ OSStatus JackCoreAudioAdapter::Render(void *inRefCon, | |||
JackCoreAudioAdapter::JackCoreAudioAdapter(jack_nframes_t buffer_size, jack_nframes_t sample_rate, const JSList* params) | |||
:JackAudioAdapterInterface(buffer_size, sample_rate), fInputData(0), fCapturing(false), fPlaying(false), fState(false) | |||
{ | |||
const JSList* node; | |||
const jack_driver_param_t* param; | |||
int in_nChannels = 0; | |||
int out_nChannels = 0; | |||
char captureName[256]; | |||
char playbackName[256]; | |||
fCaptureUID[0] = 0; | |||
fPlaybackUID[0] = 0; | |||
// Default values | |||
fCaptureChannels = 0; | |||
fPlaybackChannels = 0; | |||
fCaptureChannels = -1; | |||
fPlaybackChannels = -1; | |||
SInt32 major; | |||
SInt32 minor; | |||
Gestalt(gestaltSystemVersionMajor, &major); | |||
Gestalt(gestaltSystemVersionMinor, &minor); | |||
// Starting with 10.6 systems, the HAL notification thread is created internally | |||
if (major == 10 && minor >= 6) { | |||
CFRunLoopRef theRunLoop = NULL; | |||
AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; | |||
OSStatus theError = AudioObjectSetPropertyData (kAudioObjectSystemObject, &theAddress, 0, NULL, sizeof(CFRunLoopRef), &theRunLoop); | |||
if (theError != noErr) { | |||
jack_error("JackCoreAudioAdapter::Open kAudioHardwarePropertyRunLoop error"); | |||
} | |||
} | |||
for (node = params; node; node = jack_slist_next(node)) { | |||
param = (const jack_driver_param_t*) node->data; | |||
@@ -391,26 +385,26 @@ JackCoreAudioAdapter::JackCoreAudioAdapter(jack_nframes_t buffer_size, jack_nfra | |||
fCapturing = true; | |||
fPlaying = true; | |||
} | |||
int in_nChannels = 0; | |||
int out_nChannels = 0; | |||
if (SetupDevices(fCaptureUID, fPlaybackUID, captureName, playbackName) < 0) | |||
if (SetupDevices(fCaptureUID, fPlaybackUID, captureName, playbackName, fAdaptedSampleRate) < 0) | |||
throw -1; | |||
if (SetupChannels(fCapturing, fPlaying, fCaptureChannels, fPlaybackChannels, in_nChannels, out_nChannels, true) < 0) | |||
throw -1; | |||
if (SetupBufferSize(fAdaptedBufferSize) < 0) | |||
throw -1; | |||
if (SetupBufferSizeAndSampleRate(fAdaptedBufferSize, fAdaptedSampleRate) < 0) | |||
if (SetupSampleRate(fAdaptedSampleRate) < 0) | |||
throw -1; | |||
if (OpenAUHAL(fCapturing, fPlaying, fCaptureChannels, fPlaybackChannels, in_nChannels, out_nChannels, fAdaptedBufferSize, fAdaptedSampleRate) < 0) | |||
throw -1; | |||
if (fCapturing && fCaptureChannels > 0) | |||
if (SetupBuffers(fCaptureChannels) < 0) | |||
throw -1; | |||
if (OpenAUHAL(fCapturing, fPlaying, fCaptureChannels, fPlaybackChannels, in_nChannels, out_nChannels, fAdaptedBufferSize, fAdaptedSampleRate, true) < 0) | |||
throw -1; | |||
if (AddListeners() < 0) | |||
throw -1; | |||
} | |||
@@ -430,7 +424,7 @@ OSStatus JackCoreAudioAdapter::GetDefaultDevice(AudioDeviceID* id) | |||
jack_log("GetDefaultDevice: input = %ld output = %ld", inDefault, outDefault); | |||
// Get the device only if default input and ouput are the same | |||
// Get the device only if default input and output are the same | |||
if (inDefault == outDefault) { | |||
*id = inDefault; | |||
return noErr; | |||
@@ -518,26 +512,43 @@ OSStatus JackCoreAudioAdapter::GetDeviceNameFromID(AudioDeviceID id, char* name) | |||
int JackCoreAudioAdapter::SetupDevices(const char* capture_driver_uid, | |||
const char* playback_driver_uid, | |||
char* capture_driver_name, | |||
char* playback_driver_name) | |||
char* playback_driver_name, | |||
jack_nframes_t samplerate) | |||
{ | |||
capture_driver_name[0] = 0; | |||
playback_driver_name[0] = 0; | |||
// Duplex | |||
if (strcmp(capture_driver_uid, "") != 0 && strcmp(playback_driver_uid, "") != 0) { | |||
jack_log("JackCoreAudioAdapter::Open duplex"); | |||
if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) { | |||
if (GetDefaultDevice(&fDeviceID) != noErr) { | |||
jack_error("Cannot open default device"); | |||
// Same device for capture and playback... | |||
if (strcmp(capture_driver_uid, playback_driver_uid) == 0) { | |||
if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) { | |||
jack_log("Will take default in/out"); | |||
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; | |||
} | |||
} | |||
if (GetDeviceNameFromID(fDeviceID, capture_driver_name) != noErr || GetDeviceNameFromID(fDeviceID, playback_driver_name) != noErr) { | |||
jack_error("Cannot get device name from device ID"); | |||
return -1; | |||
} else { | |||
// Creates aggregate device | |||
AudioDeviceID captureID, playbackID; | |||
if (GetDeviceIDFromUID(capture_driver_uid, &captureID) != noErr) | |||
return -1; | |||
if (GetDeviceIDFromUID(playback_driver_uid, &playbackID) != noErr) | |||
return -1; | |||
if (CreateAggregateDevice(captureID, playbackID, samplerate, &fDeviceID) != noErr) | |||
return -1; | |||
} | |||
// Capture only | |||
// Capture only | |||
} else if (strcmp(capture_driver_uid, "") != 0) { | |||
jack_log("JackCoreAudioAdapter::Open capture only"); | |||
if (GetDeviceIDFromUID(capture_driver_uid, &fDeviceID) != noErr) { | |||
@@ -551,7 +562,7 @@ int JackCoreAudioAdapter::SetupDevices(const char* capture_driver_uid, | |||
return -1; | |||
} | |||
// Playback only | |||
// Playback only | |||
} else if (strcmp(playback_driver_uid, "") != 0) { | |||
jack_log("JackCoreAudioAdapter::Open playback only"); | |||
if (GetDeviceIDFromUID(playback_driver_uid, &fDeviceID) != noErr) { | |||
@@ -565,7 +576,7 @@ int JackCoreAudioAdapter::SetupDevices(const char* capture_driver_uid, | |||
return -1; | |||
} | |||
// Use default driver in duplex mode | |||
// Use default driver in duplex mode | |||
} else { | |||
jack_log("JackCoreAudioAdapter::Open default driver"); | |||
if (GetDefaultDevice(&fDeviceID) != noErr) { | |||
@@ -625,72 +636,82 @@ int JackCoreAudioAdapter::SetupChannels(bool capturing, | |||
return -1; | |||
} | |||
if (inchannels == 0) { | |||
if (inchannels == -1) { | |||
jack_log("Setup max in channels = %ld", in_nChannels); | |||
inchannels = in_nChannels; | |||
} | |||
if (outchannels == 0) { | |||
if (outchannels == -1) { | |||
jack_log("Setup max out channels = %ld", out_nChannels); | |||
outchannels = out_nChannels; | |||
} | |||
return 0; | |||
} | |||
int JackCoreAudioAdapter::SetupBufferSizeAndSampleRate(jack_nframes_t nframes, jack_nframes_t samplerate) | |||
int JackCoreAudioAdapter::SetupBufferSize(jack_nframes_t buffer_size) | |||
{ | |||
OSStatus err = noErr; | |||
UInt32 outSize; | |||
Float64 sampleRate; | |||
// Setting buffer size | |||
outSize = sizeof(UInt32); | |||
err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyBufferFrameSize, outSize, &nframes); | |||
UInt32 outSize = sizeof(UInt32); | |||
OSStatus err = AudioDeviceSetProperty(fDeviceID, NULL, 0, false, kAudioDevicePropertyBufferFrameSize, outSize, &buffer_size); | |||
if (err != noErr) { | |||
jack_error("Cannot set buffer size %ld", nframes); | |||
jack_error("Cannot set buffer size %ld", buffer_size); | |||
printError(err); | |||
return -1; | |||
} | |||
return 0; | |||
} | |||
int JackCoreAudioAdapter::SetupSampleRate(jack_nframes_t samplerate) | |||
{ | |||
return SetupSampleRateAux(fDeviceID, samplerate); | |||
} | |||
int JackCoreAudioAdapter::SetupSampleRateAux(AudioDeviceID inDevice, jack_nframes_t samplerate) | |||
{ | |||
OSStatus err = noErr; | |||
UInt32 outSize; | |||
Float64 sampleRate; | |||
// Get sample rate | |||
outSize = sizeof(Float64); | |||
err = AudioDeviceGetProperty(fDeviceID, 0, kAudioDeviceSectionGlobal, kAudioDevicePropertyNominalSampleRate, &outSize, &sampleRate); | |||
err = AudioDeviceGetProperty(inDevice, 0, kAudioDeviceSectionGlobal, kAudioDevicePropertyNominalSampleRate, &outSize, &sampleRate); | |||
if (err != noErr) { | |||
jack_error("Cannot get current sample rate"); | |||
printError(err); | |||
return -1; | |||
} | |||
// If needed, set new sample rate | |||
if (samplerate != (jack_nframes_t)sampleRate) { | |||
sampleRate = (Float64)samplerate; | |||
// To get SR change notification | |||
err = AudioDeviceAddPropertyListener(fDeviceID, 0, true, kAudioDevicePropertyNominalSampleRate, SRNotificationCallback, this); | |||
err = AudioDeviceAddPropertyListener(inDevice, 0, true, kAudioDevicePropertyNominalSampleRate, SRNotificationCallback, this); | |||
if (err != noErr) { | |||
jack_error("Error calling AudioDeviceAddPropertyListener with kAudioDevicePropertyNominalSampleRate"); | |||
printError(err); | |||
return -1; | |||
} | |||
err = AudioDeviceSetProperty(fDeviceID, NULL, 0, kAudioDeviceSectionGlobal, kAudioDevicePropertyNominalSampleRate, outSize, &sampleRate); | |||
err = AudioDeviceSetProperty(inDevice, NULL, 0, kAudioDeviceSectionGlobal, kAudioDevicePropertyNominalSampleRate, outSize, &sampleRate); | |||
if (err != noErr) { | |||
jack_error("Cannot set sample rate = %ld", samplerate); | |||
printError(err); | |||
return -1; | |||
} | |||
// Waiting for SR change notification | |||
int count = 0; | |||
while (!fState && count++ < 100) { | |||
while (!fState && count++ < WAIT_COUNTER) { | |||
usleep(100000); | |||
jack_log("Wait count = %ld", count); | |||
jack_log("Wait count = %d", count); | |||
} | |||
// Remove SR change notification | |||
AudioDeviceRemovePropertyListener(fDeviceID, 0, true, kAudioDevicePropertyNominalSampleRate, SRNotificationCallback); | |||
AudioDeviceRemovePropertyListener(inDevice, 0, true, kAudioDevicePropertyNominalSampleRate, SRNotificationCallback); | |||
} | |||
return 0; | |||
} | |||
@@ -724,20 +745,21 @@ void JackCoreAudioAdapter::DisposeBuffers() | |||
} | |||
int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
bool playing, | |||
int inchannels, | |||
int outchannels, | |||
int in_nChannels, | |||
int out_nChannels, | |||
jack_nframes_t buffer_size, | |||
jack_nframes_t samplerate, | |||
bool strict) | |||
bool playing, | |||
int inchannels, | |||
int outchannels, | |||
int in_nChannels, | |||
int out_nChannels, | |||
jack_nframes_t buffer_size, | |||
jack_nframes_t samplerate) | |||
{ | |||
ComponentResult err1; | |||
UInt32 enableIO; | |||
AudioStreamBasicDescription srcFormat, dstFormat; | |||
AudioDeviceID currAudioDeviceID; | |||
UInt32 size; | |||
jack_log("OpenAUHAL capturing = %ld playing = %ld inchannels = %ld outchannels = %ld in_nChannels = %ld out_nChannels = %ld ", capturing, playing, inchannels, outchannels, in_nChannels, out_nChannels); | |||
jack_log("OpenAUHAL capturing = %d playing = %d inchannels = %d outchannels = %d in_nChannels = %d out_nChannels = %d", capturing, playing, inchannels, outchannels, in_nChannels, out_nChannels); | |||
if (inchannels == 0 && outchannels == 0) { | |||
jack_error("No input and output channels..."); | |||
@@ -752,14 +774,14 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling OpenAComponent"); | |||
printError(err1); | |||
return -1; | |||
goto error; | |||
} | |||
err1 = AudioUnitInitialize(fAUHAL); | |||
if (err1 != noErr) { | |||
jack_error("Cannot initialize AUHAL unit"); | |||
printError(err1); | |||
return -1; | |||
goto error; | |||
} | |||
// Start I/O | |||
@@ -775,8 +797,7 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} | |||
if (playing && outchannels > 0) { | |||
@@ -791,18 +812,15 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_EnableIO,kAudioUnitScope_Output"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} | |||
AudioDeviceID currAudioDeviceID; | |||
UInt32 size = sizeof(AudioDeviceID); | |||
size = sizeof(AudioDeviceID); | |||
err1 = AudioUnitGetProperty(fAUHAL, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &currAudioDeviceID, &size); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitGetProperty - kAudioOutputUnitProperty_CurrentDevice"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} else { | |||
jack_log("AudioUnitGetPropertyCurrentDevice = %d", currAudioDeviceID); | |||
} | |||
@@ -812,28 +830,16 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_CurrentDevice"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} | |||
err1 = AudioUnitGetProperty(fAUHAL, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &currAudioDeviceID, &size); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitGetProperty - kAudioOutputUnitProperty_CurrentDevice"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
} else { | |||
jack_log("AudioUnitGetPropertyCurrentDevice = %d", currAudioDeviceID); | |||
} | |||
// Set buffer size | |||
if (capturing && inchannels > 0) { | |||
err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 1, (UInt32*)&buffer_size, sizeof(UInt32)); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_MaximumFramesPerSlice"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} | |||
} | |||
@@ -842,8 +848,7 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_MaximumFramesPerSlice"); | |||
printError(err1); | |||
if (strict) | |||
return -1; | |||
goto error; | |||
} | |||
} | |||
@@ -860,6 +865,7 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_ChannelMap 1"); | |||
printError(err1); | |||
goto error; | |||
} | |||
} | |||
@@ -875,40 +881,71 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioOutputUnitProperty_ChannelMap 0"); | |||
printError(err1); | |||
goto error; | |||
} | |||
} | |||
// Setup stream converters | |||
jack_log("Setup AUHAL input stream converter SR = %ld", samplerate); | |||
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 (capturing && inchannels > 0) { | |||
size = sizeof(AudioStreamBasicDescription); | |||
err1 = AudioUnitGetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &srcFormat, &size); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitGetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Input"); | |||
printError(err1); | |||
goto error; | |||
} | |||
PrintStreamDesc(&srcFormat); | |||
jack_log("Setup AUHAL input stream converter SR = %ld", samplerate); | |||
srcFormat.mSampleRate = samplerate; | |||
srcFormat.mFormatID = kAudioFormatLinearPCM; | |||
srcFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved; | |||
srcFormat.mBytesPerPacket = sizeof(float); | |||
srcFormat.mFramesPerPacket = 1; | |||
srcFormat.mBytesPerFrame = sizeof(float); | |||
srcFormat.mChannelsPerFrame = inchannels; | |||
srcFormat.mBitsPerChannel = 32; | |||
PrintStreamDesc(&srcFormat); | |||
err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &srcFormat, sizeof(AudioStreamBasicDescription)); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Input"); | |||
printError(err1); | |||
goto error; | |||
} | |||
} | |||
jack_log("Setup AUHAL output stream converter SR = %ld", samplerate); | |||
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); | |||
if (playing && outchannels > 0) { | |||
size = sizeof(AudioStreamBasicDescription); | |||
err1 = AudioUnitGetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 1, &dstFormat, &size); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitGetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Output"); | |||
printError(err1); | |||
goto error; | |||
} | |||
PrintStreamDesc(&dstFormat); | |||
jack_log("Setup AUHAL output stream converter SR = %ld", samplerate); | |||
dstFormat.mSampleRate = samplerate; | |||
dstFormat.mFormatID = kAudioFormatLinearPCM; | |||
dstFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved; | |||
dstFormat.mBytesPerPacket = sizeof(float); | |||
dstFormat.mFramesPerPacket = 1; | |||
dstFormat.mBytesPerFrame = sizeof(float); | |||
dstFormat.mChannelsPerFrame = outchannels; | |||
dstFormat.mBitsPerChannel = 32; | |||
PrintStreamDesc(&dstFormat); | |||
err1 = AudioUnitSetProperty(fAUHAL, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &dstFormat, sizeof(AudioStreamBasicDescription)); | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_StreamFormat kAudioUnitScope_Output"); | |||
printError(err1); | |||
goto error; | |||
} | |||
} | |||
// Setup callbacks | |||
@@ -920,7 +957,7 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_SetRenderCallback 1"); | |||
printError(err1); | |||
return -1; | |||
goto error; | |||
} | |||
} else { | |||
AURenderCallbackStruct output; | |||
@@ -930,11 +967,236 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing, | |||
if (err1 != noErr) { | |||
jack_error("Error calling AudioUnitSetProperty - kAudioUnitProperty_SetRenderCallback 0"); | |||
printError(err1); | |||
return -1; | |||
goto error; | |||
} | |||
} | |||
return 0; | |||
error: | |||
CloseAUHAL(); | |||
return -1; | |||
} | |||
OSStatus JackCoreAudioAdapter::DestroyAggregateDevice() | |||
{ | |||
OSStatus osErr = noErr; | |||
AudioObjectPropertyAddress pluginAOPA; | |||
pluginAOPA.mSelector = kAudioPlugInDestroyAggregateDevice; | |||
pluginAOPA.mScope = kAudioObjectPropertyScopeGlobal; | |||
pluginAOPA.mElement = kAudioObjectPropertyElementMaster; | |||
UInt32 outDataSize; | |||
osErr = AudioObjectGetPropertyDataSize(fPluginID, &pluginAOPA, 0, NULL, &outDataSize); | |||
if (osErr != noErr) { | |||
jack_error("JackCoreAudioDriver::DestroyAggregateDevice : AudioObjectGetPropertyDataSize error"); | |||
printError(osErr); | |||
return osErr; | |||
} | |||
osErr = AudioObjectGetPropertyData(fPluginID, &pluginAOPA, 0, NULL, &outDataSize, &fDeviceID); | |||
if (osErr != noErr) { | |||
jack_error("JackCoreAudioDriver::DestroyAggregateDevice : AudioObjectGetPropertyData error"); | |||
printError(osErr); | |||
return osErr; | |||
} | |||
return noErr; | |||
} | |||
static CFStringRef GetDeviceName(AudioDeviceID id) | |||
{ | |||
UInt32 size = sizeof(CFStringRef); | |||
CFStringRef UIname; | |||
OSStatus err = AudioDeviceGetProperty(id, 0, false, kAudioDevicePropertyDeviceUID, &size, &UIname); | |||
return (err == noErr) ? UIname : NULL; | |||
} | |||
OSStatus JackCoreAudioAdapter::CreateAggregateDevice(AudioDeviceID captureDeviceID, AudioDeviceID playbackDeviceID, jack_nframes_t samplerate, AudioDeviceID* outAggregateDevice) | |||
{ | |||
OSStatus osErr = noErr; | |||
UInt32 outSize; | |||
Boolean outWritable; | |||
// Check devices... | |||
if (IsAggregateDevice(captureDeviceID) || IsAggregateDevice(playbackDeviceID)) { | |||
jack_error("JackCoreAudioAdapter::CreateAggregateDevice : cannot agregate devices that are already aggregate devices..."); | |||
return -1; | |||
} | |||
//--------------------------------------------------------------------------- | |||
// Setup SR of both devices otherwise creating AD may fail... | |||
//--------------------------------------------------------------------------- | |||
if (SetupSampleRateAux(captureDeviceID, samplerate) < 0) { | |||
jack_error("JackCoreAudioDriver::CreateAggregateDevice : cannot set SR of input device"); | |||
} | |||
if (SetupSampleRateAux(playbackDeviceID, samplerate) < 0) { | |||
jack_error("JackCoreAudioDriver::CreateAggregateDevice : cannot set SR of output device"); | |||
} | |||
//--------------------------------------------------------------------------- | |||
// Start to create a new aggregate by getting the base audio hardware plugin | |||
//--------------------------------------------------------------------------- | |||
char capture_name[256]; | |||
char playback_name[256]; | |||
GetDeviceNameFromID(captureDeviceID, capture_name); | |||
GetDeviceNameFromID(playbackDeviceID, playback_name); | |||
jack_info("Separated input = '%s' and output = '%s' devices, create a private aggregate device to handle them...", capture_name, playback_name); | |||
osErr = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyPlugInForBundleID, &outSize, &outWritable); | |||
if (osErr != noErr) | |||
return osErr; | |||
AudioValueTranslation pluginAVT; | |||
CFStringRef inBundleRef = CFSTR("com.apple.audio.CoreAudio"); | |||
pluginAVT.mInputData = &inBundleRef; | |||
pluginAVT.mInputDataSize = sizeof(inBundleRef); | |||
pluginAVT.mOutputData = &fPluginID; | |||
pluginAVT.mOutputDataSize = sizeof(fPluginID); | |||
osErr = AudioHardwareGetProperty(kAudioHardwarePropertyPlugInForBundleID, &outSize, &pluginAVT); | |||
if (osErr != noErr) | |||
return osErr; | |||
//------------------------------------------------- | |||
// Create a CFDictionary for our aggregate device | |||
//------------------------------------------------- | |||
CFMutableDictionaryRef aggDeviceDict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); | |||
CFStringRef AggregateDeviceNameRef = CFSTR("JackDuplex"); | |||
CFStringRef AggregateDeviceUIDRef = CFSTR("com.grame.JackDuplex"); | |||
// add the name of the device to the dictionary | |||
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceNameKey), AggregateDeviceNameRef); | |||
// add our choice of UID for the aggregate device to the dictionary | |||
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceUIDKey), AggregateDeviceUIDRef); | |||
// add a "private aggregate key" to the dictionary | |||
int value = 1; | |||
CFNumberRef AggregateDeviceNumberRef = CFNumberCreate(NULL, kCFNumberIntType, &value); | |||
SInt32 system; | |||
Gestalt(gestaltSystemVersion, &system); | |||
jack_log("JackCoreAudioDriver::CreateAggregateDevice : system version = %x limit = %x", system, 0x00001054); | |||
// Starting with 10.5.4 systems, the AD can be internal... (better) | |||
if (system < 0x00001054) { | |||
jack_log("JackCoreAudioDriver::CreateAggregateDevice : public aggregate device...."); | |||
} else { | |||
jack_log("JackCoreAudioDriver::CreateAggregateDevice : private aggregate device...."); | |||
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceIsPrivateKey), AggregateDeviceNumberRef); | |||
} | |||
//------------------------------------------------- | |||
// Create a CFMutableArray for our sub-device list | |||
//------------------------------------------------- | |||
CFStringRef captureDeviceUID = GetDeviceName(captureDeviceID); | |||
CFStringRef playbackDeviceUID = GetDeviceName(playbackDeviceID); | |||
if (captureDeviceUID == NULL || playbackDeviceUID == NULL) | |||
return -1; | |||
// we need to append the UID for each device to a CFMutableArray, so create one here | |||
CFMutableArrayRef subDevicesArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); | |||
// two sub-devices in this example, so append the sub-device's UID to the CFArray | |||
CFArrayAppendValue(subDevicesArray, captureDeviceUID); | |||
CFArrayAppendValue(subDevicesArray, playbackDeviceUID); | |||
//----------------------------------------------------------------------- | |||
// Feed the dictionary to the plugin, to create a blank aggregate device | |||
//----------------------------------------------------------------------- | |||
AudioObjectPropertyAddress pluginAOPA; | |||
pluginAOPA.mSelector = kAudioPlugInCreateAggregateDevice; | |||
pluginAOPA.mScope = kAudioObjectPropertyScopeGlobal; | |||
pluginAOPA.mElement = kAudioObjectPropertyElementMaster; | |||
UInt32 outDataSize; | |||
osErr = AudioObjectGetPropertyDataSize(fPluginID, &pluginAOPA, 0, NULL, &outDataSize); | |||
if (osErr != noErr) | |||
return osErr; | |||
osErr = AudioObjectGetPropertyData(fPluginID, &pluginAOPA, sizeof(aggDeviceDict), &aggDeviceDict, &outDataSize, outAggregateDevice); | |||
if (osErr != noErr) | |||
return osErr; | |||
// pause for a bit to make sure that everything completed correctly | |||
// this is to work around a bug in the HAL where a new aggregate device seems to disappear briefly after it is created | |||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, false); | |||
//------------------------- | |||
// Set the sub-device list | |||
//------------------------- | |||
pluginAOPA.mSelector = kAudioAggregateDevicePropertyFullSubDeviceList; | |||
pluginAOPA.mScope = kAudioObjectPropertyScopeGlobal; | |||
pluginAOPA.mElement = kAudioObjectPropertyElementMaster; | |||
outDataSize = sizeof(CFMutableArrayRef); | |||
osErr = AudioObjectSetPropertyData(*outAggregateDevice, &pluginAOPA, 0, NULL, outDataSize, &subDevicesArray); | |||
if (osErr != noErr) | |||
return osErr; | |||
// pause again to give the changes time to take effect | |||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, false); | |||
//----------------------- | |||
// Set the master device | |||
//----------------------- | |||
// set the master device manually (this is the device which will act as the master clock for the aggregate device) | |||
// pass in the UID of the device you want to use | |||
pluginAOPA.mSelector = kAudioAggregateDevicePropertyMasterSubDevice; | |||
pluginAOPA.mScope = kAudioObjectPropertyScopeGlobal; | |||
pluginAOPA.mElement = kAudioObjectPropertyElementMaster; | |||
outDataSize = sizeof(CFStringRef); | |||
osErr = AudioObjectSetPropertyData(*outAggregateDevice, &pluginAOPA, 0, NULL, outDataSize, &captureDeviceUID); // capture is master... | |||
if (osErr != noErr) | |||
return osErr; | |||
// pause again to give the changes time to take effect | |||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, false); | |||
//---------- | |||
// Clean up | |||
//---------- | |||
CFRelease(AggregateDeviceNumberRef); | |||
// release the CF objects we have created - we don't need them any more | |||
CFRelease(aggDeviceDict); | |||
CFRelease(subDevicesArray); | |||
// release the device UID | |||
CFRelease(captureDeviceUID); | |||
CFRelease(playbackDeviceUID); | |||
jack_log("New aggregate device %ld", *outAggregateDevice); | |||
return noErr; | |||
} | |||
bool JackCoreAudioAdapter::IsAggregateDevice(AudioDeviceID device) | |||
{ | |||
OSStatus err = noErr; | |||
AudioObjectID sub_device[32]; | |||
UInt32 outSize = sizeof(sub_device); | |||
err = AudioDeviceGetProperty(device, 0, kAudioDeviceSectionGlobal, kAudioAggregateDevicePropertyActiveSubDeviceList, &outSize, sub_device); | |||
if (err != noErr) { | |||
jack_log("Device does not have subdevices"); | |||
return false; | |||
} else { | |||
int num_devices = outSize / sizeof(AudioObjectID); | |||
jack_log("Device does has %d subdevices", num_devices); | |||
return true; | |||
} | |||
} | |||
void JackCoreAudioAdapter::CloseAUHAL() | |||
@@ -957,6 +1219,8 @@ int JackCoreAudioAdapter::Close() | |||
DisposeBuffers(); | |||
CloseAUHAL(); | |||
RemoveListeners(); | |||
if (fPluginID > 0) | |||
DestroyAggregateDevice(); | |||
return 0; | |||
} | |||
@@ -995,25 +1259,25 @@ extern "C" | |||
strcpy(desc->params[i].name, "channels"); | |||
desc->params[i].character = 'c'; | |||
desc->params[i].type = JackDriverParamInt; | |||
desc->params[i].value.ui = 0; | |||
desc->params[i].value.ui = -1; | |||
strcpy(desc->params[i].short_desc, "Maximum number of channels"); | |||
strcpy(desc->params[i].long_desc, desc->params[i].short_desc); | |||
strcpy(desc->params[i].long_desc, "Maximum number of channels. If -1, max possible number of channels will be used"); | |||
i++; | |||
strcpy(desc->params[i].name, "inchannels"); | |||
desc->params[i].character = 'i'; | |||
desc->params[i].type = JackDriverParamInt; | |||
desc->params[i].value.ui = 0; | |||
desc->params[i].value.ui = -1; | |||
strcpy(desc->params[i].short_desc, "Maximum number of input channels"); | |||
strcpy(desc->params[i].long_desc, desc->params[i].short_desc); | |||
strcpy(desc->params[i].long_desc, "Maximum number of input channels. If -1, max possible number of input channels will be used"); | |||
i++; | |||
strcpy(desc->params[i].name, "outchannels"); | |||
desc->params[i].character = 'o'; | |||
desc->params[i].type = JackDriverParamInt; | |||
desc->params[i].value.ui = 0; | |||
desc->params[i].value.ui = -1; | |||
strcpy(desc->params[i].short_desc, "Maximum number of output channels"); | |||
strcpy(desc->params[i].long_desc, desc->params[i].short_desc); | |||
strcpy(desc->params[i].long_desc, "Maximum number of output channels. If -1, max possible number of output channels will be used"); | |||
i++; | |||
strcpy(desc->params[i].name, "capture"); | |||
@@ -36,6 +36,8 @@ typedef UInt8 CAAudioHardwareDeviceSectionID; | |||
#define kAudioDeviceSectionGlobal ((CAAudioHardwareDeviceSectionID)0x00) | |||
#define kAudioDeviceSectionWildcard ((CAAudioHardwareDeviceSectionID)0xFF) | |||
#define WAIT_COUNTER 60 | |||
/*! | |||
\brief Audio adapter using CoreAudio API. | |||
*/ | |||
@@ -54,7 +56,9 @@ class JackCoreAudioAdapter : public JackAudioAdapterInterface | |||
bool fCapturing; | |||
bool fPlaying; | |||
AudioDeviceID fDeviceID; | |||
AudioDeviceID fDeviceID; // Used "duplex" device | |||
AudioObjectID fPluginID; // Used for aggregate device | |||
bool fState; | |||
AudioUnitRenderActionFlags* fActionFags; | |||
@@ -86,10 +90,15 @@ class JackCoreAudioAdapter : public JackAudioAdapterInterface | |||
OSStatus GetDeviceNameFromID(AudioDeviceID id, char* name); | |||
// Setup | |||
OSStatus CreateAggregateDevice(AudioDeviceID captureDeviceID, AudioDeviceID playbackDeviceID, jack_nframes_t samplerate, AudioDeviceID* outAggregateDevice); | |||
OSStatus DestroyAggregateDevice(); | |||
bool IsAggregateDevice(AudioDeviceID device); | |||
int SetupDevices(const char* capture_driver_uid, | |||
const char* playback_driver_uid, | |||
char* capture_driver_name, | |||
char* playback_driver_name); | |||
char* playback_driver_name, | |||
jack_nframes_t samplerate); | |||
int SetupChannels(bool capturing, | |||
bool playing, | |||
@@ -106,10 +115,12 @@ class JackCoreAudioAdapter : public JackAudioAdapterInterface | |||
int in_nChannels, | |||
int out_nChannels, | |||
jack_nframes_t buffer_size, | |||
jack_nframes_t samplerate, | |||
bool strict); | |||
jack_nframes_t samplerate); | |||
int SetupBufferSizeAndSampleRate(jack_nframes_t buffer_size, jack_nframes_t samplerate); | |||
int SetupBufferSize(jack_nframes_t buffer_size); | |||
int SetupSampleRate(jack_nframes_t samplerate); | |||
int SetupSampleRateAux(AudioDeviceID inDevice, jack_nframes_t samplerate); | |||
int SetupBuffers(int inchannels); | |||
void DisposeBuffers(); | |||
void CloseAUHAL(); | |||
@@ -36,6 +36,8 @@ typedef UInt8 CAAudioHardwareDeviceSectionID; | |||
#define kAudioDeviceSectionOutput ((CAAudioHardwareDeviceSectionID)0x00) | |||
#define kAudioDeviceSectionGlobal ((CAAudioHardwareDeviceSectionID)0x00) | |||
#define kAudioDeviceSectionWildcard ((CAAudioHardwareDeviceSectionID)0xFF) | |||
#define WAIT_COUNTER 60 | |||
/*! | |||
\brief The CoreAudio driver. | |||
@@ -53,12 +55,14 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
AudioBufferList* fJackInputData; | |||
AudioBufferList* fDriverOutputData; | |||
AudioDeviceID fDeviceID; | |||
AudioDeviceID fDeviceID; // Used "duplex" device | |||
AudioObjectID fPluginID; // Used for aggregate device | |||
AudioUnitRenderActionFlags* fActionFags; | |||
AudioTimeStamp* fCurrentTime; | |||
bool fState; | |||
bool fHogged; | |||
// Initial state | |||
bool fCapturing; | |||
@@ -101,7 +105,6 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
AudioDevicePropertyID inPropertyID, | |||
void* inClientData); | |||
static OSStatus SRNotificationCallback(AudioDeviceID inDevice, | |||
UInt32 inChannel, | |||
Boolean isInput, | |||
@@ -116,11 +119,15 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
OSStatus GetTotalChannels(AudioDeviceID device, int& channelCount, bool isInput); | |||
// Setup | |||
OSStatus CreateAggregateDevice(AudioDeviceID captureDeviceID, AudioDeviceID playbackDeviceID, AudioDeviceID* outAggregateDevice); | |||
OSStatus CreateAggregateDevice(AudioDeviceID captureDeviceID, AudioDeviceID playbackDeviceID, jack_nframes_t samplerate, AudioDeviceID* outAggregateDevice); | |||
OSStatus DestroyAggregateDevice(); | |||
bool IsAggregateDevice(AudioDeviceID device); | |||
int SetupDevices(const char* capture_driver_uid, | |||
const char* playback_driver_uid, | |||
char* capture_driver_name, | |||
char* playback_driver_name); | |||
char* playback_driver_name, | |||
jack_nframes_t samplerate); | |||
int SetupChannels(bool capturing, | |||
bool playing, | |||
@@ -133,7 +140,9 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
int SetupBuffers(int inchannels); | |||
void DisposeBuffers(); | |||
int SetupBufferSizeAndSampleRate(jack_nframes_t buffer_size, jack_nframes_t samplerate); | |||
int SetupBufferSize(jack_nframes_t buffer_size); | |||
int SetupSampleRate(jack_nframes_t samplerate); | |||
int SetupSampleRateAux(AudioDeviceID inDevice, jack_nframes_t samplerate); | |||
int OpenAUHAL(bool capturing, | |||
bool playing, | |||
@@ -142,12 +151,14 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
int in_nChannels, | |||
int out_nChannels, | |||
jack_nframes_t nframes, | |||
jack_nframes_t samplerate, | |||
bool strict); | |||
jack_nframes_t samplerate); | |||
void CloseAUHAL(); | |||
int AddListeners(); | |||
void RemoveListeners(); | |||
bool TakeHogAux(AudioDeviceID deviceID, bool isInput); | |||
bool TakeHog(); | |||
public: | |||
@@ -166,7 +177,8 @@ class JackCoreAudioDriver : public JackAudioDriver | |||
jack_nframes_t capture_latency, | |||
jack_nframes_t playback_latency, | |||
int async_output_latency, | |||
int computation_grain); | |||
int computation_grain, | |||
bool hogged); | |||
int Close(); | |||
int Attach(); | |||
@@ -33,6 +33,47 @@ namespace Jack | |||
\brief Mutex abstraction. | |||
*/ | |||
class JackBasePosixMutex | |||
{ | |||
protected: | |||
pthread_mutex_t fMutex; | |||
public: | |||
JackBasePosixMutex() | |||
{ | |||
pthread_mutex_init(&fMutex, NULL); | |||
} | |||
virtual ~JackBasePosixMutex() | |||
{ | |||
pthread_mutex_destroy(&fMutex); | |||
} | |||
void Lock() | |||
{ | |||
int res = pthread_mutex_lock(&fMutex); | |||
if (res != 0) | |||
jack_error("JackBasePosixMutex::Lock res = %d", res); | |||
} | |||
bool Trylock() | |||
{ | |||
return (pthread_mutex_trylock(&fMutex) == 0); | |||
} | |||
void Unlock() | |||
{ | |||
int res = pthread_mutex_unlock(&fMutex); | |||
if (res != 0) | |||
jack_error("JackBasePosixMutex::Unlock res = %d", res); | |||
} | |||
}; | |||
class JackPosixMutex | |||
{ | |||
@@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
#include <string.h> // for memset | |||
#include <unistd.h> // for _POSIX_PRIORITY_SCHEDULING check | |||
#define JACK_SCHED_POLICY SCHED_RR | |||
//#define JACK_SCHED_POLICY SCHED_FIFO | |||
//#define JACK_SCHED_POLICY SCHED_RR | |||
#define JACK_SCHED_POLICY SCHED_FIFO | |||
namespace Jack | |||
{ | |||
@@ -104,6 +104,7 @@ bool JackProcessSync::TimedWait(long usec) | |||
gettimeofday(&T1, 0); | |||
jack_log("JackProcessSync::TimedWait finished delta = %5.1lf", | |||
(1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec)); | |||
return (res == 0); | |||
} | |||
@@ -112,11 +113,11 @@ bool JackProcessSync::LockedTimedWait(long usec) | |||
struct timeval T0, T1; | |||
timespec time; | |||
struct timeval now; | |||
int res; | |||
int res1, res2; | |||
res = pthread_mutex_lock(&fMutex); | |||
if (res != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error err = %s", usec, strerror(res)); | |||
res1 = pthread_mutex_lock(&fMutex); | |||
if (res1 != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error err = %s", usec, strerror(res1)); | |||
jack_log("JackProcessSync::TimedWait time out = %ld", usec); | |||
gettimeofday(&T0, 0); | |||
@@ -125,19 +126,19 @@ bool JackProcessSync::LockedTimedWait(long usec) | |||
unsigned int next_date_usec = now.tv_usec + usec; | |||
time.tv_sec = now.tv_sec + (next_date_usec / 1000000); | |||
time.tv_nsec = (next_date_usec % 1000000) * 1000; | |||
res = pthread_cond_timedwait(&fCond, &fMutex, &time); | |||
if (res != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error usec = %ld err = %s", usec, strerror(res)); | |||
res2 = pthread_cond_timedwait(&fCond, &fMutex, &time); | |||
if (res2 != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error usec = %ld err = %s", usec, strerror(res2)); | |||
gettimeofday(&T1, 0); | |||
res = pthread_mutex_unlock(&fMutex); | |||
if (res != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error err = %s", usec, strerror(res)); | |||
res1 = pthread_mutex_unlock(&fMutex); | |||
if (res1 != 0) | |||
jack_error("JackProcessSync::LockedTimedWait error err = %s", usec, strerror(res1)); | |||
jack_log("JackProcessSync::TimedWait finished delta = %5.1lf", | |||
(1e6 * T1.tv_sec - 1e6 * T0.tv_sec + T1.tv_usec - T0.tv_usec)); | |||
return (res == 0); | |||
return (res2 == 0); | |||
} | |||
@@ -32,7 +32,7 @@ namespace Jack | |||
\brief A synchronization primitive built using a condition variable. | |||
*/ | |||
class JackProcessSync : public JackPosixMutex | |||
class JackProcessSync : public JackBasePosixMutex | |||
{ | |||
private: | |||
@@ -41,12 +41,12 @@ class JackProcessSync : public JackPosixMutex | |||
public: | |||
JackProcessSync():JackPosixMutex() | |||
JackProcessSync():JackBasePosixMutex() | |||
{ | |||
pthread_cond_init(&fCond, NULL); | |||
} | |||
~JackProcessSync() | |||
virtual ~JackProcessSync() | |||
{ | |||
pthread_cond_destroy(&fCond); | |||
} | |||
@@ -168,9 +168,9 @@ void JackSocketClientChannel::ClientClose(int refnum, int* result) | |||
ServerSyncCall(&req, &res, result); | |||
} | |||
void JackSocketClientChannel::ClientActivate(int refnum, int state, int* result) | |||
void JackSocketClientChannel::ClientActivate(int refnum, int is_real_time, int* result) | |||
{ | |||
JackActivateRequest req(refnum, state); | |||
JackActivateRequest req(refnum, is_real_time); | |||
JackResult res; | |||
ServerSyncCall(&req, &res, result); | |||
} | |||
@@ -320,7 +320,7 @@ bool JackSocketClientChannel::Execute() | |||
goto error; | |||
} | |||
res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fValue1, event.fValue2); | |||
res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fMessage, event.fValue1, event.fValue2); | |||
if (event.fSync) { | |||
if (res.Write(fNotificationSocket) < 0) { | |||
@@ -66,7 +66,7 @@ class JackSocketClientChannel : public detail::JackClientChannelInterface, publi | |||
{} | |||
void ClientClose(int refnum, int* result); | |||
void ClientActivate(int refnum, int state, int* result); | |||
void ClientActivate(int refnum, int is_real_time, int* result); | |||
void ClientDeactivate(int refnum, int* result); | |||
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result); | |||
@@ -47,9 +47,9 @@ void JackSocketNotifyChannel::Close() | |||
fNotifySocket.Close(); | |||
} | |||
void JackSocketNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2, int* result) | |||
void JackSocketNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result) | |||
{ | |||
JackClientNotification event(name, refnum, notify, sync, value1, value2); | |||
JackClientNotification event(name, refnum, notify, sync, message, value1, value2); | |||
JackResult res; | |||
// Send notification | |||
@@ -45,7 +45,7 @@ class 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 value1, int value2, int* result); | |||
void ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result); | |||
}; | |||
} // end of namespace | |||
@@ -22,7 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
#include "JackServer.h" | |||
#include "JackLockedEngine.h" | |||
#include "JackGlobals.h" | |||
#include "JackServerGlobals.h" | |||
#include "JackClient.h" | |||
#include "JackTools.h" | |||
#include "JackNotification.h" | |||
#include <assert.h> | |||
#include <signal.h> | |||
@@ -46,9 +48,8 @@ JackSocketServerChannel::~JackSocketServerChannel() | |||
int JackSocketServerChannel::Open(const char* server_name, JackServer* server) | |||
{ | |||
jack_log("JackSocketServerChannel::Open "); | |||
fServer = server; | |||
jack_log("JackSocketServerChannel::Open"); | |||
// Prepare request socket | |||
if (fRequestListenSocket.Bind(jack_server_dir, server_name, 0) < 0) { | |||
jack_log("JackSocketServerChannel::Open : cannot create result listen socket"); | |||
@@ -57,18 +58,8 @@ int JackSocketServerChannel::Open(const char* server_name, JackServer* server) | |||
// Prepare for poll | |||
BuildPoolTable(); | |||
// Start listening | |||
if (fThread.Start() != 0) { | |||
jack_error("Cannot start Jack server listener"); | |||
goto error; | |||
} | |||
fServer = server; | |||
return 0; | |||
error: | |||
fRequestListenSocket.Close(); | |||
return -1; | |||
} | |||
void JackSocketServerChannel::Close() | |||
@@ -86,6 +77,16 @@ void JackSocketServerChannel::Close() | |||
delete socket; | |||
} | |||
} | |||
int JackSocketServerChannel::Start() | |||
{ | |||
if (fThread.Start() != 0) { | |||
jack_error("Cannot start Jack server listener"); | |||
return -1; | |||
} | |||
return 0; | |||
} | |||
void JackSocketServerChannel::ClientCreate() | |||
{ | |||
@@ -201,7 +202,7 @@ bool JackSocketServerChannel::HandleRequest(int fd) | |||
JackResult res; | |||
jack_log("JackRequest::ActivateClient"); | |||
if (req.Read(socket) == 0) | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fState); | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fIsRealTime); | |||
if (res.Write(socket) < 0) | |||
jack_error("JackRequest::ActivateClient write error ref = %d", req.fRefNum); | |||
break; | |||
@@ -395,7 +396,12 @@ bool JackSocketServerChannel::HandleRequest(int fd) | |||
jack_error("Unknown request %ld", header.fType); | |||
break; | |||
} | |||
// Issued by JackEngine::ReleaseRefnum when temporary mode is used | |||
if (JackServerGlobals::fKilled) { | |||
kill(JackTools::GetPID(), SIGINT); | |||
} | |||
return true; | |||
} | |||
@@ -59,8 +59,10 @@ class JackSocketServerChannel : public JackRunnableInterface | |||
JackSocketServerChannel(); | |||
~JackSocketServerChannel(); | |||
int Open(const char* server_name, JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Open(const char* server_name, JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Start(); | |||
// JackRunnableInterface interface | |||
bool Init(); | |||
@@ -220,6 +220,12 @@ void jack_shutdown(void *arg) | |||
exit(1); | |||
} | |||
void jack_info_shutdown(int code, const char* reason, void *arg) | |||
{ | |||
printf("JACK server failure : %s\n", reason); | |||
exit(1); | |||
} | |||
void Jack_Port_Register(jack_port_id_t port, int mode, void *arg) | |||
{ | |||
port_callback_reg++; | |||
@@ -679,6 +685,7 @@ int main (int argc, char *argv[]) | |||
} | |||
jack_on_shutdown(client1, jack_shutdown, 0); | |||
jack_on_info_shutdown(client1, jack_info_shutdown, 0); | |||
if (jack_set_buffer_size_callback(client1, Jack_Update_Buffer_Size, 0) != 0) { | |||
printf("Error when calling buffer_size_callback !\n"); | |||
@@ -167,9 +167,9 @@ void JackWinNamedPipeClientChannel::ClientClose(int refnum, int* result) | |||
ServerSyncCall(&req, &res, result); | |||
} | |||
void JackWinNamedPipeClientChannel::ClientActivate(int refnum, int state, int* result) | |||
void JackWinNamedPipeClientChannel::ClientActivate(int refnum, int is_real_time, int* result) | |||
{ | |||
JackActivateRequest req(refnum, state); | |||
JackActivateRequest req(refnum, is_real_time); | |||
JackResult res; | |||
ServerSyncCall(&req, &res, result); | |||
} | |||
@@ -315,7 +315,7 @@ bool JackWinNamedPipeClientChannel::Execute() | |||
goto error; | |||
} | |||
res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fValue1, event.fValue2); | |||
res.fResult = fClient->ClientNotify(event.fRefNum, event.fName, event.fNotify, event.fSync, event.fMessage, event.fValue1, event.fValue2); | |||
if (event.fSync) { | |||
if (res.Write(&fNotificationListenPipe) < 0) { | |||
@@ -64,7 +64,7 @@ class JackWinNamedPipeClientChannel : public detail::JackClientChannelInterface, | |||
{} | |||
void ClientClose(int refnum, int* result); | |||
void ClientActivate(int refnum, int state, int* result); | |||
void ClientActivate(int refnum, int is_real_time, int* result); | |||
void ClientDeactivate(int refnum, int* result); | |||
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result); | |||
@@ -46,9 +46,9 @@ void JackWinNamedPipeNotifyChannel::Close() | |||
fNotifyPipe.Close(); | |||
} | |||
void JackWinNamedPipeNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2, int* result) | |||
void JackWinNamedPipeNotifyChannel::ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result) | |||
{ | |||
JackClientNotification event(name, refnum, notify, sync, value1, value2); | |||
JackClientNotification event(name, refnum, notify, sync, message, value1, value2); | |||
JackResult res; | |||
// Send notification | |||
@@ -44,7 +44,7 @@ class 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 value1, int value2, int* result); | |||
void ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2, int* result); | |||
}; | |||
} // end of namespace | |||
@@ -31,15 +31,17 @@ using namespace std; | |||
namespace Jack | |||
{ | |||
HANDLE JackClientPipeThread::fMutex = NULL; // never released.... | |||
HANDLE JackClientPipeThread::fMutex = NULL; // Never released.... | |||
// fRefNum = -1 correspond to already removed client | |||
JackClientPipeThread::JackClientPipeThread(JackWinNamedPipeClient* pipe) | |||
: fPipe(pipe), fServer(NULL), fThread(this), fRefNum(0) | |||
:fPipe(pipe), fServer(NULL), fThread(this), fRefNum(0) | |||
{ | |||
if (fMutex == NULL) | |||
// First one allocated the static fMutex | |||
if (fMutex == NULL) { | |||
fMutex = CreateMutex(NULL, FALSE, NULL); | |||
} | |||
} | |||
JackClientPipeThread::~JackClientPipeThread() | |||
@@ -50,15 +52,14 @@ JackClientPipeThread::~JackClientPipeThread() | |||
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; | |||
} | |||
fServer = server; | |||
return 0; | |||
} | |||
void JackClientPipeThread::Close() // Close the Server/Client connection | |||
@@ -74,7 +75,7 @@ void JackClientPipeThread::Close() // Close the Server/Client connection | |||
fPipe->Close(); | |||
fRefNum = -1; | |||
} | |||
bool JackClientPipeThread::Execute() | |||
{ | |||
jack_log("JackClientPipeThread::Execute"); | |||
@@ -138,7 +139,7 @@ bool JackClientPipeThread::HandleRequest() | |||
JackResult res; | |||
jack_log("JackRequest::ActivateClient"); | |||
if (req.Read(fPipe) == 0) | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fState); | |||
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fIsRealTime); | |||
res.Write(fPipe); | |||
break; | |||
} | |||
@@ -316,6 +317,13 @@ bool JackClientPipeThread::HandleRequest() | |||
break; | |||
} | |||
} | |||
/* TODO | |||
// Issued by JackEngine::ReleaseRefnum when temporary mode is used | |||
if (JackServerGlobals::fKilled) { | |||
kill(JackTools::GetPID(), SIGINT); | |||
} | |||
*/ | |||
// Unlock the global mutex | |||
ReleaseMutex(fMutex); | |||
@@ -371,29 +379,18 @@ JackWinNamedPipeServerChannel::~JackWinNamedPipeServerChannel() | |||
int JackWinNamedPipeServerChannel::Open(const char* server_name, JackServer* server) | |||
{ | |||
jack_log("JackWinNamedPipeServerChannel::Open "); | |||
fServer = server; | |||
snprintf(fServerName, sizeof(fServerName), server_name); | |||
// Needed for internal connection from JackWinNamedPipeServerNotifyChannel object | |||
if (fRequestListenPipe.Bind(jack_server_dir, server_name, 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 -1; | |||
} | |||
fServer = server; | |||
return 0; | |||
error: | |||
fRequestListenPipe.Close(); | |||
return -1; | |||
} | |||
void JackWinNamedPipeServerChannel::Close() | |||
{ | |||
/* TODO : solve WIN32 thread Kill issue | |||
@@ -408,6 +405,16 @@ void JackWinNamedPipeServerChannel::Close() | |||
fRequestListenPipe.Close(); | |||
} | |||
int JackWinNamedPipeServerChannel::Start() | |||
{ | |||
if (fThread.Start() != 0) { | |||
jack_error("Cannot start Jack server listener"); | |||
return -1; | |||
} | |||
return 0; | |||
} | |||
bool JackWinNamedPipeServerChannel::Init() | |||
{ | |||
jack_log("JackWinNamedPipeServerChannel::Init "); | |||
@@ -50,9 +50,9 @@ class JackClientPipeThread : public JackRunnableInterface | |||
JackClientPipeThread(JackWinNamedPipeClient* pipe); | |||
virtual ~JackClientPipeThread(); | |||
int Open(JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Open(JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
bool HandleRequest(); | |||
// JackRunnableInterface interface | |||
@@ -88,8 +88,10 @@ class JackWinNamedPipeServerChannel : public JackRunnableInterface | |||
JackWinNamedPipeServerChannel(); | |||
~JackWinNamedPipeServerChannel(); | |||
int Open(const char* server_name, JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Open(const char* server_name, JackServer* server); // Open the Server/Client connection | |||
void Close(); // Close the Server/Client connection | |||
int Start(); | |||
// JackRunnableInterface interface | |||
bool Init(); | |||
@@ -20,9 +20,9 @@ It is compiled from the latest CVS version which is using QT4 framework. To uses | |||
- in Setup/Misc, check the "Start JACK audio server at application startup" box | |||
- quit qjackctl.exe and start is again, it should now launch the jack server. Quitting the qjackctl.exe will now close the jack server. | |||
- quit QJACKCTL and start is again, it should now launch the jack server. Quitting QJACKCTL will now close the jack server. | |||
Starting the jack server with another audio device installed on the machine (like an ASIO card) can now be done directly in qjackctl. | |||
Starting the jack server with another audio device installed on the machine (like an ASIO card) can now be done directly in QJACKCTL. | |||
A ">" button at the right of the interface button allows to list the name of all available devices, driven either by "MME", "DirectSound", or "ASIO". | |||
Alternatively using the following command allows to display the names of available devices: | |||
@@ -30,7 +30,7 @@ Alternatively using the following command allows to display the names of availab | |||
Then start jackd with the device you want, by using its name, for example: | |||
- jackd -R -S -d portaudio -d "ASIO::MOTU Audio ASIO", then start qjackctl. qjackctl will see the jackd server already running and then can be used normally. | |||
- jackd -R -S -d portaudio -d "ASIO::MOTU Audio ASIO", then start QJACKCTL. QJACKCTL will see the jackd server already running and then can be used normally. | |||
============================================= | |||
@@ -47,9 +47,9 @@ QJACKCTL MIDI connection windows can then be used. | |||
JackRouter JACK/ASIO driver | |||
============================================= | |||
JackRouter is an ASIO driver that allows any ASIO compatible application to become a JACK client, thus exchange audio with any other "native" or "Jackified" application. This driver is registered in the system by the installer and becomes available in the list of ASIO drivers when the JACK server is running. A "JackRouter.ini" configuration file allows the application to confgiure how the JackRouter driver behaves. | |||
JackRouter is an ASIO driver that allows any ASIO compatible application to become a JACK client, thus exchange audio with any other "native" or "Jackified" application. This driver is registered in the system by the installer and becomes available in the list of ASIO drivers when the JACK server is running. A "JackRouter.ini" configuration file allows the application to configure how the JackRouter driver behaves. | |||
- [IO]: the application can obtain any number if JACK input/output ports (not necessarilly equal to the audio card input/output number). [Note that some applications force their input/output channel number]. | |||
- [IO]: the application can obtain any number if JACK input/output ports (not necessarily equal to the audio card input/output number). [Note that some applications force their input/output channel number]. | |||
- [AUTO_CONNECT] : when 1, the application JACK port will automatically be connected to the machine input/output JACK ports. | |||
@@ -68,7 +68,7 @@ def set_options(opt): | |||
opt.add_option('--profile', action='store_true', default=False, help='Build with engine profiling') | |||
opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode') | |||
opt.add_option('--clients', default=64, type="int", dest="clients", help='Maximum number of JACK clients') | |||
opt.add_option('--ports', default=1024, type="int", dest="ports", help='Maximum number of ports') | |||
opt.add_option('--ports', default=2048, type="int", dest="ports", help='Maximum number of ports') | |||
opt.add_option('--ports-per-application', default=512, type="int", dest="application_ports", help='Maximum number of ports per application') | |||
opt.sub_options('dbus') | |||