shithub: sox

Download patch

ref: 9c66f578827586c026a341690ce58d4dea4a6dbd
parent: 6cf185682d9772a6b144dfe7805ec61530cc476a
author: robs <robs>
date: Sun May 3 15:46:25 EDT 2009

further float fix from Tim Munro

--- a/src/sndfile.c
+++ b/src/sndfile.c
@@ -288,8 +288,10 @@
   else rate = sf->sf_info->samplerate;
 
 #ifdef HAVE_SFC_SET_SCALE_FLOAT_INT_READ
-  if ((sf->sf_info->format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT)
+  if ((sf->sf_info->format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT) {
     sf_command(sf->sf_file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);
+    sf_command(sf->sf_file, SFC_SET_CLIPPING, NULL, SF_TRUE);
+  }
 #endif
 
 #if 0 /* FIXME */