[vlc-devel] how to change stereo to mono

Sukrit Sangwan sukritsangwan at gmail.com
Mon Mar 5 19:07:31 CET 2012


I am new to vlc. I read the code of karaoke filter. It was written set
output to mono.
I have set the output format to mono. Please check if its correct or not.


diff --git a/modules/audio_filter/karaoke.c b/modules/audio_filter/karaoke.c
index 81bc276..709a6a6 100644
--- a/modules/audio_filter/karaoke.c
+++ b/modules/audio_filter/karaoke.c
@@ -72,8 +72,9 @@ static block_t *Process (filter_t *filter, block_t *block)

         *(spl++) = s;
         *(spl++) = s;
-        /* TODO: set output format to mono */
     }
+    filter->fmt_out.audio.i_channels = 1;
+    filter->fmt_out.audio.i_physical_channels = 1;
     (void) filter;
     return block;
 }


Regards
Sukrit Sangwan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120305/a9478e4f/attachment.html>


More information about the vlc-devel mailing list