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