View Single Post
Old 24th September 2009, 21:19   #178
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally posted by TheSaw
Dipso I have no idea about the WA api either, I just ask for information when the timer fires
code:
#define IPC_CB_MISC 603
#define IPC_CB_MISC_TITLE 0 // start of playing/stop/pause
#define IPC_CB_MISC_VOLUME 1 // volume/pan
#define IPC_CB_MISC_STATUS 2 // start playing/stop/pause/ffwd/rwd
#define IPC_CB_MISC_EQ 3
#define IPC_CB_MISC_INFO 4
#define IPC_CB_MISC_VIDEOINFO 5
#define IPC_CB_MISC_TITLE_RATING 6 // (5.5+ for when the rating is changed via the songticker menu on current file)

/* Example of using IPC_CB_MISC_STATUS to detect the start of track playback with 5.x
**
** if(lParam == IPC_CB_MISC && wParam == IPC_CB_MISC_STATUS)
** {
** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING) == 1 &&
** !SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETOUTPUTTIME))
** {
** char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);
** // only output if a valid file was found
** if(file)
** {
** MessageBox(hwnd_winamp,file,"starting",0);
** // or do something else that you need to do
** }
** }
** }
*/

there are also some other notifications in the 3xxx range in wa_ipc.h

-daz
DrO is offline   Reply With Quote