On Mon, Feb 10, 2020 at 10:45:02PM +0100, Jan Stary wrote:
> I must be missing something obvious.
> How does aucat mix two mono files into one stereo file
> as the left and right channel, respectively?
> 

You have to specify which file goes to which channel,
for instance:

        aucat -n -c 0:0 -i 1.wav -c 1:1 -i 2.wav -c 0:1 -o mix.wav


There is a multi-channel bus. Inputs files (-i) are written to the bus
and output files (-o) are read from the bus. Bus channels are numbered
from 0 to the greatest channel of all files. The per-file -c option
specifies which channels of the bus the file will provide or consume.

> This mixes the two mono files into the left channel,
> leaving the right channel empty:
> 
> $ aucat -n -i 1.wav -i 2.wav -o mix.wav  
> 

Yes, by default '-c 0:0' is assumed for mono files,
so both go to the left one.

> That surprises me; the -j option says:
>       
>       If the flag is off, then each source channel is routed
>       to a single destination channel, possibly discarding channels. 
> 
> Here the -j is off (by default), so 1.wav is routed
> into a single destination channel, namely the left;
> 2.wav is also routed into a single channel: the left.
> Is that intended?
> 

Yes. We want two files specified the same way to be routed to the same
destination (ie file position on the command line shouldn't matter).

> Turning -j on, this mixes each of the two mono files
> into both the left and the right channel of the stereo output:
> 
> $ aucat -j on -n -i 1.wav -i 2.wav -o mix.wav  
> 
> Having -j on,
> 
>       a single source may be sent to multiple destinations
>       and multiple sources may be mixed into a single destination.
> 
> Here, each of 1.wav and 2.wav is indeed sent to multiple destinations,
> namely both the left and right channel of the stereo output. However,
> "multiple sources are mixed into a single destination" even with -j off:
> above, both 1.wav and 2.wav end up in the left channel.
> 

Reply via email to