Old 1st December 2002, 10:15   #1
Junior Member
Join Date: Dec 2002
Posts: 1
How to replace use of WinAmp 2 API

I've previously made an application that used Winamp to play songs and so. That is, my application launched winamp and told it what to play, when to play etc.
For this I used the hwnd API in Winamp 2, but now with Winamp 3 this have been removed.
How do I 'remote control' Winamp 3 from my application? I am aware of the plugin someone is developing that gives me some of the functionality, but I would prefer not to use it. Partly because it doesn't give me all the functionality I had with the API.
Anyone who can give me a short intro or a URL where I can read how to do this?
Thanks alot
posselt is offline  
Old 1st December 2002, 11:12   #2
Junior Member
C|ty_Hunter's Avatar
Join Date: Sep 2002
Location: Italy
Posts: 5
Since I'm making some sort of remote controlling Winamp from another application, I had your same trouble.

Basically (and I guess the winamp 2.x compatibility plug-in does the same), you create an "oldwinamp" Win32 window in your component, which receives SendMessages from your external application and processes them in its window procedure. Then you can assign messages received to whatever they did in the old days, for example a play message would call core->play() and so on.

Problem is, up to now I don't think it's possible to replicate the entire API, expecially for remote controlling purposes. I'm stuck when it comes to load files or urls, since SelectFile (which would be the Wasabi way to pick files) doesn't show properly (since Winamp is not the active application, as you're remotely controlling it from another program). More, making a Win32 GetOpenFileName to retrieve file names to be played has brought my Winamp 3 to total destruction (assertion failed on successive loading of the player, I had to reinstall it).

This is my experience with remote controlling, I hope someone in the forum will be able to tell you more.
C|ty_Hunter is offline  
Old 2nd December 2002, 16:11   #3
Monkey Hump Master
Brennan's Avatar
Join Date: Apr 2000
Posts: 782
If you're using a developer build (> 489 or so) you can just run "winamp3.exe /action=play" to hit PLAY. Other actions include "prev,next,stop,pause". Make sure "allow multiple instances" is OFF, though.

I'm gonna post the source to my ATI Remote Wonder plugin when I get the chance, it works in this way.

Brennan is offline  
Old 9th May 2003, 19:28   #4
Junior Member
Join Date: Sep 2002
Location: UK
Posts: 3
Is there a vol up and vol down alternative to this?
krazywest is offline  
Old 22nd May 2003, 22:08   #5
Monkey Hump Master
Brennan's Avatar
Join Date: Apr 2000
Posts: 782
I think the format is "/action=volume,n", where n can be "+5" or "-8" or whatever. It's all relative to current volume.

Brennan is offline  
Go Back   Winamp & Shoutcast Forums > Winamp3 > Wasabi Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump