Avoid zero padding when feeding read channels. chn_rdfeed has no way

of knowing data size transformations of feeder chain and in some cases
this means too much data is pulled through chain, eg converting input
stream from 16bits to 8bits on 16bit only h/w.

PR: kern/37831
Submitted by: Harti Brandt <brandt@fokus.fraunhofer.de>
This commit is contained in:
Orion Hodson 2003-02-03 15:02:28 +00:00
parent 411c25edae
commit faea679930

View File

@ -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);