[vlc-devel] karaoke filter

郭宇宏 yuhong.guo68 at gmail.com
Fri Apr 15 03:07:43 CEST 2011


thanks, i see the karaoke filter should work at least there're two channels.

and if you have some opinion on the sweep filter

2011/4/14 Ilkka Ollakka <ileoo at videolan.org>

> On Thu, Apr 14, 2011 at 11:00:31PM +0800, 郭宇宏 wrote:
> > Yes, i check the problem of the filter.
>
> > And i made a new patch of the filter *karaoke and sweep.*
>
> Hi,
>
> > From 6e85c56990a90f84049485f03942bd8c224d2852 Mon Sep 17 00:00:00 2001
> > From: yuhong <yuhong.guo at gmail.com>
> > Date: Thu, 14 Apr 2011 22:56:08 +0800
> > Subject: [PATCH] karaoke and sweep audio filters
>
> > + * DoWork : Do karaoke filter
> > +
> *****************************************************************************/
> > +static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
> > +{
> > +   int i, i_chan;
> > +   int i_samples = p_in_buf->i_nb_samples/4;
> > +   int i_channels = aout_FormatNbChannels( &p_filter->fmt_in.audio );
> > +   float *p_in =  (float*)p_in_buf->p_buffer;
> > +
> > +   /* filter calculation */
> > +   for( i = 0; i < i_samples; i+=i_channels) {
> > +          p_in[i] = (p_in[i] - p_in[i+1]) * 0.7;
> > +          p_in[i+1] = p_in[i];
> > +   }
>
> What if theres only mono channel? your code seems to assume that theres
> allways atleast two channels.
>
> --
> Ilkka Ollakka
> A penny saved is ridiculous.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110415/6fc890ff/attachment.html>


More information about the vlc-devel mailing list