PDA

View Full Version : Change playlist entry being played


crack1ty
3rd January 2004, 05:50
OK either I am just being really stupid or the lack of sleep has gotten to me but this is starting to frustrate me.

My plugin is just about finished, I just need to get it to actually switch tracks.

What is the best way to change the track being played given the index in the playlist?

SendMessage(hwnd_winamp,WM_WA_IPC, index, 121); will change the selected track but I cannot figure out how to actually play it without wiping out the playlist

Any help would be great.

(My plugin is a clone of Quicktracks for QCD, but from what I can tell, seems to load faster, and is more configurable)

crack1ty
9th January 2004, 02:49
OK I found a hacked way to do it but is there a better way to do this?

SendMessage(hwnd_winamp,WM_WA_IPC, index, 121); /* set spot */
PostMessage(hwnd_winamp, WM_COMMAND, 40047, 0); /* stop */
PostMessage(hwnd_winamp, WM_COMMAND, 40045, 0); /* start */


now this isnt too bad for when the user has my plugin set at play on select but when the user has selected enqueue, I get a little bit of a pause between songs as it stops start etc.

You can intercept a signal saying that the current song is finished in the input plugin, is there a way to mimick winamp by sending the next song to the input plugin instead of stopping and starting? (Then this could make crossfading and stuff work better etc).

Thanks