how to play specific track in playlist? |
This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).
![]() ![]() |
how to play specific track in playlist? |
Mar 25 2012, 05:37
Post
#1
|
|
|
Group: Members Posts: 13 Joined: 18-August 11 Member No.: 93119 |
How to start new track with given playlist index and item index?
I know how to play certain playlist plm->set_playing_playlist(playlist_index); But can't find one for track. Thanks! |
|
|
|
Mar 25 2012, 09:31
Post
#2
|
|
|
Group: Developer Posts: 161 Joined: 2-June 09 Member No.: 70332 |
Try:
CODE plm->playlist_execute_default_action( playlist_id, item_id ); HTH |
|
|
|
Mar 25 2012, 10:14
Post
#3
|
|
|
Group: Members Posts: 13 Joined: 18-August 11 Member No.: 93119 |
Thanks but I can't get it work.
plm->playlist_execute_default_action(playlist_index, item_index); pbc->start(); It can start to play given playlist but not specified item, just start to play recently played one. What did I do wrong? |
|
|
|
Mar 25 2012, 10:52
Post
#4
|
|
|
Group: Developer Posts: 161 Joined: 2-June 09 Member No.: 70332 |
You don't need to call pbc->start(). You're probably not passing valid indices to playlist_execute_default_action(), try something very simple. (calling pbc->start() will just restart the currently playing track, which sounds like what you're experiencing).
An alternative way of playing a track would be: CODE plm->playlist_set_focus_item( playlist_id, item_id ); pbc->start(); |
|
|
|
Mar 25 2012, 12:57
Post
#5
|
|
|
Group: Members Posts: 13 Joined: 18-August 11 Member No.: 93119 |
thanks!!
It's wired that it works with only "playlist_execute_default_action" --- bad --- plm->playlist_execute_default_action(playlist_index, item_index); pbc->start(); ------------- -- good --- plm->playlist_execute_default_action(playlist_index, item_index); ------------- why?? |
|
|
|
Mar 25 2012, 13:09
Post
#6
|
|
|
Group: Members Posts: 13 Joined: 18-August 11 Member No.: 93119 |
nonono~~
It doesn't work for "playlist index"!! I'm confusing! The only way I can make it work is... plm->set_active_playlist(playlist_index); plm->playlist_execute_default_action(playlist_index, item_index); ????? |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 11:10 |