From 36640042389a1eeebc309a4d70f50bbbbdf7d9f0 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 22 Sep 2017 01:52:38 -0300 Subject: [PATCH 1/2] Use the right buffer sizes in GLX visual attributes --- src/platform/nix/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index a212dfa..1191bac 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -169,6 +169,10 @@ int main(int argc, char **argv) { GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, + GLX_RED_SIZE, 8, + GLX_GREEN_SIZE, 8, + GLX_BLUE_SIZE, 8, + GLX_ALPHA_SIZE, 8, 0 }; From 5e4992b444703a2af7b5c20391b38c8d981b28f1 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 22 Sep 2017 21:23:40 -0300 Subject: [PATCH 2/2] Raise the maximum length of the PulseAudio buffer to fix crackling sound. --- src/platform/nix/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index 1191bac..7e7bb10 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -48,7 +48,7 @@ void sndInit() { }; static const pa_buffer_attr attr = { - .maxlength = SND_DATA_SIZE * 2, + .maxlength = SND_DATA_SIZE * 4, .tlength = 0xFFFFFFFF, .prebuf = 0xFFFFFFFF, .minreq = SND_DATA_SIZE,