Winamp plugin question

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Winamp plugin question

Post by Sagz »

how do you set a control to track advance when playing a playlist?



I've tried +1 in the playlist song number but that doesn't seem to do anything.
mike37931
Member
Posts: 2
Joined: Sun Apr 06, 2003 9:50 pm

Post by mike37931 »

Hi,

Code: Select all

2.3 WM_USER Messages

WM_USER messages are sent using SendMessage(). In C/C++, you can send these messages by calling:


code:--------------------------------------------------------------------------------
int ret=SendMessage(hwndWinamp,WM_USER, data, id);
--------------------------------------------------------------------------------


data is used by many of the messages, but not all. For messages where the meaning of data is not defined, simply use 0.

Here is a list of the currently supported ids that you can use from within Winamp plug-ins or from other applications (see plug-in only WM_USER messages, below, for more):



0 Retrieves the version of Winamp running. Version will be 0x20yx for 2.yx. This is a good way to determine if you did in fact find the right window, etc. 
100 Starts playback. A lot like hitting 'play' in Winamp, but not exactly the same 
101 Clears Winamp's internal playlist. 
102 Begins play of selected track. 
103 Makes Winamp change to the directory C:\\download 
104 Returns the status of playback. If 'ret' is 1, Winamp is playing. If 'ret' is 3, Winamp is paused. Otherwise, playback is stopped. 
105 If data is 0, returns the position in milliseconds of playback. If data is 1, returns current track length in seconds. Returns -1 if not playing or if an error occurs. 
106 Seeks within the current track. The offset is specified in 'data', in milliseconds. 
120 Writes out the current playlist to Winampdir\winamp.m3u, and returns the current position in the playlist. 
121 Sets the playlist position to the position specified in tracks in 'data'. 
122 Sets the volume to 'data', which can be between 0 (silent) and 255 (maximum). 
123 Sets the panning to 'data', which can be between 0 (all left) and 255 (all right). 
124 Returns length of the current playlist, in tracks. 
125 Returns the position in the current playlist, in tracks (requires Winamp 2.05+). 
126 Retrieves info about the current playing track. Returns samplerate (i.e. 44100) if 'data' is set to 0, bitrate if 'data' is set to 1, and number of channels if 'data' is set to 2. (requires Winamp 2.05+) 
127 Retrieves one element of equalizer data, based on what 'data' is set to.
0-9 The 10 bands of EQ data. Will return 0-63 (+20db - -20db) 
10 The preamp value. Will return 0-63 (+20db - -20db) 
11 Enabled. Will return zero if disabled, nonzero if enabled. 
128 Autoload. Will return zero if disabled, nonzero if enabled. To set an element of equalizer data, simply query which item you wish to set using the message above (127), then call this message with data 
129 Adds the specified file to the Winamp bookmark list 
135 Restarts Winamp 



Not sure if this is the info you are looking for. You can get the value from 125 (current playlist position) then add 1 and use 121 to set current playlist position. This comes from http://forums.winamp.com/showthread.php ... did=180297.



If you want to discuss more, repost in the MDN if are a member or the Meedio\addins\plugins forum. Better to keep the forums organized.
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Post by Sagz »

Well, I think your information pertains to someone who maybe writing a plugin, where as I am merely a user of the current one in housebot. Thanks though!



I guess my question is does the current Winamp plugin provide a mechanism to track forward through a playlist?
mike37931
Member
Posts: 2
Joined: Sun Apr 06, 2003 9:50 pm

Post by mike37931 »

Oooops, my bad. I'm starting to write a plugin myself and I guess I just have it on my brain. I didn't even know Housebot had a Winamp plugin (not a current user).



Sorry,



Mike
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Winamp plugin question

Post by ScottBot »

Sagz wrote:how do you set a control to track advance when playing a playlist?

I've tried +1 in the playlist song number but that doesn't seem to do anything.
Use +=1 instead of +1.
Scott
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Post by Sagz »

Thank you Sir!!
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Post by Sagz »

hmmmm tried that just now and it does nothing... I might be missing something



the properties of the control button I have are as follows:



Device: Winamp

Property: Play List Song Number

Value: +=1



I've also tried

Value: =+1



incase yours was a typo.... Any ideas?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It should be "+=1" (no quotes).



After you press the button, look in the history tab for the Playlist Song Number property and see if it tries to change it at the server.



Also, if you look at the WinAmp sample config on the playlist tabs, you will see 'prev track' and 'next track' buttons that demonstrate this.
Scott
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Post by Sagz »

ScottBot wrote:It should be "+=1" (no quotes).

After you press the button, look in the history tab for the Playlist Song Number property and see if it tries to change it at the server.

Also, if you look at the WinAmp sample config on the playlist tabs, you will see 'prev track' and 'next track' buttons that demonstrate this.


Hmmm I don't see the WinAmp sample config or the playlist tabs... is that on the Sample theme or am I looking in the wrong place... should I re-install housebot?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

If you install the WinAmp sample configuration that I listed in my PM response to you, you'll see what I'm talking about.



To install the sample, drag and drop the config sample file on HouseBot and then restart it.
Scott
Sagz
Member
Posts: 12
Joined: Tue Jul 20, 2004 8:56 pm
Location: OKC, OK
Contact:

Post by Sagz »

Doh! I'm a tard! didn't see the link in your PM! I'll go over this! Thanks again!
JManITPro
Member
Posts: 2
Joined: Sun Oct 31, 2004 4:59 pm

Post by JManITPro »

Where can I get a copy of the WinAmp configuration sample? Can someone post it or send it to me please?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

JManITPro wrote:Where can I get a copy of the WinAmp configuration sample? Can someone post it or send it to me please?
I've attached the WinAmp sample to this post (make sure you're logged in to see it).
Scott
JManITPro
Member
Posts: 2
Joined: Sun Oct 31, 2004 4:59 pm

Post by JManITPro »

Thanks for the quick reply!



Everything is working great now!
Post Reply