-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiroom: update snapcast to v0.22 and various improvements
- Update snapcast to v0.22.0-r0 - Replace FIFO stream source with ALSA which significantly reduces CPU and I/O usage (fixes #294) - Add SOUND_INPUT_LATENCY and SOUND_OUTPUT_LATENCY env vars (also help with #294) - Reduce multiroom-server image with multi stage builds for a slimmer image - Reduce verbose level for both multiroom services Connects-to: #294 Change-type: minor Signed-off-by: Tomás Migone <tomas@balena.io>
- Loading branch information
Showing
7 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:3.12 | ||
# Minimum snapcast version for ALSA stream source is v0.21 | ||
# Currently Alpine 3.12 is pinned to snapcast v0.19 so we need to use Alpine edge | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:edge | ||
WORKDIR /usr/src | ||
|
||
RUN install_packages snapcast-client | ||
|
||
# Audio block setup | ||
RUN curl --silent https://raw.githubusercontent.com/balenablocks/audio/master/scripts/alsa-bridge/alpine-setup.sh | sh | ||
ENV PULSE_SERVER=tcp:audio:4317 | ||
ENV PULSE_SINK=balena-sound.output | ||
RUN curl --silent https://raw.githubusercontent.com/balenablocks/audio/master/scripts/alsa-bridge/alpine-setup.sh | sh | ||
|
||
WORKDIR /usr/src | ||
COPY start.sh . | ||
|
||
CMD [ "/bin/bash", "/usr/src/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:3.12 | ||
# Build snapweb separately | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine-node:latest as web-builder | ||
WORKDIR /usr/src | ||
|
||
RUN install_packages git make npm | ||
|
||
RUN git clone https://github.com/badaix/snapweb.git snapweb | ||
RUN npm install --global --no-save typescript | ||
RUN cd snapweb && make | ||
|
||
# Minimum snapcast version for ALSA stream source is v0.21 | ||
# Currently Alpine 3.12 is pinned to snapcast v0.19 so we need to use Alpine edge | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:edge | ||
WORKDIR /usr/src | ||
|
||
RUN install_packages snapcast-server git make npm | ||
# Install snapweb | ||
RUN mkdir -p /var/www | ||
COPY --from=web-builder /usr/src/snapweb/dist/* /var/www/ | ||
|
||
# Install snapcast | ||
RUN install_packages snapcast-server | ||
COPY snapserver.conf /etc/snapserver.conf | ||
COPY start.sh . | ||
RUN git clone https://github.com/badaix/snapweb.git snapweb | ||
RUN npm install --global --no-save typescript | ||
RUN cd snapweb && make && mkdir -p /var/www && mv dist/* /var/www | ||
|
||
# Audio block setup | ||
ENV PULSE_SERVER=tcp:audio:4317 | ||
ENV PULSE_SOURCE=snapcast.monitor | ||
RUN curl --silent https://raw.githubusercontent.com/balenablocks/audio/master/scripts/alsa-bridge/alpine-setup.sh| sh | ||
|
||
CMD [ "/bin/bash", "/usr/src/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters