float fixed_vector_temp[AMR_SUBFRAME_SIZE];
memcpy(fixed_vector_temp, p->fixed_vector, AMR_SUBFRAME_SIZE*sizeof(float));
memset(p->fixed_vector, 0, AMR_SUBFRAME_SIZE*sizeof(float));
// circularly convolve the fixed vector with the impulse response
for(j=0; j<AMR_SUBFRAME_SIZE; j++) {
int index = 0;
for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
index = j-i;
// wrap the index for <0 to make circular convolution
if(index < 0) index += AMR_SUBFRAME_SIZE;
p->fixed_vector[j] += fixed_vector_temp[i]*p->ir_filter[j-i];
}
}