Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Detecting foobar playback state externally (Read 4175 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Detecting foobar playback state externally

An app I use a lot has an interesting feature - it is able to detect when playback has stopped in Winamp and perform user-specified actions accordingly. As far as I know the app's written in Delphi. I suggested that the author add detection for the player I use now, which is foobar of course. His initial response after quickly looking at the SDK and command line options is that it's difficult for an external app to query foobar for the state of the playback. Apparently Winamp has an API which can be easily accessed using standard messages via SendMessage(), but foobar lacks the same.

Would the developers here be so kind as to suggest the best way to go about this? How can an external application reliably detect the state of playback in foobar, irrespective of whether it is running in the taskbar or as a hidden tray icon, and preferably without requiring users to install more components just for this? Please feel free to be as technical as possible. While I will probably not understand a word, I will of course be directing the app author to this thread. So any useful information on how to accomplish this would be highly appreciated.

Thanks!

Detecting foobar playback state externally

Reply #1
So this forum turned out to be a great help. Honestly, I did not expect a complete lack of response from the developers here. I know you guys might be busy, but even a short message pointing in the right direction would have been sufficient. A disappointment really, I expected way more help from the foobar community.

Detecting foobar playback state externally

Reply #2
You should ask for your money back.

Detecting foobar playback state externally

Reply #3
For example, using foo_scheduler you can launch any external application when playback start/stop/pause/new track start...

Detecting foobar playback state externally

Reply #4
You should ask for your money back.

Har de har har. Interesting how people don't have the time or inclination to respond to a genuine request for help, but there's always time for useless sarcasm.

For example, using foo_scheduler you can launch any external application when playback start/stop/pause/new track start...

Thank you kindly for your response. foo_scheduler looks to be quite interesting and just the thing if I ever want to schedule tasks from within foobar itself. However I am already using the other app extensively to schedule my scripts and it would be really nice to know whether it is at all possible to query foobar from outside. Perhaps if foobar does not support this natively, there's a component that will somehow expose its playback state to external apps?


Detecting foobar playback state externally

Reply #6
foobar2000 is not designed for that sort of functionality. The author has, in the past, expressed a rather negative opinion of the sorts of hacks used to (among other things) collect information from Winamp. The proper way to do it is to expose this functionality via a component. Anything else is a hack and is looked down upon.

I believe that foo_vis_shpeck exposes information in a Winamp-compatible form.

 

Detecting foobar playback state externally

Reply #7
i'm not really sure if this will help but it might be worth a look. http://www.hydrogenaudio.org/forums/index....showtopic=39946

Thanks, foo_comserver seems to be exactly the sort of thing I need if the feature list is anything to go by. Unfortunately, the author's site seems to indicate that this now abandoned alpha quality component is not foobar 1.x compatible. Still, I will look into this further to see whether it will do the job somehow.

foobar2000 is not designed for that sort of functionality. The author has, in the past, expressed a rather negative opinion of the sorts of hacks used to (among other things) collect information from Winamp. The proper way to do it is to expose this functionality via a component. Anything else is a hack and is looked down upon.

All right, I can understand his position. A working updated component would do just fine I guess.

I believe that foo_vis_shpeck exposes information in a Winamp-compatible form.

The official description states: "Shpeck runs Winamp visualisation plugins in a stand-alone window, a Columns UI panel or Default UI element." It seems to be a wrapper component of sorts for running Winamp vis plugins. Not sure it allows external apps to query foobar's playback state, although I may be wrong. Thanks for the link, will look into this as well.

This is much more along the lines of what I expected initially in terms of useful responses. Apologies for the mini-rant above; it was frustrating to see the thread being ignored for so many days while others received answers. A big thank you to all those who have chimed in with possible solutions.

Detecting foobar playback state externally

Reply #8
You could have a look at WSH Panel Mod. It is called a UI panel, but it also enables JScripts to be executed by almost all player events.

Detecting foobar playback state externally

Reply #9
It seems to be a wrapper component of sorts for running Winamp vis plugins. Not sure it allows external apps to query foobar's playback state, although I may be wrong.
That is exactly what it is. The point is that Winamp vis plugins and external applications use the same mechanism to retrieve information from Winamp so for best compatibility the plugin has to support that mechanism (the one using window messages).