audio-server: fix zeroconf tcp stream

This commit is contained in:
Sandro - 2023-12-22 14:57:58 +01:00
parent db061ae1cb
commit 1cd74cd8d8
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 43 additions and 38 deletions

View File

@ -14,7 +14,6 @@ in
boot.kernelPackages = lib.mkOverride 900 pkgs.linuxPackages-rt_latest;
environment = {
etc."pipewire/pipewire.conf.d/audio-server.conf".text =
# _____ _______ ____ _____
# / ____|__ __/ __ \| __ \
# | (___ | | | | | | |__) |
@ -25,16 +24,21 @@ in
# errors such as:
# mod.zeroconf-publish: error id:47 seq:349 res:-2 (No such file or directory): enum params id:16 (Spa:Enum:ParamId:ProcessLatency) failed
# are harmless and can be ignored. You most likely want to restart your local avahi-daemon: sudo systemctl restart avahi-daemon
builtins.toJSON {
"context.exec" = let
path = "${pkgs.pulseaudio}/bin/pactl";
in [ {
inherit path;
args = "load-module module-zeroconf-publish";
} {
etc = {
"pipewire/pipewire.conf.d/audio-server.conf".text = builtins.toJSON {
"context.modules" = [ {
# https://wiki.archlinux.org/title/PulseAudio/Examples#PulseAudio_over_network
inherit path;
args = "load-module module-rtp-recv latency_msec=10 sap_address=0.0.0.0";
name = "libpipewire-module-rtp-sap";
args = {
"sap.ip" = "0.0.0.0";
"sess.latency.msec" = 10;
};
} ];
};
"pipewire/pipewire-pulse.conf.d/audio-server.conf".text = builtins.toJSON {
"context.exec" = [ {
path = "${pkgs.pulseaudio}/bin/pactl";
args = "load-module module-zeroconf-publish";
} ];
"pulse.properties" = {
"auth-ip-acl" = [
@ -50,10 +54,11 @@ in
"server.address" = [
"unix:native"
"tcp:4713"
"udp:9875"
];
};
};
};
systemPackages = with pkgs; [
mpd
mpv