I saw a lot of questions regarding this example. I am having a problem with this, too.
The project runs fine on my 21262 EZ-Kit Lite.
It outputs the input signal correctly.
However, when I make one small change in the block processing, it doesn't look (sound) well anymore:
For testing, I just set all samples in the block to zero like this
void processBlock(unsigned int *block_ptr)
//Clear the Block Ready Semaphore
blockReady = 0;
//Set the Processing Active Semaphore before starting processing
isProcessing = 1;
//*(block_ptr+i) = *(block_ptr+i);
*(block_ptr+i) = 0;
//Clear the Processing Active Semaphore after processing is complete
isProcessing = 0;
I test this by feeding the ADC with a low-frequency sawtooth signal.
Looking at the sound output, I see, that 2 blocks (of NUM_SAMPLES/2) in a row are set to zero, the third one contains the signal that is input into the codec.
Additionally, between the 2 blocks containing zeros, I get a spike and left and right channel have a shift of one sample relative to eachother.
When I halt the debugger, I guess the interrupts continue, only the block processing stops. Then, the signal looks fine, again.
What's wrong with it? Any idea?