Commit 105e9018 authored by sletz's avatar sletz
Browse files

Move OSX start/stop notification mechanism in Jackdmp.cpp

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1706 0c269be4-1314-0410-8aa9-9f06e86f4224
parent fdf35083
......@@ -14,6 +14,10 @@ Kjetil S.Matheussen
---------------------------
Jackdmp changes log
---------------------------
2007-11-15 Stephane Letz <letz@grame.fr>
* Move OSX start/stop notification mechanism in Jackdmp.cpp.
2007-11-05 Stephane Letz <letz@grame.fr>
......
......@@ -37,10 +37,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackGraphManager.h"
#include "JackInternalClient.h"
#ifdef __APPLE_
#include <CoreFoundation/CFNotificationCenter.h>
#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;
}
......
......@@ -37,6 +37,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "shm.h"
#include "jack.h"
#ifdef __APPLE_
#include <CoreFoundation/CFNotificationCenter.h>
#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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment