[vlc-devel] Plugin downmix-to-stereo

Martin Zuther code at mzuther.de
Tue Feb 28 22:45:00 CET 2012


Dear Jean-Baptiste,

thanks for your fast answer!  I have updated the attached code as follows...

>> >  +#include<vlc_block.h>
> Unnecessary include.

Removed.

>> >  +vlc_module_begin()
> Please reindent!
> And same for options.

Done.

>> >  +    p_sys->i_output_channel_left = var_CreateGetInteger(p_filter->p_parent,
>> >  +                                   "downmix2stereo-output-channel-left");
> var_InheritInteger is not ok for you?

I simply copied most of the code from "simple.c" and "mono.c".  But 
"var_Inherit..." works just as fine, so I have updated my code to that.

>> >  +        return -1;
> Please return VLC_EGENERIC;

Done.

>> >  +        msg_Info(p_filter, "detected compatible audio channel format");
> Info? really?

Whoops, missed that one.  Changed it to "msg_Dbg".  I'd like to keep the 
message in, though, as it might help the user when he's trying to 
troubleshoot audio issues.

>> >  +    return 0;
> Please use VLC_SUCCESS

Done.

Now to your questions...

 >> >  +#define DOWNMIX_MAX_OUTPUT_CHANNELS  6
 > Why not 8, btw?

Right now, the channel mixer only supports 5.x audio, so the maximum 
number of processed channels is six.  This means internal channels, not 
the ones of your audio card, so I thought six channels should be 
nought... :)

 > 6.1 and 7.1 are hard to do?

I thought of doing that, but haven't yet found an official 
downward-mixing matrix for those.  If anyone can point me to such a 
matrix, I'll add it, of course.

Best regards,

Martin
-- 
www.mzuther.de
www.radix-musik.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: downmix_to_stereo.c
Type: text/x-csrc
Size: 16263 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120228/e9061b13/attachment.c>


More information about the vlc-devel mailing list