[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] null-source: Fix max_latency_msec argument is not changed
PulseAudio Marge Bot
gitlab at gitlab.freedesktop.org
Wed Dec 9 03:21:59 UTC 2020
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
a17d00c3 by Jaechul Lee at 2020-12-09T03:17:28+00:00
null-source: Fix max_latency_msec argument is not changed
This module uses 2 seconds for default max latency. If max_latency_msec
is set, max_latency value will be changed.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/431>
- - - - -
1 changed file:
- src/modules/module-null-source.c
Changes:
=====================================
src/modules/module-null-source.c
=====================================
@@ -200,7 +200,6 @@ int pa__init(pa_module*m) {
pa_channel_map map;
pa_modargs *ma = NULL;
pa_source_new_data data;
- pa_usec_t max_latency = MAX_LATENCY_USEC;
uint32_t max_latency_msec;
pa_assert(m);
@@ -252,10 +251,13 @@ int pa__init(pa_module*m) {
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- if (pa_modargs_get_value_u32(ma, "max_latency_msec", &max_latency_msec))
- max_latency = max_latency_msec * PA_USEC_PER_MSEC;
+ max_latency_msec = MAX_LATENCY_USEC / PA_USEC_PER_MSEC;
+ if (pa_modargs_get_value_u32(ma, "max_latency_msec", &max_latency_msec) < 0) {
+ pa_log("Failed to get max_latency_msec.");
+ goto fail;
+ }
- pa_source_set_latency_range(u->source, MIN_LATENCY_USEC, max_latency);
+ pa_source_set_latency_range(u->source, MIN_LATENCY_USEC, max_latency_msec * PA_USEC_PER_MSEC);
u->block_usec = u->source->thread_info.max_latency;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/a17d00c3d2e306e782524eccc9b5a516be3d2be7
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/a17d00c3d2e306e782524eccc9b5a516be3d2be7
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201209/a8ae72e3/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list