Skip to content

About

Light ALSA-only sensdspin player based on sendspin-cpp

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Sendspin Player Lite

sendspin-player-lite is a lightweight Linux audio player for the Sendspin protocol. It advertises itself on the local network using mDNS, accepts Sendspin playback connections, and writes the received audio directly to an ALSA playback device.

The player is intentionally small and has no graphical interface. It is a good fit for a headless Linux machine, Raspberry Pi, or other device connected to an amplifier or speakers.

This project is based on the official sendspin-cpp library, which provides the Sendspin client, player, and metadata functionality.

Features

  • Direct ALSA playback
  • FLAC, Opus, and PCM playback at 44.1 kHz and 48 kHz stereo
  • Optional volume and mute handling through an ALSA mixer control
  • Statically built, small binary articfact and easy to build

Requirements

The project targets only Linux because it uses ALSA for audio output. Install the following before building:

  • A modern C++20 compiler such as GCC 13+
  • CMake 3.12 or newer
  • Git
  • ALSA development headers and libraries

On Debian or Ubuntu, the system requirements can be installed with:

sudo apt install build-essential cmake git libasound2-dev

On Alpine Linux:

sudo apk add build-base cmake git alsa-lib-dev

The runtime image only needs the ALSA library:

sudo apk add alsa-lib

CMake will automatically downloads these dependencies during configuration:

An internet connection is therefore required for the first configure step.

Build

From the repository root, configure and build in a separate directory:

cmake -B build -DCMAKE_BUILD_TYPE=Release .
cmake --build build --parallel

The executable is created at build/sendspin-player-lite.

Usage

The simplest invocation uses the system ALSA default device:

./build/sendspin-player-lite

The player starts on port 8928, announces itself on the local network, and waits for a Sendspin source to connect. Stop it with Ctrl+C.

A more explicit example for a named device and mixer control is:

./build/sendspin-player-lite \
  --name "Kitchen Speaker" \
  --device hw:0,0 \
  --mixer Master

Use aplay -L to list ALSA playback devices and amixer scontrols to list available mixer controls. The mixer option is optional; if it cannot be opened, audio playback still works but volume and mute change requests will have no effects.

Command-line options

Option Default Description
-n, --name NAME Sendspin Player Lite Friendly name shown during discovery
-p, --port PORT 8928 Port used for the Sendspin service announcement
-d, --device DEVICE default ALSA playback device
-m, --mixer CONTROL empty ALSA mixer element used for volume control

Help is available with:

./build/sendspin-player-lite --help

License

This project is released under the MIT License.

About

Light ALSA-only sensdspin player based on sendspin-cpp

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages