Author Topic: Old:Winamp Visualisations in XMPlay (0.9.11) (plus album art with auto download)  (Read 126295 times)

Barna

  • Posts: 105
Hi All

Ok, here's why. I really wanted some kind of MilkDrop support in XMPlay. I really like to stare at the moving pixels it generates.
So I had two three options:
- Make a proper Sonique plugin with the released sources of the old Milkdrop version
- Make a Sonique plugin which integrates Winamp plugins somehow in XMPlay.
- Use another player, duh

While option 3 wasn't really an option, I went for 2. I am quite aware that a proper Sonique visualisation would be much cleaner, but I was kinda intrigued by the development of the integration of these two plugin APIs.


(Old screen shot)
(Old screen shot)

The second main feature is the album art cover display.
It shows locally found covers and is able to automatically download covers from amazon.

Download: http://www.nukular.ch/winamp_svp_0.9.11.zip

Version history:
Download: http://www.nukular.ch/winamp_svp_0.1.zip
Download: http://www.nukular.ch/winamp_svp_0.2.zip
Download: http://www.nukular.ch/winamp_svp_0.3.zip
Download: http://www.nukular.ch/winamp_svp_0.4.zip
Download: http://www.nukular.ch/winamp_svp_0.5.zip
Download: http://www.nukular.ch/winamp_svp_0.6.zip
Download: http://www.nukular.ch/winamp_svp_0.7.zip
Download: http://www.nukular.ch/winamp_svp_0.8.zip
Download: http://www.nukular.ch/winamp_svp_0.9.zip

Read the included winamp_svp.txt for all features and version history.

Of course, as always, feedback of any kind would be more than appreciated.

Greetings from Switzerland,
Bernhard

Edit: Oh, yah, I found out about bass_vis and other plugins doing the same but for other players during the development, but I hope this still is new (for XMPlay) :-) Anyway, I had lots of fun during development so I don't care that much.

Edit: 0.2 added, MilkDrop 2.0d partially supported, see below.
Edit: 0.3 added, MilkDrop 2.0d fully supported (Thanks to Yirkha from the Hydrogenaudio Forums )
Edit: 0.3 added, album art, lookup order: embedded (in ID3v2 tags), cover.jpg/png, folder.jpg/png, any image in directory.
Edit: 0.4 added, included an elegant solution with a user friendly menu added.
Edit: 0.5 added, not that many changes. Make sure you use the newest XMPlay version (3.4.2.28+) to use all the new 'features'
Edit: 0.6 added, automatic cover downloading through Amazon Cover Downloader and multi cover image selection.
Edit: 0.7 added, some album art related changes, see newer posting, this post is already as cluttered as it can get :-)
Edit: 0.8 added, yaywoo!
Edit: 0.9 added, yayaywoo!
Edit: 0.9.5 added, fully featured auto cover downloader integrated directly in the plugin.
Edit: 0.9.8 added, support for cover images in FLAC tags.

Edit:
Plugin has been splitted into xmp-wavis and xmp-coverart.
xmp-wavis: https://www.un4seen.com/forum/?topic=8807.0
xmp-coverart: https://www.un4seen.com/forum/?topic=8808.0
« Last Edit: 5 Aug '08 - 06:23 by Barna »

Auren

  • Posts: 144
Re: Winamp Visualisations in XMPlay (0.1)
« Reply #1 on: 13 Feb '08 - 20:02 »
At last... I'll test it through. But thanks anyway :D

First bug. It doesn't work properly with the latest version of Milkdrop included in Winamp 5.52
« Last Edit: 13 Feb '08 - 21:47 by Auren »

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.1)
« Reply #2 on: 14 Feb '08 - 10:01 »
:o It indeed doesn't... or didn't, partly.
The newest MilkDrop 2.0d started to use Nullsoft's new (or old, from the unloved Winamp 3) Wasabi API which is huge and of course the first thing that gets requested by MilkDrop is an undocumented Language API service. Well I could fake some of the required data to get the plugin up and running normally, but the configuration screen just doesn't want to start. So to set up a config file (full screen resolution settings amongst other things) an old version like 2.0c or Winamp would be required.
So I rewrote a big chunk of it, adding another thread and support to reply with something when Wasabi requests come in. It may be more stable or even worse.

Download: http://www.nukular.ch/winamp_svp_0.2.zip

Enjoy (hopefully)

Auren

  • Posts: 144
