Is switching audio tracks through libvlcapi broken in 2.0.5?

This forum is about all development around libVLC.
r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Is switching audio tracks through libvlcapi broken in 2.0.5?

Postby r21514 » 29 Jan 2013 07:17

Worked perfectly 2.0.0-2.0.4, 2.0.5 - not. Did API changed or what ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15228
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is switching audio tracks through libvlcapi broken in 2.

Postby Rémi Denis-Courmont » 29 Jan 2013 19:57

I think it's the other way around. Audio track selection did not work before version 2.0.5.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: Is switching audio tracks through libvlcapi broken in 2.

Postby mangokm40 » 04 Feb 2013 14:40

"Worked perfectly 2.0.0-2.0.4, 2.0.5 - not. Did API changed or what ?"

I am also having an issue. In 2.0.5, libvlc_audio_set_track() is returning 0, even when it fails to change the audio track. It also fails to change to track 0.
In a situation with where libvlc_audio_get_track_count() tells me there are 3 tracks, I get the following:
libvlc_audio_set_track(media_player, -6) ; // returns 0, no change in track
libvlc_audio_set_track(media_player, 2) ; // returns 0, current track becomes track #2
libvlc_audio_set_track(media_player, 1) ; // returns 0, current track becomes track #1
libvlc_audio_set_track(media_player, 0) ; // returns 0, no change in track
libvlc_audio_set_track(media_player, 3) ; // returns 0, no change in track
libvlc_audio_set_track(media_player, 5) ; // returns 0, no change in track

Rémi Denis-Courmont
Developer
Developer
Posts: 15228
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is switching audio tracks through libvlcapi broken in 2.

Postby Rémi Denis-Courmont » 04 Feb 2013 17:43

Hmm, in fact the return value is undefined on error in version 2.0.5. That will be fixed in 2.0.6. In the mean time, you'd have to check libvlc_audio_get_track() if you need to check for errors... Other than that, it should work just fine.

Make sure you are using the correct track ID.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: Is switching audio tracks through libvlcapi broken in 2.

Postby mangokm40 » 04 Feb 2013 17:56

"Hmm, in fact the return value is undefined on error in version 2.0.5. That will be fixed in 2.0.6. In the mean time, you'd have
to check libvlc_audio_get_track() if you need to check for errors"
Thank you. I will do that.

"Other than that, it should work just fine. Make sure you are using the correct track ID."
OK, thanks. It appears that a change was made and the "Disable" track is now -1, instead of 0. I'll adjust accordingly.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 29 guests