mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 01:44:32 +04:00
Snapcast [1] is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution. Audio is captured by the server and routed to the connected clients. Several players can feed audio to the server in parallel and clients can be grouped to play the same audio stream. One of the most generic ways to use Snapcast is in conjunction with the music player daemon (MPD) [2] or Mopidy [3]. The inclusion starts with version 0.28.0 because of OpenSSL dependency issues of version 0.29.0. Newer versions (e.g. 0.32.3, see [4]) with optional OpenSSL support, will be incorporated with flavours, like "-mini" and "-full" in the upcoming PRs. More about this topic please check the inclusion PR at [5]! [1]: https://github.com/badaix/snapcast [2]: http://www.musicpd.org/ [3]: https://www.mopidy.com/ [4]: https://github.com/badaix/snapcast/blob/develop/changelog.md [5]: https://github.com/openwrt/packages/pull/23956#discussion_r2330463363 Fixes: #23924 Suggested-by: Tianling Shen <cnsztl@immortalwrt.org> Suggested-by: George Sapkin <george@sapk.in> Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
34 lines
824 B
Bash
Executable File
34 lines
824 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Author: Johannes Pohl <johannes.pohl@badaix.de>
|
|
# Co-Author: Szabolcs Hubai <szab.hu@gmail.com>
|
|
START=90
|
|
|
|
USE_PROCD=1
|
|
|
|
NAME=snapserver
|
|
PROG=/usr/bin/$NAME
|
|
PID_FILE=/var/run/$NAME.pid
|
|
|
|
start_service()
|
|
{
|
|
config_load "$NAME"
|
|
|
|
local enabled
|
|
config_get_bool enabled "config" enabled 0
|
|
[ "$enabled" -ne "1" ] && logger -t $NAME "Disabled in /etc/config/$NAME" && return 1
|
|
|
|
local log_sink opts
|
|
config_get log_sink "config" log_sink system
|
|
config_get opts "config" opts ""
|
|
|
|
procd_open_instance
|
|
procd_set_param command $PROG
|
|
procd_append_param command --logging.sink $log_sink
|
|
procd_append_param command $opts
|
|
procd_set_param pidfile $PID_FILE
|
|
procd_set_param respawn # use the defaults for respawing crashed process
|
|
procd_set_param stderr 1
|
|
procd_set_param stdout 1
|
|
procd_close_instance
|
|
}
|