shithub: sox

Download patch

ref: 4de92cb7833368d1c460db52ba5b0c7f179f3d52
parent: 05bf85572c49979cc3f07dc73ae1b8a4f429732e
author: Chris Bagwell <chris@cnpbagwell.com>
date: Sat Sep 24 09:21:10 EDT 2011

fix effect pipeline and file length propogation

Lets fade work again when specifying a length from end of file.
Fix is based on work from Thor Andreassen.

--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,8 @@
   o Added use_threads variable to sox_globals. This should be used to enable
     or disable use of parallel effects processing instead of directly calling
     omp_set_num_threads. (Doug Cook)
+  o Fix to effects pipeline to let fade affect specify time from end of
+    file again. (cbagwell and Thor Andreassen)
 
 sox-14.3.2	2011-02-27
 ----------
--- a/src/effects.c
+++ b/src/effects.c
@@ -143,6 +143,9 @@
         in->precision : SOX_SAMPLE_PRECISION;
   if (!(effp->handler.flags & SOX_EFF_GAIN))
     effp->out_signal.mult = in->mult;
+  if (!(effp->handler.flags & SOX_EFF_LENGTH))
+    effp->out_signal.length = in->length;
+
 
   effp->flows =
     (effp->handler.flags & SOX_EFF_MCHAN)? 1 : effp->in_signal.channels;