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.
This commit is contained in:
Lennart Poettering 2009-08-15 00:48:14 +02:00
parent 4eb59fb90e
commit 350a2bc846
10 changed files with 212 additions and 52 deletions

View file

@ -296,7 +296,7 @@ char *pa_sink_list_to_string(pa_core *c) {
pa_strbuf_printf(
s,
"\tfixed latency: %0.2f ms\n",
(double) pa_sink_get_requested_latency(sink) / PA_USEC_PER_MSEC);
(double) pa_sink_get_fixed_latency(sink) / PA_USEC_PER_MSEC);
if (sink->card)
pa_strbuf_printf(s, "\tcard: %u <%s>\n", sink->card->index, sink->card->name);
@ -415,7 +415,7 @@ char *pa_source_list_to_string(pa_core *c) {
pa_strbuf_printf(
s,
"\tfixed latency: %0.2f ms\n",
(double) pa_source_get_requested_latency(source) / PA_USEC_PER_MSEC);
(double) pa_source_get_fixed_latency(source) / PA_USEC_PER_MSEC);
if (source->monitor_of)
pa_strbuf_printf(s, "\tmonitor_of: %u\n", source->monitor_of->index);