ref: 9807dad14f3c7da4992d7a33d90dd28527ee5bdb
parent: 60e502a9b5a169a508bf9b8872c6fa371ecf8c1d
author: cbagwell <cbagwell>
date: Sun Sep 12 16:00:34 EDT 2004
Bugfix in drain of fade. Removing rounding attempt to allow "-v -1.0" to be only an inversion.
--- a/src/fade.c
+++ b/src/fade.c
@@ -295,7 +295,7 @@
len = *osamp;
*osamp = 0;
- if (fade->out_stop != 0 && fade->samplesdone < fade->out_stop &&
+ if (fade->do_out && fade->samplesdone < fade->out_stop &&
!(fade->endpadwarned))
{ /* Warning about padding silence into end of sample */
st_warn("Fade: warning: End time passed end-of-file. Padding with silence");
@@ -302,7 +302,7 @@
fade->endpadwarned = 1;
} /* endif endpadwarned */
- for (;len && (fade->out_stop != 0 &&
+ for (;len && (fade->do_out &&
fade->samplesdone < fade->out_stop); len--)
{
*obuf = 0;
--- a/src/sox.c
+++ b/src/sox.c
@@ -1243,7 +1243,7 @@
y = ST_SAMPLE_MAX;
clips++;
}
- *p++ = y + 0.5;
+ *p++ = y;
}
return clips;
}