diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-10-28 05:22:22 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-10-28 05:22:22 +0000 |
commit | a5e3445697be9d3e379e6282c89e556ccdc5d18f (patch) | |
tree | 475b6063c619d1740f8bc2beebaa69a87497b2c0 | |
parent | 58dbe4bb5d974c34335d6906a9ce930f07cd1db4 (diff) | |
download | mpd-a5e3445697be9d3e379e6282c89e556ccdc5d18f.tar.gz mpd-a5e3445697be9d3e379e6282c89e556ccdc5d18f.tar.xz mpd-a5e3445697be9d3e379e6282c89e556ccdc5d18f.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/audio.c | 9 |
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; |