Next: Mail Home Services, Previous: Fonts Home Services, Up: Home Services [Contents][Index]
The (gnu home services sound)
module provides services related to
sound support.
The following services dynamically reconfigure the
PulseAudio sound server: they let you toggle
broadcast of audio output over the network using the RTP (real-time
transport protocol) and, correspondingly, playback of sound received over
RTP. Once home-pulseaudio-rtp-sink-service-type
is among your home
services, you can start broadcasting audio output by running this command:
herd start pulseaudio-rtp-sink
You can then run a PulseAudio-capable mixer, such as pavucontrol
or
pulsemixer
(both from the same-named package) to control which audio
stream(s) should be sent to the RTP “sink”.
By default, audio is broadcasted to a multicast address: any device on the LAN (local area network) receives it and may play it. Using multicast in this way puts a lot of pressure on the network and degrades its performance, so you may instead prefer sending to specifically one device. The first way to do that is by specifying the IP address of the target device when starting the service:
herd start pulseaudio-rtp-sink 192.168.1.42
The other option is to specify this IP address as the one to use by default in your home environment configuration:
(service home-pulseaudio-rtp-sink-service-type
"192.168.1.42")
On the device where you intend to receive and play the RTP stream, you can
use home-pulseaudio-rtp-source-service-type
, like so:
This will then let you start the receiving module for PulseAudio:
herd start pulseaudio-rtp-source
Again, by default it will listen on the multicast address. If, instead, you’d like it to listen for direct incoming connections, you can do that by running:
(service home-pulseaudio-rtp-source-service-type
"0.0.0.0")
The reference of these services is given below.
This is the type of the service to send, respectively receive, audio streams over RTP (real-time transport protocol).
The value associated with this service is the IP address (a string) where
to send, respectively receive, the audio stream. By default, audio is
sent/received on multicast address %pulseaudio-rtp-multicast-address
.
This service defines one Shepherd service: pulseaudio-rtp-sink
,
respectively pulseaudio-rtp-source
. The service is not started by
default, so you have to explicitly start it when you want to turn it on, as
in this example:
herd start pulseaudio-rtp-sink
Stopping the Shepherd service turns off broadcasting.
This is the multicast address used by default by the two services above.
Next: Mail Home Services, Previous: Fonts Home Services, Up: Home Services [Contents][Index]