Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBackend = "pipe" DefaultDeviceName = "tuify" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BinaryPath string // path to librespot binary, default "librespot"
DeviceName string // Spotify Connect device name, default DefaultDeviceName
Bitrate int // 96, 160, or 320; default 320
Backend string // audio backend: DefaultBackend ("pipe"), "pulseaudio", etc.
Username string // Spotify username for direct auth (avoids zeroconf key issues)
CacheDir string // directory for librespot credential/audio cache
}
Config holds librespot launch parameters.
type Process ¶
type Process struct {
OnReconnect func() // called when librespot authenticates (initial or restart)
OnInactive func() // called when librespot reports device became inactive
OnStdout func(io.ReadCloser) // called with the stdout pipe in launch(); for pipe backend audio
// contains filtered or unexported fields
}
Process manages a librespot child process with automatic restart on crash.
func NewProcess ¶
NewProcess creates a new Process with the given configuration.
Click to show internal directories.
Click to hide internal directories.