shithub: sox

Download patch

ref: df0ac53c096caff7717dd11bcf4ec91650521a1b
parent: fbc1d1ef1af64995a4d2549d8a99837b1bc55c68
author: rrt <rrt>
date: Wed Dec 27 12:41:12 EST 2006

More tidy-up: don't use st_ prefix on static functions, and make the
functions in the table in skeleff.c correspond to the names in the
file.

--- a/src/skel.c
+++ b/src/skel.c
@@ -36,7 +36,7 @@
  *      size and encoding of samples,
  *      mono/stereo/quad.
  */
-static int st_skelstartread(ft_t ft)
+static int skel_startread(ft_t ft)
 {
   skel_t sk = (skel_t)ft->priv;
 
@@ -77,7 +77,7 @@
  * Place in buf[].
  * Return number of samples read.
  */
-static st_size_t st_skelread(ft_t ft, st_sample_t *buf, st_size_t len)
+static st_size_t skel_read(ft_t ft, st_sample_t *buf, st_size_t len)
 {
   skel_t sk = (skel_t)ft->priv;
   st_size_t done;
@@ -109,12 +109,12 @@
  * Do anything required when you stop reading samples.
  * Don't close input file!
  */
-static int st_skelstopread(ft_t ft)
+static int skel_stopread(ft_t ft)
 {
   return ST_SUCCESS;
 }
 
-static int st_skelstartwrite(ft_t ft)
+static int skel_startwrite(ft_t ft)
 {
   skel_t sk = (skel_t)ft->priv;
 
@@ -146,7 +146,7 @@
 
 }
 
-static st_size_t st_skelwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
+static st_size_t skel_write(ft_t ft, const st_sample_t *buf, st_size_t len)
 {
   skel_t sk = (skel_t)ft->priv;
   st_size_t len = 0;
@@ -168,7 +168,7 @@
   return len;
 }
 
-static int st_skelstopwrite(ft_t ft)
+static int skel_stopwrite(ft_t ft)
 {
   /* All samples are already written out. */
   /* If file header needs fixing up, for example it needs the */
@@ -186,13 +186,13 @@
   skel_names,
   NULL,
   ST_FILE_STEREO | ST_FILE_SEEK,
-  st_skelstartread,
-  st_skelread,
-  st_skelstopread,
-  st_skelstartwrite,
-  st_skelwrite,
-  st_skelstopwrite,
-  st_skelseek
+  skel_startread,
+  skel_read,
+  skel_stopread,
+  skel_startwrite,
+  skel_write,
+  skel_stopwrite,
+  skel_seek
 };
 
 const st_format_t *st_skel_format_fn()
--- a/src/skeleff.c
+++ b/src/skeleff.c
@@ -34,7 +34,7 @@
  * Don't do initialization now.
  * The 'info' fields are not yet filled in.
  */
-static int st_skeleff_getopts(eff_t effp, int n, char **argv)
+static int skeleff_getopts(eff_t effp, int n, char **argv)
 {
   skeleff_t skeleff = (skeleff_t)effp->priv;
 
@@ -51,7 +51,7 @@
  * Do all initializations.
  * If there's nothing to do, use st_effect_nothing instead.
  */
-static int st_skeleff_start(eff_t effp)
+static int skeleff_start(eff_t effp)
 {
   if (effp->outinfo.channels == 1) {
     st_fail("Can't run skeleff on mono data.");
@@ -65,7 +65,7 @@
  * Processed signed long samples from ibuf to obuf.
  * Return number of samples processed.
  */
-static int st_skeleff_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, 
+static int skeleff_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, 
                            st_size_t *isamp, st_size_t *osamp)
 {
   skeleff_t skeleff = (skeleff_t)effp->priv;
@@ -99,7 +99,7 @@
  * Drain out remaining samples if the effect generates any.
  * If there's nothing to do, use st_effect_nothing_drain instead.
  */
-static int st_skeleff_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)
+static int skeleff_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)
 {
   *osamp = 0;
   /* Help out application and return ST_EOF when drain
@@ -113,7 +113,7 @@
  * Do anything required when you stop reading samples.  
  * If there's nothing to do, use st_effect_nothing instead.
  */
-static int st_skeleff_stop(eff_t effp)
+static int skeleff_stop(eff_t effp)
 {
   return ST_SUCCESS;
 }
@@ -123,7 +123,7 @@
  *      (free allocated memory, etc.)
  * If there's nothing to do, use st_effect_nothing instead.
  */
-static int st_skeleff_delete(eff_t effp)
+static int skeleff_delete(eff_t effp)
 {
   return ST_SUCCESS;
 }
@@ -138,12 +138,12 @@
   "skel",
   "Usage: skel [option]",
   ST_EFF_MCHAN,
-  st_skel_getopts,
-  st_skel_start,
-  st_skel_flow,
-  st_skel_drain,
-  st_skel_stop,
-  st_skel_delete,
+  skeleff_getopts,
+  skeleff_start,
+  skeleff_flow,
+  skeleff_drain,
+  skeleff_stop,
+  skeleff_delete,
 };
 
 /*