Skip to main content

Topic: @ Benski: no WavPack in Winamp Essentials 5.54? (Read 27127 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Howdy Benski and WA guys over here @ HA,
as you surely know by now the WavPack Winamp plugin has reached final release (v2.5  ), 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...

Thanks/ciao.

Dc
WavPack 4.75.2 -b384hx6cmv/qaac 2.55 -V 100

  • benski
  • [*][*][*][*][*]
  • Developer
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #1
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

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #2
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.

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

-Chris
  • Last Edit: 23 July, 2008, 04:44:44 PM by Koopatrooper

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #3
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

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #4
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
  • Last Edit: 24 July, 2008, 07:02:37 AM by Koopatrooper

  • benski
  • [*][*][*][*][*]
  • Developer
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #5
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.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #6
Thanks for the pointers; I'll take a look and see if I can figure it out, otherwise I'll ask for more... 

As I mentioned, I'm swamped just lately, but I should get a chance at some point next month.

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #7
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
  • Last Edit: 11 January, 2009, 09:25:56 AM by Koopatrooper

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #8
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

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #9
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: [Select]
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. 

Regards,
David

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #10
Thanks for this, I've made a quick test and the translation is working fine.  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
  • Last Edit: 19 January, 2009, 09:11:16 AM by Koopatrooper

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #11
Great, thanks for trying it out so quickly!

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

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #12
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
  • Last Edit: 19 January, 2009, 04:51:21 PM by Koopatrooper

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #13
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

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #14
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

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #15
Still not complete, but should help you I guess.

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

-Chris

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #16
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!  Thanks!

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #17
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! 

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #18
I can verify that both issues are fixed, the temp file will be deleted and the file info editor shows the umlauts correctly now.

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

  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #19
WavPack is a nice lossless codec, I hope shipping it in EP will help spreading the format.
That was the idea. 
A big fat thank you to David for squeezing in the time to do this, appreciated.
Maybe you'll create an encoder plugin for Winamp too someday, hehe.
Why not! HINT HINT HINT
WavPack 4.75.2 -b384hx6cmv/qaac 2.55 -V 100

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #20
WavPack is a nice lossless codec, I hope shipping it in EP will help spreading the format.
That was the idea. 
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. 

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #21
Winamp Essentials Pack v5.55 released, including WavPack decoder. WavPack decoder is also translated in most of the official language packs.

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

Again, thanks for this David.

-Chris

  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #22
Great news!

Then it's really time to work on an encoder plug-in  !
WavPack 4.75.2 -b384hx6cmv/qaac 2.55 -V 100

@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #23
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

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
@ Benski: no WavPack in Winamp Essentials 5.54?
Reply #24
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... 

Thanks again to you guys for making this possible! 

David