Skip to content

Commit de65cb5

Browse files
authored
Presets: soxr max32 and 16x allowed formats (#460)
1 parent f45a874 commit de65cb5

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Please find here the variables used to configure the SOXR plugin.
188188
VARIABLE|DESCRIPTION
189189
:---|:---
190190
SOXR_PLUGIN_ENABLE|Enable the `soxr` plugin. Do not use in conjunction with variable `SAMPLERATE_CONVERTER`
191-
SOXR_PLUGIN_PRESET|Presets for SOXR_PLUGIN configuration. Available presets: `goldilocks` and `extremus`
191+
SOXR_PLUGIN_PRESET|Presets for SOXR_PLUGIN configuration. Available presets: `goldilocks`, `extremus`, `max32`
192192
SOXR_PLUGIN_THREADS|The number of libsoxr threads. `0` means automatic. The default is `1` which disables multi-threading.
193193
SOXR_PLUGIN_QUALITY|The quality of `soxr` resampler. Possible values: `very high`, `high` (the default), `medium`, `low`, `quick`, `custom`. When set to `custom`, the additional `soxr` parameters can be set.
194194
SOXR_PLUGIN_PRECISION|The precision in bits. Valid values `16`,`20`,`24`,`28` and `32` bits.
@@ -263,7 +263,7 @@ ALSA_OUTPUT_MIXER_TYPE|Mixer type, defaults to `hardware`
263263
ALSA_OUTPUT_MIXER_DEVICE|Mixer device, defaults to `default`
264264
ALSA_OUTPUT_MIXER_CONTROL|Mixer Control, defaults to `PCM`
265265
ALSA_OUTPUT_MIXER_INDEX|Mixer Index, defaults to `0`
266-
ALSA_OUTPUT_ALLOWED_FORMATS_PRESET|Alternative to `ALSA_OUTPUT_ALLOWED_FORMATS`. Possible values: 8x, 4x, 2x, 8x-nodsd, 4x-nodsd, 2x-nodsd
266+
ALSA_OUTPUT_ALLOWED_FORMATS_PRESET|Alternative to `ALSA_OUTPUT_ALLOWED_FORMATS`. Possible values: `16x`, `8x`, `4x`, `2x`, `16x-nodsd`, `8x-nodsd`, `4x-nodsd`, `2x-nodsd`
267267
ALSA_OUTPUT_ALLOWED_FORMATS|Sets allowed formats
268268
ALSA_OUTPUT_FORMAT|Sets output format
269269
ALSA_OUTPUT_AUTO_RESAMPLE|If set to no, then libasound will not attempt to resample. In this case, the user is responsible for ensuring that the requested sample rate can be produced natively by the device, otherwise an error will occur.

app/bin/build-allowed-formats-presets.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22

33
declare -A allowed_formats_presets
44

5+
allowed_16x=16x
56
allowed_8x=8x
67
allowed_4x=4x
78
allowed_2x=2x
89

10+
allowed_16x_nodsd=16x-nodsd
911
allowed_8x_nodsd=8x-nodsd
1012
allowed_4x_nodsd=4x-nodsd
1113
allowed_2x_nodsd=2x-nodsd
1214

15+
allowed_formats_presets[$allowed_16x]="705600:*:* 768000:*:* *:dsd:*"
1316
allowed_formats_presets[$allowed_8x]="352800:*:* 384000:*:* *:dsd:*"
1417
allowed_formats_presets[$allowed_4x]="176400:*:* 192000:*:* *:dsd:*"
1518
allowed_formats_presets[$allowed_2x]="88200:*:* 96000:*:* *:dsd:*"
1619

20+
allowed_formats_presets[$allowed_16x_nodsd]="705600:*:* 768000:*:*"
1721
allowed_formats_presets[$allowed_8x_nodsd]="352800:*:* 384000:*:*"
1822
allowed_formats_presets[$allowed_4x_nodsd]="176400:*:* 192000:*:*"
1923
allowed_formats_presets[$allowed_2x_nodsd]="88200:*:* 96000:*:*"

app/bin/build-soxr-presets.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ declare -A soxr_plugin_presets
44

55
GOLDILOCKS_SOXR_PLUGIN_PRESET=goldilocks
66
EXTREMUS_SOXR_PLUGIN_PRESET=extremus
7+
MAX32_SOXR_PLUGIN_PRESET=max32
78

89
SOXR_PRESET_KEY_QUALITY="SOXR_PLUGIN_QUALITY"
910
SOXR_PRESET_KEY_PRECISION="SOXR_PLUGIN_PRECISION"
@@ -28,3 +29,10 @@ soxr_plugin_presets[$EXTREMUS_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_PASSBAND_END]=
2829
soxr_plugin_presets[$EXTREMUS_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_STOPBAND_BEGIN]=100
2930
soxr_plugin_presets[$EXTREMUS_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_ATTENUATION]=3.05
3031

32+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_QUALITY]=custom
33+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_PRECISION]=32
34+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_PHASE_RESPONSE]=45
35+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_PASSBAND_END]=95
36+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_STOPBAND_BEGIN]=105
37+
soxr_plugin_presets[$MAX32_SOXR_PLUGIN_PRESET.$SOXR_PRESET_KEY_ATTENUATION]=2
38+

doc/change-history.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Date|Major Changes
44
:---|:---
5+
2026-05-06|Add `max32` soxr preset
6+
2026-05-06|Add `16x` and `16x-nodsd` upsampling allowed format presets
57
2026-04-11|Allow overriding sox parameters when a preset is selected (see issue [#458](https://github.com/GioF71/mpd-alsa-docker/issues/458))
68
2026-04-11|Bump to version 0.24.9 (see issue [#456](https://github.com/GioF71/mpd-alsa-docker/issues/456))
79
2026-02-24|Bump to version 0.24.8 (see issue [#453](https://github.com/GioF71/mpd-alsa-docker/issues/453))

0 commit comments

Comments
 (0)