Re: Winamp Visualisations in XMPlay (0.2)
« Reply #3 on: 14 Feb '08 - 18:24 »
Sorry, but it still doesn't work with the latest Milkdrop available... I uploaded an archive with the player and .vis files for you to reproduce the problem.

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.2)
« Reply #4 on: 15 Feb '08 - 03:21 »
Well seems like MilkDrop brought another new requirement. It requires the DLL nscrt.dll from the Winamp installation. So either install Winamp (it will put NSCRT.DLL into system32) or copy it from somewhere and place it next to XMPlay.exe.
It's a bit stupid that it doesn't display the usual 'DLL not found blah blah' error message and just crashes... I'll try to change that.
If that still doesn't work, then it's strange... It works here on two machines fine now.

Edit: OK, modified 0.2 once again. It now shows fancy error messages on missing requirements/dependencies and doesn't crash XMPlay anymore.
« Last Edit: 15 Feb '08 - 04:30 by Barna »

Auren

  • Posts: 144
Re: Winamp Visualisations in XMPlay (0.2)
« Reply #5 on: 15 Feb '08 - 06:11 »
it will put NSCRT.DLL into system32
It won't :)

or copy it from somewhere and place it next to XMPlay.exe.
Did that.

If that still doesn't work, then it's strange... It works here on two machines fine now.
And now it works on my computer too :D Thank you for the detailed explanation!
« Last Edit: 15 Feb '08 - 06:20 by Auren »

piovrauz

  • Posts: 967
Re: Winamp Visualisations in XMPlay (0.2)
« Reply #6 on: 19 Feb '08 - 08:03 »
Great, that's a great start. I'll give it a test with the plugins I love the most, but it's already good with milkdrop support.

Do you plan to add config dialog or such? or you're waiting for it to became more stable/complete/optimized?

Btw: lil "bug" sometime milkdrop doesn't see the res my monitor can do, and even another bunch of plugins too :P

Anyway, tyanks for your work, and keep it up ;)

Edit1: I've tested it with geiss2, it works very well, only some hotkey broken, but all the importants stuff are there :) thanks again
« Last Edit: 20 Feb '08 - 07:34 by piovrauz »

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #7 on: 20 Feb '08 - 08:33 »
See first post, added 0.3 which doesn't change that much in the visualisation part (except that the config screen from the new plugins now work fully), but adds an experimental cover art display functionality.

it will put NSCRT.DLL into system32
It won't :)
hehe, you're right... I wonder how it ended up there on my machine...

Do you plan to add config dialog or such? or you're waiting for it to became more stable/complete/optimized?
For now the only way to open the config screen of the plugin is that you have to press and hold the shift key during the loading of the visualisation.
As for an included option dialog with uber user friendliness... I dunno, maybe I'll hack something one day... For now the sonique visualisation system used by XMPlay is a bit limited to support it all in a real fancy way.

Btw: lil "bug" sometime milkdrop doesn't see the res my monitor can do, and even another bunch of plugins too :P
Maybe you can fix it with MilkDrop's config screen, the one from 2.0d now works too.
Otherwise it's a bit weird, MilkDrop has it's own window management and screen setup functions, it shouldn't be different from how it runs in actual Winamp.

Edit1: I've tested it with geiss2, it works very well, only some hotkey broken, but all the importants stuff are there :)
Thanks for the report, I'll try it myself and see if I can get everything working perfectly.

piovrauz

  • Posts: 967
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #8 on: 20 Feb '08 - 12:24 »
monitor res fixed, it is selectable ;) by config, just didn't noticed at first, discoverd when trying out geiss2 (reading explanations? me? naaa...)

report n° 1: sometime in fillscreen mode xmplay appears on top of the rendered stuff, blinking so frames and then disappearing... dunno why. maybe cause I have it "always on top"?

report n° 2: iconizing xmplay, the wa plugin doesn't get data... is it possible to keep feeding it? or it's xmplay that does thi in order to save cpu?

« Last Edit: 20 Feb '08 - 16:04 by piovrauz »

Ian @ un4seen

  • Administrator
  • Posts: 20426
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #9 on: 20 Feb '08 - 14:14 »
I've never used Winamp vis or cover art, but this plugin looks like some nice work! :)

