xmos / lib_src

Sample rate conversion library
Other
16 stars 19 forks source link

us3 example not helpful #19

Open ed-xmos opened 7 years ago

ed-xmos commented 7 years ago

us3 example is basically a test. Doesn't show a practical use of teh function. In particular, how to walk through the 2 dimensional array of coeffs. Something like:

int main() {

int32_t data[SRC_FF3V_FIR_TAPS_PER_PHASE];
memset(data, 0, sizeof(data));

for (unsigned s=0;s<24;s++)
{
    int32_t samp = (s == 0 ? 0x7fffffff : 0); //impulse

    //Walk backwards through phases
    printf("%d\n", src_us3_voice_input_sample(data, src_ff3v_fir_coefs[2], samp));
    printf("%d\n", src_us3_voice_get_next_sample(data, src_ff3v_fir_coefs[1]));
    printf("%d\n", src_us3_voice_get_next_sample(data, src_ff3v_fir_coefs[0]));
}
return 0;

}

ed-xmos commented 7 years ago

Evidence of confusion - http://www.xcore.com/viewtopic.php?f=26&t=5691