pgaskin / pulseaudio-win32

An up-to-date PulseAudio build for Windows with an installer, service, socket support, bug fixes, and new features.
https://pgaskin.net/pulseaudio-win32
MIT License
73 stars 6 forks source link

Unix socket support #5

Closed pgaskin closed 3 years ago

pgaskin commented 3 years ago

Split from #2

pgaskin commented 3 years ago

The existing Unix socket code in PA should work fine in theory.

https://github.com/freedesktop/pulseaudio/blob/master/src/modules/module-protocol-stub.c https://github.com/freedesktop/pulseaudio/blob/master/src/pulsecore/socket.h https://github.com/freedesktop/pulseaudio/blob/master/src/pulsecore/socket-util.c

But, when module-native-protocol-unix is loaded with pa-win32 v2, it gives:

(9537.920|   0.002) E: [(null)] ../../src/pulseaudio/src/modules/module-protocol-stub.c: Failed to remove stale UNIX socket 'C:\Windows\ServiceProfiles\LocalService\AppData\Local\PulseAudio\.config\pulse\WIN-TIF3CSSABRF-runtime\native': No such file or directory
(9537.920|   0.000) E: [(null)] ../../src/pulseaudio/src/pulsecore/module.c: Failed to load module "module-native-protocol-unix" (argument: ""): initialization failed.

This is because the path gets trimmed to C:\Windows\ServiceProfiles\LocalService\AppData\Local\PulseAudio\.config\pulse\WIN-TIF3CSSABRF-runtime\nati.

This shouldn't be an issue after I change the runtime directory for the system instance to ProgramData (which it'll have to be anyways, since all users would need to be able to access it).

pgaskin commented 3 years ago

Done in 8fc1b1099f8341931eb6af3b7d175421c3929c87.