hagbard23

  • Posts: 7
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #10 on: 20 Feb '08 - 18:41 »
Great plugin, it's almost exactlly what I was dreaming about  :)

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #11 on: 20 Feb '08 - 22:36 »
Edit1: I've tested it with geiss2, it works very well, only some hotkey broken, but all the importants stuff are there :)
Seems to be just about the same as with MilkDrop, most work, except toggling shuffle doesn't report correctly if it was set on or off (can't get that info from XMPlay) and the play list is 'read only' (meaning a new song can't be started), so pressing enter in the play list inside of the visualisation doesn't work as expected. I tried to simulate the select-playlist-entry-number by sending the correct number of list-nav-up/down but that only worked for small 'play list jumps'.

monitor res fixed, it is selectable ;) by config, just didn't noticed at first, discoverd when trying out geiss2 (reading explanations? me? naaa...)
Yeah guess we're all the same about readmes :-) But suddenly as a developer I start to feel different, haha

report n 1: sometime in fillscreen mode xmplay appears on top of the rendered stuff, blinking so frames and then disappearing... dunno why. maybe cause I have it "always on top"?
hmm, I tried a few different settings (resolution modes of MilkDrop, XMPlay appearance/misc settings and skins) but it doesn't happen to me. The only thing that can cause flickering is the volume bubble which appears when pressing up/down in MilkDrop with XMPlay always on top.

report n 2: iconizing xmplay, the wa plugin doesn't get data... is it possible to keep feeding it? or it's xmplay that does thi in order to save cpu?
Yeah, too bad about it. I was thinking about minimizing XMPlay during Winamp plugin full screen but the rendering of the actual XMPlay plugin doesn't get called anymore then so no new data can get to the visualisation. If it's minimized to tray the visualisation can be activated by right clicking the tray icon and selecting info window. Otherwise one could assign a global shortcut to Info - Visuals to open the window while XMPlay is minimized. The info window then could be moved somewhere near the edge of the screen or even below the Windows task bar.

I've never used Winamp vis or cover art, but this plugin looks like some nice work! :)
Thanks Ian, I actually never cared much about the covers too, but I think now is a good time for me to start including cover albums in the usual ripping/tagging process :-)

Auren

  • Posts: 144
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #12 on: 21 Feb '08 - 18:59 »
Can't get 0.3 ver. of this plugin to show me Milkdrop's visualization. It only shows me "No Album Cover" message...

Milkdrop 2.0d
XMPlay 3.4.2.26
Tried to use both methods to load the plugin.
« Last Edit: 21 Feb '08 - 19:03 by Auren »

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.3) (plus album art)
« Reply #13 on: 22 Feb '08 - 01:24 »
^ Hope all your problems are solved now :-)

Presenting, version 0.4, titled 'fancy user friendliness powered'.
As you can see in the thread opening's screen shot, it now features a nice little menu including a button which displays a file open dialog to load a plugin. Hope it's all clear and easy now.

piovrauz

  • Posts: 967
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #14 on: 22 Feb '08 - 08:13 »
Nice, very nice, so now I suppose it'll be easier to choose between the 3 vis from wa I like ;)


Auren

  • Posts: 144
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #15 on: 22 Feb '08 - 13:26 »
Yes, Barna. "Fancy user friendliness powered interface" does its job :) It showed me that there are problems in DLL dependencies. So, I tried to put nscrt.dll in the same folder where vis_milk2.dll resides. And now it works. Thanks a lot for your work.

piovrauz

  • Posts: 967
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #16 on: 22 Feb '08 - 13:53 »
I was thinking about the blinking when i fullscreen and the stop in feeding data to the plugin when xmplay is minimized... maybe, maybe, Ian could put an option to continue feeding the vis data even when the xmplay is minimized, and one to iconize xmplay when fullscreen is launched on a plugin. (what a demanding guy I am...)

I suppose these may fix the 2 issues I found, but if it involves massive rewritingg in xmplay, np don't do it ;)

btw: is it possible to change "central mouse key with, say, shift+click?" scroller are sensible fellow, and I end up changing plugin instead of opening config :P

I know, you're starting to hate me...

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #17 on: 22 Feb '08 - 18:55 »
If your computer allows it, you can use the MilkDrop/Geiss option 'Use Fake fullscreen mode' if your computer allows it (performance wise, as it doesn't lower the resolution). It seems to run better in many ways, at least here.

But if Ian actually starts to customize/add features to XMPlay for this vis, I could add a few more things to the list :-)
One thing would be a way to get the current output sample rate via QueryInterface. I'm doing this currently via DDE INFO0 string parsing, but there could be a nicer way I guess.
Another would be support for a few more of the Winamp IPC messages. Mostly IPC_SETPLAYLISTPOS and IPC_GET_SHUFFLE (gets if random play order is active or not) for now, for perfect support of MilkDrop2 at least.
I'm unsure about this one, but I feel like it would be nice if the plugin could control XMPlay (start, stop, volume up/down) with something else than DDE. It kinda makes me feel uneasy as DdeUninitialize made the plugin thread hang before... But I think I have it under control now (queueing DDE commands, delayed execution, ...). Still it would feel nice if for instance QueryInterface::QueryInt could be used to send KEYxxx commands and QueryString for INFO0/1/2.

