summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source-output.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/source-output.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/source-output.c')
-rw-r--r--src/pulsecore/source-output.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 2b3a0c58..3803a6cc 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -84,6 +84,7 @@ static void reset_callbacks(pa_source_output *o) {
o->update_max_rewind = NULL;
o->update_source_requested_latency = NULL;
o->update_source_latency_range = NULL;
+ o->update_source_fixed_latency = NULL;
o->attach = NULL;
o->detach = NULL;
o->suspend = NULL;
@@ -561,13 +562,13 @@ pa_usec_t pa_source_output_set_requested_latency_within_thread(pa_source_output
pa_source_output_assert_io_context(o);
if (!(o->source->flags & PA_SOURCE_DYNAMIC_LATENCY))
- usec = o->source->fixed_latency;
+ usec = o->source->thread_info.fixed_latency;
if (usec != (pa_usec_t) -1)
usec = PA_CLAMP(usec, o->source->thread_info.min_latency, o->source->thread_info.max_latency);
o->thread_info.requested_source_latency = usec;
- pa_source_invalidate_requested_latency(o->source);
+ pa_source_invalidate_requested_latency(o->source, TRUE);
return usec;
}
@@ -587,7 +588,7 @@ pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t
if (o->source) {
if (!(o->source->flags & PA_SOURCE_DYNAMIC_LATENCY))
- usec = o->source->fixed_latency;
+ usec = pa_source_get_fixed_latency(o->source);
if (usec != (pa_usec_t) -1) {
pa_usec_t min_latency, max_latency;