libvlc_audio_set_channel help

This forum is about all development around libVLC.
anhlunnhaque
Blank Cone
Blank Cone
Posts: 18
Joined: 01 Sep 2006 21:36

libvlc_audio_set_channel help

Postby anhlunnhaque » 11 Nov 2010 00:09

Hello,

I am trying to toggle the libvlc_audio_set_channel from Left to Right in C#. But I am not sure I understands the vlc documents correctly. It says

libvlc_audio_set_channel (libvlc_media_player_t *p_mi, int channel)
Set current audio channel.

But isn't channels are L or R? but the parameter is an int for channel. So how can pass L or R for Left or Right channel respectively to it if it's asking for an int?

This is what I current have:

Code: Select all

[DllImport("libvlc", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] [SuppressUnmanagedCodeSecurity] public static extern int libvlc_audio_set_channel(IntPtr libvlc_mediaplayer, int i_channel);

calanor
Blank Cone
Blank Cone
Posts: 50
Joined: 08 May 2010 19:36

Re: libvlc_audio_set_channel help

Postby calanor » 15 Nov 2010 00:40

From http://www.videolan.org/developers/vlc/ ... audio.html

Code: Select all

Audio channels. Enumerator: libvlc_AudioChannel_Error libvlc_AudioChannel_Stereo libvlc_AudioChannel_RStereo libvlc_AudioChannel_Left libvlc_AudioChannel_Right libvlc_AudioChannel_Dolbys
And a question.
Its possible the mute of only one channel ( L or R ) ?

anhlunnhaque
Blank Cone
Blank Cone
Posts: 18
Joined: 01 Sep 2006 21:36

Re: libvlc_audio_set_channel help

Postby anhlunnhaque » 15 Nov 2010 06:37

@calanor

Do you mind post a snippet code on how to use it? I want to hear only my Right channel. How do I use libvlc_AudioChannel_Right ??

Thanks!

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: libvlc_audio_set_channel help

Postby sherington » 15 Nov 2010 11:00

Isn't it something like:

Code: Select all

libvlc_audio_set_channel(mediaplayer, libvlc_audio_output_channel_t.libvlc_AudioChannel_Right);
The second int parameter is simply obtained from the enum.

(I'm a Java person so the syntax above may not be 100% correct, but you get the idea.)

anhlunnhaque
Blank Cone
Blank Cone
Posts: 18
Joined: 01 Sep 2006 21:36

Re: libvlc_audio_set_channel help

Postby anhlunnhaque » 16 Nov 2010 06:27

sorry, I am not sure I get the idea. Does anybody knows how to do this??

Anybody??

jacobs1
Blank Cone
Blank Cone
Posts: 33
Joined: 03 Oct 2011 16:11

Re: libvlc_audio_set_channel help

Postby jacobs1 » 16 Feb 2012 07:34

I know it is an old topic, but has anyone managed to set the channel from .net ? how ?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests