Add latencyOffsetNsec node property, and use it for bluez
Implement similar feature as Pulseaudio's latency offset, for Bluetooth devices. The A/V delay becomes adjustable e.g. in pavucontrol, and media-session saves and restores it per-device/profile.
This adds a new property "latencyOffsetNsec" to props.h
, and implements it in a2dp-sink nodes and bluez device route props. It simply adjusts the delay reported by the clock, so positive values work but that's enough for fixing A/V sync.
Also add a better fallback values for A2DP transport delay, to be used when the device doesn't have working delay reporting. This seems quite common (at least in the cheaper hw), only 1 of 4 BT headsets I have reports delay.
Because the Bluetooth delays can be fairly big (the fallback value may be off by 100ms, as devices seem to vary in 100-300ms range), this feature is probably more important here than for other hardware devices where delays probably are smaller.
One question is whether this should be implemented in a different way, so that it would not only apply to BlueZ but to all devices.
Fixes #547 (closed)