Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 31st January 2004, 08:50   #1
DrLobo
Junior Member
 
Join Date: Sep 2001
Location: France
Posts: 47
Topic for Delphi plugin developers

Hi,

the aim of this topic is to gather knowledge about plugin development with Delphi.

You can find some code by browsing this forum, but I never found a complete example on how a delphi plugin should be.

Here some code that could be useful to start:

tutorial for a general plugin:
www.sntd.de
This is one is old (2000!) and based on winamp 2.x api but works.

One of the most intersting thing, was the translation of winamp 2.9.x api by Saivert:

Quote:
I have ported (or, actually translated) the C/C++ code and headers from the WA 2.9x SDK to Object Pascal (for use with Borland Delphi).

A little about the so-called skin SDK:
What you actually get when you download the above Winamp 2.9x SDK is two headers.
One called wa_ipc.c (wa_ipc.pas in my ZIP).
And one called wa_dlg.h (wa_dlg.pas in my ZIP). So to make your plugin window look like the rest of Winamp's window you must implement a lot of the code that is in wa_dlg.h. When you write your Window Procedure you must pass the hwnd, msg, wParam and lParam to a function called "WADlg_handleDialogMsgs". Like this:

function LRESULT myWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
int a=WADlg_handleDialogMsgs(hwnd, uMsg, wParam, lParam); if a > 0 return a;
switch uMsg
{
case WM_DISPLAYCHANGE:
WADlg_init(hwnd);
// Do other stuff here
}
}
delphiwa29xsdkbysaivert.zip

but I never found how to use it...


If somebody could create a very simple general plugin with the new api (and with skinned,dockable windows), I think it will help a lot of people (and me the first!).
DrLobo is offline   Reply With Quote
Old 4th February 2004, 17:00   #2
DrLobo
Junior Member
 
Join Date: Sep 2001
Location: France
Posts: 47
Noboby using Delphi here ?

Another useful post by Saivert :
How to add a form into winamp preferences window
DrLobo is offline   Reply With Quote
Old 20th February 2004, 09:55   #3
Ikarus7
Senior Member
 
Ikarus7's Avatar
 
Join Date: Apr 2003
Posts: 286
DrLOBO !!!
good that i found you. i hope youre still active. i want to build a delphi plugin, but im not VERY good in delphi, but i learn fast.
i have my form, completely working, the ponly thin i need now is :
build it into winamp. i want an dll out of the exe, i want to have it running without beeing seen.

can you help me ?
Ikarus7 is offline   Reply With Quote
Old 23rd February 2004, 07:39   #4
DrLobo
Junior Member
 
Join Date: Sep 2001
Location: France
Posts: 47
have a look there http://members.***********/files_saiv...winampdev.html

the nxs balloon tip project is a delphi one,it could help you.
DrLobo is offline   Reply With Quote
Old 23rd February 2004, 14:32   #5
Ikarus7
Senior Member
 
Ikarus7's Avatar
 
Join Date: Apr 2003
Posts: 286
i made it. (look at my signature )
thanks !
Ikarus7 is offline   Reply With Quote
Old 28th February 2004, 07:13   #6
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
When I wrote the first stuff about skinned/docked windows when using Delphi, I didn't realize how much work it really was. I have done most of the work in C++, and have created a new version of NxS Balloon Tip which is written in C++.

Check out WinampDev site!

I don't think you should use Delphi when making stuff for Winamp. It is in fact much easier to do it in plain C++. By using MS Visual C++ for example you can create a smaller plugin file. Borland Delphi tend to create very large EXE and DLL files and you will have to make huge hacks to integrate Delphi's Forms in e.g. the Preferences Page.

It is easy to embed a Delphi Form in a skinned window created by the use of IPC_GETEMBEDIF and calling the returned function pointer from Winamp, but when you need to "owner-draw" all your buttons and color the edit boxes, list boxes and labels using the code in wa_dlg.pas you will get stuck.

You can ofcourse use Delphi if you create your windows and buttons like we all did before. That is: Calling CreateDialog() and CreateWindow() and setting up a indow Procedure (this is handled in Forms using events).
But then you can use C++ anyway since you loose the simplyness with Forms and events. A cross between these two programming platforms must be MFC (Microsoft Foundation Classes). MFC lets you handle stuff like a C++ class.
saivert is offline   Reply With Quote
Old 23rd September 2004, 10:25   #7
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
I have created a new Winamp Delphi SDK which covers all types of plugins and is easy to setup. Currently (read my sig) I have no homepage, so somebody must provide me with a place to upload it. I cant attach it since it is too big for this forums.
saivert is offline   Reply With Quote
Old 23rd September 2004, 13:15   #8
inthegray
Major Dude
 
inthegray's Avatar
 
Join Date: Sep 2003
Posts: 704
Send a message via AIM to inthegray
how big it it?
inthegray is offline   Reply With Quote
Old 24th September 2004, 07:08   #9
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
Size?? --> 576 kB (590_180 bytes)
Filename: winamp504_sdk_for_delphi.exe

Available if you give me upload account (FTP).
Send it as a private message or E-Mail if you care about privacy! I will ofcourse not tell everybody, I have some decency, you now?
saivert is offline   Reply With Quote
Old 29th September 2004, 08:25   #10
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
Hmmm... inactivity in the thread...anyway:

Files now uploaded: plugins
saivert is offline   Reply With Quote
Old 16th November 2004, 15:30   #11
pinterpeti
Junior Member
 
Join Date: Dec 2003
Posts: 11
Hi! I've written a plugin to sort the plugins item by the length (I know there is a plugin by Peter Windridge but it is a bit 'limited') but I've got some problem. I've written 4 methods to sort the contents but 3 of them doesn't work (however they should)and I can't figure it out why.The method which is working is VERY SLOW.Please somebody help me!
Thanks! pp

http://tvn.hu/sid12poiuztrewqasdfghj...ylength_00.zip
pinterpeti is offline   Reply With Quote
Old 31st July 2005, 08:09   #12
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
A real deserved update. Hope I get to see more plug-in using this SDK.

@pinterpeti: That link leads me to nowhere. You must only use English when communicating with me. And that site is definitivley not English.

I have made a slight update to my Winamp SDK for Delphi. It's nothing brand new, but the Input plug-in sample now includes Media Library support. This means that is now exports these functions:

- winampGetExtendedFileInfo
- winampSetExtendedFileInfo
- winampWriteExtendedFileInfo

Download release 4 of the SDK:
winamp504_sdk_for_delphi.exe 598 KB

And remember that the SDK includes compiled versions of all the sample plug-ins.

Not to skilled developers:
I need help in translating the Video Interface part from wa_ipc.h to Object Pascal. Just using an Object Pascal Class doesn't work. This is also needed in order to translate the AVS APE (Advance Plug-in Effect) sample from C++ to Object Pascal. I really can't figure out those C++ classes.
saivert is offline   Reply With Quote
Old 14th August 2005, 12:49   #13
Eichhoernchen
Junior Member
 
Join Date: Jun 2005
Posts: 4
What do you guys use to create resource Dialogs for a Winamp Plugin?

And which properties does it need?
Eichhoernchen is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp 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