[client] audio: add latency tuning parameter

This adds a new `audio:bufferLatency` option which allows the user to
adjust the amount of buffering LG does over the absolute bare minimum. By
default, this is set large enough to absorb typical timing jitter from
Spice. Users may reduce this if they care more about latency than audio
quality.
This commit is contained in:
Chris Spencer
2022-02-22 09:21:36 +00:00
committed by Geoffrey McRae
parent 9908b737b0
commit 7c2d493bb5
3 changed files with 28 additions and 9 deletions

View File

@@ -473,6 +473,13 @@ static struct Option options[] =
.type = OPTION_TYPE_INT,
.value.x_int = 2048
},
{
.module = "audio",
.name = "bufferLatency",
.description = "Additional buffer latency in milliseconds",
.type = OPTION_TYPE_INT,
.value.x_int = 8
},
{0}
};
@@ -646,6 +653,7 @@ bool config_load(int argc, char * argv[])
}
g_params.audioPeriodSize = option_get_int("audio", "periodSize");
g_params.audioBufferLatency = option_get_int("audio", "bufferLatency");
return true;
}