please provide examples for all network protocols
Please provide working examples for all network protocol modules (and all other modules).
I'm trying to set up my laptop so that it can play audio to the soundcard on a desktop, over my LAN. These are some observations I made:
There is an example for doing this here which uses ZeroConf. I'm not sure if this works. The PulseAudio documentation should contain an example like this, both with and without ZeroConf. An example without ZeroConf is required so that people can know what is happening "behind the scenes" when you use ZeroConf.
There is an answer here which suggests that you need a GUI called 'paprefs' where you can check or uncheck some authentication-related options before the above will work. If this additional configuration is necessary, then the PulseAudio documentation should explain that. It should also explain how to do it without the GUI.
I got sidetracked looking at 'module-simple-protocol-tcp'. There were two questions I couldn't answer with the documentation: what does this protocol suffer from, compared to the "native" protocol? (is it going to lack synching or just automatic format conversion or what?) And how do I create a PulseAudio sink which writes to a port on a remote server that is listening via this "simple" protocol?
Eventually I discovered that I can run this command locally:
pacmd load-module module-tunnel-sink server=192.168.1.24 sink=music_sink sink_name=remote_music_sink
to write to the native protocol socket I had created on my server with:
pacmd load-module module-native-protocol-tcp auth-ip-acl='127.0.0.1;192.168.0.0/24' auth-anonymous=1
- It worked in the end, but it was too difficult for me as a user. A big part of this is due to the fact that pacmd doesn't print an error message when loading the module fails for some reason. But without changing the design of the system, much of the frustration could have been resolved with better documentation. For example the documentation of
module-tunnel-sinkand vice-versa. If the documentation had provided working examples of server and client setup (at the command-line level), then this information would have been present already. So I think providing examples should be the priority.
My last point might belong in a separate issue:
- Ideally there should be documentation for all of these things, including working examples, installed on my computer when I install PulseAudio. Instead I have to look at this website https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/ and there are no examples. Available online tutorials seem to suffer from not having a standard place to point people to for detailed documentation of the system. When the system was changing a lot, maybe it wasn't feasible to provide this. But now it seems stable enough that we can ask for all the essentials to be documented in standard places like manual pages. This would include all the command-line APIs.