Commit 2cece7e2 authored by Xavier Mendez's avatar Xavier Mendez
Browse files

Correct netmanager latency reporting

parent cd59d678
......@@ -400,28 +400,28 @@ namespace Jack
for (int i = 0; i < obj->fParams.fSendAudioChannels; i++) {
//port latency
range.min = range.max = float(obj->fParams.fNetworkLatency * port_latency) / 2.f;
jack_port_set_latency_range(obj->fAudioCapturePorts[i], JackCaptureLatency, &range);
jack_port_set_latency_range(obj->fAudioCapturePorts[i], JackPlaybackLatency, &range);
}
//audio
for (int i = 0; i < obj->fParams.fReturnAudioChannels; i++) {
//port latency
range.min = range.max = float(obj->fParams.fNetworkLatency * port_latency) / 2.f + ((obj->fParams.fSlaveSyncMode) ? 0 : port_latency);
jack_port_set_latency_range(obj->fAudioPlaybackPorts[i], JackPlaybackLatency, &range);
jack_port_set_latency_range(obj->fAudioPlaybackPorts[i], JackCaptureLatency, &range);
}
//midi
for (int i = 0; i < obj->fParams.fSendMidiChannels; i++) {
//port latency
range.min = range.max = float(obj->fParams.fNetworkLatency * port_latency) / 2.f;
jack_port_set_latency_range(obj->fMidiCapturePorts[i], JackCaptureLatency, &range);
jack_port_set_latency_range(obj->fMidiCapturePorts[i], JackPlaybackLatency, &range);
}
//midi
for (int i = 0; i < obj->fParams.fReturnMidiChannels; i++) {
//port latency
range.min = range.max = obj->fParams.fNetworkLatency * port_latency + ((obj->fParams.fSlaveSyncMode) ? 0 : port_latency);
jack_port_set_latency_range(obj->fMidiPlaybackPorts[i], JackPlaybackLatency, &range);
jack_port_set_latency_range(obj->fMidiPlaybackPorts[i], JackCaptureLatency, &range);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment