Also, make sure that floats are 32 bit even in the case of an
extensible header.
sr_err("Only PCM and floating point samples are supported.");
return SR_ERR_DATA;
}
+ if (fmt_code == WAVE_FORMAT_IEEE_FLOAT && unitsize != 4) {
+ sr_err("only 32-bit floats supported.");
+ return SR_ERR_DATA;
+ }
} else {
sr_err("Only PCM and floating point samples are supported.");
return SR_ERR_DATA;
} else {
/* BINARY32 float */
#ifdef WORDS_BIGENDIAN
+ int i;
for (i = 0; i < inc->unitsize; i++)
- d[i] = s[inc->unitsize - i];
+ d[i] = s[inc->unitsize - 1 - i];
#else
memcpy(d, s, inc->unitsize);
#endif