Commit d2f7053e authored by sletz's avatar sletz
Browse files

Nedko Arnaudov log patch(2).

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1936 0c269be4-1314-0410-8aa9-9f06e86f4224
parent c4ee8ff5
......@@ -247,7 +247,7 @@ static inline void WaitGraphChange()
JackEngineControl* control = GetEngineControl();
if (manager && control && manager->IsPendingChange()) {
JackLog("WaitGraphChange...\n");
jack_log("WaitGraphChange...");
JackSleep(int(control->fPeriodUsecs * 1.1f));
}
}
......@@ -845,7 +845,7 @@ EXPORT int jack_set_graph_order_callback(jack_client_t* ext_client, JackGraphOrd
JackLibGlobals::CheckContext();
#endif
JackClient* client = (JackClient*)ext_client;
JackLog("jack_set_graph_order_callback ext_client %x client %x \n", ext_client, client);
jack_log("jack_set_graph_order_callback ext_client %x client %x ", ext_client, client);
if (client == NULL) {
jack_error("jack_set_graph_order_callback called with a NULL client");
return -1;
......@@ -874,7 +874,7 @@ EXPORT int jack_set_thread_init_callback(jack_client_t* ext_client, JackThreadIn
JackLibGlobals::CheckContext();
#endif
JackClient* client = (JackClient*)ext_client;
JackLog("jack_set_thread_init_callback ext_client %x client %x \n", ext_client, client);
jack_log("jack_set_thread_init_callback ext_client %x client %x ", ext_client, client);
if (client == NULL) {
jack_error("jack_set_thread_init_callback called with a NULL client");
return -1;
......@@ -1474,7 +1474,7 @@ EXPORT float jack_get_max_delayed_usecs(jack_client_t* ext_client)
#ifdef __CLIENTDEBUG__
JackLibGlobals::CheckContext();
#endif
JackLog("jack_get_max_delayed_usecs: not yet implemented\n");
jack_log("jack_get_max_delayed_usecs: not yet implemented");
return 0.f;
}
......@@ -1483,7 +1483,7 @@ EXPORT float jack_get_xrun_delayed_usecs(jack_client_t* ext_client)
#ifdef __CLIENTDEBUG__
JackLibGlobals::CheckContext();
#endif
JackLog("jack_get_xrun_delayed_usecs: not yet implemented\n");
jack_log("jack_get_xrun_delayed_usecs: not yet implemented");
return 0.f;
}
......@@ -1492,7 +1492,7 @@ EXPORT void jack_reset_max_delayed_usecs(jack_client_t* ext_client)
#ifdef __CLIENTDEBUG__
JackLibGlobals::CheckContext();
#endif
JackLog("jack_reset_max_delayed_usecs: not yet implemented\n");
jack_log("jack_reset_max_delayed_usecs: not yet implemented");
}
// thread.h
......
This diff is collapsed.
......@@ -74,12 +74,12 @@ Requirement:
The fCounter is an array of indexes to access the current and 3 different "pending" states.
¥ WriteNextStateStart(int index) must return a valid state to be written into, and must invalidate state "index" ==> cur state switch.
¥ WriteNextStateStop(int index) makes the "index" state become "switchable" with the current state.
¥ TrySwitchState(int index) must detect that pending state is a new state, and does the switch
¥ ReadCurrentState() must return the state
¥ GetCurrentIndex() must return an index increased each new switch.
¥ WriteNextStateStart(int index1) and WriteNextStateStart(int index2) can be interleaved
WriteNextStateStart(int index) must return a valid state to be written into, and must invalidate state "index" ==> cur state switch.
WriteNextStateStop(int index) makes the "index" state become "switchable" with the current state.
TrySwitchState(int index) must detect that pending state is a new state, and does the switch
ReadCurrentState() must return the state
GetCurrentIndex() must return an index increased each new switch.
WriteNextStateStart(int index1) and WriteNextStateStart(int index2) can be interleaved
[switch counter][index state][index state][cur index]
......@@ -136,7 +136,7 @@ class JackAtomicArrayState
JackAtomicArrayState()
{
JackLog("JackAtomicArrayState constructor\n");
jack_log("JackAtomicArrayState constructor");
Counter1(fCounter) = 0;
}
......
......@@ -91,7 +91,7 @@ int JackAudioDriver::Attach()
unsigned long port_flags = JackPortIsOutput | JackPortIsPhysical | JackPortIsTerminal;
int i;
JackLog("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld\n", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
jack_log("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
for (i = 0; i < fCaptureChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fClientControl->fName, fCaptureDriverName, i + 1);
......@@ -104,7 +104,7 @@ int JackAudioDriver::Attach()
port->SetAlias(alias);
port->SetLatency(fEngineControl->fBufferSize + fCaptureLatency);
fCapturePortList[i] = port_index;
JackLog("JackAudioDriver::Attach fCapturePortList[i] port_index = %ld\n", port_index);
jack_log("JackAudioDriver::Attach fCapturePortList[i] port_index = %ld", port_index);
}
port_flags = JackPortIsInput | JackPortIsPhysical | JackPortIsTerminal;
......@@ -120,11 +120,11 @@ int JackAudioDriver::Attach()
port->SetAlias(alias);
port->SetLatency(fEngineControl->fBufferSize + fPlaybackLatency);
fPlaybackPortList[i] = port_index;
JackLog("JackAudioDriver::Attach fPlaybackPortList[i] port_index = %ld\n", port_index);
jack_log("JackAudioDriver::Attach fPlaybackPortList[i] port_index = %ld", port_index);
// Monitor ports
if (fWithMonitorPorts) {
JackLog("Create monitor port \n");
jack_log("Create monitor port ");
snprintf(name, sizeof(name) - 1, "%s:%s:monitor_%u", fClientControl->fName, fPlaybackDriverName, i + 1);
if ((port_index = fGraphManager->AllocatePort(fClientControl->fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, fEngineControl->fBufferSize)) == NO_PORT) {
jack_error("Cannot register monitor port for %s", name);
......@@ -143,7 +143,7 @@ int JackAudioDriver::Attach()
int JackAudioDriver::Detach()
{
int i;
JackLog("JackAudioDriver::Detach\n");
jack_log("JackAudioDriver::Detach");
for (i = 0; i < fCaptureChannels; i++) {
fGraphManager->ReleasePort(fClientControl->fRefNum, fCapturePortList[i]);
......
......@@ -77,7 +77,7 @@ JackClient::~JackClient()
int JackClient::Close()
{
JackLog("JackClient::Close ref = %ld\n", GetClientControl()->fRefNum);
jack_log("JackClient::Close ref = %ld", GetClientControl()->fRefNum);
Deactivate();
int result = -1;
fChannel->ClientClose(GetClientControl()->fRefNum, &result);
......@@ -105,12 +105,12 @@ pthread_t JackClient::GetThreadID()
void JackClient::SetupDriverSync(bool freewheel)
{
if (!freewheel && !GetEngineControl()->fSyncMode) {
JackLog("JackClient::SetupDriverSync driver sem in flush mode\n");
jack_log("JackClient::SetupDriverSync driver sem in flush mode");
fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(true);
fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(true);
fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(true);
} else {
JackLog("JackClient::SetupDriverSync driver sem in normal mode\n");
jack_log("JackClient::SetupDriverSync driver sem in normal mode");
fSynchroTable[AUDIO_DRIVER_REFNUM]->SetFlush(false);
fSynchroTable[FREEWHEEL_DRIVER_REFNUM]->SetFlush(false);
fSynchroTable[LOOPBACK_DRIVER_REFNUM]->SetFlush(false);
......@@ -142,7 +142,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync,
break;
case kActivateClient:
JackLog("JackClient::kActivateClient name = %s ref = %ld \n", name, refnum);
jack_log("JackClient::kActivateClient name = %s ref = %ld ", name, refnum);
Init();
break;
}
......@@ -156,31 +156,31 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync,
switch (notify) {
case kAddClient:
JackLog("JackClient::kAddClient fName = %s name = %s\n", GetClientControl()->fName, name);
jack_log("JackClient::kAddClient fName = %s name = %s", GetClientControl()->fName, name);
if (fClientRegistration && strcmp(GetClientControl()->fName, name) != 0) // Don't call the callback for the registering client itself
fClientRegistration(name, 1, fClientRegistrationArg);
break;
case kRemoveClient:
JackLog("JackClient::kRemoveClient fName = %s name = %s\n", GetClientControl()->fName, name);
jack_log("JackClient::kRemoveClient fName = %s name = %s", GetClientControl()->fName, name);
if (fClientRegistration && strcmp(GetClientControl()->fName, name) != 0) // Don't call the callback for the registering client itself
fClientRegistration(name, 0, fClientRegistrationArg);
break;
case kBufferSizeCallback:
JackLog("JackClient::kBufferSizeCallback buffer_size = %ld\n", value1);
jack_log("JackClient::kBufferSizeCallback buffer_size = %ld", value1);
if (fBufferSize)
res = fBufferSize(value1, fBufferSizeArg);
break;
case kGraphOrderCallback:
JackLog("JackClient::kGraphOrderCallback\n");
jack_log("JackClient::kGraphOrderCallback");
if (fGraphOrder)
res = fGraphOrder(fGraphOrderArg);
break;
case kStartFreewheelCallback:
JackLog("JackClient::kStartFreewheel\n");
jack_log("JackClient::kStartFreewheel");
SetupDriverSync(true);
fThread->DropRealTime();
if (fFreewheel)
......@@ -188,7 +188,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync,
break;
case kStopFreewheelCallback:
JackLog("JackClient::kStopFreewheel\n");
jack_log("JackClient::kStopFreewheel");
SetupDriverSync(false);
if (fFreewheel)
fFreewheel(0, fFreewheelArg);
......@@ -196,31 +196,31 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync,
break;
case kPortRegistrationOnCallback:
JackLog("JackClient::kPortRegistrationOn port_index = %ld\n", value1);
jack_log("JackClient::kPortRegistrationOn port_index = %ld", value1);
if (fPortRegistration)
fPortRegistration(value1, 1, fPortRegistrationArg);
break;
case kPortRegistrationOffCallback:
JackLog("JackClient::kPortRegistrationOff port_index = %ld \n", value1);
jack_log("JackClient::kPortRegistrationOff port_index = %ld ", value1);
if (fPortRegistration)
fPortRegistration(value1, 0, fPortRegistrationArg);
break;
case kPortConnectCallback:
JackLog("JackClient::kPortConnectCallback src = %ld dst = %ld\n", value1, value2);
jack_log("JackClient::kPortConnectCallback src = %ld dst = %ld", value1, value2);
if (fPortConnect)
fPortConnect(value1, value2, 1, fPortConnectArg);
break;
case kPortDisconnectCallback:
JackLog("JackClient::kPortDisconnectCallback src = %ld dst = %ld\n", value1, value2);
jack_log("JackClient::kPortDisconnectCallback src = %ld dst = %ld", value1, value2);
if (fPortConnect)
fPortConnect(value1, value2, 0, fPortConnectArg);
break;
case kXRunCallback:
JackLog("JackClient::kXRunCallback\n");
jack_log("JackClient::kXRunCallback");
if (fXrun)
res = fXrun(fXrunArg);
break;
......@@ -236,7 +236,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync,
*/
int JackClient::Activate()
{
JackLog("JackClient::Activate \n");
jack_log("JackClient::Activate ");
if (IsActive())
return 0;
......@@ -273,7 +273,7 @@ int JackClient::Activate()
*/
int JackClient::Deactivate()
{
JackLog("JackClient::Deactivate \n");
jack_log("JackClient::Deactivate ");
if (!IsActive())
return 0;
......@@ -281,7 +281,7 @@ int JackClient::Deactivate()
int result = -1;
fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result);
JackLog("JackClient::Deactivate res = %ld \n", result);
jack_log("JackClient::Deactivate res = %ld ", result);
// We need to wait for the new engine cycle before stopping the RT thread, but this is done by ClientDeactivate
/* TODO : solve WIN32 thread Kill issue
......@@ -306,7 +306,7 @@ int JackClient::Deactivate()
bool JackClient::Init()
{
if (fInit) {
JackLog("JackClient::Init calling client thread init callback\n");
jack_log("JackClient::Init calling client thread init callback");
fInit(fInitArg);
}
return true;
......@@ -314,7 +314,7 @@ bool JackClient::Init()
int JackClient::StartThread()
{
JackLog("JackClient::StartThread : period = %ld computation = %ld constraint = %ld\n",
jack_log("JackClient::StartThread : period = %ld computation = %ld constraint = %ld",
long(int64_t(GetEngineControl()->fPeriod) / 1000.0f),
long(int64_t(GetEngineControl()->fComputation) / 1000.0f),
long(int64_t(GetEngineControl()->fConstraint) / 1000.0f));
......@@ -362,7 +362,7 @@ inline bool JackClient::WaitFirstSync()
return false;
return true;
} else {
JackLog("Process called for an inactive client\n");
jack_log("Process called for an inactive client");
}
SignalSync();
}
......@@ -453,7 +453,7 @@ inline void JackClient::SignalSync()
inline int JackClient::End()
{
JackLog("JackClient::Execute end name = %s\n", GetClientControl()->fName);
jack_log("JackClient::Execute end name = %s", GetClientControl()->fName);
// Hum... not sure about this, the following "close" code is called in the RT thread...
int result;
fThread->DropRealTime();
......@@ -505,12 +505,12 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig
return 0; // Means failure here...
}
JackLog("JackClient::PortRegister ref = %ld name = %s type = %s\n", GetClientControl()->fRefNum, name.c_str(), port_type);
jack_log("JackClient::PortRegister ref = %ld name = %s type = %s", GetClientControl()->fRefNum, name.c_str(), port_type);
int result = -1;
unsigned int port_index = NO_PORT;
fChannel->PortRegister(GetClientControl()->fRefNum, name.c_str(), port_type, flags, buffer_size, &port_index, &result);
JackLog("JackClient::PortRegister port_index = %ld \n", port_index);
jack_log("JackClient::PortRegister port_index = %ld ", port_index);
if (result == 0) {
fPortList.push_back(port_index);
......@@ -522,7 +522,7 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig
int JackClient::PortUnRegister(jack_port_id_t port_index)
{
JackLog("JackClient::PortUnRegister port_index = %ld\n", port_index);
jack_log("JackClient::PortUnRegister port_index = %ld", port_index);
list<jack_port_id_t>::iterator it = find(fPortList.begin(), fPortList.end(), port_index);
if (it != fPortList.end()) {
......@@ -538,7 +538,7 @@ int JackClient::PortUnRegister(jack_port_id_t port_index)
int JackClient::PortConnect(const char* src, const char* dst)
{
JackLog("JackClient::Connect src = %s dst = %s\n", src, dst);
jack_log("JackClient::Connect src = %s dst = %s", src, dst);
int result = -1;
fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result);
return result;
......@@ -546,7 +546,7 @@ int JackClient::PortConnect(const char* src, const char* dst)
int JackClient::PortDisconnect(const char* src, const char* dst)
{
JackLog("JackClient::Disconnect src = %s dst = %s\n", src, dst);
jack_log("JackClient::Disconnect src = %s dst = %s", src, dst);
int result = -1;
fChannel->PortDisconnect(GetClientControl()->fRefNum, src, dst, &result);
return result;
......@@ -554,7 +554,7 @@ int JackClient::PortDisconnect(const char* src, const char* dst)
int JackClient::PortDisconnect(jack_port_id_t src)
{
JackLog("JackClient::PortDisconnect src = %ld\n", src);
jack_log("JackClient::PortDisconnect src = %ld", src);
int result = -1;
fChannel->PortDisconnect(GetClientControl()->fRefNum, src, ALL_PORTS, &result);
return result;
......@@ -593,7 +593,7 @@ ShutDown is called:
void JackClient::ShutDown()
{
JackLog("ShutDown\n");
jack_log("ShutDown");
if (fShutdown) {
GetClientControl()->fActive = false;
fShutdown(fShutdownArg);
......@@ -638,7 +638,7 @@ int JackClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timeba
if (IsActive()) {
int result = -1;
fChannel->SetTimebaseCallback(GetClientControl()->fRefNum, conditional, &result);
JackLog("SetTimebaseCallback result = %ld\n", result);
jack_log("SetTimebaseCallback result = %ld", result);
if (result == 0) {
fTimebase = timebase_callback;
fTimebaseArg = arg;
......@@ -646,7 +646,7 @@ int JackClient::SetTimebaseCallback(int conditional, JackTimebaseCallback timeba
fTimebase = NULL;
fTimebaseArg = NULL;
}
JackLog("SetTimebaseCallback OK result = %ld\n", result);
jack_log("SetTimebaseCallback OK result = %ld", result);
return result;
} else {
fTimebase = timebase_callback;
......@@ -663,7 +663,7 @@ int JackClient::RequestNewPos(jack_position_t* pos)
jack_position_t* request = transport.WriteNextStateStart(2);
pos->unique_1 = pos->unique_2 = transport.GenerateUniqueID();
JackTransportEngine::TransportCopyPosition(pos, request);
JackLog("RequestNewPos pos = %ld\n", pos->frame);
jack_log("RequestNewPos pos = %ld", pos->frame);
transport.WriteNextStateStop(2);
return 0;
}
......@@ -673,14 +673,14 @@ int JackClient::TransportLocate(jack_nframes_t frame)
jack_position_t pos;
pos.frame = frame;
pos.valid = (jack_position_bits_t)0;
JackLog("TransportLocate pos = %ld\n", pos.frame);
jack_log("TransportLocate pos = %ld", pos.frame);
return RequestNewPos(&pos);
}
int JackClient::TransportReposition(jack_position_t* pos)
{
jack_position_t tmp = *pos;
JackLog("TransportReposition pos = %ld\n", pos->frame);
jack_log("TransportReposition pos = %ld", pos->frame);
return (tmp.valid & ~JACK_POSITION_MASK) ? EINVAL : RequestNewPos(&tmp);
}
......@@ -837,7 +837,7 @@ int JackClient::SetInitCallback(JackThreadInitCallback callback, void *arg)
int JackClient::SetGraphOrderCallback(JackGraphOrderCallback callback, void *arg)
{
JackLog("SetGraphOrderCallback \n");
jack_log("SetGraphOrderCallback ");
if (IsActive()) {
jack_error("You cannot set callbacks on an active client");
......
......@@ -29,7 +29,7 @@ namespace Jack
JackConnectionManager::JackConnectionManager()
{
int i;
JackLog("JackConnectionManager::InitConnections size = %ld \n", sizeof(JackConnectionManager));
jack_log("JackConnectionManager::InitConnections size = %ld ", sizeof(JackConnectionManager));
for (i = 0; i < PORT_NUM; i++) {
fConnection[i].Init();
......@@ -37,7 +37,7 @@ JackConnectionManager::JackConnectionManager()
fLoopFeedback.Init();
JackLog("JackConnectionManager::InitClients\n");
jack_log("JackConnectionManager::InitClients");
for (i = 0; i < CLIENT_NUM; i++) {
InitRefNum(i);
}
......@@ -52,7 +52,7 @@ JackConnectionManager::~JackConnectionManager()
bool JackConnectionManager::IsLoopPathAux(int ref1, int ref2) const
{
JackLog("JackConnectionManager::IsLoopPathAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::IsLoopPathAux ref1 = %ld ref2 = %ld", ref1, ref2);
if (ref1 == AUDIO_DRIVER_REFNUM // Driver is reached
|| ref2 == AUDIO_DRIVER_REFNUM
......@@ -93,7 +93,7 @@ int JackConnectionManager::GetActivation(int refnum) const
*/
int JackConnectionManager::Connect(jack_port_id_t port_src, jack_port_id_t port_dst)
{
JackLog("JackConnectionManager::Connect port_src = %ld port_dst = %ld\n", port_src, port_dst);
jack_log("JackConnectionManager::Connect port_src = %ld port_dst = %ld", port_src, port_dst);
if (fConnection[port_src].AddItem(port_dst)) {
return 0;
......@@ -108,7 +108,7 @@ int JackConnectionManager::Connect(jack_port_id_t port_src, jack_port_id_t port_
*/
int JackConnectionManager::Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst)
{
JackLog("JackConnectionManager::Disconnect port_src = %ld port_dst = %ld\n", port_src, port_dst);
jack_log("JackConnectionManager::Disconnect port_src = %ld port_dst = %ld", port_src, port_dst);
if (fConnection[port_src].RemoveItem(port_dst)) {
return 0;
......@@ -158,7 +158,7 @@ const jack_int_t* JackConnectionManager::GetConnections(jack_port_id_t port_inde
int JackConnectionManager::AddInputPort(int refnum, jack_port_id_t port_index)
{
if (fInputPort[refnum].AddItem(port_index)) {
JackLog("JackConnectionManager::AddInputPort ref = %ld port = %ld\n", refnum, port_index);
jack_log("JackConnectionManager::AddInputPort ref = %ld port = %ld", refnum, port_index);
return 0;
} else {
jack_error("Maximum number of input ports is reached for application ref = %ld", refnum);
......@@ -172,7 +172,7 @@ int JackConnectionManager::AddInputPort(int refnum, jack_port_id_t port_index)
int JackConnectionManager::AddOutputPort(int refnum, jack_port_id_t port_index)
{
if (fOutputPort[refnum].AddItem(port_index)) {
JackLog("JackConnectionManager::AddOutputPort ref = %ld port = %ld\n", refnum, port_index);
jack_log("JackConnectionManager::AddOutputPort ref = %ld port = %ld", refnum, port_index);
return 0;
} else {
jack_error("Maximum number of output ports is reached for application ref = %ld", refnum);
......@@ -185,7 +185,7 @@ int JackConnectionManager::AddOutputPort(int refnum, jack_port_id_t port_index)
*/
int JackConnectionManager::RemoveInputPort(int refnum, jack_port_id_t port_index)
{
JackLog("JackConnectionManager::RemoveInputPort ref = %ld port_index = %ld \n", refnum, port_index);
jack_log("JackConnectionManager::RemoveInputPort ref = %ld port_index = %ld ", refnum, port_index);
if (fInputPort[refnum].RemoveItem(port_index)) {
return 0;
......@@ -200,7 +200,7 @@ int JackConnectionManager::RemoveInputPort(int refnum, jack_port_id_t port_index
*/
int JackConnectionManager::RemoveOutputPort(int refnum, jack_port_id_t port_index)
{
JackLog("JackConnectionManager::RemoveOutputPort ref = %ld port_index = %ld \n", refnum, port_index);
jack_log("JackConnectionManager::RemoveOutputPort ref = %ld port_index = %ld ", refnum, port_index);
if (fOutputPort[refnum].RemoveItem(port_index)) {
return 0;
......@@ -285,7 +285,7 @@ int JackConnectionManager::ResumeRefNum(JackClientControl* control, JackSynchro*
timing[i].fSignaledAt = current_date;
if (!fInputCounter[i].Signal(table[i], control)) {
JackLog("JackConnectionManager::ResumeRefNum error: ref = %ld output = %ld \n", control->fRefNum, i);
jack_log("JackConnectionManager::ResumeRefNum error: ref = %ld output = %ld ", control->fRefNum, i);
res = -1;
}
}
......@@ -305,7 +305,7 @@ void JackConnectionManager::IncDirectConnection(jack_port_id_t port_src, jack_po
assert(ref1 >= 0 && ref2 >= 0);
DirectConnect(ref1, ref2);
JackLog("JackConnectionManager::IncConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::IncConnectionRef: ref1 = %ld ref2 = %ld", ref1, ref2);
}
/*!
......@@ -319,7 +319,7 @@ void JackConnectionManager::DecDirectConnection(jack_port_id_t port_src, jack_po
assert(ref1 >= 0 && ref2 >= 0);
DirectDisconnect(ref1, ref2);
JackLog("JackConnectionManager::DecConnectionRef: ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::DecConnectionRef: ref1 = %ld ref2 = %ld", ref1, ref2);
}
/*!
......@@ -330,7 +330,7 @@ void JackConnectionManager::DirectConnect(int ref1, int ref2)
assert(ref1 >= 0 && ref2 >= 0);
if (fConnectionRef.IncItem(ref1, ref2) == 1) { // First connection between client ref1 and client ref2
JackLog("JackConnectionManager::DirectConnect first: ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::DirectConnect first: ref1 = %ld ref2 = %ld", ref1, ref2);
fInputCounter[ref2].IncValue();
}
}
......@@ -343,7 +343,7 @@ void JackConnectionManager::DirectDisconnect(int ref1, int ref2)
assert(ref1 >= 0 && ref2 >= 0);
if (fConnectionRef.DecItem(ref1, ref2) == 0) { // Last connection between client ref1 and client ref2
JackLog("JackConnectionManager::DirectDisconnect last: ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::DirectDisconnect last: ref1 = %ld ref2 = %ld", ref1, ref2);
fInputCounter[ref2].DecValue();
}
}
......@@ -402,7 +402,7 @@ bool JackConnectionManager::IncFeedbackConnection(jack_port_id_t port_src, jack_
int ref2 = GetInputRefNum(port_dst);
// Add an activation connection in the other direction
JackLog("JackConnectionManager::IncFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::IncFeedbackConnection ref1 = %ld ref2 = %ld", ref1, ref2);
assert(ref1 >= 0 && ref2 >= 0);
if (ref1 != ref2)
......@@ -417,7 +417,7 @@ bool JackConnectionManager::DecFeedbackConnection(jack_port_id_t port_src, jack_
int ref2 = GetInputRefNum(port_dst);
// Remove an activation connection in the other direction
JackLog("JackConnectionManager::DecFeedbackConnection ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackConnectionManager::DecFeedbackConnection ref1 = %ld ref2 = %ld", ref1, ref2);
assert(ref1 >= 0 && ref2 >= 0);
if (ref1 != ref2)
......
......@@ -255,7 +255,7 @@ class JackLoopFeedback
fTable[i][0] = ref1;
fTable[i][1] = ref2;
fTable[i][2] = 1;
JackLog("JackLoopFeedback::AddConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackLoopFeedback::AddConnectionAux ref1 = %ld ref2 = %ld", ref1, ref2);
return true;
}
}
......@@ -273,7 +273,7 @@ class JackLoopFeedback
fTable[i][0] = EMPTY;
fTable[i][1] = EMPTY;
fTable[i][2] = 0;
JackLog("JackLoopFeedback::RemoveConnectionAux ref1 = %ld ref2 = %ld\n", ref1, ref2);
jack_log("JackLoopFeedback::RemoveConnectionAux ref1 = %ld ref2 = %ld", ref1, ref2);
return true;
}
}
......@@ -328,7 +328,7 @@ class JackLoopFeedback
int index = GetConnectionIndex(ref1, ref2);
if (index >= 0) {
JackLog("JackLoopFeedback::DecConnection ref1 = %ld ref2 = %ld index = %ld\n", ref1, ref2, index);
jack_log("JackLoopFeedback::DecConnection ref1 = %ld ref2 = %ld index = %ld", ref1, ref2, index);
return (DecConnection(index) == 0) ? RemoveConnectionAux(ref1, ref2) : true;
} else {
return false;
......
......@@ -97,7 +97,7 @@ int JackDebugClient::Open(const char* server_name, const char* name, jack_option
*fStream << "Open client with name '" << name << "'." << endl;
}
} else {
JackLog("JackDebugClient::Open : cannot open log file\n");
jack_log("JackDebugClient::Open : cannot open log file");
}
strcpy(fClientName, name);
return res;
......
......@@ -62,7 +62,7 @@ JackDriver::JackDriver()
JackDriver::~JackDriver()
{
JackLog("~JackDriver\n");
jack_log("~JackDriver");
delete fClientControl;
}
......@@ -94,8 +94,8 @@ int JackDriver::Open(jack_nframes_t nframes,
jack_nframes_t capture_latency,
jack_nframes_t playback_latency)
{
JackLog("JackDriver::Open capture_driver_name = %s\n", capture_driver_name);
JackLog("JackDriver::Open playback_driver_name = %s\n", playback_driver_name);
jack_log("JackDriver::Open capture_driver_name = %s", capture_driver_name);
jack_log("JackDriver::Open playback_driver_name = %s", playback_driver_name);
int refnum = -1;
if (fEngine->ClientInternalOpen(fClientControl->fName, &refnum, &fEngineControl, &fGraphManager, this, false) != 0) {
......@@ -128,7 +128,7 @@ int JackDriver::Open(jack_nframes_t nframes,
int JackDriver::Close()
{
JackLog("JackDriver::Close\n");
jack_log("JackDriver::Close");
fGraphManager->DirectDisconnect(fClientControl->fRefNum, fClientControl->fRefNum); // Disconnect driver from itself for sync
fClientControl->fActive = false;
return fEngine->ClientInternalClose(fClientControl->fRefNum, false);
......@@ -142,10 +142,10 @@ int JackDriver::Close()
void JackDriver::SetupDriverSync(int ref, bool freewheel)
{
if (!freewheel && !fEngineControl->fSyncMode) {
JackLog("JackDriver::SetupDriverSync driver sem in flush mode\n");