mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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>
This commit is contained in:
parent
0fbb356714
commit
2c4df1a41a
1 changed files with 16 additions and 1 deletions
|
@ -140,6 +140,11 @@ (define (uglify-field-name field-name)
|
|||
(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 @@ (define-configuration mpd-output
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue