set pipewire rate and quantum
hopefully will remove all that annoying crackling i get in some games
This commit is contained in:
parent
fb1fc75908
commit
9faaddc232
1 changed files with 34 additions and 4 deletions
|
@ -1,6 +1,4 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
imports = [inputs.nix-gaming.nixosModules.pipewireLowLatency];
|
|
||||||
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
|
@ -8,6 +6,38 @@
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
|
||||||
lowLatency.enable = true;
|
extraConfig = let
|
||||||
|
rate = 48000;
|
||||||
|
min-quantum = 512;
|
||||||
|
max-quantum = 1024;
|
||||||
|
in {
|
||||||
|
pipewire."92-quantum"."context.properties" = {
|
||||||
|
"default.clock.rate" = rate;
|
||||||
|
"default.clock.quantum" = min-quantum;
|
||||||
|
"default.clock.min-quantum" = min-quantum;
|
||||||
|
"default.clock.max-quantum" = max-quantum;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipewire-pulse."92-quantum" = let
|
||||||
|
qr = "${toString min-quantum}/${toString rate}";
|
||||||
|
in {
|
||||||
|
"context.properties" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-protocol-pulse";
|
||||||
|
args = {};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
"pulse.properties" = {
|
||||||
|
"pulse.default.req" = qr;
|
||||||
|
"pulse.min.req" = qr;
|
||||||
|
"pulse.max.req" = qr;
|
||||||
|
"pulse.min.quantum" = qr;
|
||||||
|
"pulse.max.quantum" = qr;
|
||||||
|
};
|
||||||
|
"stream.properties" = {
|
||||||
|
"node.latency" = qr;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue