| @@ -88,13 +88,13 @@ JackClient::JackClient(JackSynchro* table):fThread(this) | |||||
| JackClient::~JackClient() | JackClient::~JackClient() | ||||
| {} | {} | ||||
| void JackClient::ShutDown(const char* message) | |||||
| void JackClient::ShutDown(jack_status_t code, const char* message) | |||||
| { | { | ||||
| jack_log("JackClient::ShutDown"); | jack_log("JackClient::ShutDown"); | ||||
| // If "fInfoShutdown" callback, then call it | // If "fInfoShutdown" callback, then call it | ||||
| if (fInfoShutdown) { | if (fInfoShutdown) { | ||||
| fInfoShutdown(JackFailure, message, fInfoShutdownArg); | |||||
| fInfoShutdown(code, message, fInfoShutdownArg); | |||||
| fInfoShutdown = NULL; | fInfoShutdown = NULL; | ||||
| // Otherwise possibly call the normal "fShutdown" | // Otherwise possibly call the normal "fShutdown" | ||||
| } else if (fShutdown) { | } else if (fShutdown) { | ||||
| @@ -299,7 +299,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, | |||||
| case kShutDownCallback: | case kShutDownCallback: | ||||
| jack_log("JackClient::kShutDownCallback"); | jack_log("JackClient::kShutDownCallback"); | ||||
| ShutDown(message); | |||||
| ShutDown(jack_status_t(value1), message); | |||||
| break; | break; | ||||
| case kSessionCallback: | case kSessionCallback: | ||||
| @@ -660,7 +660,7 @@ inline void JackClient::Error() | |||||
| fThread.DropSelfRealTime(); | fThread.DropSelfRealTime(); | ||||
| GetClientControl()->fActive = false; | GetClientControl()->fActive = false; | ||||
| fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result); | fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result); | ||||
| ShutDown(JACK_SERVER_FAILURE); | |||||
| ShutDown(jack_status_t(JackFailure | JackServerError), JACK_SERVER_FAILURE); | |||||
| fThread.Terminate(); | fThread.Terminate(); | ||||
| } | } | ||||
| @@ -143,7 +143,7 @@ class SERVER_EXPORT JackClient : public JackClientInterface, public JackRunnable | |||||
| virtual int SetBufferSize(jack_nframes_t buffer_size); | virtual int SetBufferSize(jack_nframes_t buffer_size); | ||||
| virtual int SetFreeWheel(int onoff); | virtual int SetFreeWheel(int onoff); | ||||
| virtual int ComputeTotalLatencies(); | virtual int ComputeTotalLatencies(); | ||||
| virtual void ShutDown(const char* message); | |||||
| virtual void ShutDown(jack_status_t code, const char* message); | |||||
| virtual jack_native_thread_t GetThreadID(); | virtual jack_native_thread_t GetThreadID(); | ||||
| // Port management | // Port management | ||||
| @@ -363,10 +363,10 @@ ShutDown is called: | |||||
| (Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown)) | (Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown)) | ||||
| */ | */ | ||||
| void JackDebugClient::ShutDown(const char* message) | |||||
| void JackDebugClient::ShutDown(jack_status_t code, const char* message) | |||||
| { | { | ||||
| CheckClient("ShutDown"); | CheckClient("ShutDown"); | ||||
| fClient->ShutDown(message); | |||||
| fClient->ShutDown(code, message); | |||||
| } | } | ||||
| //--------------------- | //--------------------- | ||||
| @@ -84,7 +84,7 @@ class JackDebugClient : public JackClient | |||||
| int SetBufferSize(jack_nframes_t buffer_size); | int SetBufferSize(jack_nframes_t buffer_size); | ||||
| int SetFreeWheel(int onoff); | int SetFreeWheel(int onoff); | ||||
| int ComputeTotalLatencies(); | int ComputeTotalLatencies(); | ||||
| void ShutDown(const char* message); | |||||
| void ShutDown(jack_status_t code, const char* message); | |||||
| jack_native_thread_t GetThreadID(); | jack_native_thread_t GetThreadID(); | ||||
| // Port management | // Port management | ||||
| @@ -111,10 +111,10 @@ error: | |||||
| return -1; | return -1; | ||||
| } | } | ||||
| void JackInternalClient::ShutDown(const char* message) | |||||
| void JackInternalClient::ShutDown(jack_status_t code, const char* message) | |||||
| { | { | ||||
| jack_log("JackInternalClient::ShutDown"); | jack_log("JackInternalClient::ShutDown"); | ||||
| JackClient::ShutDown(message); | |||||
| JackClient::ShutDown(code, message); | |||||
| } | } | ||||
| JackGraphManager* JackInternalClient::GetGraphManager() const | JackGraphManager* JackInternalClient::GetGraphManager() const | ||||
| @@ -47,7 +47,7 @@ class JackInternalClient : public JackClient | |||||
| virtual ~JackInternalClient(); | virtual ~JackInternalClient(); | ||||
| int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status); | int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status); | ||||
| void ShutDown(const char* message); | |||||
| void ShutDown(jack_status_t code, const char* message); | |||||
| JackGraphManager* GetGraphManager() const; | JackGraphManager* GetGraphManager() const; | ||||
| JackEngineControl* GetEngineControl() const; | JackEngineControl* GetEngineControl() const; | ||||
| @@ -62,11 +62,11 @@ ShutDown is called: | |||||
| (Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown)) | (Not needed since the synch object used (Sema of Fifo will fails when server quits... see ShutDown)) | ||||
| */ | */ | ||||
| void JackLibClient::ShutDown(const char* message) | |||||
| void JackLibClient::ShutDown(jack_status_t code, const char* message) | |||||
| { | { | ||||
| jack_log("JackLibClient::ShutDown"); | jack_log("JackLibClient::ShutDown"); | ||||
| JackGlobals::fServerRunning = false; | JackGlobals::fServerRunning = false; | ||||
| JackClient::ShutDown(message); | |||||
| JackClient::ShutDown(code, message); | |||||
| } | } | ||||
| JackLibClient::JackLibClient(JackSynchro* table): JackClient(table) | JackLibClient::JackLibClient(JackSynchro* table): JackClient(table) | ||||
| @@ -45,7 +45,7 @@ class JackLibClient : public JackClient | |||||
| virtual ~JackLibClient(); | virtual ~JackLibClient(); | ||||
| int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status); | int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status); | ||||
| void ShutDown(const char* message); | |||||
| void ShutDown(jack_status_t code, const char* message); | |||||
| int ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | int ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2); | ||||
| @@ -173,7 +173,7 @@ int JackServer::Stop() | |||||
| fEngine->NotifyQuit(); | fEngine->NotifyQuit(); | ||||
| fRequestChannel.Stop(); | fRequestChannel.Stop(); | ||||
| fEngine->NotifyFailure(JackFailure, JACK_SERVER_FAILURE); | |||||
| fEngine->NotifyFailure(JackFailure | JackServerError, JACK_SERVER_FAILURE); | |||||
| return res; | return res; | ||||
| } | } | ||||
| @@ -359,7 +359,7 @@ int JackServer::SwitchMaster(jack_driver_desc_t* driver_desc, JSList* driver_par | |||||
| std::list<JackDriverInterface*> slave_list; | std::list<JackDriverInterface*> slave_list; | ||||
| std::list<JackDriverInterface*>::const_iterator it; | std::list<JackDriverInterface*>::const_iterator it; | ||||
| /// Remove current master | |||||
| // Remove current master | |||||
| fAudioDriver->Stop(); | fAudioDriver->Stop(); | ||||
| fAudioDriver->Detach(); | fAudioDriver->Detach(); | ||||
| fAudioDriver->Close(); | fAudioDriver->Close(); | ||||
| @@ -311,7 +311,7 @@ OSStatus JackCoreAudioDriver::Render(AudioUnitRenderActionFlags* ioActionFlags, | |||||
| if (Process() < 0) { | if (Process() < 0) { | ||||
| jack_error("Process error, stopping driver"); | jack_error("Process error, stopping driver"); | ||||
| NotifyFailure(JackBackendError, "Process error, stopping driver"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| NotifyFailure(JackFailure | JackBackendError, "Process error, stopping driver"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| Stop(); | Stop(); | ||||
| kill(JackTools::GetPID(), SIGINT); | kill(JackTools::GetPID(), SIGINT); | ||||
| return kAudioHardwareUnsupportedOperationError; | return kAudioHardwareUnsupportedOperationError; | ||||
| @@ -497,7 +497,7 @@ OSStatus JackCoreAudioDriver::DeviceNotificationCallback(AudioDeviceID inDevice, | |||||
| case kAudioDevicePropertyStreamConfiguration: { | case kAudioDevicePropertyStreamConfiguration: { | ||||
| jack_error("Cannot handle kAudioDevicePropertyStreamConfiguration : server will quit..."); | jack_error("Cannot handle kAudioDevicePropertyStreamConfiguration : server will quit..."); | ||||
| driver->NotifyFailure(JackBackendError, "Another application has changed the device configuration"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| driver->NotifyFailure(JackFailure | JackBackendError, "Another application has changed the device configuration"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| driver->CloseAUHAL(); | driver->CloseAUHAL(); | ||||
| kill(JackTools::GetPID(), SIGINT); | kill(JackTools::GetPID(), SIGINT); | ||||
| return kAudioHardwareUnsupportedOperationError; | return kAudioHardwareUnsupportedOperationError; | ||||
| @@ -544,7 +544,7 @@ OSStatus JackCoreAudioDriver::DeviceNotificationCallback(AudioDeviceID inDevice, | |||||
| return noErr; | return noErr; | ||||
| } else { | } else { | ||||
| driver->NotifyFailure(JackBackendError, "Another application has changed the sample rate"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| driver->NotifyFailure(JackFailure | JackBackendError, "Another application has changed the sample rate"); // Message length limited to JACK_MESSAGE_SIZE | |||||
| driver->CloseAUHAL(); | driver->CloseAUHAL(); | ||||
| kill(JackTools::GetPID(), SIGINT); | kill(JackTools::GetPID(), SIGINT); | ||||
| return kAudioHardwareUnsupportedOperationError; | return kAudioHardwareUnsupportedOperationError; | ||||
| @@ -152,7 +152,7 @@ bool JackSocketClientChannel::Execute() | |||||
| error: | error: | ||||
| fNotificationSocket->Close(); | fNotificationSocket->Close(); | ||||
| fClient->ShutDown(JACK_SERVER_FAILURE); | |||||
| fClient->ShutDown(jack_status_t(JackFailure | JackServerError), JACK_SERVER_FAILURE); | |||||
| return false; | return false; | ||||
| } | } | ||||