Page 1 of 1

forcing custom downmixing?

Posted: 10 Jun 2011 16:46
by bero7
Hi,

I have a short question:

I made my own audio filter but now I would also like to do my own downmixing from 5.1 -> stereo, preferably all in the same audio_filter module.
How can I force the vlc to use my algorithm not float32_mixer or simple_channel_mixer or other..What is the deciding mechanism anyway, sometimes it uses float32 sometimes others?

Thanks!!!!

Re: forcing custom downmixing?

Posted: 10 Jun 2011 21:58
by Rémi Denis-Courmont
The float32 mixer is not a channel mixer, it's a track mixer and software volume. You should really leave that alone.

As for the channel mixer, the plugin needs a higher priority for the "audio filter" capability, so that it gets probed first.

Re: forcing custom downmixing?

Posted: 14 Jun 2011 09:38
by bero7
Great. Thank You.
But is there some kind of signalling that my plugin is "downmix capable" or is it automatically? How will it know that it can use this one for downmixing?

Re: forcing custom downmixing?

Posted: 14 Jun 2011 09:49
by Rémi Denis-Courmont
You need to check the channels in the input and output formats.

Re: forcing custom downmixing?

Posted: 14 Jun 2011 16:25
by bero7
hm..I set the priority to ("audio filter", 10) just like simple_channel_mixer...If the priority is different then it just takes simple_channel_mixer. But with priority set to 10 I get silence cause it says it cannot find a filter for conversion.

myFilter warning: input and output formats are not similar
main debug: no audio filter module matching "any" could be loaded
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main error: couldn't find a filter for the conversion
main error: couldn't set an input pipeline

What do you mean by check the channels in the input and output format? what action is necessary

thanks

Re: forcing custom downmixing?

Posted: 15 Jun 2011 14:41
by bero7
I guess the question is how do I get my formats to be the same?

Re: forcing custom downmixing?

Posted: 15 Jun 2011 15:01
by Rémi Denis-Courmont
If the input and output formats are identical, then the input and output channels maps are identical, then there is no point in downmixing to begin with. Thus your question makes no sense.

Re: forcing custom downmixing?

Posted: 15 Jun 2011 15:37
by bero7
ah, I didn't know that AOUT_FMT_SIMILAR checks only i_rate and channel numbers :shock: and so I left it from my previous filter implementation...I should be more careful.

thank you