aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/audio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/audio.c b/src/audio.c
index e3a311abb..9df190dd5 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -175,7 +175,7 @@ void finishAudioDriver() {
}
int isCurrentAudioFormat(AudioFormat * audioFormat) {
- if(!audioFormat) return 0;
+ if(!audioFormat) return 1;
if(memcmp(audioFormat,&audio_format,sizeof(AudioFormat)) != 0) return 0;
@@ -195,12 +195,9 @@ int openAudioDevice(AudioFormat * audioFormat) {
for(i = 0; i < audioOutputArraySize; i++) {
if(!audioOutputArray[i]->open || !isCurrentFormat) {
- if(0 == openAudioOutput(audioOutputArray[i],
- &audio_format))
- {
- ret = 0;
- }
+ openAudioOutput(audioOutputArray[i], &audio_format);
}
+ if(audioOutputArray[i]->open) ret = 0;
}
return ret;