I am trying to change to play, 16bit wav, which are more readily available.
I can not understand why crashes after the first buffer and stops forward.
void Audio_Handler (void){
if (__SampleIndex < __NumberOfSamples - 1) {
analogWrite(A0, __WavSamples[__SampleIndex+=2]<<2);
TC5->COUNT16.INTFLAG.bit.MC0 = 1; // Clear the interrupt
} else {
__SampleIndex = 0;
TC5->COUNT16.INTFLAG.bit.MC0 = 1;
}
}
I am trying to change to play, 16bit wav, which are more readily available.
I can not understand why crashes after the first buffer and stops forward.