Configure Network Sound

Set up local sound to play across the network.

In “Mix Your Audio for Perfect Sound” [Hack #13] I discuss how to use EsounD as a sound server to mix sounds from multiple programs for a sound card that supports only one input. One extra feature of EsounD is the ability to send and receive sound over the network. This can be particularly useful if you use programs like VNC over a local network, because you can use audio applications remotely and hear them on your local machine. Plus, in general, it’s just pretty cool to be able to send sound around over the network.

To do this esd must be installed on the server (the machine on which you hear the sound). You don’t have to have esd installed on the client—your client doesn’t even need a sound card—but make sure your programs are EsounD-compatible. Most distributions should have EsounD packaged, so install it from your package management tool. If you use GNOME, EsounD is probably already installed. Once esd is installed on the server, you need to start it with special options so that it knows to listen to the network. Kill any open esd processes, and then start esd from the command line:

	greenfly@napoleon:~$ esd -promiscuous -tcp -public -port 16001

You should hear a series of beeps on your computer to tell you that esd has started. Now on your client machine open a terminal and type:

	greenfly@moses:~$ esdplay --server="ip_of_server:16001" sample.wav

Replace ip_of_server with the IP address of the esd server. The ...

Get Linux Multimedia Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.