loopback: Add hooks to track port latency offsets

The previous patch assumed constant port latency offsets. The offsets can
however be changed by the user, therefore these changes need to be tracked
as well. This patch adds the necessary hooks.

Also the print_msg argument was removed from update_minimum_latency() and
update_latency_boundaries() because the message should always be logged.
This commit is contained in:
Georg Chini 2017-04-10 21:47:23 +02:00
parent 6f2e22e7ad
commit 5bc363d4b8
4 changed files with 45 additions and 13 deletions

View file

@ -2586,6 +2586,8 @@ void pa_source_set_port_latency_offset(pa_source *s, int64_t offset) {
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_PORT_LATENCY_OFFSET, NULL, offset, NULL) == 0);
else
s->thread_info.port_latency_offset = offset;
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PORT_LATENCY_OFFSET_CHANGED], s);
}
/* Called from main thread */