diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 20:39:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 20:39:56 +0100 |
commit | 03390d8be1cb8983778faf6eedb9bcfd26a6dbce (patch) | |
tree | a47f82e44dba4e18980300fd08fb308daac04848 /src | |
parent | 030238bb1035acc825cebe793be51eb034f92e4f (diff) | |
download | mpd-03390d8be1cb8983778faf6eedb9bcfd26a6dbce.tar.gz mpd-03390d8be1cb8983778faf6eedb9bcfd26a6dbce.tar.xz mpd-03390d8be1cb8983778faf6eedb9bcfd26a6dbce.zip |
audio: call closeAudioDevice() on error
Instead of implementing another loop which calls audio_output_close()
on all configured devices, simply call closeAudioDevice().
Diffstat (limited to '')
-rw-r--r-- | src/audio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/audio.c b/src/audio.c index cd029c09b..0eff63f8f 100644 --- a/src/audio.c +++ b/src/audio.c @@ -313,12 +313,9 @@ int openAudioDevice(const struct audio_format *audioFormat) ret = 0; } - if (ret != 0) { + if (ret != 0) /* close all devices if there was an error */ - for (i = 0; i < audioOutputArraySize; ++i) { - audio_output_close(&audioOutputArray[i]); - } - } + closeAudioDevice(); return ret; } |