![]() |
#1 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Winamp 5.55 SDK
http://dev.winamp.com/wiki/Plug-in_D..._Documentation
http://download.nullsoft.com/winamp/...WA5.55_SDK.exe Much thanks to DrO for providing additional documentation for wa_ipc.h Much of the new functionality in the SDK is not yet documented. Please use this thread for discussion, and we'll add information about topics discussed into the SDK. [edit - DrO 21/01/2010] Below are a number of threads which have been kept as stickies in the past and may be of some use when developing plug-ins along with what is detailed in this thread and the sdk itself. Winamp 5.04 SDK (Installer Rev #3) (soon to be deprecated but has information still!) Winamp Application Programming Interface Language Pack Guide Useful Info -> What info should you know when making plugins? Empty general purpose plug-in project. ml_pmp SDK Input plug-in transcoding extentions. |
![]() |
![]() |
![]() |
#2 |
Join Date: Sep 2003
Posts: 27,873
|
As benski mentions, somethings still aren't fully documented (there's still some merging of the wa_ipc.h i'd had prepared to be merged in and a few of the other wa_*.h files) and also some of the example projects need to be cleaned up still but this will give you a good idea of the new apis.
-daz |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jun 2006
Location: Planet Earth, the Solar system.
Posts: 31
|
Hmm, hmm, hmm.... huh?
Where did wa_msgids.h go? |
![]() |
![]() |
![]() |
#4 |
Join Date: Sep 2003
Posts: 27,873
|
wa_msgids.h was never an official header and is something i created myself. will look at making it official with benski before final.
-daz |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
I stumbled upon the line
Quote:
|
|
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Aug 2006
Location: Bonn, Germany
Posts: 8
|
If I try to open the main.rc in lang_b folder, I get errors of not found resource-files:
![]() The error repeates with a lot of more files. I use Visual Studio 2005. Eventually someone could upload these files? Edit: I have now extracted most of all the not found resource-files from actual beta-release of 5.25 (812). The only file I've not found is manifest.xml. Eventually someone could upload these files? Many greetings from Germany salnet Last edited by salnet; 11th August 2006 at 23:06. |
![]() |
![]() |
![]() |
#7 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
I've attached it. Note that the version is listed as "5.0.1.1". Our build system automatically patches this file before each release. It doesn't really make a difference, but to be correct, you can modify it to be the same as the Winamp version&build number (e.g. 5.2.4.703)
|
![]() |
![]() |
![]() |
#8 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
The the new IPC_UPDATE_URL command
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Join Date: Sep 2003
Posts: 27,873
|
a number of the newer apis are really just for internal processing between some of the native plugins to winamp.exe and aren't really for anyother use. i'm sure what that one will be explained if it is of any real use nearer to/in the final 5.25 sdk
-daz |
![]() |
![]() |
![]() |
#10 | ||
Junior Member
Join Date: Aug 2006
Location: Bonn, Germany
Posts: 8
|
Quote:
Thanks for that file. Now I've got another problem: When I want to compile the language-file, I get the following error: Quote:
|
||
![]() |
![]() |
![]() |
#11 |
Join Date: Sep 2003
Posts: 27,873
|
there shouldn't be any reason for that file to be needed and with a few modifications i can happily build the language file (moved tips.txt into a resource folder and disabled all of the icon, bitmap and cursor references). basically i'd just comment out those lines if they're still giving you issues (like in the modified version i've attached all files of)
-daz |
![]() |
![]() |
![]() |
#12 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
I noticed SAAdd and VSAAdd are returning
int now instead of void. What values do they return? Does this change cause stack trouble if an input plugin calls one of these functions expecting it to return void? |
![]() |
![]() |
![]() |
#13 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Return values arent stored on the stack, they are in eax. The return value would simply be lost. Im not sure if theres any compilers that would assume the value of eax would remain unchanged after a function call. Although I guess its possible if the function was declared to return void.
|
![]() |
![]() |
![]() |
#14 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
They've always been functions that return int. They were just (incorrectly) put as a returning void in the SDK header files. It removes any possibility of something going wrong re: the return value.
|
![]() |
![]() |
![]() |
#15 |
Junior Member
Join Date: Jan 2006
Posts: 12
|
Would you be so kind to provide zip version of the SDK? I won't have access to Windows machine for some time. Also sending executable files by mail is not reliable (virus protections, etc.).
|
![]() |
![]() |
![]() |
#16 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
Are there more amoung them that should return int instead? -------- I added basic support for Unicode input plugins to my Inbridge plugin so I thought I should announce it here. Changes are:
  |
