aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c7
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;
}