fix a little bug with audio device being closed on song change, oops

git-svn-id: https://svn.musicpd.org/mpd/trunk@2376 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-10-28 05:22:22 +00:00
parent 58dbe4bb5d
commit a5e3445697
1 changed files with 3 additions and 6 deletions

View File

@ -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;