mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
null-sink: setting maximum latency to 50 ms when rewinds are disabled
This commit is contained in:
parent
e74a154f29
commit
eadd987a66
1 changed files with 6 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ PA_MODULE_USAGE(
|
||||||
|
|
||||||
#define DEFAULT_SINK_NAME "null"
|
#define DEFAULT_SINK_NAME "null"
|
||||||
#define BLOCK_USEC (PA_USEC_PER_SEC * 2)
|
#define BLOCK_USEC (PA_USEC_PER_SEC * 2)
|
||||||
|
#define NOREWINDS_MAX_LATENCY_USEC (50*PA_USEC_PER_MSEC)
|
||||||
|
|
||||||
struct userdata {
|
struct userdata {
|
||||||
pa_core *core;
|
pa_core *core;
|
||||||
|
|
@ -398,7 +399,11 @@ int pa__init(pa_module*m) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(u->norewinds){
|
||||||
|
pa_sink_set_latency_range(u->sink, 0, NOREWINDS_MAX_LATENCY_USEC);
|
||||||
|
} else {
|
||||||
pa_sink_set_latency_range(u->sink, 0, BLOCK_USEC);
|
pa_sink_set_latency_range(u->sink, 0, BLOCK_USEC);
|
||||||
|
}
|
||||||
|
|
||||||
pa_sink_put(u->sink);
|
pa_sink_put(u->sink);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue