ref: ebf04abd3bb19fff8a12cab1516a4fc63db6f272
parent: 72756a9d0f366ef3f531b8e3ee8f04804b98f151
author: Ulrich Klauer <ulrich@chirlu.de>
date: Thu Jan 5 12:00:47 EST 2012
Derive "channels" effect handler from "remix" handler Instead of having a completely separate (but similar) effect handler for "channels" in the source code, use the handler for "remix" and modify only some fields. This makes it clearer which fields change and which don't.
--- a/src/remix.c
+++ b/src/remix.c
@@ -254,10 +254,13 @@
sox_effect_handler_t const * lsx_channels_effect_fn(void)
{
- static sox_effect_handler_t handler = {
- "channels", "number", SOX_EFF_MCHAN | SOX_EFF_CHAN | SOX_EFF_PREC,
- channels_create, channels_start, flow, NULL, closedown, NULL, sizeof(priv_t)
- };
+ static sox_effect_handler_t handler;
+ handler = *lsx_remix_effect_fn();
+ handler.name = "channels";
+ handler.usage = "number";
+ handler.flags &= ~SOX_EFF_GAIN;
+ handler.getopts = channels_create;
+ handler.start = channels_start;
return &handler;
}