A few VB questions
OK i currently use Cobra3, since the current trend of software, MediaEngine and AutoPlay and A few others using Flash. I figured why not give it a try.
Well 3 things are begining to drive em nuts.
#1. Grabbing Current Song Playing and have it refresh on song change. I can manually go to next track in playlist and the ShowSongTitle changes BUT if the songs just play thru It is not changing.
#2. I need to make Winamp stay set on "repeat" mode. I can set this in form load BUT if it changes somehow the form load will cut toggle off..
Would some kinda of IF ... THEN do the job?
#3. Displaying Song titles in playlist and having the abilitly to click and play a particualr song. I am using a module that can display playlist contents, Current Title and Complete Filename?
Any help would be appreciated. Just trying to prove to myself I can do it
For #1 - 2: I have an OCX that you might be interested in. It's plays MP3s and does all of the ID3 tag reading automagically. I'm sure you'll notice that winamp will stall for a second when you change songs from you frontend. This will avoid that problem and you won't have to spawn Winamp to play MP3s anymore. PM if you want me to send it to you.
For #3, I used a standard MSFlexGrid to store my playlist. When the program starts, it scans a certain directory and fills the first column with the song artist & title, then fills the second column with the full file name. Even neater is that it'll autosort the list. It is much easier to keep track of what song is playing this way.
Not really much help on the way you're currently doing things, but there are easier ways.
I wrote my own VB app which frontends Winamp to a HD44780 and a numeric keypad via DirectInput, which might be helpful for you.. PM me if you'd like a copy?
You can talk to WinAmp via it's "API", which works by using SendMessage(). There's details on this page:
You can retreive Winamp's playlist by using SendMessage(), request WM_WA_IPC as wMsg, and IPC_WRITEPLAYLIST as lParam. That forces Winamp to write a file called winamp.m3u in it's directory, which is your standard .m3u file and you can parse this into whatever format you like.
You can also tell WinAmp to jump to another track using IPC_SETPLAYLISTPOS.
Winamp can't tell you when it changes track (unless you write a winamp plugin), but you can request WinAmp to give you the current playlist index position (WM_WA_IPC as wMsg, and IPC_GETLISTPOS as lParam). Use a timer to request this every second or so, if it changes, your track's changed.
Unfortuntately i don't think there's an easy way find if Winamp's in repeat mode from an external program...
Hope that's of some use?