I know, you're starting to hate me... >_>

The shift-click alternative is up to Ian... It works well here (you don't need to hold down middle mouse button, just click it and release it, then chose). But there are mouse drivers out there (at least were a few years ago) which override middle mouse button with something else, so maybe there are people who can't use it now at all.

The option to continue feeding the plugin while minimized wouldn't even needed to be added to the options, as the plugin could activate/deactivate that option when it's Winamp wrapped reports about going full screen/coming back from it. But yeah, both implementations would be a bit weird/improper anyway... So maybe just minimizing XMPlay (with right click if tray is disabled) and reopening only the vis window (right click on the tray icon, 'Info window' would be better and work anyway. Still XMPlay would need to stop redrawing the visualisation window. Maybe it could not do that if the vis render method returns false.

Ian @ un4seen

  • Administrator
  • Posts: 20426
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #18 on: 23 Feb '08 - 15:12 »
I was thinking about the blinking when i fullscreen and the stop in feeding data to the plugin when xmplay is minimized... maybe, maybe, Ian could put an option to continue feeding the vis data even when the xmplay is minimized, and one to iconize xmplay when fullscreen is launched on a plugin. (what a demanding guy I am...)

I'll have to think about that.

is it possible to change "central mouse key with, say, shift+click?" scroller are sensible fellow, and I end up changing plugin instead of opening config :P

I think that could be arranged. Actually, the Sonique API "button has been clicked" function has a "buttons" parameter, implying that it may support/distinguish multiple buttons (eg. left and right). Unfortunately, the API doesn't mention any valid parameter values. Does anyone know if Sonique supported multiple buttons, and if so, know of any plugins that took advantage of that?

Another would be support for a few more of the Winamp IPC messages. Mostly IPC_SETPLAYLISTPOS and IPC_GET_SHUFFLE (gets if random play order is active or not) for now, for perfect support of MilkDrop2 at least.

According to the Winamp API, IPC_SETPLAYLISTPOS just moves focus in the playlist, and does not change playback. Are you sure that's what you want? :)

I'm unsure about this one, but I feel like it would be nice if the plugin could control XMPlay (start, stop, volume up/down) with something else than DDE. It kinda makes me feel uneasy as DdeUninitialize made the plugin thread hang before... But I think I have it under control now (queueing DDE commands, delayed execution, ...). Still it would feel nice if for instance QueryInterface::QueryInt could be used to send KEYxxx commands and QueryString for INFO0/1/2.

I think I have a better idea :)

Here's an update with a "xmplay:interface" QueryInt option, which will give you access to the XMPlay plugin functions...

   www.un4seen.com/stuff/xmplay.exe

The XMPlay general plugin APIs are included in the DSP plugin SDK (on the XMPlay page). You would use it something like this...

Code: [Select]
// get XMPlay interface
InterfaceProc xmpface;
sonface->QueryInt("xmplay:interface", (int*)&xmpface);
// get miscellaneous functions
XMPFUNC_MISC *xmpmisc=(XMPFUNC_MISC*)xmpface(XMPFUNC_MISC_FACE);

// get general info text
char *text=xmpmisc->GetInfoText(XMPINFO_TEXT_GENERAL);

// press play/pause
xmpmisc->PerformShortcut(80);

Be sure to check the QueryInt return value, in case a previous EXE is being used.

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #19 on: 23 Feb '08 - 16:20 »
According to the Winamp API, IPC_SETPLAYLISTPOS just moves focus in the playlist, and does not change playback. Are you sure that's what you want? :)
Yeah, thats fine.
The plugin (MilkDrop2 in that case) sends another command (WM_COMMAND with a param of some winamp button ID thingie) directly after the SETPLAYLISTPOS which gets translated to a DDE Key Command (List Play). So it should work out well.
As I mentioned, currently my visualisation calculates the difference between the requested SetPlayListPos and IPC_GETLISTPOS and sends as much List nav - Up/Down as needed. Kinda works, too, but not too well. Maybe better now with the XMPFUNC_MISC commands, haven't tried that yet.
But meh, it's not that important anyway...

I think I have a better idea :)

