summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/sound/pcm/feeder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 0edb34f..915111a 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -388,6 +388,10 @@ feed_root(struct pcm_feeder *feeder, struct pcm_channel *ch, u_int8_t *buffer, u
l = min(count, sndbuf_getready(src));
sndbuf_dispose(src, buffer, l);
+ /* When recording only return as much data as available */
+ if (ch->direction == PCMDIR_REC)
+ return l;
+
/*
if (l < count)
printf("appending %d bytes\n", count - l);
OpenPOWER on IntegriCloud