AN00231_ASRC_SPDIF_TO_DAC bug - fixed

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

AN00231_ASRC_SPDIF_TO_DAC bug - fixed

Post by ffomich »


I have found the bug in the AN00231_ASRC_SPDIF_TO_DAC example project.

This bug produces N*samples shift between left & right output channels after ASRC.
For example, after ASRC 48kHz->48kHz the left channel is ahead of the right one by 1 sample.

Bug fix:
in the function
void serial2block(server serial_transfer_push_if i_serial_in, client block_transfer_if i_block_transfer[ASRC_N_INSTANCES], server sample_rate_enquiry_if i_input_rate)

Code: Select all

if (chan_idx == ASRC_CHANNELS_PER_INSTANCE - 1) buff_idx++; //Move index when all channels received

Code: Select all

if (chan_idx == ASRC_CHANNELS_PER_INSTANCE) buff_idx++; //Move index when all channels received
Also I have created new issue here:
User avatar
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Appreciate you taking the time to report this AND making a pull request. Will process shortly.