Browse Source

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
tags/1.9.8
sletz 14 years ago
parent
commit
885a6b7cf2
4 changed files with 10 additions and 4 deletions
  1. +1
    -1
      common/JackNetDriver.cpp
  2. +1
    -0
      common/JackNetManager.cpp
  3. +1
    -0
      common/JackNetTool.h
  4. +7
    -3
      tests/iodelay.cpp

+ 1
- 1
common/JackNetDriver.cpp View File

@@ -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 {


+ 1
- 0
common/JackNetManager.cpp View File

@@ -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)));


+ 1
- 0
common/JackNetTool.h View File

@@ -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++;
}


+ 7
- 3
tests/iodelay.cpp View File

@@ -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");
}
}


Loading…
Cancel
Save