Latency (in/out): 0.0xx / 0.0yy sec

Hello,

I have two questions regarding hardware latency.

1. how to let Post Window display this?

Under macOS, the Post Window does not show the latency (in/out) of the hardware when booting.
Under Windows, the Post Window shows the latency (in/out) of the hardware when booting as follows:

Latency (in/out): 0.013 / 0.091 sec

Is there any way to see under macOS?

2. how to use the input latency and output latency of hardware in sclang?
Could I use the hardware latency mentioned above by using codes?

I’ve searched the source code. There is no reference to latency at all in SC_CoreAudio.cpp. So I have to conclude that CoreAudio handles driver latency differently from JACK or PortAudio. But I don’t know anything about CoreAudio internals.

If CoreAudio handles driver latency internally (so that scsynth doesn’t have to do anything about it), then there’s no need for anything to be printed… maybe?

You don’t have to.

If you do server.sendBundle(latency, ... msgs...), the language calculates a timestamp based on logical time now + latency. Then, the server is supposed to schedule the message so that the audio hits the speakers at the timestamp – that is, the synth will start calculating at the time timestamp - driver_latency. This all happens for you – SC user code should not have to compensate for driver latency.

(Windows MME drivers add a couple hundred milliseconds latency but don’t report this to client apps – if the driver lies to scsynth, of course it doesn’t work, so we recommend ASIO drivers in Windows.)

hjh

Thank you for the explanation!