ref: 05f98be8d25ebd7daf28b536acffb1adacb4197d
parent: a0ab06d06dae1301fae8cc24e4d60f092012b8de
author: cbagwell <cbagwell>
date: Sun Mar 19 21:14:08 EST 2006
Add check for clipping to dat.
--- a/src/dat.c
+++ b/src/dat.c
@@ -136,7 +136,9 @@
st_fail_errno(ft,ST_EOF,"Unable to read sample.");
return (ST_EOF);
}
- *buf++ = roundoff(sampval * FLOATTOLONG);
+ sampval = roundoff(sampval * FLOATTOLONG);
+ ST_SAMPLE_CLIP(sampval);
+ *buf++ = sampval;
done++;
}
}