Using double precision in a DMA callback seems to block it?
I am using a BlueNRG-LP and started with the CCA01M1 I2S project. I changed the callback so that it applies a volume to the stream in real time. But this seems to block the code if I use a double (which id like to do to see some precision - and I want to add a tone generator in there too). If I use a int16_t then it is fine and doesnt block,
If variable c is double then it blocks. If c is int then it works
anyone know why?
/*Copy song fragment to Audio Output buffer*/
for(i=0; i< DMA_BUFFER_SIZE/2; i++)
{
if (Amplifier.State == AMP_PLAYING)
{
c = *Amplifier.PlayPtr;
c /= 10;
c *= Amplifier.Volume;
d = (int16_t) c;
Amplifier.DMABuffer[i*2]= d;
Amplifier.DMABuffer[i*2+1]= d;
Amplifier.PlayPtr++;
}
