diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 22:34:37 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 22:34:37 +0100 |
commit | f8722913cf2f9d88cdc20a022c81d131c1728b17 (patch) | |
tree | 2ac32849414bea9ab267038c136425d1d582eb8e /src/output_control.c | |
parent | 7da0e005f34bd8ce305b8ece7a33a8405bbaba87 (diff) | |
download | mpd-f8722913cf2f9d88cdc20a022c81d131c1728b17.tar.gz mpd-f8722913cf2f9d88cdc20a022c81d131c1728b17.tar.xz mpd-f8722913cf2f9d88cdc20a022c81d131c1728b17.zip |
output: removed audio_output.result
Since open() and play() close the device on error, we can simply check
audio_output.open instead of audio_output.result after a call.
Diffstat (limited to 'src/output_control.c')
-rw-r--r-- | src/output_control.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/output_control.c b/src/output_control.c index c4c9510dc..f6ff6347a 100644 --- a/src/output_control.c +++ b/src/output_control.c @@ -55,8 +55,6 @@ bool audio_output_open(struct audio_output *audioOutput, const struct audio_format *audioFormat) { - bool ret = true; - audioOutput->reopen_after = 0; if (audioOutput->open && @@ -83,12 +81,10 @@ audio_output_open(struct audio_output *audioOutput, if (audioOutput->thread == 0) audio_output_thread_start(audioOutput); - if (!audioOutput->open) { + if (!audioOutput->open) ao_command(audioOutput, AO_COMMAND_OPEN); - ret = audioOutput->result; - } - return ret; + return audioOutput->open; } void |