Old 7th November 2007, 21:37   #81
Maxim
Senior Member
 
Join Date: Mar 2001
Location: smspower.org
Posts: 107
Re: Backwards compatibility fix for Global Config

Quote:
Originally posted by Benski
code:
api_config *GetConfigAPI()
{
if (!serviceApi)
{
serviceApi = (api_service *)SendMessage(mod.hMainWindow, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
}

if (serviceApi && !configApi)
{
waServiceFactory *sf= (waServiceFactory *)serviceApi->service_getServiceByGuid(AgaveConfigGUID);
configApi = (api_config *)sf->getInterface();
}

return configApi;
}

Bugfix 2:
code:
api_config *GetConfigAPI()
{
if (!serviceApi)
{
serviceApi = (api_service *)SendMessage(mod.hMainWindow, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
}

if ((int)serviceApi == 1)
return NULL;

if (serviceApi && !configApi)
{
waServiceFactory *sf= (waServiceFactory *)serviceApi->service_getServiceByGuid(AgaveConfigGUID);
if (!sf)
return NULL;

configApi = (api_config *)sf->getInterface();
}

return configApi;
}


Older Winamps crash without the second check.
Maxim is offline   Reply With Quote
Old 14th November 2007, 09:43   #82
Ibrahim Dwaikat
Junior Member
 
Join Date: Nov 2007
Posts: 3
How can I use winamp as an embedded player in my C# project like (Windows Media Player????)
Ibrahim Dwaikat is offline   Reply With Quote
Old 21st November 2007, 18:54   #83
CraigF
Passionately Apathetic
Administrator
 
CraigF's Avatar
 
Join Date: May 2000
Location: Hell
Posts: 5,436
You cant.

CraigF is offline   Reply With Quote
Old 20th February 2008, 13:21   #84
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
Some questions on the tree view in ML:
Is there an API for rearranging tree items - without using ML_IPC_TREEITEM_DELETE and then ML_IPC_TREEITEM_ADD? I would like to move a whole subtree of a hierarchy, and removing the whole stuff and then reinserting isn't a good solution.

Is there an API for collapsing/expanding tree view items with children, and to query the current expand-state?

How can I do drag/drop for rearranging my tree items over some levels of hierarchy? I want to be able to drag a specific item (a playlist) into every available subfolder. At the moment, the "insert here" cursor only shows up on the same nesting level as the original item.

Thanks!
BTW: Is there a newer SDK than 5.36 beta 1550?

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
abu is offline   Reply With Quote
Old 10th April 2008, 03:00   #85
jesseg
Senior Member
 
jesseg's Avatar
 
Join Date: Mar 2002
Location: Minneapolis
Posts: 234
Quote:
Originally posted by abu
BTW: Is there a newer SDK than 5.36 beta 1550? [/B]
Dang, where's 5.36 b1550 even? The latest I could get was 5.35 and I had to create my own link just to guess if it would be there, in order to download it.

jesseg is offline   Reply With Quote
Old 11th April 2008, 14:51   #86
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
http://beta.nullsoft.com/sdk/ but you need a betatester password for that.

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
abu is offline   Reply With Quote
Old 11th April 2008, 17:05   #87
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,047
I'm working on a new SDK, should hopefully be ready in a few weeks.

For treeview rearranging, this one might help
code:

#define ML_IPC_TREEITEM_INSERTW 0x134
// like ML_IPC_TREEITEM_ADDW, but id becomes an "insert after" ID


only available with the unicode MLTREEITEMW, no ANSI version available (Easy enough to add but then it'd be 5.54+)

The API for systematic expand/collapse is in gen_ml\ml_ipc_0313.h. I'm not sure if that file is in the 5.36 SDK. The function is MLNavItem_Expand but it's a bit tricky to use unless you're using the new API. As to why there's no basically 3 media library treeview API's. well, i won't comment.

As for drag&drop across levels. I'll have to look.
Benski is offline   Reply With Quote
Old 21st July 2008, 18:52   #88
Jusa1
Junior Member
 
Join Date: Dec 2007
Location: Finland
Posts: 16
Hey Benski & Dro, to you both i want to say, that during this year i start to do a Finnish translation for Winamp. I have already downloaded from here SDK and mentioned lang_b files and also that precompiled language file. also i have already watched those other threads which tell about doing a language. Well, i'll do that Finnish translation with patience and slowly. If i then later get any problems, then i just ask from you and others
Jusa1 is offline   Reply With Quote
Old 22nd July 2008, 03:52   #89
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,336
Jusa1: if you want to make a language file, you don't need the SDK anymore.

The language file which is (still) part of the SDK is outdated on no longer used anymore.

More informations about the new translation format you can find here:

http://www.meggamusic.co.uk/winamp/docs/xlat/xlat.html

DrO/Benski: the language stuff should be removed from the SDK and the sticky thread in this forum should link to Xlat instead of the old language pack guide, to stop confusion.
Koopa is offline   Reply With Quote
Old 25th November 2008, 14:18   #90
dreamlayers
Junior Member
 
Join Date: Jun 2006
Location: Ontario, Canada
Posts: 33
Lacks visualization plugin files

In vis\vis_test, only SVIS.MAK is there. In that directory, wa502_sdk.zip also has:
  • SVIS.C - a sample visualization plugin
  • VIS.H - header file for visualization plugins
  • SVIS.MDB - not sure what's the point of that
dreamlayers is offline   Reply With Quote
Old 16th April 2009, 10:37   #91
zubalama
Junior Member
 
Join Date: Mar 2009
Location: Georgia
Posts: 12
Please Need Help!
How I can get played track info in wchar_t?
Winamp return it in char array and I have problems with unicode symbols!
Please Help!
zubalama is offline   Reply With Quote
Old 9th November 2009, 09:38   #92
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
in gen_tray\TRAYCTL.C line
int ret = CallWindowProc(lpOldWinampWndProc,hwnd,message,wParam,lParam);
better to replace:
if (IsWindowUnicode(hwnd))
CallWindowProcW(lpOldWinampWndProc,hwnd,message,wParam,lParam);
else
CallWindowProcA(lpOldWinampWndProc,hwnd,message,wParam,lParam);
Ruzzz is offline   Reply With Quote
Old 9th November 2009, 09:58   #93
DrO
 
Join Date: Sep 2003
Posts: 27,880
Ruzzz: that's not required as the OS will do the relevant mapping based on how you subclassed to begin with. so in this case as long as a SetWindowLongPtrW(GWLP_WNNPROC) is correctly applied then it'll map things through CallWindowProcW(..) as long as nothing else has done a CallWindowProcA(..) or a SetWindowLongPtrA(GWLP_WNNPROC).

-daz
DrO is offline   Reply With Quote
Old 22nd November 2009, 14:07   #94
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
in wa_ipc.h -> IPC_GETRATING
int GetPlaylistItemRating(int item_to_get, int rating_to_set) - need to remove "int rating_to_set"?
Ruzzz is offline   Reply With Quote
Old 22nd November 2009, 14:36   #95
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
DrO
code:
WNDPROC old_wnd_proc_A = NULL;
WNDPROC old_wnd_proc_W = NULL;

LRESULT CALLBACK WindowProcWrapperW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_SETTEXT) {

printf("WM_SETTEXT from Wide subclass as Wide: '%ws'", lParam);
printf("\n");

//wchar_t str[50];
char str[50];
WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)lParam, -1, str, 50, NULL, NULL);

printf("str from Wide subclass as Ansi: '%hs'", str);
printf("\n");

// We say that it ANSI,
// and if next window procedure wait Ansi - OS does not Unicode-to-ANSI conversion
// OS pays attention to the function CallWindowProc
return ::CallWindowProcA(old_wnd_proc_W, hwnd, uMsg, wParam, (LPARAM)&str);
} else
return ::CallWindowProcW(old_wnd_proc_W, hwnd, uMsg, wParam, lParam);
}

