Skip to content

Commit c3f0d6e

Browse files
authored
[Feature] Support audio_buffer_size #218 (#219)
1 parent fea5271 commit c3f0d6e

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ ENV ZEROCONF_NAME ""
208208
ENV HYBRID_DSD_ENABLED ""
209209

210210
ENV MAX_OUTPUT_BUFFER_SIZE ""
211+
ENV AUDIO_BUFFER_SIZE ""
211212

212213
ENV MAX_ADDITIONAL_OUTPUTS_BY_TYPE ""
213214

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ ZEROCONF_ENABLED|Set to `yes` to enable. Disabled by default.
122122
ZEROCONF_NAME|Set zeroconf name, used only if `ZEROCONF_ENABLED` is set to `yes`
123123
HYBRID_DSD_ENABLED|Hybrid dsd is enabled by default, set to `no` to disable. Disabled when using Pulse mode.
124124
MAX_OUTPUT_BUFFER_SIZE|The maximum size of the output buffer to a client (maximum response size). Default is 8192 (8 MiB). Value in KBytes.
125+
AUDIO_BUFFER_SIZE|Adjust the size of the internal audio buffer. Default is `4 MB` (4 MiB).
125126
MAX_ADDITIONAL_OUTPUTS_BY_TYPE|The maximum number of outputs by type, defaults to `20`
126127
RESTORE_PAUSED|If set to `yes`, then MPD is put into pause mode instead of starting playback after startup. Default is `no`.
127128
STATE_FILE_INTERVAL|Auto-save the state file this number of seconds after each state change, defaults to `10` seconds

app/bin/run-mpd.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ fi
668668
if [ -n "${MAX_OUTPUT_BUFFER_SIZE}" ]; then
669669
echo "max_output_buffer_size \"${MAX_OUTPUT_BUFFER_SIZE}\"" >> $MPD_ALSA_CONFIG_FILE
670670
fi
671+
if [ -n "${AUDIO_BUFFER_SIZE}" ]; then
672+
echo "audio_buffer_size \"${AUDIO_BUFFER_SIZE}\"" >> $MPD_ALSA_CONFIG_FILE
673+
fi
671674
echo "filesystem_charset \"UTF-8\"" >> $MPD_ALSA_CONFIG_FILE
672675

673676
number_re="^[0-9]+$"

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ echo "Base Image Tag: ["$selected_image_tag"]"
6464
echo "Build Tag: ["$tag"]"
6565
echo "Proxy: ["$proxy"]"
6666

67-
docker build . \
67+
docker build . --no-cache \
6868
--build-arg BASE_IMAGE_TAG=${selected_image_tag} \
6969
--build-arg USE_APT_PROXY=${proxy} \
7070
-t giof71/mpd-alsa:$tag

doc/change-history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Date|Major Changes
44
:---|:---
5+
2023-01-30|Add support for `AUDIO_BUFFER_SIZE`
56
2023-01-20|Player state enforced by default
67
2023-01-17|`HTTPD_OUTPUT_TAGS` had typo in name
78
2023-01-17|Add `PULSE_AUDIO_OUTPUT_SINK` to PulseAudio output

0 commit comments

Comments
 (0)