|
![]() |
![]() |
![]() |
#17 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
An updated SDK change has been uploaded. 22-8-2006 5:30 PM GMT
Input plugin developers who have implemented the new Unicode API - take note. GetFileInfo was still taking a char * for the title. It now takes in_char * (e.g. wchar_t * for unicode plugins). The change is for Winamp 5.25 Beta Build 839 and up. |
![]() |
![]() |
![]() |
#18 |
Senior Member
Join Date: Mar 2001
Location: smspower.org
Posts: 107
|
I'm struggling to see the advantage of going Fully Unicode in my input plugin - it seems I'll lose backwards compatibility, for a start, and all I'll gain is the headache of supporting Unicode filenames. If I just implement winampGetExtendedFileInfoW, will that do? Will Winamp keep sending me un-Unicode asdf~1 type filenames? Since winampGetExtendedFileInfo(W) are still undocumented, is that OK or likely to be broken?
Finally, why is winampGetExtendedFileInfo still used in preference to winampGetExtendedFileInfoW? If Winamp used the W one first, if available, I could provide both for better backwards compatibility for those tinfoil-helmet types using WA2.91. |
![]() |
![]() |
![]() |
#19 | ||
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#20 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Example
Here's an example of how to use the Wasabi service manager and the new global configuration API.
code: |
![]() |
![]() |
![]() |
#21 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
  |
