Castspeaker 是一个应用于基于以太网/WIFI局域网,C/S 架构,在带宽允许内支持更多数量扬声器客户端的数字扬声器管理系统,使用时钟同步保证所有扬声器客户端高质量的同步播放。Castspeaker可以自动发现局域网内的扬声器客户端,自动匹配采样率和位宽。支持设备分组,可以为每个分组单独指定播放源,通过在移动设备或者电脑端播放到指定的设备分组。可应用在智能家居中全屋音响,支持使用 homeassitant 作为管理端。
golang
/ nodejs
/ make
/ pkg-config
libavcodec
/ libavformat
/ libavutil
/ libswresample
libasound2-dev
make
castserver --help
GLIBC_2.30
ln -s `realpath gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu` /aarch64
export PATH=/aarch64/bin:$PATH
export PKG_CONFIG_LIBDIR=/aarch64/lib/pkgconfig
export CC=aarch64-none-linux-gnu-gcc
git clone --depth=1 https://git.ffmpeg.org/ffmpeg.git -b n4.4.4
cd ffmpeg
./configure --prefix=/aarch64 --arch=arm64 --enable-cross-compile --target-os=linux --cross-prefix=aarch64-none-linux-gnu- --disable-all --enable-gpl --enable-shared --enable-network --enable-autodetect --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-asm --enable-decoder=*
make -j12
make install
# 验证是否安装成功
pkg-config --exists libavcodec libavformat libswresample libavutil && echo true || echo false
./gitcompile --prefix=/aarch64 --host=aarch64-none-linux-gnu
make install
# 验证是否安装成功
pkg-config --exists alsa && echo true || echo false
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags '-s -w' -o castserver ./
scp castserver orangepi:/bin/
ssh orangepi castserver -i wlan0