IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
@ Benski: no WavPack in Winamp Essentials 5.54?, Why, why, why?
DARcode
post Jul 10 2008, 09:12
Post #1





Group: Members (Donating)
Posts: 682
Joined: 10-January 05
From: Italy
Member No.: 18968



Howdy Benski and WA guys over here @ HA,
as you surely know by now the WavPack Winamp plugin has reached final release (v2.5 w00t.gif ), so why not including it in an Essentials pack?

The WV community might even forgive you for not having it done with v5.54 already... wink.gif

Thanks/ciao.

Dc


--------------------
WavPack 4.70.0 -b384hx6cmv/qaac 2.43 -V 100
Go to the top of the page
+Quote Post
benski
post Jul 10 2008, 14:15
Post #2


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



Still working out the details (namely an encoder plugin to go along with it).

In the meantime, if Bryant wants to navigate our often-buggy plugin upload system, I'd be more than happy to put the plugin in the 'featured plugin' section on winamp.com smile.gif
Go to the top of the page
+Quote Post
Koopatrooper
post Jul 23 2008, 21:41
Post #3





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



If Bryant agrees, it would be a pleasure for me to include it in the Essentials Pack. The only nice addition I like to see then, is localization support, because hopefully most plug-ins, which are bundled in EP will be translatable in future. smile.gif

I'll inform you guys here, when we made a final decision on this.

-Chris

This post has been edited by Koopatrooper: Jul 23 2008, 21:44
Go to the top of the page
+Quote Post
bryant
post Jul 24 2008, 06:39
Post #4


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Hey guys, sorry I've been so rare around here lately, but I've been swamped with real-life projects lately!

Chris, I'd be happy to add the localization support. Is this something that can be done now, and are there instructions or examples that you can point me to?

