Page 1 of 1
Is switching audio tracks through libvlcapi broken in 2.0.5?
Posted: 29 Jan 2013 07:17
by r21514
Worked perfectly 2.0.0-2.0.4, 2.0.5 - not. Did API changed or what ?
Re: Is switching audio tracks through libvlcapi broken in 2.
Posted: 29 Jan 2013 19:57
by Rémi Denis-Courmont
I think it's the other way around. Audio track selection did not work before version 2.0.5.
Re: Is switching audio tracks through libvlcapi broken in 2.
Posted: 04 Feb 2013 14:40
by mangokm40
"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
Re: Is switching audio tracks through libvlcapi broken in 2.
Posted: 04 Feb 2013 17:43
by Rémi Denis-Courmont
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.
Re: Is switching audio tracks through libvlcapi broken in 2.
Posted: 04 Feb 2013 17:56
by mangokm40
"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.