diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-03-26 19:41:31 +0100 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-04-02 12:35:30 +0200 |
commit | 2c4df1a41af70ebbae4422878ce6a4c8600c6811 (patch) | |
tree | da51097d78c2a6c104fcf5f0852426e8dd57e54b /gnu/services/audio.scm | |
parent | 0fbb356714f4ae3ea18e4997131a0e1746cc923c (diff) | |
download | guix-2c4df1a41af70ebbae4422878ce6a4c8600c6811.tar.gz |
services: mpd: Fix unintentional API breakage for mixer-type field.
* gnu/services/audio.scm (mpd-output)[mixer-type]: Use sanitizer to accept both strings and symbols as values. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/services/audio.scm')
-rw-r--r-- | gnu/services/audio.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index c073b85a32..bc4aed71dc 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -140,6 +140,11 @@ (define list-of-symbol? (list-of symbol?)) + +;;; +;;; MPD +;;; + (define (mpd-serialize-field field-name value) (let ((field (if (string? field-name) field-name (uglify-field-name field-name))) @@ -294,7 +299,17 @@ disconnect all listeners even when playback is accidentally stopped.") for this audio output: the @code{hardware} mixer, the @code{software} mixer, the @code{null} mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none}).") +External Mixer) or no mixer (@code{none})." + (sanitizer + (lambda (x) ; TODO: deprecated, remove me later. + (cond + ((symbol? x) + (warning (G_ "symbol value for 'mixer-type' is deprecated, \ +use string instead~%")) + (symbol->string x)) + ((string? x) x) + (else + (configuration-field-error #f 'mixer-type x)))))) (replay-gain-handler maybe-string |