I could be wrong, but IIRC SFC_SET_SCALE_FLOAT_INT_READ looks out for a peak sample riff chunk first. Your code assumes proper +-1 scaling of floating point data, which isn't guaranteed.