LRESULT CALLBACK WindowProcWrapperA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{

if (uMsg == WM_SETTEXT) {
printf("WM_SETTEXT from Ansi subclass as Ansi: '%hs'", lParam);
printf("\n");
}
// Call the last window procedure
// OS pays no attention to the function CallWindowProc!
// OS pays attention to SetWindowLongPtr for this(current) procedure
// CallWindowProcA or CallWindowProcW - No difference O_o
// It is important that correct data came in current procedure
return ::CallWindowProcA(old_wnd_proc_A, hwnd, uMsg, wParam, lParam);
}

int _tmain(int argc, _TCHAR* argv[])
{
HWND wnd = ::CreateWindowW(L"STATIC", L"foo", WS_VISIBLE|WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, NULL, NULL, NULL, 0);
//HWND wnd = ::CreateWindowA("STATIC", "foo", WS_VISIBLE|WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, NULL, NULL, NULL, 0);

//printf("IsWindowUnicode: '%d'\n", IsWindowUnicode(wnd));

old_wnd_proc_A = (WNDPROC)::GetWindowLongPtrA(wnd, GWLP_WNDPROC);
::SetWindowLongPtrA(wnd, GWLP_WNDPROC, (LONG_PTR)&WindowProcWrapperA);

old_wnd_proc_W = (WNDPROC)::GetWindowLongPtrW(wnd, GWLP_WNDPROC);
::SetWindowLongPtrW(wnd, GWLP_WNDPROC, (LONG_PTR)&WindowProcWrapperW);

::SendMessageA(wnd, WM_SETTEXT, 0, (LPARAM)"Ansi text");
::SendMessageW(wnd, WM_SETTEXT, 0, (LPARAM)L"Wide text");

MSG m;
while (::GetMessage(&m, NULL, 0, 0)) {
::TranslateMessage(&m);
::DispatchMessage(&m);
}

return 0;
}

