pw_time documentation is less than helpful
I may be a moron but the documentation for struct pw_time
does not seem very sensible or helpful.
-
now
is according to the the documentation "the monotonic time in nanoseconds". But it looks like it actually is the monotonic clock timestamp at the time that rest of the time structure was last sampled. At least it seems consistently slightly behind the monotonic clock. -
rate
is just "the rate" which is rather nondescript. Besides rates are typically measured in Hertz, but this seems to be the period time expressed in seconds. The documentation does not mention the unit either. -
ticks
seems to be some kind of accumulated time of the stream? The documentation does not clarify how it is or is not affected by pauses, underruns/overruns though. -
delay
seems intended to be the difference from the record/playback time of the other end toticks
. However for me it is a positive constant for raw audio playback streams, which makes no physical sense (and indeed contradicts the documentation). -
queued
refers to an unspecified queue, and so far it is always zero for me.
I was hoping to get some equivalent to snd_pcm_delay
or pa_stream_get_time
and I'm at a complete loss here.