From ba5cf2002c366bddeec584c33a52a7f61c75fb67 Mon Sep 17 00:00:00 2001 From: Giovanni Fulco Date: Thu, 2 Jan 2025 17:06:19 +0100 Subject: [PATCH] 414 opus exception not seekable (#415) * #414 Support disable opus decoder * Mention OPUS_DECODER_ENABLED in Dockerfile --- Dockerfile | 1 + README.md | 1 + app/bin/run-mpd.sh | 8 ++++++++ doc/change-history.md | 1 + 4 files changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9c366b3..9ed91e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -241,6 +241,7 @@ ENV ZEROCONF_ENABLED "" ENV ZEROCONF_NAME "" ENV HYBRID_DSD_ENABLED "" +ENV OPUS_DECODER_ENABLED "" ENV AUDIO_BUFFER_SIZE "" diff --git a/README.md b/README.md index 173006c..152803d 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ CURL_CACERT|Parameter for CURL input plugin ZEROCONF_ENABLED|Set to `yes` to enable, disabled by default. ZEROCONF_NAME|Set zeroconf name, used only if `ZEROCONF_ENABLED` is set to `yes` HYBRID_DSD_ENABLED|Hybrid dsd is enabled by default, set to `no` to disable. Disabled when at least one PulseAudio output is created. +OPUS_DECODER_ENABLED|Defaults to `yes`, if set to `no`, the opus decoder will be disabled. AUDIO_BUFFER_SIZE|Adjust the size of the internal audio buffer. Default is `4 MB` (4 MiB). MAX_ADDITIONAL_OUTPUTS_BY_TYPE|The maximum number of outputs by type, defaults to `20` RESTORE_PAUSED|If set to `yes`, then MPD is put into pause mode instead of starting playback after startup. Default is `no`. diff --git a/app/bin/run-mpd.sh b/app/bin/run-mpd.sh index 3cb5426..89462e1 100644 --- a/app/bin/run-mpd.sh +++ b/app/bin/run-mpd.sh @@ -516,6 +516,14 @@ if [[ "${HYBRID_DSD_ENABLED^^}" == "NO" || "${ANY_PULSE}" -eq 1 ]]; then echo "}" >> $MPD_ALSA_CONFIG_FILE fi +## Hybrid dsd plugin disabled when requested +if [[ "${OPUS_DECODER_ENABLED^^}" == "NO" ]] || [[ "${OPUS_DECODER_ENABLED^^}" == "N" ]]; then + echo "decoder {" >> $MPD_ALSA_CONFIG_FILE + echo " plugin \"opus\"" >> $MPD_ALSA_CONFIG_FILE + echo " enabled \"no\"" >> $MPD_ALSA_CONFIG_FILE + echo "}" >> $MPD_ALSA_CONFIG_FILE +fi + ## Add Qobuz plugin echo "Qobuz Plugin Enabled: [$QOBUZ_PLUGIN_ENABLED]" if [[ "${QOBUZ_PLUGIN_ENABLED^^}" == "Y" || "${QOBUZ_PLUGIN_ENABLED^^}" == "YES" ]]; then diff --git a/doc/change-history.md b/doc/change-history.md index 20e8926..eb6b208 100644 --- a/doc/change-history.md +++ b/doc/change-history.md @@ -2,6 +2,7 @@ Date|Major Changes :---|:--- +2025-01-02|Support for disabling opus decoder (see issue [#414](https://github.com/GioF71/mpd-alsa-docker/issues/414)) 2024-12-26|Bump to version 0.23.14 (see issue [#412](https://github.com/GioF71/mpd-alsa-docker/issues/412)) 2024-10-11|Support for `stop_dsd_silence` (see issue [#410](https://github.com/GioF71/mpd-alsa-docker/issues/410)) 2024-09-21|Fix CURL_PROXY interpretation (thank you [tantra35](https://github.com/tantra35))