Browse Source

Code cleanup after compilation with clang.

tags/v1.9.10
Stephane Letz 12 years ago
parent
commit
7f09225b7a
7 changed files with 13 additions and 15 deletions
  1. +1
    -1
      common/JackDebugClient.cpp
  2. +1
    -1
      common/JackDebugClient.h
  3. +0
    -2
      common/JackGenericClientChannel.h
  4. +2
    -2
      common/JackNetDriver.cpp
  5. +1
    -1
      common/JackNetInterface.cpp
  6. +4
    -6
      common/JackNetTool.h
  7. +4
    -2
      posix/JackPosixSemaphore.cpp

+ 1
- 1
common/JackDebugClient.cpp View File

@@ -417,7 +417,7 @@ jack_nframes_t JackDebugClient::GetCurrentTransportFrame()
return fClient->GetCurrentTransportFrame();
}

int JackDebugClient::TransportReposition(jack_position_t* pos)
int JackDebugClient::TransportReposition(const jack_position_t* pos)
{
CheckClient("TransportReposition");
return fClient->TransportReposition(pos);


+ 1
- 1
common/JackDebugClient.h View File

@@ -106,7 +106,7 @@ class JackDebugClient : public JackClient
void TransportLocate(jack_nframes_t frame);
jack_transport_state_t TransportQuery(jack_position_t* pos);
jack_nframes_t GetCurrentTransportFrame();
int TransportReposition(jack_position_t* pos);
int TransportReposition(const jack_position_t* pos);
void TransportStart();
void TransportStop();



+ 0
- 2
common/JackGenericClientChannel.h View File

@@ -57,8 +57,6 @@ class JackGenericClientChannel : public detail::JackClientChannelInterface

void ClientCheck(const char* name, int uuid, char* name_res, int protocol, int options, int* status, int* result, int open);
void ClientOpen(const char* name, int pid, int uuid, int* shared_engine, int* shared_client, int* shared_graph, int* result);
void ClientOpen(const char* name, int* ref, int uuid, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
{}
void ClientClose(int refnum, int* result);

void ClientActivate(int refnum, int is_real_time, int* result);


+ 2
- 2
common/JackNetDriver.cpp View File

@@ -286,7 +286,7 @@ namespace Jack
//port latency
port = fGraphManager->GetPort(port_index);
port->SetAlias(alias);
range.min = range.max = (fParams.fNetworkLatency * fEngineControl->fBufferSize + (fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize);
range.min = range.max = (fParams.fNetworkLatency * fEngineControl->fBufferSize + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize));
port->SetLatencyRange(JackPlaybackLatency, &range);
fPlaybackPortList[audio_port_index] = port_index;
jack_log("JackNetDriver::AllocPorts() fPlaybackPortList[%d] audio_port_index = %ld fPortLatency = %ld", audio_port_index, port_index, port->GetLatency());
@@ -321,7 +321,7 @@ namespace Jack

//port latency
port = fGraphManager->GetPort(port_index);
range.min = range.max = (fParams.fNetworkLatency * fEngineControl->fBufferSize + (fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize);
range.min = range.max = (fParams.fNetworkLatency * fEngineControl->fBufferSize + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize));
port->SetLatencyRange(JackPlaybackLatency, &range);
fMidiPlaybackPortList[midi_port_index] = port_index;
jack_log("JackNetDriver::AllocPorts() fMidiPlaybackPortList[%d] midi_port_index = %ld fPortLatency = %ld", midi_port_index, port_index, port->GetLatency());


+ 1
- 1
common/JackNetInterface.cpp View File

@@ -632,7 +632,7 @@ namespace Jack
bool JackNetSlaveInterface::InitConnection(int time_out_sec)
{
jack_log("JackNetSlaveInterface::InitConnection()");
uint try_count = (time_out_sec > 0) ? ((1000000 * time_out_sec) / SLAVE_INIT_TIMEOUT) : LONG_MAX;
uint try_count = (time_out_sec > 0) ? ((1000000 * time_out_sec) / SLAVE_INIT_TIMEOUT) : UINT_MAX;

// set the parameters to send
strcpy(fParams.fPacketType, "params");


+ 4
- 6
common/JackNetTool.h View File

@@ -324,9 +324,6 @@ namespace Jack
virtual int RenderFromNetwork(int cycle, int sub_cycle, uint32_t port_num) = 0;
virtual int RenderToNetwork(int sub_cycle, uint32_t port_num) = 0;

virtual void RenderFromNetwork(char* net_buffer, int active_port, int sub_cycle, size_t copy_size) {}
virtual void RenderToNetwork(char* net_buffer, int active_port, int sub_cycle, size_t copy_size) {}

virtual int ActivePortsToNetwork(char* net_buffer);
virtual void ActivePortsFromNetwork(char* net_buffer, uint32_t port_num);

@@ -340,6 +337,10 @@ namespace Jack
int fPacketSize;

void UpdateParams(int active_ports);
void RenderFromNetwork(char* net_buffer, int active_port, int sub_cycle);
void RenderToNetwork(char* net_buffer, int active_port, int sub_cycle);

public:

@@ -357,9 +358,6 @@ namespace Jack
int RenderFromNetwork(int cycle, int sub_cycle, uint32_t port_num);
int RenderToNetwork(int sub_cycle, uint32_t port_num);

void RenderFromNetwork(char* net_buffer, int active_port, int sub_cycle);
void RenderToNetwork(char* net_buffer, int active_port, int sub_cycle);

};

#if HAVE_CELT


+ 4
- 2
posix/JackPosixSemaphore.cpp View File

@@ -94,8 +94,9 @@ bool JackPosixSemaphore::Wait()

while ((res = sem_wait(fSemaphore) < 0)) {
jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
if (errno != EINTR)
if (errno != EINTR) {
break;
}
}
return (res == 0);
}
@@ -122,8 +123,9 @@ bool JackPosixSemaphore::TimedWait(long usec)
jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
jack_log("JackPosixSemaphore::TimedWait now : %ld %ld ", now.tv_sec, now.tv_usec);
jack_log("JackPosixSemaphore::TimedWait next : %ld %ld ", time.tv_sec, time.tv_nsec/1000);
if (errno != EINTR)
if (errno != EINTR) {
break;
}
}
return (res == 0);
}


Loading…
Cancel
Save