diff --git a/ChangeLog b/ChangeLog index 9a804188..59281cf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ Kjetil S.Matheussen --------------------------- Jackdmp changes log --------------------------- + +2007-11-15 Stephane Letz + + * Move OSX start/stop notification mechanism in Jackdmp.cpp. 2007-11-05 Stephane Letz diff --git a/common/JackServer.cpp b/common/JackServer.cpp index 7e52b1af..e5282160 100644 --- a/common/JackServer.cpp +++ b/common/JackServer.cpp @@ -37,10 +37,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "JackGraphManager.h" #include "JackInternalClient.h" -#ifdef __APPLE_ -#include -#endif - namespace Jack { @@ -135,16 +131,6 @@ int JackServer::Open(jack_driver_desc_t* driver_desc, JSList* driver_params) fAudioDriver->AddSlave(fLoopbackDriver); fAudioDriver->AddSlave(fFreewheelDriver); // After ??? InitTime(); - -#ifdef __APPLE__ - // Send notification to be used in the Jack Router - CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), - CFSTR("com.grame.jackserver.start"), - CFSTR("com.grame.jackserver"), - NULL, - true); -#endif - return 0; } @@ -159,16 +145,6 @@ int JackServer::Close() fFreewheelDriver->Close(); fLoopbackDriver->Close(); fEngine->Close(); - -#ifdef __APPLE__ - // Send notification to be used in the Jack Router - CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), - CFSTR("com.grame.jackserver.stop"), - CFSTR("com.grame.jackserver"), - NULL, - true); -#endif - return 0; } diff --git a/common/Jackdmp.cpp b/common/Jackdmp.cpp index 2781fd06..20c3ce1d 100644 --- a/common/Jackdmp.cpp +++ b/common/Jackdmp.cpp @@ -37,6 +37,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "shm.h" #include "jack.h" +#ifdef __APPLE_ +#include +#endif + using namespace Jack; static JackServer* fServer; @@ -354,6 +358,15 @@ int main(int argc, char* argv[]) JackDelete(); return 0; } + +#ifdef __APPLE__ + // Send notification to be used in the Jack Router + CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), + CFSTR("com.grame.jackserver.start"), + CFSTR("com.grame.jackserver"), + NULL, + true); +#endif /* For testing purpose... @@ -417,5 +430,14 @@ int main(int argc, char* argv[]) JackTools::CleanupFiles(server_name); jack_unregister_server(server_name); +#ifdef __APPLE__ + // Send notification to be used in the Jack Router + CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), + CFSTR("com.grame.jackserver.stop"), + CFSTR("com.grame.jackserver"), + NULL, + true); +#endif + return 1; }