Browse Source

Add a test for coherent freewheel state in JackDebugClient. Cleanup JackMutex class.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2416 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
d37f95f398
6 changed files with 19 additions and 6 deletions
  1. +2
    -0
      ChangeLog
  2. +6
    -0
      common/JackDebugClient.cpp
  3. +1
    -0
      common/JackDebugClient.h
  4. +7
    -5
      common/JackMutex.h
  5. +1
    -1
      common/JackServer.cpp
  6. +2
    -0
      macosx/Jackdmp.xcodeproj/project.pbxproj

+ 2
- 0
ChangeLog View File

@@ -23,6 +23,8 @@ Fernando Lopez-Lezcano
2008-06-02 Stephane Letz <letz@grame.fr> 2008-06-02 Stephane Letz <letz@grame.fr>


* Cleanup and correct wscript for example-clients. * Cleanup and correct wscript for example-clients.
* Add a test for coherent freewheel state in JackDebugClient.
* Cleanup JackMutex class.


2008-05-31 Stephane Letz <letz@grame.fr> 2008-05-31 Stephane Letz <letz@grame.fr>




+ 6
- 0
common/JackDebugClient.cpp View File

@@ -41,6 +41,7 @@ JackDebugClient::JackDebugClient(JackClient * client)
fIsDeactivated = 0; fIsDeactivated = 0;
fIsClosed = 0; fIsClosed = 0;
fClient = client; fClient = client;
fFreewheel = false;
} }


JackDebugClient::~JackDebugClient() JackDebugClient::~JackDebugClient()
@@ -321,6 +322,11 @@ int JackDebugClient::SetBufferSize(jack_nframes_t buffer_size)
int JackDebugClient::SetFreeWheel(int onoff) int JackDebugClient::SetFreeWheel(int onoff)
{ {
CheckClient(); CheckClient();
if (onoff && fFreewheel)
*fStream << "!!! ERROR !!! : Freewheel setup seems incorrect : set = ON while FW is already ON " << endl;
if (!onoff && !fFreewheel)
*fStream << "!!! ERROR !!! : Freewheel setup seems incorrect : set = OFF while FW is already OFF " << endl;
fFreewheel = onoff;
return fClient->SetFreeWheel(onoff); return fClient->SetFreeWheel(onoff);
} }




+ 1
- 0
common/JackDebugClient.h View File

@@ -58,6 +58,7 @@ class JackDebugClient : public JackClient
int fIsActivated; int fIsActivated;
int fIsDeactivated; int fIsDeactivated;
int fIsClosed; int fIsClosed;
bool fFreewheel;
char fClientName[JACK_CLIENT_NAME_SIZE + 1]; char fClientName[JACK_CLIENT_NAME_SIZE + 1];
JackProcessCallback fProcessTimeCallback; JackProcessCallback fProcessTimeCallback;
void* fProcessTimeCallbackArg; void* fProcessTimeCallbackArg;


+ 7
- 5
common/JackMutex.h View File

@@ -54,7 +54,7 @@ class JackMutex
// In recursive mode by default // In recursive mode by default
fMutex = CreateMutex(0, FALSE, 0); fMutex = CreateMutex(0, FALSE, 0);
} }
virtual ~JackMutex()
~JackMutex()
{ {
CloseHandle(fMutex); CloseHandle(fMutex);
} }
@@ -90,7 +90,7 @@ class JackMutex
res = pthread_mutexattr_destroy(&mutex_attr); res = pthread_mutexattr_destroy(&mutex_attr);
assert(res == 0); assert(res == 0);
} }
virtual ~JackMutex()
~JackMutex()
{ {
pthread_mutex_destroy(&fMutex); pthread_mutex_destroy(&fMutex);
} }
@@ -124,13 +124,15 @@ class JackLockAble


JackMutex fMutex; JackMutex fMutex;


public:
protected:


JackLockAble() JackLockAble()
{} {}
virtual ~JackLockAble()
~JackLockAble()
{} {}


public:
void Lock() void Lock()
{ {
fMutex.Lock(); fMutex.Lock();
@@ -166,7 +168,7 @@ class JackLock
fObj->Lock(); fObj->Lock();
} }


virtual ~JackLock()
~JackLock()
{ {
fObj->Unlock(); fObj->Unlock();
} }


+ 1
- 1
common/JackServer.cpp View File

@@ -224,7 +224,7 @@ no graph state change can be done during freewheel mode.


int JackServer::SetFreewheel(bool onoff) int JackServer::SetFreewheel(bool onoff)
{ {
jack_log("JackServer::SetFreewheel state = %ld", onoff);
jack_log("JackServer::SetFreewheel is = %ld want = %ld", fFreewheel, onoff);


if (fFreewheel) { if (fFreewheel) {
if (onoff) { if (onoff) {


+ 2
- 0
macosx/Jackdmp.xcodeproj/project.pbxproj View File

@@ -1139,6 +1139,7 @@
4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackServerGlobals.h; path = ../common/JackServerGlobals.h; sourceTree = SOURCE_ROOT; }; 4BC2168D0A444BED00BDA09F /* JackServerGlobals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackServerGlobals.h; path = ../common/JackServerGlobals.h; sourceTree = SOURCE_ROOT; };
4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDummyDriver.cpp; path = ../common/JackDummyDriver.cpp; sourceTree = SOURCE_ROOT; }; 4BC3988908B3CF6C00B6F371 /* JackDummyDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackDummyDriver.cpp; path = ../common/JackDummyDriver.cpp; sourceTree = SOURCE_ROOT; };
4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDummyDriver.h; path = ../common/JackDummyDriver.h; sourceTree = SOURCE_ROOT; }; 4BC3988A08B3CF6C00B6F371 /* JackDummyDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackDummyDriver.h; path = ../common/JackDummyDriver.h; sourceTree = SOURCE_ROOT; };
4BC8326D0DF42C7D00DD1C93 /* JackMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JackMutex.h; path = ../common/JackMutex.h; sourceTree = SOURCE_ROOT; };
4BCC87950D57168300A7FEB1 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = "<absolute>"; }; 4BCC87950D57168300A7FEB1 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = "<absolute>"; };
4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackTransportEngine.h; path = ../common/JackTransportEngine.h; sourceTree = SOURCE_ROOT; }; 4BD4B4D409BACD9600750C0F /* JackTransportEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackTransportEngine.h; path = ../common/JackTransportEngine.h; sourceTree = SOURCE_ROOT; };
4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackTransportEngine.cpp; path = ../common/JackTransportEngine.cpp; sourceTree = SOURCE_ROOT; }; 4BD4B4D509BACD9600750C0F /* JackTransportEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackTransportEngine.cpp; path = ../common/JackTransportEngine.cpp; sourceTree = SOURCE_ROOT; };
@@ -1968,6 +1969,7 @@
4BA3874007947A46008D8992 /* Synchro */ = { 4BA3874007947A46008D8992 /* Synchro */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
4BC8326D0DF42C7D00DD1C93 /* JackMutex.h */,
4B02069D0DC0BAB400319AF1 /* JackProcessSync.cpp */, 4B02069D0DC0BAB400319AF1 /* JackProcessSync.cpp */,
4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */, 4BF8D1A70834EEB400C94B91 /* JackActivationCount.h */,
4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */, 4BF8D1A80834EEB400C94B91 /* JackActivationCount.cpp */,


Loading…
Cancel
Save