IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
Detecting foobar playback state externally
DocDrew
post Feb 25 2013, 06:51
Post #1





Group: Members
Posts: 4
Joined: 25-February 13
Member No.: 106863



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!
Go to the top of the page
+Quote Post
DocDrew
post Mar 4 2013, 18:04
Post #2





Group: Members
Posts: 4
Joined: 25-February 13
Member No.: 106863



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.
Go to the top of the page
+Quote Post
MrMonkey
post Mar 4 2013, 19:09
Post #3





Group: Members
Posts: 78
Joined: 22-August 10
Member No.: 83276



You should ask for your money back.
Go to the top of the page
+Quote Post
Rollin
post Mar 4 2013, 19:14
Post #4





Group: Members
Posts: 184
Joined: 5-March 08
Member No.: 51815



For example, using foo_scheduler you can launch any external application when playback start/stop/pause/new track start...
Go to the top of the page
+Quote Post
DocDrew
post Mar 5 2013, 19:10
Post #5





Group: Members
Posts: 4
Joined: 25-February 13
Member No.: 106863



QUOTE (MrMonkey @ Mar 4 2013, 18:09) *
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.

QUOTE (Rollin @ Mar 4 2013, 18:14) *
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?
Go to the top of the page
+Quote Post
marc2003
post Mar 5 2013, 19:30
Post #6





Group: Members
Posts: 4337
Joined: 27-January 05
From: England
Member No.: 19379



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

Go to the top of the page
+Quote Post
Canar
post Mar 5 2013, 20:18
Post #7





Group: Super Moderator
Posts: 3327
Joined: 26-July 02
From: princegeorge.ca
Member No.: 2796



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.

This post has been edited by Canar: Mar 5 2013, 20:22


--------------------
∑:<
Go to the top of the page
+Quote Post
DocDrew
post Mar 6 2013, 08:40
Post #8





Group: Members
Posts: 4
Joined: 25-February 13
Member No.: 106863



QUOTE (marc2003 @ Mar 5 2013, 18:30) *
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.

QUOTE (Canar @ Mar 5 2013, 19:18) *
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.

QUOTE (Canar @ Mar 5 2013, 19:18) *
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. smile.gif

This post has been edited by DocDrew: Mar 6 2013, 08:43
Go to the top of the page
+Quote Post
ojdo
post Mar 6 2013, 16:58
Post #9





Group: Members
Posts: 894
Joined: 18-June 06
From: Germany
Member No.: 31980



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.


--------------------
http://freemusi.cc/
Go to the top of the page
+Quote Post
foosion
post Mar 10 2013, 00:19
Post #10





Group: FB2K Moderator (Donating)
Posts: 4336
Joined: 24-February 03
Member No.: 5153



QUOTE (DocDrew @ Mar 6 2013, 08:40) *
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).


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th April 2014 - 09:57