mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-24 18:51:00 +00:00
pulseaudio: Only use PA_STREAM_ADJUST_LATENCY if buffer isn't super small.
Fixes #6121.
This commit is contained in:
parent
06492c5981
commit
d8b1ef42ae
|
@ -630,7 +630,13 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname)
|
||||||
paattr.prebuf = -1;
|
paattr.prebuf = -1;
|
||||||
paattr.maxlength = -1;
|
paattr.maxlength = -1;
|
||||||
paattr.minreq = -1;
|
paattr.minreq = -1;
|
||||||
|
|
||||||
|
/* don't let this change the global device's latency if the number is
|
||||||
|
extremely small, as it will affect other applications. Without this
|
||||||
|
flag, it only affects this specific stream. */
|
||||||
|
if (this->spec.samples >= 512) {
|
||||||
flags |= PA_STREAM_ADJUST_LATENCY;
|
flags |= PA_STREAM_ADJUST_LATENCY;
|
||||||
|
}
|
||||||
|
|
||||||
if (ConnectToPulseServer(&h->mainloop, &h->context) < 0) {
|
if (ConnectToPulseServer(&h->mainloop, &h->context) < 0) {
|
||||||
return SDL_SetError("Could not connect to PulseAudio server");
|
return SDL_SetError("Could not connect to PulseAudio server");
|
||||||
|
|
Loading…
Reference in a new issue