diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-02-27 23:13:26 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-02-27 23:13:26 +0000 |
commit | 821355361ccf360cd1867278178bc6fb32d8abab (patch) | |
tree | 609ba1ab13344fba8f9f136c3bf1780be3ef13a5 /src/decode.c | |
parent | 5622edbc98f55852bc079a50690137232fbd82a1 (diff) | |
download | mpd-821355361ccf360cd1867278178bc6fb32d8abab.tar.gz mpd-821355361ccf360cd1867278178bc6fb32d8abab.tar.xz mpd-821355361ccf360cd1867278178bc6fb32d8abab.zip |
audio cleanups
git-svn-id: https://svn.musicpd.org/mpd/trunk@109 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/decode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/decode.c b/src/decode.c index 637df6d66..bdd5cd379 100644 --- a/src/decode.c +++ b/src/decode.c @@ -337,7 +337,9 @@ void decode() { } else doCrossFade = -1; } - if(pause) playAudio(silence,CHUNK_SIZE); + if(pause) { + if(playAudio(silence,CHUNK_SIZE)<0) quit = 1; + } else if((cb->begin!=cb->end || cb->wrap) && cb->begin!=cb->next) { @@ -399,8 +401,11 @@ void decode() { cb->chunkSize[cb->begin], af, pc->softwareVolume); - playAudio(cb->chunks+cb->begin*CHUNK_SIZE, - cb->chunkSize[cb->begin]); + if(playAudio(cb->chunks+cb->begin*CHUNK_SIZE, + cb->chunkSize[cb->begin])<0) + { + quit = 1; + } cb->begin++; if(cb->begin>=buffered_chunks) { cb->begin = 0; |