Ruzzz is offline   Reply With Quote
Old 22nd November 2009, 14:54   #96
DrO
 
Join Date: Sep 2003
Posts: 27,880
what am i meant to be looking at as that isn't code for a plugin...

-daz
DrO is offline   Reply With Quote
Old 22nd November 2009, 16:53   #97
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
DrO, i want to say that if each plugin will make subclassing winamp's window, each of them must correctly use CallWindowProc. Or something I do not understand?
Ruzzz is offline   Reply With Quote
Old 22nd November 2009, 17:10   #98
DrO
 
Join Date: Sep 2003
Posts: 27,880
not seeing proper code for a plugin confused me.

correct it is the responsibility of the plugin to correctly subclass Winamp but that has always been the case ever since plugins appeared. the only change is that with more recent (ie clients released in the last 3-4 years) need to factor in unicode support and with all recent 5.5+ clients only runnning on unicode supporting OSes, really everyone should just use SetWindowLongPtrW(..).

and as noted previously, it's the SetWindowLongPtrA/W call that dictates how compatible a plugin will be with allowing unicode data to be passed around the player still instead of having to mess around with CallWindowProcA/W switches (seeing as the OS handles that anyway especially with the ansi/unicode layering which has been in place with the NT based OSes.

-daz
DrO is offline   Reply With Quote
Old 22nd November 2009, 18:30   #99
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
ОК, simply by default, this project (gen_tray) is not unicode, and will be used CallWindowProcA. sorry for prolixity
Ruzzz is offline   Reply With Quote
Old 23rd November 2009, 03:06   #100
-ex-
Junior Member
 
-ex-'s Avatar
 
Join Date: Nov 2009
Location: Malaysia
Posts: 45
How do I use the SDK?
I have read it and I still have no clue on how to use it.
I have created a new project in the same installation directory as the SDK.
Then, what is it for? I don't even know what functions they are about.

Can someone help me? Thanks..
-ex- is offline   Reply With Quote
Old 1st December 2009, 15:58   #101
-ex-
Junior Member
 
-ex-'s Avatar
 
Join Date: Nov 2009
Location: Malaysia
Posts: 45
Hi.. I have an error in compiling "ml_xmlex\main.h"

