shithub: sox

Download patch

ref: 8e6a9f96055e6a08c35d9e998ecc4efb3ccfcb47
parent: 3300e52e3e0a036ff2e6020c68353e1cada10779
author: robs <robs>
date: Sun Dec 31 17:51:40 EST 2006

Remove the old internal copy effect.

--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,8 @@
   o Remove old, optional rate change and alaw/ulaw conversion code.
     (Reuben Thomas)
   o Remove soxmix.  (Reuben Thomas)
+  o Removed the old internally invoked (but mentioned in the man page)
+    copy effect.  (robs)
   o Consistent (and hopefully complete) clipping detection and
     reporting.  (robs)
   o Add AIFF-C output support.  (shashimoto)
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@
 	  vox.c wav.c wav.h wve.c xa.c
 
 effects = avg.c band.c bandpass.c biquad.c biquad.h breject.c btrworth.c \
-	  btrworth.h chorus.c compand.c copy.c dcshift.c deemphas.c earwax.c \
+	  btrworth.h chorus.c compand.c dcshift.c deemphas.c earwax.c \
 	  echo.c echos.c equalizer.c fade.c FFT.c FFT.h filter.c flanger.c \
 	  highp.c highpass.c lowp.c lowpass.c lua.c lintlib.c mask.c \
 	  mcompand.c noiseprof.c noisered.c noisered.h pad.c pan.c \
--- a/src/README
+++ b/src/README
@@ -11,7 +11,6 @@
 bass		y	y
 chorus		y	y
 compand		y	y
-copy		n	n
 dcshift		y	c
 deemph		n	n
 dither		see mask
--- a/src/copy.c
+++ /dev/null
@@ -1,74 +1,0 @@
-/*
- * July 5, 1991
- * Copyright 1991 Lance Norskog And Sundry Contributors
- * This source code is freely redistributable and may be used for
- * any purpose.  This copyright notice must be maintained. 
- * Lance Norskog And Sundry Contributors are not responsible for 
- * the consequences of using this software.
- */
-
-/*
- * Sound Tools skeleton effect file.
- */
-
-#include "st_i.h"
-#include "string.h" /* memcpy() */
-
-static st_effect_t st_copy_effect;
-
-/*
- * Process options
- */
-static int st_copy_getopts(eff_t effp UNUSED, int n, char **argv UNUSED) 
-{
-        if (n)
-        {
-                st_fail(st_copy_effect.usage);
-                return (ST_EOF);
-        }
-        return (ST_SUCCESS);
-}
-
-/*
- * Start processing
- */
-static int st_copy_start(eff_t effp UNUSED)
-{
-        /* nothing to do */
-        /* stuff data into delaying effects here */
-        return (ST_SUCCESS);
-}
-
-/*
- * Read up to len samples from file.
- * Convert to signed longs.
- * Place in buf[].
- * Return number of samples read.
- */
-static int st_copy_flow(eff_t effp UNUSED, const st_sample_t *ibuf, st_sample_t *obuf, 
-                 st_size_t *isamp, st_size_t *osamp)
-{
-        int done;
-        
-        done = ((*isamp < *osamp) ? *isamp : *osamp);
-        memcpy(obuf, ibuf, done * sizeof(st_sample_t));
-        *isamp = *osamp = done;
-        return (ST_SUCCESS);
-}
-
-static st_effect_t st_copy_effect = {
-  "copy",
-  "Usage: Copy effect takes no options",
-  ST_EFF_MCHAN,
-  st_copy_getopts,
-  st_copy_start,
-  st_copy_flow,
-  st_effect_nothing_drain,
-  st_effect_nothing,
-  st_effect_nothing
-};
-
-const st_effect_t *st_copy_effect_fn(void)
-{
-    return &st_copy_effect;
-}
--- a/src/handlers.c
+++ b/src/handlers.c
@@ -92,7 +92,6 @@
   st_bass_effect_fn,
   st_chorus_effect_fn,
   st_compand_effect_fn,
-  st_copy_effect_fn,
   st_dcshift_effect_fn,
   st_deemph_effect_fn,
   st_dither_effect_fn,
--- a/src/play.in
+++ b/src/play.in
@@ -80,7 +80,7 @@
       --file=FILENAME          specify filename
 
 EFFECTs are one or more of the following: avg, band, bandpass, bandreject,
-bass, chorus, compand, copy, dcshift, deemph, dither, earwax, echo, echos,
+bass, chorus, compand, dcshift, deemph, dither, earwax, echo, echos,
 equalizer, fade, filter, flanger, highpass, highp, lowpass, lowp, mask,
 mcompand, noiseprof, noisered, pad, pan, phaser, pick, pitch, polyphase,
 rabbit, rate, repeat, resample, reverb, reverse, silence, speed, stat,
@@ -94,7 +94,7 @@
 # loop over arguments
 while [ $# -ne 0 ]; do
     case "$1" in
-	avg|band|bandpass|bandreject|bass|chorus|compand|copy|dcshift|deemph|dither|earwax|echo|echos|equalizer|fade|filter|flanger|highpass|highp|lowpass|lowp|mask|mcompand|noiseprof|noisered|pad|pan|phaser|pick|pitch|polyphase|rabbit|rate|repeat|resample|reverb|reverse|silence|speed|stat|stretch|swap|synth|treble|trim|vibro|vol)
+	avg|band|bandpass|bandreject|bass|chorus|compand|dcshift|deemph|dither|earwax|echo|echos|equalizer|fade|filter|flanger|highpass|highp|lowpass|lowp|mask|mcompand|noiseprof|noisered|pad|pan|phaser|pick|pitch|polyphase|rabbit|rate|repeat|resample|reverb|reverse|silence|speed|stat|stretch|swap|synth|treble|trim|vibro|vol)
 	    effects="$@"
 	    break
 	    ;;
--- a/src/st_i.h
+++ b/src/st_i.h
@@ -272,7 +272,6 @@
 extern const st_effect_t *st_bass_effect_fn(void);
 extern const st_effect_t *st_chorus_effect_fn(void);
 extern const st_effect_t *st_compand_effect_fn(void);
-extern const st_effect_t *st_copy_effect_fn(void);
 extern const st_effect_t *st_dcshift_effect_fn(void);
 extern const st_effect_t *st_deemph_effect_fn(void);
 extern const st_effect_t *st_dither_effect_fn(void);