@@ -417,7 +417,7 @@ jack_nframes_t JackDebugClient::GetCurrentTransportFrame() | |||||
return fClient->GetCurrentTransportFrame(); | return fClient->GetCurrentTransportFrame(); | ||||
} | } | ||||
int JackDebugClient::TransportReposition(jack_position_t* pos) | |||||
int JackDebugClient::TransportReposition(const jack_position_t* pos) | |||||
{ | { | ||||
CheckClient("TransportReposition"); | CheckClient("TransportReposition"); | ||||
return fClient->TransportReposition(pos); | return fClient->TransportReposition(pos); | ||||
@@ -106,7 +106,7 @@ class JackDebugClient : public JackClient | |||||
void TransportLocate(jack_nframes_t frame); | void TransportLocate(jack_nframes_t frame); | ||||
jack_transport_state_t TransportQuery(jack_position_t* pos); | jack_transport_state_t TransportQuery(jack_position_t* pos); | ||||
jack_nframes_t GetCurrentTransportFrame(); | jack_nframes_t GetCurrentTransportFrame(); | ||||
int TransportReposition(jack_position_t* pos); | |||||
int TransportReposition(const jack_position_t* pos); | |||||
void TransportStart(); | void TransportStart(); | ||||
void TransportStop(); | void TransportStop(); | ||||
@@ -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 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 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 ClientClose(int refnum, int* result); | ||||
void ClientActivate(int refnum, int is_real_time, int* result); | void ClientActivate(int refnum, int is_real_time, int* result); | ||||
@@ -286,7 +286,7 @@ namespace Jack | |||||
//port latency | //port latency | ||||
port = fGraphManager->GetPort(port_index); | port = fGraphManager->GetPort(port_index); | ||||
port->SetAlias(alias); | 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); | port->SetLatencyRange(JackPlaybackLatency, &range); | ||||
fPlaybackPortList[audio_port_index] = port_index; | 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()); | 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 latency | ||||
port = fGraphManager->GetPort(port_index); | 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); | port->SetLatencyRange(JackPlaybackLatency, &range); | ||||
fMidiPlaybackPortList[midi_port_index] = port_index; | 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()); | jack_log("JackNetDriver::AllocPorts() fMidiPlaybackPortList[%d] midi_port_index = %ld fPortLatency = %ld", midi_port_index, port_index, port->GetLatency()); | ||||
@@ -632,7 +632,7 @@ namespace Jack | |||||
bool JackNetSlaveInterface::InitConnection(int time_out_sec) | bool JackNetSlaveInterface::InitConnection(int time_out_sec) | ||||
{ | { | ||||
jack_log("JackNetSlaveInterface::InitConnection()"); | 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 | // set the parameters to send | ||||
strcpy(fParams.fPacketType, "params"); | strcpy(fParams.fPacketType, "params"); | ||||
@@ -324,9 +324,6 @@ namespace Jack | |||||
virtual int RenderFromNetwork(int cycle, int sub_cycle, uint32_t port_num) = 0; | 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 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 int ActivePortsToNetwork(char* net_buffer); | ||||
virtual void ActivePortsFromNetwork(char* net_buffer, uint32_t port_num); | virtual void ActivePortsFromNetwork(char* net_buffer, uint32_t port_num); | ||||
@@ -340,6 +337,10 @@ namespace Jack | |||||
int fPacketSize; | int fPacketSize; | ||||
void UpdateParams(int active_ports); | 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: | public: | ||||
@@ -357,9 +358,6 @@ namespace Jack | |||||
int RenderFromNetwork(int cycle, int sub_cycle, uint32_t port_num); | int RenderFromNetwork(int cycle, int sub_cycle, uint32_t port_num); | ||||
int RenderToNetwork(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 | #if HAVE_CELT | ||||
@@ -94,8 +94,9 @@ bool JackPosixSemaphore::Wait() | |||||
while ((res = sem_wait(fSemaphore) < 0)) { | while ((res = sem_wait(fSemaphore) < 0)) { | ||||
jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno)); | jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno)); | ||||
if (errno != EINTR) | |||||
if (errno != EINTR) { | |||||
break; | break; | ||||
} | |||||
} | } | ||||
return (res == 0); | return (res == 0); | ||||
} | } | ||||
@@ -122,8 +123,9 @@ bool JackPosixSemaphore::TimedWait(long usec) | |||||
jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno)); | 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 now : %ld %ld ", now.tv_sec, now.tv_usec); | ||||
jack_log("JackPosixSemaphore::TimedWait next : %ld %ld ", time.tv_sec, time.tv_nsec/1000); | jack_log("JackPosixSemaphore::TimedWait next : %ld %ld ", time.tv_sec, time.tv_nsec/1000); | ||||
if (errno != EINTR) | |||||
if (errno != EINTR) { | |||||
break; | break; | ||||
} | |||||
} | } | ||||
return (res == 0); | return (res == 0); | ||||
} | } | ||||