1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3 Date: Fri, 18 Dec 2020 23:17:36 +0000
4 Subject: [PATCH] Hack to work with modern PulseAudio
7 ossp-padsp.c | 8 ++++++++
8 1 file changed, 8 insertions(+)
10 diff --git a/ossp-padsp.c b/ossp-padsp.c
11 index c505b57..b4ac097 100644
16 #include <sys/types.h>
18 +#include <linux/limits.h>
21 #include <pulse/pulseaudio.h>
22 #include <sys/soundcard.h>
23 @@ -1478,9 +1480,15 @@ static void action_post(void)
24 int main(int argc, char **argv)
27 + static char runtime_dir[PATH_MAX];
29 ossp_slave_init("ossp-padsp", argc, argv);
31 + snprintf(runtime_dir, sizeof runtime_dir, "/run/user/%llu",
32 + (long long unsigned) getuid());
33 + if (access(runtime_dir, R_OK | X_OK) == 0)
34 + setenv("XDG_RUNTIME_DIR", runtime_dir, 0);
36 page_size = sysconf(_SC_PAGE_SIZE);
38 mainloop = pa_threaded_mainloop_new();