and... i found the bug.
i realised that when the presets where garbled this message was printed on the bela console:
File samples scale = 16.2277
which of course made my presets values to large by an amount of 16.227
i now changed the offending line and sure enough it works again :-)
if (subformat == SF_FORMAT_FLOAT || subformat == SF_FORMAT_DOUBLE) {
double scale ;
int m ;
sf_command (sndfile, SFC_CALC_SIGNAL_MAX, &scale, sizeof (scale)) ;
if (scale < 1e-10)
scale = 1.0 ;
else
// scale = 32700.0 / scale ;
scale = 1.0 ;
cout << "File samples scale = " << scale << endl;
for (m = 0; m < frameLen; m++)
tempBuf[m] *= scale;
}
so it seems that the signal max calculation is sometimes way off in getSamples()