My Winamp 2.x plugin, LucidAmp, has been idle for some time now. I've been on vacation from work for the Thanksgiving holiday, and decided that I should take a stab at updating LucidAmp to work with the Modern skins in Winamp 5.x (it still works just fine with Classic skins). I've gotten pretty far with it so far, and I think I may have something to show for it by the end of this weekend.
A few annoying things I've found so far:
- The Playlist Editor, Media Library, and Video window (and perhaps others ...) for Modern skins are really just a container for the old 2.x windows. This causes a problem if you've enabled transparency for the classic window and the modern window. I'm planning a work-around, but it was quite a surprise when I thought I had Modern skin support working only to find that the Media Library was rendering incorrectly.
- Windows in Modern skins all use the Window class BaseWindow_RootWnd, which means I have to key off of the window's caption as well as the class.
- There's no fixed set of windows that will always exist in a Modern skin (example). I'm currently iterating through all of the top-level windows and looking for those with a class of BaseWindow_RootWnd, but that means that LucidAmp may find more windows than you expect. It could end up with some windows listed in the configuration that have obscure names or non-obvious functionality. It also means that you may have to reconfigure LucidAmp for different skins, since they may use different captions.
- Modern skin windows like to change their WS_EX_LAYERED attribute and/or transparency level on focus, which means LucidAmp has to fight with Winamp. Ultimately, Lucidamp wins but it means there's some unsightly flickering at times.
- Winamp has some concurrency issues with closing plugins while quitting. If your plugin doesn't clean itself up fast enough, Winamp unloads the library out from under you and you get a nasty AV error. I'm using an ugly hack to bypass this by calling LoadLibrary on my plugin dll to increase the ref count, so it doesn't get unloaded until the winamp.exe process is completely stopped. I wish there was a better way to handle this, but at least this hack works.