Number of channels of current audio track

This forum is about all development around libVLC.
ppcat
Blank Cone
Blank Cone
Posts: 13
Joined: 12 Feb 2015 11:16
VLC version: 2.1.5
Operating System: Windows 7
Contact:

Number of channels of current audio track

Postby ppcat » 28 Jul 2015 14:23

I have some application:

Code: Select all

const char *params[] = { "--ignore-config", }; vlcInstance = libvlc_new(sizeof(params) / sizeof(params[0]), params); player = libvlc_media_player_new(vlcInstance); libvlc_media_t* media = libvlc_media_new_path(vlcInstance, (const char*)ccName); libvlc_media_player_set_media(player, media); // and so on...
How can i get number of channels of the current audiotrack (mono, stereo, quadro, ...)?

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: Number of channels of current audio track

Postby sherington » 28 Jul 2015 19:53

Start here:

https://www.videolan.org/developers/vlc ... 07e0e80f02

Use libvlc_media_tracks_get. You then iterate the returned structure to get a libvlc_media_track_t:

https://www.videolan.org/developers/vlc ... ck__t.html

And finally when you find an audio track:

https://www.videolan.org/developers/vlc ... ck__t.html

This structure has the number of channels.

ppcat
Blank Cone
Blank Cone
Posts: 13
Joined: 12 Feb 2015 11:16
VLC version: 2.1.5
Operating System: Windows 7
Contact:

Re: Number of channels of current audio track

Postby ppcat » 29 Jul 2015 13:34

Thanks, it helped me.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests