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/audio.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 '')
-rw-r--r-- | src/audio.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/audio.c b/src/audio.c index 45f36fff6..953b1a54e 100644 --- a/src/audio.c +++ b/src/audio.c @@ -247,11 +247,9 @@ bool playAudio(const char *buffer, size_t length) if (!audio_output_is_open(ao)) continue; - if (audio_output_command_is_finished(ao)) { - bool success = audio_output_get_result(ao); - if (success) - ret = true; - } else { + if (audio_output_command_is_finished(ao)) + ret = true; + else { finished = false; audio_output_signal(ao); } |