Browse Source

Cleanup JACK API code.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4698 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 14 years ago
parent
commit
dddffd3294
5 changed files with 126 additions and 240 deletions
  1. +113
    -231
      common/JackAPI.cpp
  2. +8
    -0
      common/JackGlobals.cpp
  3. +1
    -1
      common/JackGlobals.h
  4. +2
    -4
      common/JackLibAPI.cpp
  5. +2
    -4
      common/JackServerAPI.cpp

+ 113
- 231
common/JackAPI.cpp
File diff suppressed because it is too large
View File


+ 8
- 0
common/JackGlobals.cpp View File

@@ -39,6 +39,8 @@ jack_thread_creator_t JackGlobals::fJackThreadCreator = pthread_create;
#endif

#ifdef __CLIENTDEBUG__

#include "JackLibGlobals.h"
std::ofstream* JackGlobals::fStream = NULL;

void JackGlobals::CheckContext(const char* name)
@@ -59,6 +61,12 @@ void JackGlobals::CheckContext(const char* name)
}
(*fStream) << "JACK API call : " << name << ", calling thread : " << pthread_self() << std::endl;
}

#else

void JackGlobals::CheckContext(const char* name)
{}

#endif

} // end of namespace

+ 1
- 1
common/JackGlobals.h View File

@@ -49,8 +49,8 @@ struct JackGlobals {

#ifdef __CLIENTDEBUG__
static std::ofstream* fStream;
static void CheckContext(const char* name);
#endif
static void CheckContext(const char* name);
};

// Each "side" server and client will implement this to get the shared graph manager, engine control and inter-process synchro table.


+ 2
- 4
common/JackLibAPI.cpp View File

@@ -166,9 +166,8 @@ static jack_client_t* jack_client_open_aux(const char* client_name, jack_options

LIB_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options_t options, jack_status_t* status, ...)
{
#ifdef __CLIENTDEBUG__
JackGlobals::CheckContext("jack_client_open");
#endif
try {
assert(JackGlobals::fOpenMutex);
JackGlobals::fOpenMutex->Lock();
@@ -189,9 +188,8 @@ LIB_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_opt

LIB_EXPORT int jack_client_close(jack_client_t* ext_client)
{
#ifdef __CLIENTDEBUG__
JackGlobals::CheckContext("jack_client_close");
#endif
assert(JackGlobals::fOpenMutex);
JackGlobals::fOpenMutex->Lock();
int res = -1;


+ 2
- 4
common/JackServerAPI.cpp View File

@@ -151,9 +151,8 @@ jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t opti

SERVER_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options_t options, jack_status_t* status, ...)
{
#ifdef __CLIENTDEBUG__
JackGlobals::CheckContext("jack_client_open");
#endif
try {
assert(JackGlobals::fOpenMutex);
JackGlobals::fOpenMutex->Lock();
@@ -174,9 +173,8 @@ SERVER_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_

SERVER_EXPORT int jack_client_close(jack_client_t* ext_client)
{
#ifdef __CLIENTDEBUG__
JackGlobals::CheckContext("jack_client_close");
#endif
assert(JackGlobals::fOpenMutex);
JackGlobals::fOpenMutex->Lock();
int res = -1;


Loading…
Cancel
Save