Here's an update with a "xmplay:interface" QueryInt option, which will give you access to the XMPlay plugin functions...
...
Be sure to check the QueryInt return value, in case a previous EXE is being used.
Thats great.
Will implement it with both solutions for now.
Thanks.

Ian @ un4seen

  • Administrator
  • Posts: 20426
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #20 on: 27 Feb '08 - 15:25 »
Here's an (untested :)) update that should allow vis updating while XMPlay is minimized...

   www.un4seen.com/stuff/xmplay.exe

It's a plugin controlled setting (rather than a user setting), to avoid unnecessary updating for plugins that don't need it. Again, it's a QueryInt option ("xmplay:minupdate"), but instead of XMPlay returning a value, it reads a value from the plugin. You would use it like this...

Code: [Select]
// enable minimized updating
int minupdate=1;
sonface->QueryInt("xmplay:minupdate", &minupdate);

// disable minimized updating
int minupdate=0;
sonface->QueryInt("xmplay:minupdate", &minupdate);

The setting is reset (disabled) each time a new plugin is loaded, and a plugin shouldn't set it after it has been closed (eg. SaveSettings has been called).

Btw, I forgot to mention last time that you need to free the texts that you receive from XMPlay (unless it's defined as "const"), using the "Free" miscellaneous function.

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #21 on: 28 Feb '08 - 05:58 »
Thanks Ian, minupdate works fine as far as I can see.

But...

I was almost ready to make a release when I encountered some weird behaviour.
When a thread started by the vis plugin uses XMPFUNC_MISC::PerformShortcut( 80 ) to play a track it works fine, until that thread stops. Then XMPlay's sound playing thread kind of freezes and doesn't continue until it's started again (by pressing pause/play twice for instance).

Here's the code of some mini sample plugin which reproduces the behaviour (source/binary download):

Code: [Select]
#include <windows.h>
#include <stdio.h>
#include "vis.h"
#include "xmpfunc.h"

void initialize(void);
BOOL render(unsigned long* Video, int width, int height, int pitch, VisData* pVD);
BOOL savesettings(char* FileName) { return TRUE; }
BOOL opensettings(char* FileName) { return TRUE; }
BOOL receivequeryinterface(QueryInterface* Interface);
BOOL deinit();
BOOL clicked(int x, int y, int buttons);

VisInfo plugin = { 1, "XMPFunc Test", 0, &initialize, &render, &savesettings, &opensettings, &deinit, &clicked, &receivequeryinterface };
DLLEXPORT VisInfo* QueryModule(void) { return &plugin; }

int sentpause = 0;
int sentplay = 0;
int threadalive = 0;
XMPFUNC_MISC* XMPlay_Misc = NULL;
BOOL receivequeryinterface(QueryInterface* queryinterface)
{
QueryInterface* XMPlay_QueryInterface = queryinterface;
InterfaceProc xmpface = NULL;
if (queryinterface->QueryInt("xmplay:interface", (int*)&xmpface) && xmpface)
XMPlay_Misc = (XMPFUNC_MISC*)xmpface(XMPFUNC_MISC_FACE);
return TRUE;
}

DWORD WINAPI ThreadProc(LPVOID lpParam)
{
threadalive = 1;
Sleep(2000);
sentpause = 1;
if (XMPlay_Misc) XMPlay_Misc->PerformShortcut(80);
Sleep(2000);
sentplay = 1;
if (XMPlay_Misc) XMPlay_Misc->PerformShortcut(80);
Sleep(2000);
threadalive = 0;
return 1;
}

HANDLE hThread = NULL;
void initialize(void)
{
hThread = CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL);
}

BOOL clicked(int x, int y, int buttons)
{
if (!threadalive) initialize();
return TRUE;
}

BOOL deinit()
{
if (WaitForSingleObject(hThread, 500))
{
TerminateThread(hThread, 0);
}
CloseHandle(hThread);
return TRUE;
}

