I'm relatively new to XMOS and I have spent the last couple of weeks trying to get my head around the Long-Delay sliceKIT Audio Demo and Long-Delay Function Library. I'm trying to modify this app and module to create a basic recirculating stereo delay instead of a multi-tap delay.
I've changed the number of taps to 2 and I'm using the first tap to get the left channel delay signal and the second tap to get the right channel delay. Rather than dealing in micro-seconds I want to use samples directly, so I'm completely ignoring the us_delays array found in the DELAY_PARAM_S struct and for now just hardcoding two delay sample values to the req_delay variable in update_common_delays() within the sdram_delay.c file:
Code: Select all
// Calculate delays in samples ...
// Loop through all delay taps.
for (tap_cnt = 0; tap_cnt < num_taps; tap_cnt++)
{
// Calculate current requested delay in samples
//req_delay = ((S64_T)cur_param_ps->freq * (S64_T)cur_param_ps->us_delays[tap_cnt] + (S64_T)500000) / (S64_T)1000000;
if (tap_cnt == 0)
req_delay = 5000;
else if (tap_cnt == 1)
req_delay = 10000;
// Do checks
assert(DELAY_SAMPS > req_delay); // Check buffer is large enough
assert(LOCAL_SAMPS <= req_delay); // Check delay is larger than multi-buffer (theoretical minimum delay)
delay_off = req_delay - LOCAL_SAMPS; // compute delay offset to guarantee requested delay
// Update output offset. NB Add in extra DELAY_SAMPS to prevent negative offsets.
delay_ps->out_bufs[tap_cnt].off = (delay_ps->inp_bufs.off + (DELAY_SAMPS - delay_off)) % DELAY_SAMPS;
} // for tap_cnt
Any idea what this tone is and why it's preventing any audio I/O?
Thanks.