Skip to content

Configuring PulseAudio outputs

Tomasz Lemiech edited this page Oct 18, 2021 · 8 revisions

PulseAudio is a sound server which allows sharing audio equipment (read: sound card(s)) across many sound sources (applications). It is a default sound server in pretty much every mainstream Linux distribution. This is the software component which allows simultaneous audio playback from several applications (web browser, media player, Skype client, desktop notifications sounds, etc).

RTLSDR-Airband can stream uncompressed audio to a PulseAudio server for real-time playback. The server may run on the same machine where RTLSDR-Airband is running, or on another one, reachable over your local network.

The key thing to understand here is that RTLSDR-Airband is acting as PulseAudio client, while the machine with a sound card and speakers is the PulseAudio server. The client has to know the IP address and port of the server. It connects there, streams the audio to it and the server plays it. There is no need to launch any player like with Icecast streams. Playback will start right after RTLSDR-Airband connects to the server and starts streaming.

Prerequisities

Syntax

outputs is a list of outputs where the audio stream of a particular channel is to be routed. An output is a group of settings enclosed in braces { }. The number of outputs per channel is unlimited.

outputs: (
  {
    type = "pulse";
#   server = "192.168.11.10";
#   sink = ... /* default sink */
#   stream_name = "Utility channels";
#   continuous = false;
  }
);

Want more outputs? Just repeat the braced section several times and separate individual sections with a comma, like this:

outputs: (
  {
    # ... settings for output 1
  },
  {
    # ... settings for output 2
  }
# , ... more outputs here
);

Remember, do not put a comma after the closing brace of the last output. This is a syntax error.

Explanation of keywords

  • type (string, required) - type of this output. Put "pulse" here.
  • server (string, optional) - the host name or IP address (with an optional port number) of the server where RTLSDR-Airband will connect to feed the stream. If this setting is omitted, RTLSDR-Airband will attempt to connect to a default server, which is most often, localhost (it depends on the PulseAudio library configuration). Refer to PulseAudio documentation for a full description of server string syntax.
  • sink (string, optional) - the name of the sink where PulseAudio server should route the audio to. If omitted, the server is free to choose the sink automatically. This is useful if you have more than one sound card and want to explicitly choose the one which shall play this stream. To find out information about available sinks, run pacmd list-sinks on the PulseAudio server machine (or pacmd list-sinks|grep name: to show sink names only).
  • stream_name (string, optional) - the name of the stream. It will be displayed, eg. in the label under the mixer slider associated with this stream. If omitted, the default value is the channel frequency in MHz.
  • continuous (boolean, optional) - whether RTLSDR-Airband shall stream the audio to the server continuously (true) or pause when the squelch is closed (false). The default is false.

Now you may want to read about configuring other output types for your channels:

or jump straight to:

Clone this wiki locally