aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c11
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;