To be honest, I haven't any knowledge in C++.
I have "brief notions" of Delphi and C# so I am mostly guessing what does what through the code.
With luck, I might have something that compiles C++ in one of my cds.
with MusicWin.cpp, I just added the album related lines to his method, but I have no idea where the "getMetainfo" field parameter actually works and if it will recognize "album" as a valid information.
static int GetWinampInfo(ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[])
{
HWND hwWinamp;
long position;
long playState;
char artist[1024]={'\0'};
char title[1024]={'\0'};
char file[1024]={'\0'};
char album[1024]={'\0'};
Tcl_Obj *output = Tcl_NewListObj(0,NULL);
Tcl_SetObjResult(interp,output);
if((hwWinamp=FindWindow("Winamp v1.x",NULL))==NULL){ //WinAmp isn't launched so we say it's stopped
Tcl_ListObjAppendElement(interp,output,Tcl_NewIntObj(0));
return TCL_OK;
}
//Get the playing status
playState=(LONG)SendMessage(hwWinamp,WM_WA_IPC,0,IPC_ISPLAYING);
//Get the postion in the play list
position=SendMessage(hwWinamp,WM_WA_IPC,0,IPC_GETLISTPOS);
//Get informations about the filename
getFileName(hwWinamp,position,file,sizeof(file));
getMetaInfo(hwWinamp,file,"ARTIST",artist,sizeof(artist));
getMetaInfo(hwWinamp,file,"title",title,sizeof(artist));
getMetaInfo(hwWinamp,file,"album",album,sizeof(artist));
//Put informations on the output :
//Status
//Artist
//Title
//File
Tcl_ListObjAppendElement(interp,output,Tcl_NewIntObj(playState));
Tcl_ListObjAppendElement(interp,output,Tcl_NewStringObj(title,-1));
Tcl_ListObjAppendElement(interp,output,Tcl_NewStringObj(artist,-1));
Tcl_ListObjAppendElement(interp,output,Tcl_NewStringObj(file,-1));
Tcl_ListObjAppendElement(interp,output,Tcl_NewStringObj(album,-1));
return TCL_OK;
}
In music.tcl I am also making a silly guess about adding lines for album info,
but again I have no idea of which part the tcl file plays in the greater scheme.
###############################################
# ::music::GetSongWinamp #
# ------------------------------------------- #
# Gets the current playing song in WinAmp #
###############################################
proc GetSongWinamp {} {
variable musicpluginpath
load [file join $musicpluginpath MusicWin.tmp]
set tmplst [::music::TreatSongWinamp]
set status [lindex $tmplst 0]
set song [lindex $tmplst 1]
set art [lindex $tmplst 2]
set path [lindex $tmplst 3]
set alb [lindex $tmplst 4]
if {$status == "0"} {
return 0
}
return [list $song $art $path $alb "" ""]
}