|
![]() |
![]() |
![]() |
#22 |
Junior Member
Join Date: Aug 2006
Posts: 8
|
How to make 5.25 language pack?
I tried to make a 5.24 language pack in Vietnamese, and some strings in treeview, tooltip, link were broken. Someone said that it's because of wrong convertion from Unicode to MBSC. So I wait for 5.25 SDK, hope it supports Unicode fully. But I can't do so, there's no file in /resources folder that .h file defined. Please tell me why
![]() Sorry for all, I'm just a newbie. |
![]() |
![]() |
![]() |
#23 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Is there an updated SDK for 5.3?
I could not find any. |
![]() |
![]() |
![]() |
#24 |
Join Date: Sep 2003
Posts: 27,873
|
there is but it's not been cleaned up/uploaded yet i believe. it'll come soon though
-daz |
![]() |
![]() |
![]() |
#25 |
mlipod moderator
(Senior Member) Join Date: Jun 2005
Location: Germany
Posts: 3,457
|
Where have all the nice methods of GayString gone, in gen_ml\gaystring.cpp, like GayString::Replace() etc.? They are quite handy!
And one more: I would love to have an API to enumerate all ML playlists. Possible already? WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it) ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug? Donations to support the ml_iPod project can be done HERE |
![]() |
![]() |
![]() |
#26 |
Join Date: Sep 2003
Posts: 27,873
|
you'd have to get gaystring from the older sdk (not even sure if that was in the original zip sdk to begin with - think it was something that i added into the installer version of the sdk that i built)
with the playlists thing, i'm not sure. a fallback method with recent winamp releases would be to scan through %inidir%\plugins\ml\playlists.xml -daz |
![]() |
![]() |
![]() |
#27 | ||
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Quote:
![]() Quote:
code: pass to gen_ml's HWND ... |
||
![]() |
![]() |
![]() |
#28 | ||
mlipod moderator
(Senior Member) Join Date: Jun 2005
Location: Germany
Posts: 3,457
|
Quote:
Quote:
Since which Winamp version is ML_IPC_PLAYLIST_INFO available? WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it) ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug? Donations to support the ml_iPod project can be done HERE |
||
![]() |
![]() |
![]() |
#29 |
Junior Member
Join Date: Nov 2006
Posts: 7
|
in <wa_msgids.h> the constant ID_MAIN_PLAY_AUDIOCD1 has been renamed to ID_MAIN_PLAY_AUDIOCD, although the value is the same this breaks old source i have distributed. (should the user wish to recompile).
|
![]() |
![]() |
![]() |
#30 |
Join Date: Sep 2003
Posts: 27,873
|
|
![]() |
![]() |
![]() |
#31 |
Junior Member
Join Date: Nov 2006
Posts: 7
|
Sure Dro, but since those constants (in the beta SDK) have now been removed from <winamp/wa_ipc.h> i just wanted to let you know that i had noticed that name change, as it broke some code i compiled in order to test the beta SDK, which worked in previous SDK's.
Aint no biggie ![]() |
![]() |
![]() |
![]() |
#32 |
mlipod moderator
(Senior Member) Join Date: Jun 2005
Location: Germany
Posts: 3,457
|
I think I found a bug in this SDK. There was a subtle change in ml_lib.cpp, which was wrong as far as I can see:
code: As you see, the braces have been moved. But the old version was right: We want to compare the length of the new value to that of the old value. And that can be found at address "item->extended_info[x]+strlen(name)+1". In the new version, we compare the length of the new value with the length of the name (at item->extended_info[x]), plus again the length of the name, plus 1. Makes no sense, right? WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it) ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug? Donations to support the ml_iPod project can be done HERE |
![]() |
![]() |
![]() |
#33 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
You seem correct about that. It appears to be a regression, as my old 5.04 SDK has the buggy code too. It must have been re-introduced at some point.
|
![]() |
![]() |
![]() |
#34 | |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Quote:
|
|
![]() |
![]() |
![]() |
#35 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Thanks for the new SDK benski, some interesting stuff in there. For the menu id request API.. would it be possible to have it take a number of ids required? such that it returns a starting ID, and will have reserved that many ids in sequence?
If not, is it safe to assume that requesting 10 ids in a row would return them in a linear sequence? (obviously requesting them all before handing back control to the message pump). |
![]() |
![]() |
![]() |
#36 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Shane - for 5.33 I will increment the number by wParam when you call IPC_REGISTER_LOWORD_COMMAND. It will return the first number in the series.
For 5.32 - You can safely call it 10 times, assuming of course you on the main thread (e.g. during your init() call) |
![]() |
![]() |
![]() |
#37 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Thanks Benski, that should help out with a few things. Can we use this function to allocate timer ids too? Otherwise an API for that would be good, or just picking random numbers as usual :P No biggy.
My main gripe is with the ATF functionality. Its great that the new IPC_FORMAT_TITLE_EXTENDED does a bit of work, but it doesn't seem to do much. For example, it doesn't handle %rating% or %playcount% etc. Would it be possible to have something like a IPC_FORMAT_TITLE_EXTENDED_2 which tells winamp that the *p in waFormatTitleExtended is pointing to an itemRecordW, and therefore use that to do the tag processing? Or maybe returning -2 from *TAGFUNC tells winamp the same thing. Or better still, instead of just querying the input plugins for %tags%, it actually does the full ATF processing? (I assume involving an ML lookup etc) This way any plugins that do ATF processing will automatically be future proofed against new %tags% supported in winamp, and not require much (re)implementation on behalf of plugins. This would be the preferred option I think. |
![]() |
![]() |
![]() |
#38 | ||
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
Quote:
Quote:
Also of note, there is a (hidden) API to use the ATF engine directly, w/o going through a SendMessage call. At the moment, it doesn't let you do much extra, but I am considering adding things to it like defining your own custom functions and prepopulating (or retrieving) the $put/$get variables. If you have any interest in this, let me know. |
||
![]() |
![]() |
![]() |
#39 | ||
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Quote:
Quote:
It'd be great to not have to worry about changes to the ATF tags and ML etc and just let winamp do it. Perhaps you could set useExtendedInfo to '2' to tell winamp to do "full" ATF processing. I assume the 'hidden' ATF API is the tagz.w5s service? I havent used the wasabi interfaces before, I hope they still work with classic skins? The new functions cover most of what I have implemented myself through %tag% hacks, which i intend to depreciate :P but I wouldnt mind implementing a kind of regex replace function for getting rid of radio stream taglines. eg: $regex('s/\(.*\)$//', %streamtitle%) or: $regexreplace('\(*\)$', '', %streamtitle%) To remove the brackets from: songname - artist (104.fm hits) It may be possible with existing tags with $right, $left, $strchr etc but would be difficult. If not full regex, even something simple such as: $removetagline('(', ')', %streamtitle%) would be good (and could also handle nested brackets without some complex regex line). Ive had quite a few people ask how to get this done. Id probably implement this myself if you exposed the API to the tags service. |
||
![]() |
![]() |
![]() |
#40 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
With IPC_FORMAT_TITLE_EXTENDED and waFormatTitleExtended::useExtendedInfo == 1, if you return 0 from your tag function, it will cause Winamp to go lookup the tag through IPC_GET_EXTENDED_FILE_INFOW_HOOKABLE (which is what ATF is using to resolve %tags% in the playlist titles, save for "filename" and "folder").
Returning -1 just means "empty tag" and is mainly used to avoid mallocing an empty string. p.s. I'll post an example soon of how to use the tagz.w5s service directly |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|