Re: Reason for sox mix restriction to two or more input files?

Jeremy Nicoll - ml sox users <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
On 2019-08-09 20:42, Dr. Thomas Tensi wrote:
> Dear all,
> 
> 
> I am using sox for automatic, scripted file generation.
> 
> One step is a mix of several input files.  It may happen
> that - by configuration - only a single input file remains
> for that mixing step.
> 
> This cannot be handled by sox, because sox _requires_
> at least two input files and quits with the message
>   "Not enough input filenames specified"
> 
> I understand that at least one input file is necessary
> (for finding the target length, sample rate etc.), but
> why does sox fail when mixing a single input file?

Probably because it's simpler to write programmes that assume
the user means what they say.  So if you ask sox to mix several
files, it is written assuming that you will provide more than
one.

You say you're using a script to drive this.  That means you are
in control.  Your script can - surely - determine that there's
only one input file and adjust the sox command(s) you're using
accordingly.


-- 
Jeremy Nicoll - my opinions are my own
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.