summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink-input.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-15 00:48:14 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-15 00:48:14 +0200
commit350a2bc846559bb274ba70f928bb42a9472050bf (patch)
treeaa3e4690bed11fdc01bfde994d45025ce7e05d06 /src/pulsecore/sink-input.c
parent4eb59fb90e474a81f2d626bc4fc7db083fafed7a (diff)
core: make fixed latency dynamically changeable
This of course makes the name 'fixed' a bit of a misnomer. However the definitions are now like this: fixed latency: the latency may change during runtime, but is solely controlled by the backend, the client has no influence. dynamic latency: the latency may change during runtime, influenced by the requests of the clients. i.e. fixed vs. dynamic is from the perspective of the client.
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r--src/pulsecore/sink-input.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 1b3ea92d..f6d9ac73 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -114,6 +114,7 @@ static void reset_callbacks(pa_sink_input *i) {
i->update_max_request = NULL;
i->update_sink_requested_latency = NULL;
i->update_sink_latency_range = NULL;
+ i->update_sink_fixed_latency = NULL;
i->attach = NULL;
i->detach = NULL;
i->suspend = NULL;
@@ -851,13 +852,13 @@ pa_usec_t pa_sink_input_set_requested_latency_within_thread(pa_sink_input *i, pa
pa_sink_input_assert_io_context(i);
if (!(i->sink->flags & PA_SINK_DYNAMIC_LATENCY))
- usec = i->sink->fixed_latency;
+ usec = i->sink->thread_info.fixed_latency;
if (usec != (pa_usec_t) -1)
usec = PA_CLAMP(usec, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
i->thread_info.requested_sink_latency = usec;
- pa_sink_invalidate_requested_latency(i->sink);
+ pa_sink_invalidate_requested_latency(i->sink, TRUE);
return usec;
}
@@ -877,7 +878,7 @@ pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec)
if (i->sink) {
if (!(i->sink->flags & PA_SINK_DYNAMIC_LATENCY))
- usec = i->sink->fixed_latency;
+ usec = pa_sink_get_fixed_latency(i->sink);
if (usec != (pa_usec_t) -1) {
pa_usec_t min_latency, max_latency;