View Full Version : SendMessage() problem
notaDJ
7th April 2002, 14:15
I use SendMessage() in VB to tell WinAMP to change EQ settings. But he simply doesn't want to do that.
He changes ON/OFF and AUTOLOAD state, but Preamp and 10 bands stay unchanged. But when I close down WinAMP, and restart it, THEN he sets up EQ the way I wanted it.
That indeed makes no sense, since all other SendMessage() codes I used, work fine.
What's up with that....
It's going on my nerves :igor:
davekc
9th December 2002, 20:51
I got the same problem...
Have you find why?
davekc
10th December 2002, 17:17
That was an easy on actually!
Simply send a WA_RELOADSKIN command after...
jmoschetti45
19th January 2003, 23:54
Good fix but it takes up processing power and it takes a few seconds so the change isn't instant.
davekc
20th January 2003, 12:32
That's the only way. To apply the settings quicker, with less CPU demands, simply reduce the buffer size to less than 2sec default. With a 500ms setting for instance, the EQ will change that quick. Yes, it depends on buffer length, that's the way it works. Also, if my memory is good, the EQ settings are apply even if we don't see it (before the refresh), so my fix is not the problem as you can see.
jmoschetti45
20th January 2003, 19:04
I get what you are trying to say but there should be a better way.
Tuatara
1st June 2003, 10:49
The way I was able to do it in the Virtuoso plugin was to mimic the actions a user would take to do it:
1). Get the current value of the EQ Settings you want (from EQ, or from your application)
2). Use SendMessage() to send the keys 1234567890 / QWERTYUIOP directly to the EQ Window, until the EQ setting is 'approx' what you want it to be (i.e. if it was below, send '1', otherwise send 'Q') - when you cross over (i.e. if below, then stop when equal to or above the value you want - etc.)
3). Use SendMessage() and re-set the value to be exactly what you want it to be in the EQ.
End result - the slider is in the right place, and the EQ is set EXACTLY to the value you want.
Yeah - it's messy, does a lot of 'keystroke-stuffing', but it avoids a skin reload, avoids other redraw tricks/issues, and works reliably since keyboard control works in 2.x. Also has the added benefit of 'continuously' modifying the EQ settings to the final desired value (although this happens nearly instantaneously).
Anyways ... still working on Virtuoso II (Winamp 3.x, and soon to follow a Winamp 2.9x version) ...
Regards,
Robert.
jmoschetti45
1st June 2003, 10:54
Yes, that fixed it :)
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.