View Single Post
Old 3rd October 2009, 08:06   #2
Join Date: Sep 2003
Posts: 27,873
the api_playlistmanager/ifc_playlist stuff isn't used for the main playlist editor (as you appear to be working on). they're more aimed at playlist handling in the media library though i think they can be applied to arbitary playlists but that then requires you to save the current winamp playlist/manipulate winamp.m3u(8) and then re-load that back into the player.

for doing a randomise on load, you'd be best subclassing the winamp hwnd and then doing a PostMessage(..) of a custom message (ideally using IPC_REGISTER_WINAMP_IPCMESSAGE to generate that) and then when you receive that it is likely that Winamp should have loaded fully (or at least as much as is needed to have the playlist fully loaded). then you can randomise the playlist.

now for the randomising of the playlist you could use Winamp's standard randomise playlist action which can be initiated by sending the randomise playlist menu id to the playlist editor window (the hwnd for that can be accessed via IPC_GETWND) as a WM_COMMAND message in the PostMessage(..) handler mentioned above.

DrO is offline   Reply With Quote