aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-21 22:37:28 +0200
committerMax Kellermann <max@duempel.org>2009-10-21 22:37:28 +0200
commit2c05430002c66f69c498eec40b961d4eabef66c2 (patch)
treef7e51c0943d5df0993382315f2baada763f34083 /src/output_thread.c
parent643650dba75becfe572c1b334d1276a1b3f66d41 (diff)
downloadmpd-2c05430002c66f69c498eec40b961d4eabef66c2.tar.gz
mpd-2c05430002c66f69c498eec40b961d4eabef66c2.tar.xz
mpd-2c05430002c66f69c498eec40b961d4eabef66c2.zip
output: convert config_audio_format to an audio_format struct
This allows more sophisticated audio format selection.
Diffstat (limited to '')
-rw-r--r--src/output_thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index 11dea0845..dd97d88b0 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -67,7 +67,9 @@ ao_open(struct audio_output *ao)
return;
}
- if (!ao->config_audio_format)
+ if (audio_format_defined(&ao->config_audio_format))
+ ao->out_audio_format = ao->config_audio_format;
+ else
ao->out_audio_format = *filter_audio_format;
success = ao_plugin_open(ao->plugin, ao->data,
@@ -164,7 +166,7 @@ ao_reopen_filter(struct audio_output *ao)
static void
ao_reopen(struct audio_output *ao)
{
- if (!ao->config_audio_format) {
+ if (!audio_format_defined(&ao->config_audio_format)) {
if (ao->open) {
const struct music_pipe *mp = ao->pipe;
ao_close(ao);