A Go SDK for Sendspin players: encrypted connections, audio decoding, synchronized playback, discovery, and optional audio capture.
Go 1.27.3+ is required.
go get github.com/echocat/sendspin-player-goThe SDK and native audio backends build without CGO. Opening an audio device still requires the operating system's runtime libraries and permissions.
package main
import (
"context"
"os"
"os/signal"
"path/filepath"
sendspin "github.com/echocat/sendspin-player-go"
"github.com/echocat/sendspin-player-go/audio/native"
)
func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()
configDir, err := os.UserConfigDir()
if err != nil {
panic(err)
}
player, err := sendspin.New(ctx, sendspin.Config{
Name: "Living room",
Store: sendspin.FileStore{Path: filepath.Join(configDir, "sendspin-player-go", "device.json")},
Output: native.Output{},
})
if err != nil {
panic(err)
}
if err := player.Run(ctx, "ws://192.0.2.1:8927/sendspin"); err != nil && ctx.Err() == nil {
panic(err)
}
}Pair the client with your server using player.PairingToken(). Treat the token
and credential file as secrets. See SDK usage for pairing,
discovery, server-initiated connections, and cancellation.
- Encrypted client- and server-initiated connections with mDNS discovery.
- PCM, FLAC, and Opus decoding, buffering, clock synchronization, and drift correction.
- Native ALSA, PipeWire, WASAPI, and CoreAudio playback and capture.
- Controller commands, metadata, artwork, visualizer, and color updates.
- Optional Source streaming, PIN pairing, and host-managed volume/mute.
- Replaceable audio interfaces, codecs, storage, and application-selected logging.
Targets Sendspin 1.0.0-rc1. See protocol support and limitations.
- SDK usage
- Audio backends and capture
- API reference
- Runnable examples —
mise example <name> [arguments...] - Development · Releasing
MIT, with third-party notices in NOTICES. The derived time-filter code uses Apache License 2.0. Sendspin is a trademark of the Open Home Foundation.