From 78fa3f06f9fadcc274c0a0042d28d59c88bff152 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 6 Jul 2009 10:01:02 +0200 Subject: output: added command REOPEN REOPEN is called when the input audio format changes. The output thread may be reconfigure the PCM converter. --- src/output_control.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/output_control.c') diff --git a/src/output_control.c b/src/output_control.c index eac9bdfcb..2c193c30f 100644 --- a/src/output_control.c +++ b/src/output_control.c @@ -82,26 +82,13 @@ audio_output_open(struct audio_output *ao, ao->in_audio_format = *audio_format; ao->chunk = NULL; - if (!ao->config_audio_format) { - if (ao->open) - audio_output_close(ao); - - /* no audio format is configured: copy in->out, let - the output's open() method determine the effective - out_audio_format */ - ao->out_audio_format = ao->in_audio_format; - } - ao->pipe = mp; if (ao->thread == NULL) audio_output_thread_start(ao); + ao_command(ao, ao->open ? AO_COMMAND_REOPEN : AO_COMMAND_OPEN); open = ao->open; - if (!open) { - ao_command(ao, AO_COMMAND_OPEN); - open = ao->open; - } if (open && ao->mixer != NULL) mixer_open(ao->mixer); -- cgit v1.2.3