On Wed, May 02, 2012 at 05:51:26PM -1000, Joel Roth wrote: > Hi, > > I've finished a rough cut of coding for > latency *measurement*. > > I need to go over it again, because there > is a problem with units: LADSPA plugins > return latency in milliseconds; JACK > clients report latency in frames, > where one frame is 1/sample rate. > > We'll need some work and creativity > to test all this work, but for now > if anyone has time to look over the code, > I'm sure it will help. It's fairly straightforward code: the only bit I couldn't wrap my (admittedly small) mind around is this cascading assignment: $setup->{sibling_latency}->{$_->wet_name} = $setup->{sibling_latency}->{$_->dry_name} = $setup->{track_latency}->{$_->wet_name} = track_ops_latency($::tn{$_->wet_name}) + $additional_latency The code indeed needs to be fixed for mismatched units, as you say. Note that frame/srate will give you a value in microseconds, not miliseconds, so the code in loop_device_latency needs to be modified. Perhaps it would make more sense to tally latency in samples separately and convert it to miliseconds just once? Cheers, S.M.