Skip to main content
Topic: foo_winamp_spam 0.9 beta (Read 341702 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_winamp_spam 0.9 beta

Reply #150
thegeek: lParam = 106, seeking is already implemented, download the latest version of foo_winamp_spam plugin. If you don't belive me, use this program, which works with both foobar (foo_winamp_spam) and winamp. Of course with foobar doesn't work volume chaning, as Chronial hasn't implemented it yet.

Things which I found out that aren't implemented:
- volume setting - lParam = 122, wParam = volume
- VBR bitrate updating - lParam = 125, wParam = 1

You said you want to EMULATE Winamp API, and Winamp supports everything above. So, it's your move now. Implement it, or release source code, if you don't want to implement it. Thanks!

btw. I have found that foo_winamp_spam and Winamp 5.32 (latest) returns bits per sample differently. Winamp returns 44 and foo_winamp_spam returns 44100. foo_winamp_spam does it right.

foo_winamp_spam 0.9 beta

Reply #151
No, track seeking does _not_ work.
The program you linked shows the track progress, but you can NOT _seek_.
I did however use the wrong lparam;P
It's not 106, I have this in my code:
PostMessage(hwndFoobar2000,TRACKSET, 1, Round (  (Wparam/100) * SendMessage(hwndFoobar2000,TRACKLENGTH, 0, 0) ));
and
TRACKSET =  WM_USER + 13 ;

Sorry about the mistake;P
However, to get on topic: _Please_ release source code.

foo_winamp_spam 0.9 beta

Reply #152
No, YOU are wrong... don't make me blind, cause I'm not blind!

Code: [Select]
WM_USER = 1024; //(0x400)
IPC_JUMPTOTIME = 106; //(0x6A)

ret = SendMessage(hWnd, WM_USER, ms, IPC_JUMPTOTIME);


Here's my prove! You are using bad Message for foo_winamp_spam. Sorry, you are using Winamp IPC API WRONG way.

Code: [Select]
#define IPC_JUMPTOTIME 106
/* (requires Winamp 1.60+)
** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME);
** IPC_JUMPTOTIME sets the position in milliseconds of the
** current song (approximately).
** Returns -1 if not playing, 1 on eof, or 0 if successful
*/


Can you see that? You have to use SendMessage, NOT PostPessage. I have question: do you get something right from Winamp (foo_winamp_spam)? I don't think so.

Code: [Select]
/* message used to sent many messages to winamp's main window. 
** most all of the IPC_* messages involve sending the message in the form of:
**   result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);
*/
#define WM_WA_IPC WM_USER


And if you now still think you are right, start thinking about it. Think about all code sheets I've posted above.

And at last (for making things clear): foo_winamp_spam SUPPORTS seeking!!!

foo_winamp_spam 0.9 beta

Reply #153
Quote
Can you see that? You have to use SendMessage, NOT PostPessage. I have question: do you get something right from Winamp (foo_winamp_spam)? I don't think so.
using PostMessage(..) is a valid way of using some of the apis (basically those which you don't need to get the return value) and is used both by myself, others and internally in some instances - as long as the wndproc receives a valid message irrespective of it being done straight away (SendMessage(..) style) or delayed until the message pump gets to the message (PostMessage(..) style) and fits with how the api is implemented ie if you need the return value or not, then it doesn't matter.

with the case of IPC_JUMPTOTIME, it can be happily used with PostMessage(..) - i've got a few plugin's which do it so SendMessage(..) is not a fixed requirement for that api.

also your tone in your post comes across aggressively to an extent (is just how it seems to me).

-daz

foo_winamp_spam 0.9 beta

Reply #154
Yes, I knew about PostMessage, but I didn't use it.

btw. i was angry when thegeek repeately wrote about that foo_winamp_spam doesn't support seeking. I have to prove the opposite (as that is right)... that's why the post was aggressive

btw. I think he won't get from Winamp (or foo_winamp_spam) anything NOT because of using PostMessage. That's ok. But he is using BAD messages and he mixed up lParam and wParam params

foo_winamp_spam 0.9 beta

Reply #155
Well, if seeking actually works that would be great.
So far I used the app you posted with a completely fresh reinstall of foobar and with foo_winamp_spam from the link in the first post of this thread. Is there a newer version?
I have a song playing and the app you linked to does show the track progress, however if I change position on the slider it just "snaps" back. Exactly like the program I'm working on.
As for the code I posted I know it works, since it works with both winamp and foobar 0.8.

This is the code from another project I'm working on (this one c++) :
case MODE_AMP:
   PostMessage(g_hwndWinamp, WM_USER, ((SendMessage(g_hwndWinamp,WM_USER, 1, 105)*1000)/100)*wParam, 106);
   break;

This code _works_ with the latest winamp.

The reason I use postmessage instead of sendmessage is because this is used directly in the message processing-function of a gui element, sendmessage will block and that means the gui element might not respond. I also fail to see why my messages are "bad", when they work with winamp.
If you say that track seeking works I'll believe you, but it's _NOT_ working for me.

EDIT:
Ok, I'm very sorry, I missed the updated version, as soon as I updated the component everything worked;P
It might be a good idea to edit the wiki to point to the homepage and edit the first post of this thread so that new arrivals will get the latest version. *feels stupid*

foo_winamp_spam 0.9 beta

Reply #156
thegeek: Doesn't matter. And, I'm sorry that I shouted at you (I was sure that you are using an old version).

Back to the point: Chronial we NEED you to implement those features OR release source code


foo_winamp_spam 0.9 beta

Reply #158
Well, there it is: foo_winamp_spam v 0.95

Changelog available at my foobar page

Enjoy

(If anyone knows the volume formula used by winamp, i'd be happy to implement it)

Sourcecode requests will be answered if sent by mail - see my foobar page

foo_winamp_spam 0.9 beta

Reply #159
while using one program, i encountered an error called "foo_winamp_spam: Unsupported WM_USER, lParam 640.". can anyone tell me what lParam 640 is? the SDK doesn't mention it...

foo_winamp_spam 0.9 beta

Reply #160
Chronial: THANKS! You rocks!
My question is: can you implement lParam = IPC_GETOUTPUTTIME wParam = 1 to return length in miliseconds? I'm just asking, because I know Winamp hasn't implemented this, it's your choice. Thanks

btw. Winamp isn't using dB for volume, it just use percents (from main window) to calculate volume from 0 to 255. As fb2k is using dB, I think your formula is good as it is.

foo_winamp_spam 0.9 beta

Reply #161
My question is: can you implement lParam = IPC_GETOUTPUTTIME wParam = 1 to return length in miliseconds? I'm just asking, because I know Winamp hasn't implemented this, it's your choice. Thanks

No, of course not. This would break the component. An application using this param awaits the length in seconds, returning milliseconds would break such an application.

Quote
btw. Winamp isn't using dB for volume, it just use percents (from main window) to calculate volume from 0 to 255. As fb2k is using dB, I think your formula is good as it is.

This doesn't matter - if you are calling it db or percent, you can always convert from the one unit to the other (if you know the correct formula). But as far as I remember, you can set different formulas in winamp's settings (linear, logarithmic and something else I believe).

foo_winamp_spam 0.9 beta

Reply #162
i encountered an error called "foo_winamp_spam: Unsupported WM_USER, lParam 640.". can anyone tell me what lParam 640 is? the SDK doesn't mention it...

it's IPC_GETRATING and has been in the sdk for a few years (was done 5.04 so you're using an old one i bet)

Quote
But as far as I remember, you can set different formulas in winamp's settings (linear, logarithmic and something else I believe).

that'd be down to the relevant output plugin and what's reported by the IPC_SETVOLUME api is just whatever the value is set in the main window. i wouldn't worry about things and looks like how you've done it will be fine from the foobar to winamp mapping. winamp plugin's querying that api never have an idea.

also not sure but you might want to look at implementing the -666 wparam option for IPC_SETVOLUME to return the current volume (just to get the implementation of the api completed)

-daz

foo_winamp_spam 0.9 beta

Reply #163
Chronial: and what about considering new mode=2 for length of song in miliseconds?

foo_winamp_spam 0.9 beta

Reply #164
for what's intended for this component to be a winamp api emulation layer, adding in parts which have nothing to do with the winamp api implementations doesn't seem right and really if extras are required, native implementations of the plugins being used would be the better option to go for. well that's how i see it especially if this one is just to replicate the winamp api

-daz

foo_winamp_spam 0.9 beta

Reply #165
That's just how I see it.

Thanks for the notes on the new SDK version (the volume thing is also not mentioned in the old version).
Maybe you should tell the guys from nullsoft to update their Website

foo_winamp_spam 0.9 beta

Reply #166
no one bothers with nsdn anymore, is all in the dev forum for all of the latest sdk bits (nsdn is basically dead from all view points on it)

-daz

foo_winamp_spam 0.9 beta

Reply #167
Would anyone be so kind as to modify the wiki for this component to include either a download link for the latest version or a link to Chronial's Foobar Components page? The first post in this thread is outdated and it's a bit troublesome to scroll back through the thread history and find the link.

Edit: I attempted to do this myself however the wiki is locked.

foo_winamp_spam 0.9 beta

Reply #168
Hello,
I just got the time to update the plugin from the latest r1ch version, and found that with 0.95 my volume gets set to -100dB and it gets reset all the time I am trying to increase it. With 0.94 it' all fine. I have winamp 5.33 an foobar2000 0.9.4.2. I am happy to help with tracking this down.

foo_winamp_spam 0.9 beta

Reply #169
There's only one thing that could cause such a behaviour: something tells foobar to set the volume to -100db. Just try to close everything else that's running and kill every non-windows proccess.

foo_winamp_spam 0.9 beta

Reply #170
OK, it must have been foxytunes for firefox, I haven't used that anyway, just occupied loads of place on my sidebar. ;-) Sorry for the noise.
Oh, and looks like the title of the 'fake window' does not get reset when I stop the player, or is it just me?

foo_winamp_spam 0.9 beta

Reply #171
There we go - foo_winamp_spam 0.96 is out.

changes:
*  Implemented IPC_SETVOLUME (lParam 122), wParam=-666 to return current volume level
* Implemented IPC_GETRATING (lParam 640)
* Implemented IPC_SETRATING (lParam 639) - setting the rating to 0 removes the tag

foo_winamp_spam 0.9 beta

Reply #172
The title of the fake window is always 'Winamp 1.x', If I'm not mistaken.

foo_winamp_spam 0.9 beta

Reply #173
Didn't change anything there in this version
can someone confirm that?

foo_winamp_spam 0.9 beta

Reply #174
Actually, I wrote that as an answer to bastya_elvtars.
I thought its supposed to always be that? afaik, That's what Winamp does.

 
SimplePortal 1.0.0 RC1 © 2008-2019