BOOL render(unsigned long* Video, int width, int height, int pitch, VisData* pVD)
{
char szText[4][128];
BITMAPINFO m_bmpInfo;
HDC m_dcPaint;
long *m_pPaintBuffer;
HBITMAP hDibSection;
HDC hDC;
HGDIOBJ OldObject;
int y;
memset(&m_bmpInfo.bmiHeader, 0, sizeof(m_bmpInfo.bmiHeader));
m_bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
m_bmpInfo.bmiHeader.biWidth = width+(width%4?4:0)-(width%4);
m_bmpInfo.bmiHeader.biHeight = 0-(height+(height%4?4:0)-(height%4));
m_bmpInfo.bmiHeader.biPlanes = 1;
m_bmpInfo.bmiHeader.biBitCount = 32;
hDC = GetDC(NULL);
hDibSection = CreateDIBSection(hDC, (BITMAPINFO *) &m_bmpInfo, DIB_RGB_COLORS, (void**)&m_pPaintBuffer, NULL, 0);
m_dcPaint = CreateCompatibleDC(hDC);
SetMapMode(m_dcPaint, GetMapMode(hDC));   
OldObject = SelectObject(m_dcPaint, hDibSection);
PatBlt(m_dcPaint,0,0,m_bmpInfo.bmiHeader.biWidth,m_bmpInfo.bmiHeader.biHeight,RGB(0,0,0));
sprintf( szText[0], "Thread active: %d", threadalive);
sprintf( szText[1], "");
sprintf( szText[2], "sentpause (shortcut 80): %d", sentpause);
sprintf( szText[3], "sentplay (shortcut 80): %d", sentplay);
SetBkMode(m_dcPaint,RGB(255,255,255));
SetTextColor(m_dcPaint,RGB(255,200,0));
for (y = 0; y < 4; y++) TextOut( m_dcPaint, 6, 5+y*15, szText[y], strlen( szText[y] ) );
for (y = 0; y < height; y++) memcpy(&Video[y*pitch], &m_pPaintBuffer[y*m_bmpInfo.bmiHeader.biWidth], width*sizeof(long));
DeleteObject(OldObject);
DeleteDC(m_dcPaint);
DeleteDC(hDC);
DeleteObject(hDibSection);
return TRUE;
}

I deleted the previous 3.4.2.27 version already so I'm unsure if that was added due to the last update.

It works fine if the PerformShortcut calls are in the render function (even if the thread does the first 80-shortcut (pause) and then the render function does the second (play) later).
So yeah, I'm a bit struck by that whole thing... It could probably be worked around by using some queue from the vis thread so only the render function does the XMPFUNC_MISC commands. But I wanted to ask back maybe you have an idea (talk about abusing your attention now >_<).

Thanks already :-)

piovrauz

  • Posts: 967
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #22 on: 28 Feb '08 - 15:30 »
@Barna: talking about stuff that pops up when using your plugin: the bubbles indicating volume that appears when changing volume, is possible to remove them? Maybe letting the wa plugin managing that "info"? just an idea. I'll test the svp in the attachment too, tonite ;)

Ian @ un4seen

  • Administrator
  • Posts: 20426
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #23 on: 28 Feb '08 - 15:44 »
I was almost ready to make a release when I encountered some weird behaviour.
When a thread started by the vis plugin uses XMPFUNC_MISC::PerformShortcut( 80 ) to play a track it works fine, until that thread stops. Then XMPlay's sound playing thread kind of freezes and doesn't continue until it's started again (by pressing pause/play twice for instance).

Do you happen to be using DirectSound output? DirectSound will kill the playback if the thread that started it dies.

Barna

  • Posts: 105
Re: Winamp Visualisations in XMPlay (0.4) (plus album art)
« Reply #24 on: 28 Feb '08 - 18:27 »
Do you happen to be using DirectSound output? DirectSound will kill the playback if the thread that started it dies.
Ah great I'm an idiot...
I installed the DirectSound plugin once out of boredom while looking through all the downloads and just trying everything out :-)
It all makes more sense now. Even though it does only happen with shortcut 80, and not with 372 (List - Play) or 128 (Change track - Next). But I guess that is just how it works internal.
Well in a straight-forward-one-INT-solution I just now let the main thread do the 80 commands :-)

@Barna: talking about stuff that pops up when using your plugin: the bubbles indicating volume that appears when changing volume, is possible to remove them? Maybe letting the wa plugin managing that "info"? just an idea. I'll test the svp in the attachment too, tonite ;)
Well I tried to hide the bubbles but apparently XMPlay still displays a very small bubble when being asked to show an empty (String "") bubble. Anyway it doesn't matter that much anymore as these are only shown while XMPlay is not minimized. Now the visualisation does minimize XMPlay automatically (when asked by the Winamp plugin on fullscreen, configurable for MilkDrop for instance) and can be minimized manually without losing the visualisation input.

Download: http://www.nukular.ch/winamp_svp_0.5.zip
« Last Edit: 28 Feb '08 - 20:25 by Barna »