mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
combine-sink: Rearrange block_usec initialization
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.
This commit is contained in:
parent
a6dbfe55c7
commit
d02511115c
1 changed files with 3 additions and 3 deletions
|
|
@ -1355,13 +1355,13 @@ int pa__init(pa_module*m) {
|
||||||
pa_sink_set_rtpoll(u->sink, u->rtpoll);
|
pa_sink_set_rtpoll(u->sink, u->rtpoll);
|
||||||
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
|
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
|
||||||
|
|
||||||
u->block_usec = BLOCK_USEC;
|
nbytes = pa_usec_to_bytes(BLOCK_USEC, &u->sink->sample_spec);
|
||||||
nbytes = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
|
|
||||||
pa_sink_set_max_request(u->sink, nbytes);
|
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 */
|
/* pulse clamps the range, get the real values */
|
||||||
u->default_min_latency = u->sink->thread_info.min_latency;
|
u->default_min_latency = u->sink->thread_info.min_latency;
|
||||||
u->default_max_latency = u->sink->thread_info.max_latency;
|
u->default_max_latency = u->sink->thread_info.max_latency;
|
||||||
|
u->block_usec = u->sink->thread_info.max_latency;
|
||||||
|
|
||||||
|
|
||||||
if (!u->automatic) {
|
if (!u->automatic) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue