![]() |
#1 |
Junior Member
Join Date: Nov 2005
Posts: 11
|
looking for the artist/song of currently playing file
I'm working on a plugin and I have gotten it to run but I havent gotten it to do what I want it to do. Basically, I'm totally new to winamp plugin writing and dont know where to go next.
I'm looking to get the song title and artist from whatever file is playing. Where would I find this? is their a struct that gets this info or is it something I have to set up? A point in the right direction would be wonderful. Thanks. |
![]() |
![]() |
![]() |
#2 |
Join Date: Sep 2003
Posts: 27,873
|
taken from the modified wa_ipc.h
code: that can be used (with 5.x) to query the artist and title as needed. the current song is obtained with char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE); -daz |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Nov 2005
Posts: 11
|
Thanks a bunch for the help. I got it compiling again but winamp crashes when I try and use the "char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);"
I had to change the hwnd to plugin.hwndParent cause I thought I remember reading somewhere that they are used the same way and the template I had used hwndParent. If I am wrong about that please let me know. Thanks again. EDIT: I just thought of something. Would it be a problem if nothing is being played at the time? When I first open winamp, nothing is being played so that may be causing the crash. |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Nov 2005
Posts: 11
|
I get everything basically working. I've learned a lot in the past day or so. I'm still having one very strange problem.
The first time I get all the info from the mp3 it works great. When the next song starts or I click a new song the info I get back is garbage. Does the code above only work for a 1 time deal? or maybe I'm doing somethign completely wrong. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|