Commit 1d5712a5 authored by Stéphane Letz's avatar Stéphane Letz
Browse files

Fix merge conflicts.

parents 66c14ab5 d060e55d
......@@ -3,6 +3,7 @@
---------------------------
Dmitry Baikov
Gabriel M. Beddingfield
Steven Chamberlain
Thom Johansen
Thibault LeMeur
......@@ -21,12 +22,24 @@ Torben Hohn
Paul Davis
Peter L Jones
Devin Anderson
Josh Green
Josh Green
Mario Lang
---------------------------
Jackdmp changes log
---------------------------
2010-01-29 Gabriel M. Beddingfield <gabriel@teuton.org>
* Change JackEngineProfiling and JackAudioAdapterInterface gnuplot scripts to output SVG instead of PDF.
2009-12-15 Stephane Letz <letz@grame.fr>
* Shared memory manager was calling abort in case of fatal error, now return an error in caller.
2009-12-13 Stephane Letz <letz@grame.fr>
* Mario Lang alsa_io time calculation overflow patch.
2009-12-10 Stephane Letz <letz@grame.fr>
......
......@@ -68,8 +68,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming1.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming1.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -80,8 +80,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 2 title \"Consumer interrupt period\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
......@@ -100,8 +102,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming2.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming2.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -112,8 +114,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
......@@ -132,8 +136,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming3.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming3.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -144,8 +148,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
}
......
......@@ -121,7 +121,7 @@ void JackDebugClient::CheckClient(const char* function_name) const
*fStream << "!!! ERROR !!! : Accessing a client '" << fClientName << "' already closed " << "from " << function_name << endl;
*fStream << "This is likely to cause crash !'" << endl;
#ifdef __APPLE__
Debugger();
// Debugger();
#endif
}
}
......
......@@ -167,7 +167,7 @@ int JackDriver::Open(jack_nframes_t buffer_size,
int JackDriver::Close()
{
if (fClientControl.fRefNum > 0) {
if (fClientControl.fRefNum >= 0) {
jack_log("JackDriver::Close");
fGraphManager->DirectDisconnect(fClientControl.fRefNum, fClientControl.fRefNum); // Disconnect driver from itself for sync
fClientControl.fActive = false;
......
......@@ -35,8 +35,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
namespace Jack
{
#define AssertRefnum(ref) assert(ref >= 0 && ref < CLIENT_NUM);
JackEngine::JackEngine(JackGraphManager* manager,
JackSynchro* table,
JackEngineControl* control)
......@@ -213,28 +211,28 @@ void JackEngine::NotifyClient(int refnum, int event, int sync, const char* messa
JackClientInterface* client = fClientTable[refnum];
// The client may be notified by the RT thread while closing
if (!client) {
jack_log("JackEngine::NotifyClient: client not available anymore");
} else if (client->GetClientControl()->fCallback[event]) {
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, message, value1, value2) < 0)
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
} else {
jack_log("JackEngine::NotifyClient: no callback for event = %ld", event);
if (client) {
if (client && client->GetClientControl()->fCallback[event]) {
/*
Important for internal clients : unlock before calling the notification callbacks.
*/
bool res = fMutex.Unlock();
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, message, value1, value2) < 0)
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
if (res)
fMutex.Lock();
} else {
jack_log("JackEngine::NotifyClient: no callback for event = %ld", event);
}
}
}
void JackEngine::NotifyClients(int event, int sync, const char* message, int value1, int value2)
void JackEngine::NotifyClients(int event, int sync, const char* message, int value1, int value2)
{
for (int i = 0; i < CLIENT_NUM; i++) {
JackClientInterface* client = fClientTable[i];
if (client) {
if (client->GetClientControl()->fCallback[event]) {
if (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, message, value1, value2) < 0)
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
} else {
jack_log("JackEngine::NotifyClients: no callback for event = %ld", event);
}
}
NotifyClient(i, event, sync, message, value1, value2);
}
}
......@@ -274,8 +272,7 @@ void JackEngine::NotifyRemoveClient(const char* name, int refnum)
void JackEngine::NotifyXRun(jack_time_t callback_usecs, float delayed_usecs)
{
// Use the audio thread => request thread communication channel
fEngineControl->ResetFrameTime(callback_usecs);
fEngineControl->NotifyXRun(delayed_usecs);
fEngineControl->NotifyXRun(callback_usecs, delayed_usecs);
fChannel.Notify(ALL_CLIENTS, kXRunCallback, 0);
}
......@@ -348,14 +345,9 @@ void JackEngine::NotifyActivate(int refnum)
int JackEngine::GetInternalClientName(int refnum, char* name_res)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
if (client) {
strncpy(name_res, client->GetClientControl()->fName, JACK_CLIENT_NAME_SIZE);
return 0;
} else {
return -1;
}
strncpy(name_res, client->GetClientControl()->fName, JACK_CLIENT_NAME_SIZE);
return 0;
}
int JackEngine::InternalClientHandle(const char* client_name, int* status, int* int_ref)
......@@ -378,7 +370,6 @@ int JackEngine::InternalClientHandle(const char* client_name, int* status, int*
int JackEngine::InternalClientUnload(int refnum, int* status)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
if (client) {
int res = client->Close();
......@@ -592,26 +583,19 @@ error:
// Used for external clients
int JackEngine::ClientExternalClose(int refnum)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
if (client) {
fEngineControl->fTransport.ResetTimebase(refnum);
int res = ClientCloseAux(refnum, client, true);
client->Close();
delete client;
return res;
} else {
return -1;
}
fEngineControl->fTransport.ResetTimebase(refnum);
int res = ClientCloseAux(refnum, client, true);
client->Close();
delete client;
return res;
}
// Used for server internal clients or drivers when the RT thread is stopped
int JackEngine::ClientInternalClose(int refnum, bool wait)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
return (client) ? ClientCloseAux(refnum, client, wait) : -1;
return ClientCloseAux(refnum, client, wait);
}
int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wait)
......@@ -656,11 +640,9 @@ int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wai
int JackEngine::ClientActivate(int refnum, bool is_real_time)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
assert(fClientTable[refnum]);
jack_log("JackEngine::ClientActivate ref = %ld name = %s", refnum, client->GetClientControl()->fName);
if (is_real_time)
fGraphManager->Activate(refnum);
......@@ -700,11 +682,7 @@ int JackEngine::ClientActivate(int refnum, bool is_real_time)
// May be called without client
int JackEngine::ClientDeactivate(int refnum)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
if (client == NULL)
return -1;
jack_log("JackEngine::ClientDeactivate ref = %ld name = %s", refnum, client->GetClientControl()->fName);
jack_int_t input_ports[PORT_NUM_FOR_CLIENT];
......@@ -749,8 +727,6 @@ int JackEngine::ClientDeactivate(int refnum)
int JackEngine::PortRegister(int refnum, const char* name, const char *type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index)
{
jack_log("JackEngine::PortRegister ref = %ld name = %s type = %s flags = %d buffer_size = %d", refnum, name, type, flags, buffer_size);
AssertRefnum(refnum);
assert(fClientTable[refnum]);
JackClientInterface* client = fClientTable[refnum];
// Check if port name already exists
......@@ -772,8 +748,6 @@ int JackEngine::PortRegister(int refnum, const char* name, const char *type, uns
int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index)
{
jack_log("JackEngine::PortUnRegister ref = %ld port_index = %ld", refnum, port_index);
AssertRefnum(refnum);
assert(fClientTable[refnum]);
JackClientInterface* client = fClientTable[refnum];
// Disconnect port ==> notification is sent
......@@ -791,7 +765,6 @@ int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index)
int JackEngine::PortConnect(int refnum, const char* src, const char* dst)
{
jack_log("JackEngine::PortConnect src = %s dst = %s", src, dst);
AssertRefnum(refnum);
jack_port_id_t port_src, port_dst;
return (fGraphManager->GetTwoPorts(src, dst, &port_src, &port_dst) < 0)
......@@ -802,7 +775,6 @@ int JackEngine::PortConnect(int refnum, const char* src, const char* dst)
int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
{
jack_log("JackEngine::PortConnect src = %d dst = %d", src, dst);
AssertRefnum(refnum);
JackClientInterface* client;
int ref;
......@@ -838,7 +810,6 @@ int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst)
{
jack_log("JackEngine::PortDisconnect src = %s dst = %s", src, dst);
AssertRefnum(refnum);
jack_port_id_t port_src, port_dst;
return (fGraphManager->GetTwoPorts(src, dst, &port_src, &port_dst) < 0)
......@@ -849,8 +820,7 @@ int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst)
int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
{
jack_log("JackEngine::PortDisconnect src = %d dst = %d", src, dst);
AssertRefnum(refnum);
if (dst == ALL_PORTS) {
jack_int_t connections[CONNECTION_NUM_FOR_PORT];
......@@ -886,7 +856,6 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds
int JackEngine::PortRename(int refnum, jack_port_id_t port, const char* name)
{
AssertRefnum(refnum);
char old_name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
strcpy(old_name, fGraphManager->GetPort(port)->GetName());
fGraphManager->GetPort(port)->SetName(name);
......
......@@ -23,6 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackConstants.h"
#include "JackGraphManager.h"
#include "JackSynchro.h"
#include "JackMutex.h"
#include "JackTransportEngine.h"
#include "JackPlatformPlug.h"
......@@ -37,8 +38,10 @@ class JackExternalClient;
\brief Engine description.
*/
class SERVER_EXPORT JackEngine
class SERVER_EXPORT JackEngine : public JackLockAble
{
friend class JackLockedEngine;
private:
JackGraphManager* fGraphManager;
......@@ -71,6 +74,11 @@ class SERVER_EXPORT JackEngine
void NotifyPortConnect(jack_port_id_t src, jack_port_id_t dst, bool onoff);
void NotifyPortRename(jack_port_id_t src, const char* old_name);
void NotifyActivate(int refnum);
bool CheckClient(int refnum)
{
return (refnum >= 0 && refnum < CLIENT_NUM && fClientTable[refnum] != NULL);
}
public:
......
......@@ -81,8 +81,9 @@ void JackEngineControl::ResetRollingUsecs()
fRollingInterval = int(floor((JACK_ENGINE_ROLLING_INTERVAL * 1000.f) / fPeriodUsecs));
}
void JackEngineControl::NotifyXRun(float delayed_usecs)
void JackEngineControl::NotifyXRun(jack_time_t callback_usecs, float delayed_usecs)
{
ResetFrameTime(callback_usecs);
fXrunDelayedUsecs = delayed_usecs;
if (delayed_usecs > fMaxDelayedUsecs)
fMaxDelayedUsecs = delayed_usecs;
......
......@@ -162,7 +162,7 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem
}
// XRun
void NotifyXRun(float delayed_usecs);
void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs);
void ResetXRun()
{
fMaxDelayedUsecs = 0.f;
......
......@@ -95,7 +95,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream1("Timing1.plot", std::ios_base::ate);
if (!fStream1.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing1.log file");
jack_error("JackEngineProfiling::Save cannot open Timing1.plot file");
} else {
fStream1 << "set grid\n";
......@@ -104,21 +104,22 @@ JackEngineProfiling::~JackEngineProfiling()
fStream1 << "set ylabel \"usec\"\n";
fStream1 << "plot \"JackEngineProfiling.log\" using 1 title \"Audio period\" with lines \n";
fStream1 << "set output 'Timing1.pdf\n";
fStream1 << "set terminal pdf\n";
fStream1 << "set output 'Timing1.svg\n";
fStream1 << "set terminal svg\n";
fStream1 << "set grid\n";
fStream1 << "set title \"Audio driver timing\"\n";
fStream1 << "set xlabel \"audio cycles\"\n";
fStream1 << "set ylabel \"usec\"\n";
fStream1 << "plot \"JackEngineProfiling.log\" using 1 title \"Audio period\" with lines \n";
fStream1 << "unset output\n";
}
// Driver end date
std::ofstream fStream2("Timing2.plot", std::ios_base::ate);
if (!fStream2.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing2.log file");
jack_error("JackEngineProfiling::Save cannot open Timing2.plot file");
} else {
fStream2 << "set grid\n";
......@@ -127,14 +128,15 @@ JackEngineProfiling::~JackEngineProfiling()
fStream2 << "set ylabel \"usec\"\n";
fStream2 << "plot \"JackEngineProfiling.log\" using 2 title \"Driver end date\" with lines \n";
fStream2 << "set output 'Timing2.pdf\n";
fStream2 << "set terminal pdf\n";
fStream2 << "set output 'Timing2.svg\n";
fStream2 << "set terminal svg\n";
fStream2 << "set grid\n";
fStream2 << "set title \"Driver end date\"\n";
fStream2 << "set xlabel \"audio cycles\"\n";
fStream2 << "set ylabel \"usec\"\n";
fStream2 << "plot \"JackEngineProfiling.log\" using 2 title \"Driver end date\" with lines \n";
fStream2 << "unset output\n";
}
// Clients end date
......@@ -142,7 +144,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream3("Timing3.plot", std::ios_base::ate);
if (!fStream3.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing3.log file");
jack_error("JackEngineProfiling::Save cannot open Timing3.plot file");
} else {
fStream3 << "set multiplot\n";
......@@ -170,8 +172,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream3 << "\n unset multiplot\n";
fStream3 << "set output 'Timing3.pdf\n";
fStream3 << "set terminal pdf\n";
fStream3 << "set output 'Timing3.svg\n";
fStream3 << "set terminal svg\n";
fStream3 << "set multiplot\n";
fStream3 << "set grid\n";
......@@ -196,6 +198,8 @@ JackEngineProfiling::~JackEngineProfiling()
fStream3 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) - 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream3 << "\nunset multiplot\n";
fStream3 << "unset output\n";
}
}
......@@ -204,7 +208,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream4("Timing4.plot", std::ios_base::ate);
if (!fStream4.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing4.log file");
jack_error("JackEngineProfiling::Save cannot open Timing4.plot file");
} else {
fStream4 << "set multiplot\n";
......@@ -222,8 +226,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream4 << "\n unset multiplot\n";
fStream4 << "set output 'Timing4.pdf\n";
fStream4 << "set terminal pdf\n";
fStream4 << "set output 'Timing4.svg\n";
fStream4 << "set terminal svg\n";
fStream4 << "set multiplot\n";
fStream4 << "set grid\n";
......@@ -238,6 +242,8 @@ JackEngineProfiling::~JackEngineProfiling()
fStream4 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream4 << "\nunset multiplot\n";
fStream4 << "unset output\n";
}
}
......@@ -246,7 +252,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream5("Timing5.plot", std::ios_base::ate);
if (!fStream5.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing5.log file");
jack_error("JackEngineProfiling::Save cannot open Timing5.plot file");
} else {
fStream5 << "set multiplot\n";
......@@ -264,8 +270,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream5 << "\n unset multiplot\n";
fStream5 << "set output 'Timing5.pdf\n";
fStream5 << "set terminal pdf\n";
fStream5 << "set output 'Timing5.svg\n";
fStream5 << "set terminal svg\n";
fStream5 << "set multiplot\n";
fStream5 << "set grid\n";
......@@ -280,8 +286,47 @@ JackEngineProfiling::~JackEngineProfiling()
fStream5 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) + 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream5 << "\nunset multiplot\n";
fStream5 << "unset output\n";
}
}
std::ofstream fStream6("Timings.html", std::ios_base::ate);
if (!fStream6.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timings.html file");
} else {
fStream6 << "<?xml version='1.0' encoding='utf-8'?>\n";
fStream6 << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
fStream6 << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
fStream6 << "<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>\n";
fStream6 << " <head>\n";
fStream6 << " <title>JACK engine profiling</title>\n";
fStream6 << " <!-- assuming that images are 600px wide -->\n";
fStream6 << " <style media='all' type='text/css'>\n";
fStream6 << " .center { margin-left:auto ; margin-right: auto; width: 650px; height: 550px }\n";
fStream6 << " </style>\n";
fStream6 << " </head>\n";
fStream6 << " <body>\n";
fStream6 << " <h2 style='text-align:center'>JACK engine profiling</h2>\n";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing1.svg'>Timing1</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing2.svg'>Timing2</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing3.svg'>Timing3</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing4.svg'>Timing4</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing5.svg'>Timing5</object></div>";
fStream6 << " </body>\n";
fStream6 << "</html>\n";
}
std::ofstream fStream7("generate_timings", std::ios_base::ate);
if (!fStream7.is_open()) {
jack_error("JackEngineProfiling::Save cannot open generate_timings file");
} else {
fStream7 << "gnuplot -persist Timing1.plot \n";
fStream7 << "gnuplot -persist Timing2.plot\n";
fStream7 << "gnuplot -persist Timing3.plot\n";
fStream7 << "gnuplot -persist Timing4.plot\n";
fStream7 << "gnuplot -persist Timing5.plot\n";
}
}
bool JackEngineProfiling::CheckClient(const char* name, int cur_point)
......
......@@ -103,6 +103,9 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_
} catch (int n) {
jack_error("Map shared memory segments exception %d", n);
goto error;
} catch (...) {
jack_error("Unknown error...");
goto error;
}
SetupDriverSync(false);
......
......@@ -37,7 +37,6 @@ See : http://groups.google.com/group/comp.programming.threads/browse_thread/thre
catch (...) {
// Assuming thread cancellation, must rethrow
throw;
}
*/
......@@ -62,11 +61,12 @@ catch (...) {
throw; \
} \
/*!
\brief Locked Engine, access to methods is serialized using a mutex.
*/
class SERVER_EXPORT JackLockedEngine : public JackLockAble
class SERVER_EXPORT JackLockedEngine
{
private:
......@@ -99,21 +99,21 @@ class SERVER_EXPORT JackLockedEngine : public JackLockAble
int ClientCheck(const char* name, char* name_res, int protocol, int options, int* status)
{
TRY_CALL
JackLock lock(this);
JackLock lock(&fEngine);
return fEngine.ClientCheck(name, name_res, protocol, options, status);
CATCH_EXCEPTION_RETURN
}
int ClientExternalOpen(const char* name, int pid, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager)
{
TRY_CALL
JackLock lock(this);
JackLock lock(&fEngine);
return fEngine.ClientExternalOpen(name, pid, ref, shared_engine, shared_client, shared_graph_manager);
CATCH_EXCEPTION_RETURN
}
int ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, bool wait)
{
TRY_CALL
JackLock lock(this);
JackLock lock(&fEngine);
return fEngine.ClientInternalOpen(name, ref, shared_engine, shared_manager, client, wait);
CATCH_EXCEPTION_RETURN
}
......@@ -121,30 +121,30 @@ class SERVER_EXPORT JackLockedEngine : public JackLockAble
int ClientExternalClose(int refnum)
{
TRY_CALL
JackLock lock(this);
return fEngine.ClientExternalClose(refnum);