ref: 05ac00e00968ae0a1fde4f81ef11b847d58450d1
parent: 719cb10be146193e7e0b563da480e6a0c0de0418
author: cbagwell <cbagwell>
date: Wed Jan 26 22:04:41 EST 2000
Applying small cosmetic fixes.
--- a/sox.1
+++ b/sox.1
@@ -506,7 +506,7 @@
Reduce the number of channels by averaging the samples,
or duplicate channels to increase the number of channels.
This effect is automatically used when the number of input
-samples differ from the number of output channels. When reducing
+channels differ from the number of output channels. When reducing
the number of channels it is possible to manually specify the
avg effect and use the \fI-l\fR and \fI-r\fR options to select only
the left or right channel for the output instead of averaging the
--- a/src/avg.c
+++ b/src/avg.c
@@ -65,6 +65,13 @@
int st_avg_start(effp)
eff_t effp;
{
+ if ((effp->ininfo.channels == effp->outinfo.channels) ||
+ effp->outinfo.channels == -1)
+ {
+ fail("Output must have different number of channels to use avg effect");
+ return(ST_EOF);
+ }
+
switch (effp->outinfo.channels)
{
case 1: switch (effp->ininfo.channels)