From ac11bd263e51fa158adeb3262e2da4c48445c8a3 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:31:26 -0800 Subject: [PATCH] fix audio bugs --- extras/gaming.nix | 21 ++++++++++----------- systems/BASED.nix | 1 + 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extras/gaming.nix b/extras/gaming.nix index 373a642..3532b95 100644 --- a/extras/gaming.nix +++ b/extras/gaming.nix @@ -32,17 +32,16 @@ } ]; - security.rtkit.enable = true; environment.etc = let json = pkgs.formats.json {}; in { "pipewire/pipewire.conf.d/92-low-latency.conf".source = json.generate "92-low-latency.conf" { context.properties = { # default.allowed-rates = [] - default.clock.rate = 48000; - default.clock.quantum = 32; - default.clock.min-quantum = 32; - default.clock.max-quantum = 32; + default.clock.rate = 44100; + default.clock.quantum = 24; + default.clock.min-quantum = 24; + default.clock.max-quantum = 24; }; }; "pipewire/pipewire-pulse.d/92-low-latency.conf".source = json.generate "92-low-latency.conf" { @@ -50,16 +49,16 @@ { name = "libpipewire-module-protocol-pulse"; args = { - pulse.min.req = "32/48000"; - pulse.default.req = "32/48000"; - pulse.max.req = "32/48000"; - pulse.min.quantum = "32/48000"; - pulse.max.quantum = "32/48000"; + pulse.min.req = "24/44100"; + pulse.default.req = "24/44100"; + pulse.max.req = "24/44100"; + pulse.min.quantum = "24/44100"; + pulse.max.quantum = "24/44100"; }; } ]; stream.properties = { - node.latency = "32/48000"; + node.latency = "24/44100"; resample.quality = 1; }; }; diff --git a/systems/BASED.nix b/systems/BASED.nix index 9029775..d9b8bd0 100644 --- a/systems/BASED.nix +++ b/systems/BASED.nix @@ -84,6 +84,7 @@ gwenview ]; + security.rtkit.enable = true; services.pipewire = { enable = lib.mkDefault true; alsa.enable = true;