aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/audio.c b/src/audio.c
index 728f93718..c3b87fa5b 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -79,7 +79,9 @@ void initAudioDriver() {
myAudioDevicesEnabled[i] = 1;
}
- while((param = getNextConfigParam(CONF_AUDIO_OUTPUT, param))) {
+ param = getNextConfigParam(CONF_AUDIO_OUTPUT, param);
+
+ do {
if(audioOutputArraySize == AUDIO_MAX_DEVICES) {
ERROR("only up to 255 audio output devices are "
"supported");
@@ -93,12 +95,12 @@ void initAudioDriver() {
audioOutputArray[i] = newAudioOutput(param);
- if(!audioOutputArray[i]) {
+ if(!audioOutputArray[i] && param) {
ERROR("problems configuring output device defined at "
"line %i\n", param->line);
exit(EXIT_FAILURE);
}
- }
+ } while((param = getNextConfigParam(CONF_AUDIO_OUTPUT, param)));
}
void getOutputAudioFormat(AudioFormat * inAudioFormat,