diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2015-01-20 15:38:19 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2015-01-20 15:38:19 +0100 |
commit | f48f18fadcce5c32700a66ac88f7581fa31da73f (patch) | |
tree | 59cbd89403e0f5046efecd1ce4ffac7bb35a3b79 | |
parent | 24340049229343f3fc078a19415d095e97d797e6 (diff) |
combine-sink: Rearrange block_usec initializationrhel-6.6-work
block_usec should be determined by the sink max latency, not the other
way around. This change doesn't cause any change in behaviour, but
makes the code more logical. Further updates to block_usec are already
done correctly, so this is the only place that needs modification.
-rw-r--r-- | src/modules/module-combine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c index 326674d8e..345f5a02e 100644 --- a/src/modules/module-combine.c +++ b/src/modules/module-combine.c @@ -1317,13 +1317,13 @@ int pa__init(pa_module*m) { pa_sink_set_rtpoll(u->sink, u->rtpoll); pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq); - u->block_usec = BLOCK_USEC; - nbytes = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec); + nbytes = pa_usec_to_bytes(BLOCK_USEC, &u->sink->sample_spec); pa_sink_set_max_request(u->sink, nbytes); - pa_sink_set_latency_range(u->sink, 0, u->block_usec); + pa_sink_set_latency_range(u->sink, 0, BLOCK_USEC); /* pulse clamps the range, get the real values */ u->default_min_latency = u->sink->thread_info.min_latency; u->default_max_latency = u->sink->thread_info.max_latency; + u->block_usec = u->sink->thread_info.max_latency; if (!u->automatic) { const char*split_state; |