Le tridi 13 germinal, an CCXX, Clément Bœsch a écrit :
Adding the levels, it begins to look a bit insane IMO.
That is a bit exaggerated, but I grant you it is somewhat overly verbose.
Maybe the "mix" filter could be added in the "pan" one, so it could use the internals?
Possibly. Another, IMHO cleaner solution, would be to tweak the parser to be able to write: pan=stereo:mix=0.4+0.6 and it would automatically fill the matrix as if the coefficients have been given as "stereo:c0=0.4*c0+0.6*c2:c1=0.4*c1+0.6*c3". A kind of macro-expansion, in fact (but IMHO, simpler written avoiding text operations).
(A pan cmd line could be generated in the mix init func and use amerge callbacks)
I am not sure what you mean, but it looks fragile and ad-hoc. Ad-hoc is my main problem with this patch: Matthieu wrote it for the case he needs to solve, but it stops working on most other case. For example mixing a mono commentary on a stereo music will not work. Adding a special case for a very common need is ok, of course, but I do not believe that mixing with the same channel layout is that much more common than mixing with different layouts, or mixing from more than two streams. Regards, -- Nicolas George