Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: how to play specific track in playlist? (Read 2394 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to play specific track in playlist?

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!

how to play specific track in playlist?

Reply #1
Try:
Code: [Select]
plm->playlist_execute_default_action( playlist_id, item_id );

HTH

how to play specific track in playlist?

Reply #2
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?

how to play specific track in playlist?

Reply #3
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: [Select]
plm->playlist_set_focus_item( playlist_id, item_id );
pbc->start();


how to play specific track in playlist?

Reply #4
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??

 

how to play specific track in playlist?

Reply #5
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);

?????