summaryrefslogtreecommitdiff
path: root/palsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'palsa.c')
-rw-r--r--palsa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/palsa.c b/palsa.c
index 09550065..b1229e0d 100644
--- a/palsa.c
+++ b/palsa.c
@@ -342,6 +342,10 @@ palsa_thread (uintptr_t context) {
static void
palsa_callback (char *stream, int len) {
+ if (streamer_get_fill () < len) {
+ memset (stream, 0, len);
+ return;
+ }
int bytesread = streamer_read (stream, len);
int ivolume = volume * 1000;
for (int i = 0; i < bytesread/2; i++) {