Winamp Embedded Window Plug-in Example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • akayrak
    Junior Member
    • Aug 2010
    • 2

    Winamp Embedded Window Plug-in Example

    Hi guys,
    I really did not understand how to create a plugin which is an external window from winamp but works and opens with winamp. Can anyone explain or point an article to me?
    Thanks in advance

    [edit - DrO 15/09/2010]
    See http://nunzioweb.com/daz/gen_embedwnd/ for example plug-in source and download
  • siam6606
    Junior Member
    • May 2010
    • 42

    #2
    The best of the best example is the DrO's gen_wa2dlg...
    But I don't know the URL to download it...

    Comment

    • DrO
      • Sep 2003
      • 27868

      #3
      hmm, i'm not sure i've got a copy of that project myself though i know it's out of date and needs to be refreshed (especially to show how to properly insert items into the Winamp menus). will try to sort something out over the next few days (is a good thing i'm doing some updates of my site so i can allocate the time to it).

      here's the old links... http://forums.winamp.com/showthread....hreadid=154650 (gen_wa2dlg) and http://forums.winamp.com/showthread.php?t=178052 (gen_craig) but they're poorly documented and really i wouldn't suggest using them as is since they're not fully compatible with newer client releases (breaks unicode taskbar text and the menu issue if in there is unreliable).

      plus we're 6-7 years on from when i first did them so i should be able to make a better example now anyway

      -daz
      WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

      Comment

      • akayrak
        Junior Member
        • Aug 2010
        • 2

        #4
        Anything else? Cause these are really old. Is there any new document or sample plug-in?

        Comment

        • DrO
          • Sep 2003
          • 27868

          #5
          you could work through a recent copy of wa_ipc,h and manually find all of the relevant apis if you want to but otherwise there's no other examples that i'm aware off at the moment. alas documentation of most thnigs to do with Winamp has generally been poor as you're now finding.

          -daz
          WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

          Comment

          • DrO
            • Sep 2003
            • 27868

            #6
            i've not forgotten about this, just a bit pressed on time (as i've 25+ of my plug-ins to still update due to other reasons) and need to work out how to resolve a quirk with going from classic skin -> modern skin -> closing winamp -> restarting winamp -> classic skin (causes the height and width to use the modern skin width instead of the classic width) - am trying to find a decent solution without too much menu / api hooking...

            [edit - 1hr later]
            just fixed the size not being preserved in the above scenario from what i can tell so now just need to get the comments in the source finished off - it won't be 100% but it should be understandable for the most parts

            -daz
            WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

            Comment

            • DrO
              • Sep 2003
              • 27868

              #7
              i've now finished of v1.0 of the Winamp Embedded Window Plug-in Example which can be found at http://nunzioweb.com/daz/gen_embedwnd/

              and now i've got to update some of my plug-ins as this new code is a lot better than my own older codebase, heh

              -daz
              WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

              Comment

              • thinktink
                Forum King
                • May 2009
                • 3348

                #8
                Small bug

                I found a small UI bug. I don't know if it's with the example plugin or if it's a Winamp 5.581 bug since I'm not aware of another plugin that uses the embedded window right now.

                If you close the example embedded window from the close X [button] on the window itself instead of un-checking it from the context menu, when you reopen the menu, the option for the example window still shows as checked. If you click on it after the Window comes back. If you close the window from the context menu it behaves normally. It's as if the check mark of context menu for the embedded window isn't being updated to reflect the current state of the example window when you close the window outside the context menu.

                It does this on both my box at work and at home both running Windows XP Home with the latest version of Winamp installed. My box at home does have modern skin support installed but I don't use it. I don't know if that's relevant or not but I mention it just in case it is.
                | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                | AterKast (Source DSP) | More of my stuff... |

                Comment

                • DrO
                  • Sep 2003
                  • 27868

                  #9
                  Originally Posted by thinktink View Post
                  It's as if the check mark of context menu for the embedded window isn't being updated to reflect the current state of the example window when you close the window outside the context menu.
                  oops, you're correct. will get that fixed at the start of next week - i should have caught that but i tended to do the testing via the menu / shortcut as i was coding it over vnc (will teach me to do that, heh). thanks for finding the bug

                  as for other windows using the embedded window, the media library, the jtfe / queue manager window are about it (and AVS + Milkdrop) though none of them use the example code (though it's based more off the gen_ml handling then my over-coded jtfe version).

                  -daz
                  WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                  Comment

                  • DrO
                    • Sep 2003
                    • 27868

                    #10
                    just released v1.1 which should fix the update issue when clicking the close button (1 line fix to get the update function called *shrugs* ).

                    -daz
                    WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                    Comment

                    • Danya Lukin
                      Junior Member
                      • Jan 2011
                      • 9

                      #11
                      Hey Daz, what's the post compilation command that runs lng_generator.exe?
                      What is that executable anyways, does it just copy the dll, or does it have other important function?

                      And when i compile the project (windows 7, visual stoduio 2010) it doesnt give out any errors, but the plugin is not recognized.

                      Comment

                      • thinktink
                        Forum King
                        • May 2009
                        • 3348

                        #12
                        Originally Posted by Danya Lukin
                        And when i compile the project (windows 7, visual stoduio 2010) it doesnt give out any errors, but the plugin is not recognized.
                        Double check to make sure that your plugin's primary export function is not name mangled and is using the __cdecl calling convention.
                        | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                        | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                        | AterKast (Source DSP) | More of my stuff... |

                        Comment

                        • DrO
                          • Sep 2003
                          • 27868

                          #13
                          Originally Posted by Danya Lukin View Post
                          what's the post compilation command that runs lng_generator.exe?
                          What is that executable anyways, does it just copy the dll, or does it have other important function?
                          it generates a language file from the plug-in which can then be passed onto language pack authors so they can translate aspects of the plug-in as needed - basicially any new plug-in created should be doing this as seeing as localisation support has been in Winamp since 2007 (when 5.5 was released), there's no real excuse to not just target that as a minimum Winamp version especially as we're almost 4years since that release.

                          the command is in the post-build section of the project.

                          -daz
                          WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                          Comment

                          • Danya Lukin
                            Junior Member
                            • Jan 2011
                            • 9

                            #14
                            thanks alot thinkthink!!
                            i guess Visual studio converted the convetions to sdtcall and i didnt know i had to change that..
                            its working now!

                            But there is a different problem - the dll is recognized, but when you click on the plugin in the gen plugins list, it only opens the config dialog, not the window, while the dll that came with the source code worked fine and the window opened...
                            what could be wrong?

                            Comment

                            • DrO
                              • Sep 2003
                              • 27868

                              #15
                              the config option doesn't open the embedded window. you need to check it's not set to hidden in the main right-click menu for the option to open the window.

                              also, i'm not sure why VS would have converted the function calling convention as __cdecl is the default (at least with all of the versions i've used upto VS2008).

                              -daz
                              WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                              Comment

                              Working...
                              X