I was also recently made aware of a minor APEv2 bug (WavPack ignores tags with footer and no header, but they're valid according to specs), so maybe I'll wait until all this is done before submitting to the 'featured plugin' section.

Thanks!

David
Go to the top of the page
+Quote Post
Koopatrooper
post Jul 24 2008, 11:44
Post #5





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



We're shipping translations for bundled EP plug-ins in the official language files.

There are 2 ways to create a language file:

1. String based translation via an .ini file
2. Translation based on a resource file. (the better solution, this allows the translator to change the size of the dialogs etc)

An example for a translation, based on an .ini file is the trap_auto.ini. It is the language file for the bundled Time Restore & Autoplay plug-in, which was made by DrO.

Translation for nearly all Winamp plug-ins is based on resource files. E.g. take a look at "ml_impex.lng", it's the language file for the "Winamp Database Import/Export" plugin, or "enc_vorbis.lng", that's the translation for the "Nullsoft Vorbis Encoder", which are both bundled in the Essentials Pack. This should give you a short overview, how it works, I think.

A .lng file can be easily modified by the translator via a Resource Editor. It basically includes the Dialogs and String Tables.

You can find the current example file here:

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

The .wlz file is simply a renamed .zip file, which will be extracted to the temp folder when Winamp is loaded. Your plug-in should be able to load the extracted translation file from the temp folder.

But it's probably better if DrO/Benski make a reply to this thread and give you more informations about this stuff. DrO is the person, who works on the whole translation stuff and he has much, much more knowledge about this, than me.

-Chris

This post has been edited by Koopatrooper: Jul 24 2008, 12:02
Go to the top of the page
+Quote Post
benski
post Jul 24 2008, 19:52
Post #6


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



Bryant -
I can talk you through the translation stuff if you'd like, Or just make the changes and submit a diff. It's mostly a simple search/replace with standard windows functions like DialogBox(), so it should be straightforward and can be done in a backwards compatible way.
Go to the top of the page
+Quote Post
bryant
post Jul 28 2008, 04:36
Post #7


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Thanks for the pointers; I'll take a look and see if I can figure it out, otherwise I'll ask for more... smile.gif

As I mentioned, I'm swamped just lately, but I should get a chance at some point next month.
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 11 2009, 15:23
Post #8





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



bryant:

any news? I've already prepared the installer for the WavPack input plugin in the last builds, installer translations are complete as well. All I need is an updated in_wv.dll with localization support and an English in_wv.lng file.

-Chris

This post has been edited by Koopatrooper: Jan 11 2009, 15:25
Go to the top of the page
+Quote Post
bryant
post Jan 12 2009, 05:47
Post #9


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



I apologize for being so slow on this (geez, that was July!) and I really appreciate your support.

I will look into this right away and let you guys know if I have any problems/questions.

Cheers,
David
Go to the top of the page
+Quote Post
bryant
post Jan 19 2009, 07:34
Post #10


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Okay, I think I just about figured all this out. I have created in_wv.dll and in_wv.lng (for US English):

http://www.wavpack.com/files/in_wv.zip

My language file looks almost exactly like the examples except for two things. First, it does not have the "HASH" entry and it does not have the ID 65535 in the string table. I assume you guys put those in there? Am I supposed to do something with them?

I wasn't sure exactly how to code this in the plugin, but I got this to work perfectly:

CODE
HMODULE hResources;              // module handle for resources to use

static void configure_resources (void)
{
    HMODULE lang_resources = LoadLibrary ("in_wv.lng");

    if (lang_resources)
        hResources = GetModuleHandle ("in_wv.lng");
    else
        hResources = GetModuleHandle ("in_wv.dll");
}


When there is nothing in the Lang folder then I get the resources from the DLL, otherwise I get them from the LNG file.

Thanks again so much for your patience, and please let me know if I messed something up or am hopelessly confused. smile.gif

Regards,
David
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 19 2009, 15:07
Post #11





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



Thanks for this, I've made a quick test and the translation is working fine. smile.gif I'll make more tests in the evening.

The only issue I can see so far is, that in_wv.lng doesn't unload correctly, so it won't be removed from the temp folder after closing Winamp.

The Hash system isn't activated yet, I hope Darren finds some time to give you a short description, but I won't worry about it too much for now.

I'll provide an EP beta installer here as soon as possible. I'll upload the example file to xlat and will inform the translators via mail about it, as soon, as we've verified that everything is ok.

-Chris

This post has been edited by Koopatrooper: Jan 19 2009, 15:11
Go to the top of the page
+Quote Post
bryant
post Jan 19 2009, 15:27
Post #12


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Great, thanks for trying it out so quickly!

QUOTE (Koopatrooper @ Jan 19 2009, 06:07) *
The only issue I can see so far is, that in_wv.lng doesn't unload correctly, so it won't be removed from the temp folder after closing Winamp.
Yes, that is the part I was least sure about. I'll try to duplicate this. Perhaps winamp has already loaded the lng file for me and I don't need to do that step?

David
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 19 2009, 22:35
Post #13





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



The translation seems to be complete (or I haven't found anything, which is still not translatable, heh)

There seems to be an issue with umlauts:

http://stashbox.org/367066/wv_file_info_editor.png

The correct word would be "Kanšle"

Darren (the Winamp language pack creator) will reply as soon as possible, he can explain you, how to add a guid so that you can fix that unloading issue in the temp folder.

[Edit] Here is a working testing build of the Essentials Pack installer, if someone wants to check it:

http://stashbox.org/367106/Winamp_Essentia..._Beta%21%21.exe

This post has been edited by Koopatrooper: Jan 19 2009, 22:51
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 19 2009, 23:13
Post #14





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



This is directly from Darren ( he isn't able to post directly due to login issues ), hopefully this should help you David:

QUOTE
As koopa mentioned, the HASH part isn't used and that is something which can be easily updated either by the language pack authors or anyone else when it finally is enabled (famous last words).

I would suggest you implement the 65535 string as we use this to ensure that we're using the correct .lng file. All this entry is is a guid from guidgen in the registry format style. I've allocated the following for in_wv's usage
(abd this will be noted in the next update of %winampsdk%\Agave\Language\lang.h). Also you'll need to have the 65535 string present in in_wv.dll as well.

// {6DE2E465-690E-4df1-B6E2-2A9B33ED3DBB}
static const GUID InWvLangGuid =
{ 0x6de2e465, 0x690e, 0x4df1, { 0xb6, 0xe2, 0x2a, 0x9b, 0x33, 0xed, 0x3d, 0xbb } };


With the loader you've pasted, you don't need to use LoadLibrary(..) or FreeLibrary(..) on the in_wv.lng file since the Winamp WLZ loader will ensure that the dll is present for the loading of any of the dlls so everything will be localisable from the start. Now the choice is upto you how much you want to version lock the plugin as you can use the loader function in api_language.h and use the service it provides to load everything. Only issue with that is it is a 5.5+ only api and if you want to support earlier winamp versions you'll need to have it graciously fallback to most like the code you're already using.

If you did go the api_language way (i think you've used the config group stuff so the wasabi services shouldn't be too strange to you i believe) then you'd need use something like the following (and explains the use of the guid) as it then makes the loading/use of the lng irrespective of the file filename (useful we found for people using out_ds.dll and out_ds2.dll).

api_service *WASABI_API_SVC = 0;
api_language *WASABI_API_LNG = 0;
HINSTANCE WASABI_API_LNG_HINST = 0,
WASABI_API_ORIG_HINST = 0;

void GetLocalisationApiService(void){
if(!WASABI_API_LNG){
// loader so that we can get the localisation service api for use
if(!WASABI_API_SVC){
WASABI_API_SVC = (api_service*)SendMessage(plugin.hW, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
if (WASABI_API_SVC == (api_service*)1){
WASABI_API_SVC = NULL;
return;
}
}

if(!WASABI_API_LNG){
waServiceFactory *sf;
sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID);
if (sf) WASABI_API_LNG = reinterpret_cast<api_language*>(sf->getInterface());
}

// need to have this initialised before we try to do anything with localisation features
WASABI_API_START_LANG(plugin.hMainWindow,InWavLangGuid);
}
}

And finally, with the umlauts issue Koopa is seeing, this is due to "formatinformation" requiring a unicode string back which i'm guessing is not what is being sent looking at how it has managled that.

-daz
Go to the top of the page
+Quote Post
bryant
post Jan 20 2009, 07:45
Post #15


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Okay, thanks guys! I think I have enough to go on now and I'll let you know when I've solved these problems.

BTW, Chris, could you send me the in_wv.lng file that you have obviously created for German (even if it's not done/correct)? I think that will help me with my UNICODE stuff. Thanks...

David
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 20 2009, 13:59
Post #16





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



Still not complete, but should help you I guess.

http://stashbox.org/367829/in_wv.lng

-Chris
Go to the top of the page
+Quote Post
bryant
post Jan 20 2009, 17:56
Post #17


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



QUOTE (Koopatrooper @ Jan 20 2009, 04:59) *
Still not complete, but should help you I guess.

http://stashbox.org/367829/in_wv.lng

-Chris

As long as there are lots of umlauts in there! smile.gif Thanks!
Go to the top of the page
+Quote Post
bryant
post Jan 23 2009, 07:39
Post #18


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



Okay, I think I've got everything fixed now and I updated the link above with the latest version.

The temp file not going away was simply because I was calling LoadLibrary(), which I didn't need to do once I really selected the language in winamp. I added the 65535 string as instructed to both the .lng file and my .dll file. Finally, the umlauts issue was easy to fix once I looked and saw that I wasn't doing the correct conversion to Unicode for the formatstring. There are still some places where I use MultiByte characters internally and these should eventually be all turned to Unicode, but I think we will be okay for now.

Thanks again for all the help and support, guys! smile.gif
Go to the top of the page
+Quote Post
Koopatrooper
post Jan 23 2009, 13:09
Post #19





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



I can verify that both issues are fixed, the temp file will be deleted and the file info editor shows the umlauts correctly now. smile.gif

I'll upload the example file to Xlat server and mail the other translators about WavPack translation.

Thanks for your work on this, David. WavPack is a nice lossless codec, I hope shipping it in EP will help spreading the format.

Maybe you'll create an encoder plugin for Winamp too someday, hehe.

Thanks,
Chris
Go to the top of the page
+Quote Post
DARcode
post Jan 24 2009, 14:05
Post #20





Group: Members (Donating)
Posts: 682
Joined: 10-January 05
From: Italy
Member No.: 18968



QUOTE (Koopatrooper @ Jan 23 2009, 14:09) *
WavPack is a nice lossless codec, I hope shipping it in EP will help spreading the format.
That was the idea. beer.gif emot-toot.gif
A big fat thank you to David for squeezing in the time to do this, appreciated.
QUOTE (Koopatrooper @ Jan 23 2009, 14:09) *
Maybe you'll create an encoder plugin for Winamp too someday, hehe.
Why not! HINT HINT HINTlalala.gif


--------------------
WavPack 4.70.0 -b384hx6cmv/qaac 2.43 -V 100
Go to the top of the page
+Quote Post
bryant
post Jan 26 2009, 05:43
Post #21


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



QUOTE (DARcode @ Jan 24 2009, 05:05) *
QUOTE (Koopatrooper @ Jan 23 2009, 14:09) *
WavPack is a nice lossless codec, I hope shipping it in EP will help spreading the format.
That was the idea. beer.gif emot-toot.gif
A big fat thank you to David for squeezing in the time to do this, appreciated.

You're welcome, but the thanks should really go to Chris and Ben and Darren for their huge support and patience. smile.gif
Go to the top of the page
+Quote Post
Koopatrooper
post Feb 26 2009, 19:56
Post #22





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



Winamp Essentials Pack v5.55 released, including WavPack decoder. WavPack decoder is also translated in most of the official language packs. smile.gif

I'll submit this to winamp.com as soon as possible, hopefully the database works this time, though.

Again, thanks for this David.

-Chris
Go to the top of the page
+Quote Post
DARcode
post Feb 27 2009, 11:09
Post #23





Group: Members (Donating)
Posts: 682
Joined: 10-January 05
From: Italy
Member No.: 18968



Great news!

Then it's really time to work on an encoder plug-in emot-toot.gif !


--------------------
WavPack 4.70.0 -b384hx6cmv/qaac 2.43 -V 100
Go to the top of the page
+Quote Post
Koopatrooper
post Mar 1 2009, 22:50
Post #24





Group: Members
Posts: 21
Joined: 23-April 06
Member No.: 29941



David, just one last thing, can you update http://wavpack.com/downloads.html with latest Winamp input plugin? Just to make sure, that all people use latest version.

-Chris
Go to the top of the page
+Quote Post
bryant
post Mar 2 2009, 07:50
Post #25


WavPack Developer


Group: Developer (Donating)
Posts: 1297
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



QUOTE (Koopatrooper @ Mar 1 2009, 13:50) *
David, just one last thing, can you update http://wavpack.com/downloads.html with latest Winamp input plugin? Just to make sure, that all people use latest version.

Yes, I will do that this week. I have to find the backup folder image where I built the installer on a long-dead Windows machine... sad.gif

Thanks again to you guys for making this possible! smile.gif

David
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th December 2014 - 18:04