Commit 885a6b7c authored by sletz's avatar sletz
Browse files

Make the printed output of jack_iodelay more useful to actual users.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4488 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 0cb52000
......@@ -575,7 +575,7 @@ namespace Jack
}
for (int audio_port_index = 0; audio_port_index < fPlaybackChannels; audio_port_index++) {
#ifdef OPTIMIZED_PROTOCOL
// Port is connected on other side..
// Port is connected on other side...
if ((long)fNetAudioPlaybackBuffer->GetBuffer(audio_port_index) == -1) {
fNetAudioPlaybackBuffer->SetBuffer(audio_port_index, GetOutputBuffer(audio_port_index, true));
} else {
......
......@@ -432,6 +432,7 @@ namespace Jack
#ifdef OPTIMIZED_PROTOCOL
if ((long)fNetAudioCaptureBuffer->GetBuffer(audio_port_index) == -1) {
// Port is connected on other side...
fNetAudioCaptureBuffer->SetBuffer(audio_port_index,
static_cast<sample_t*>(jack_port_get_buffer_nulled(fAudioCapturePorts[audio_port_index],
fParams.fPeriodSize)));
......
......@@ -614,6 +614,7 @@ namespace Jack
}
for (uint port_index = 0; port_index < port_num; port_index++) {
// Use -1 when port is actually connected on other side
fPortBuffer[*active_port_address] = (sample_t*)-1;
active_port_address++;
}
......
......@@ -235,14 +235,18 @@ int main (int ac, char *av [])
if (mtdm.resolve () < 0) printf ("Signal below threshold...\n");
else
{
jack_nframes_t systemic_latency;
if (mtdm.err () > 0.3)
{
mtdm.invert ();
mtdm.resolve ();
}
printf ("%10.3lf frames %10.3lf ms", mtdm.del (), mtdm.del () * t);
if (mtdm.err () > 0.2) printf (" ??");
if (mtdm.inv ()) printf (" Inv");
systemic_latency = (jack_nframes_t) floor (mtdm->_del - (capture_latency.max + playback_latency.max));
printf ("%10.3lf frames %10.3lf ms total roundtrip latency\n\textra loopback latency: %u frames\n\tuse %u for the backend arguments -I and -O", mtdm->_del, mtdm->_del * t,
systemic_latency, systemic_latency/2);
if (mtdm->_err > 0.2) printf (" ??");
if (mtdm->_inv) printf (" Inv");
printf ("\n");
}
}
......
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