The error is at the:
#include <api/service/api_service.h>

It says no such file or directory..

Anyone has a solution? Thanks..
-ex- is offline   Reply With Quote
Old 5th December 2009, 17:09   #102
Ruzzz
Junior Member
 
Join Date: Nov 2009
Location: Ukraine
Posts: 24
IPC_GET_NEXT_PLITEM - error in example:
Quote:
SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_NEXT_PLITEM);
in IPC_GET_PREVIOUS_PLITEM too.
Ruzzz is offline   Reply With Quote
Old 7th December 2009, 12:15   #103
DrO
 
Join Date: Sep 2003
Posts: 27,880
Ruzzz: will get that changed though that api shouldn't be used other than through gen_jumpex.dll

-ex-: it sounds like "%WinampSDK%\Wasabi" hasn't been correctly included in the project's directories.

-daz
DrO is offline   Reply With Quote
Old 26th January 2010, 10:39   #104
DrO
 
Join Date: Sep 2003
Posts: 27,880
Updated ml_lib.cpp (Unicode Version)

Attached is a newer version of ml_lib.cpp (from the gen_ml folder) which implements all of the required unicode functions.
DrO is offline   Reply With Quote
Old 5th February 2010, 21:32   #105
hydrant
Junior Member
 
Join Date: Feb 2010
Location: Prague
Posts: 2
missing header

I'm looking for file gen_ml/itemlist.h which is missing in this SDK.

Could somebody point me where to find one? I guess, that this file used to be there, but have been removed.

I would like to continue in development of ml_daap plugin, but current code use this header.

Thanks
Andrej
hydrant is offline   Reply With Quote
Old 6th February 2010, 09:13   #106
DrO
 
Join Date: Sep 2003
Posts: 27,880
older files should be in this older 5.04 version of the sdk.

-daz
DrO is offline   Reply With Quote
Old 1st July 2010, 22:54   #107
x86.sll
Junior Member
 
Join Date: Jun 2010
Posts: 3
Why there is no vis folder in the new sdk?
x86.sll is offline   Reply With Quote
Old 6th January 2012, 20:54   #108
Sagehorn
Member
 
Join Date: Jul 2009
Location: Berlin
Posts: 84
Where can i find the "full" standardcode for a ml-plugin?
Sagehorn is offline   Reply With Quote
Old 7th January 2012, 14:56   #109
DrO
 
Join Date: Sep 2003
Posts: 27,880
there's only what's in the sdk and that's just a slim version of what is natively done (depending on when the ml plug-in was done as styles have changed over time). really just use them as a basis and go with what _you_ want to do with the plug-in as there's only so much the shipped examples can do before becoming a true plug-in which defeats the point of most of the examples.

-daz
DrO is offline   Reply With Quote
Old 30th December 2013, 00:38   #110
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,930
Send a message via Skype™ to thinktink
Any news on an updated SDK? If not or if I'm just being an annoying prat just ignore me.
thinktink is offline   Reply With Quote
Old 30th December 2013, 09:14   #111
DrO
 
Join Date: Sep 2003
Posts: 27,880
I've done nothing else towards things and with the way other things are going I'd just forget about seeing any sort of update from me.
DrO is offline   Reply With Quote
Old 30th December 2013, 14:05   #112
Victhor
Late skinner & Moderator
 
Victhor's Avatar
 
Join Date: May 2003
Location: Argentina
Posts: 1,371
So I guess there is no news about the Color editor wasabi files (or just a plain "no it won´t be")...?

· · TMCT · KOMODO X
Victhor is offline   Reply With Quote
Old 30th December 2013, 14:10   #113
DrO
 
Join Date: Sep 2003
Posts: 27,880
nothing has happened with that.
<post changed from my earlier outburst>
DrO is offline   Reply With Quote
Old 30th December 2013, 15:01   #114
Victhor
Late skinner & Moderator
 
Victhor's Avatar
 
Join Date: May 2003
Location: Argentina
Posts: 1,371
Hahaha.. ok!

· · TMCT · KOMODO X
Victhor is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast 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