+ if (!fetch(self, nframes)) {
+ buffer_t *bbp = &self->buffer[self->nbuffer];
+ if (bp->count < 2 * LPC_ORDER) {
+ size_t total = bp->count + bbp->count;
+ if (bbp->count &&
+ realloc_buffer(bbp, total * sfmt->bytes_per_frame) == 0 &&
+ realloc_buffer(bp, total * sfmt->bytes_per_frame) == 0)
+ {
+ memcpy(bbp->data + bbp->count * sfmt->channels_per_frame,
+ bp->data, bp->count * sfmt->bytes_per_frame);
+ memcpy(bp->data, bbp->data, total * sfmt->bytes_per_frame);
+ bp->count = total;
+ }
+ }
+ if (bp->count >= 2 * LPC_ORDER)
+ extrapolate(self, bp, bbp->data, nframes);
+ else
+ memset(bbp->data, 0, nframes * sfmt->bytes_per_frame);
+ bbp->count = nframes;