aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-21 23:01:04 +0200
committerMax Kellermann <max@duempel.org>2009-10-21 23:01:04 +0200
commit9526fdbe730edb4b095a1e12aade0e16f1da2292 (patch)
tree4544e77bf35e08a12d2b019e0bf3942754b85b96 /src/audio.c
parenta5c4566fa1551953b84882a1fa53400c7bd6551c (diff)
downloadmpd-9526fdbe730edb4b095a1e12aade0e16f1da2292.tar.gz
mpd-9526fdbe730edb4b095a1e12aade0e16f1da2292.tar.xz
mpd-9526fdbe730edb4b095a1e12aade0e16f1da2292.zip
audio_format: wildcards allowed in audio_format configuration
An asterisk means that this attribute should not be enforced, and stays whatever it used to be. This way, some configuration values work like masks.
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/audio.c b/src/audio.c
index fb4712728..13f128eeb 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -35,9 +35,8 @@ static struct audio_format configured_audio_format;
void getOutputAudioFormat(const struct audio_format *inAudioFormat,
struct audio_format *outAudioFormat)
{
- *outAudioFormat = audio_format_defined(&configured_audio_format)
- ? configured_audio_format
- : *inAudioFormat;
+ *outAudioFormat = *inAudioFormat;
+ audio_format_mask_apply(outAudioFormat, &configured_audio_format);
}
void initAudioConfig(void)
@@ -50,7 +49,7 @@ void initAudioConfig(void)
return;
ret = audio_format_parse(&configured_audio_format, param->value,
- &error);
+ true, &error);
if (!ret)
g_error("error parsing \"%s\" at line %i: %s",
CONF_AUDIO_OUTPUT_FORMAT, param->line, error->message);