diff options
Diffstat (limited to 'src/audio.c')
-rw-r--r-- | src/audio.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/audio.c b/src/audio.c index d48558e46..a0259cb37 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) @@ -46,17 +45,12 @@ void initAudioConfig(void) GError *error = NULL; bool ret; - if (NULL == param || NULL == param->value) + if (param == NULL) 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); } - -void finishAudioConfig(void) -{ - audio_format_clear(&configured_audio_format); -} |