On 15/03/2014 1:46 AM, Richard Dobson wrote:
But portaudio only states the software i/o buffer latency, it knows
nothing directly of internal codec latencies. You would need to subtract
the (two-way?) buffer latency portaudio reports, and then measure or
compute how much of the remainder is down to the dac filtering. I am not
entirely sure how accurate that portaudio estimate is anyway - it's an
area of portaudio that may not be entirely bug-free. It has been
discussed on the portaudio list fairly recently IIRC.
Possible bugs not withstanding, there are indeed limits to what
PortAudio can report with respect to latency.
However the following is not strictly correct: "portaudio only states
the software i/o buffer latency"
In summary, PortAudio reports the sum of:
- any buffering latency introduced by PortAudio (often this is zero)
AND
- any buffering latency that can be inferred to be introduced by the
native API.
AND/OR
- any latency (of any kind, not just buffering) that is reported by the
native API and/or the driver.
Some native APIs (CoreAudio, ASIO) provide mechanisms for the audio
driver to report detailed latency information for components below the
client software interface. In general PortAudio aims to surface that
information to the PortAudio client.
Many of the bugs in PA were fixed (hence discussions), and those that
remain I think relate to imperfect inference when the native APIs that
don't explicitly report latency information, or with obscure edge cases
(multiple-device full duplex I/O on OS X comes to mind).
As has been pointed out elsewhere, if an audio interface has a digital
interface, its driver can't report the latency introduced by arbitrary
ADC/DACs connected to the digital interface. As far as I know, it is
largely undocumented/undefined whether the latency reported by an ASIO
driver includes the hardware ADC/DAC delays for hardware that has analog
IO. CoreAudio reports multiple latency components, and may well go all
the way to reporting converter latency (I don't remember). I'm not sure
about ALSA.
Ross.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp