mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
sink, source: Fix setting the latency offset when the sink/source is unlinked.
This commit is contained in:
parent
bf4091dcf8
commit
0c8fdf30d1
2 changed files with 2 additions and 2 deletions
|
|
@ -3256,7 +3256,7 @@ void pa_sink_set_latency_offset(pa_sink *s, int64_t offset) {
|
||||||
if (PA_SINK_IS_LINKED(s->state))
|
if (PA_SINK_IS_LINKED(s->state))
|
||||||
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
|
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
|
||||||
else
|
else
|
||||||
s->thread_info.fixed_latency = offset;
|
s->thread_info.latency_offset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from main context */
|
/* Called from main context */
|
||||||
|
|
|
||||||
|
|
@ -2540,7 +2540,7 @@ void pa_source_set_latency_offset(pa_source *s, int64_t offset) {
|
||||||
if (PA_SOURCE_IS_LINKED(s->state))
|
if (PA_SOURCE_IS_LINKED(s->state))
|
||||||
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
|
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
|
||||||
else
|
else
|
||||||
s->thread_info.fixed_latency = offset;
|
s->thread_info.latency_offset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from main thread */
|
/* Called from main thread */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue