#1 2020-07-31 11:41

rol
Member
Registered: 2020-07-31
Posts: 2

Suggestions for new events (Foobar2000 and program exit code)

Hi !  I love Shutter, and IMO it has almost everything that we may need... except one or two things.

I would like something like the Winamp Stops event, but for Foobar2000.  I understand that it is impossible to support every player available for Windows, but Foobar2000 is probably the best audio player (just above Winamp IMO) and one of the most used by music lovers.  It is probably possible to check if it is playing with its web interface, so IMO it should be easy to support it.

I would also like a new event to check unusual external events not (yet) supported directly by Shutter.  The idea is to launch at fixed intervals a program, batch file or anything executable, wait until it finishes, and check the return code.  If the RC is 0, then Shutter should assume that the event is triggered, elsewhere not.  With that event, someone with some programming knowledge should be able to check almost anything we could imagine (like for example foobar2000 still playing) and inform Shutter of the result.

Thanks in advance for considering my suggestions.

Last edited by rol (2020-07-31 11:41)

Offline

#2 2020-08-03 08:16

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 2,991

Re: Suggestions for new events (Foobar2000 and program exit code)

Hi.

Thanks for the suggestions - they all sound reasonable.

Adding a Foobar2000 specific event was considered previously (many years ago), but it was dropped because there was no well defined/documented API for controlling and querying this program programmatically. However, this might have changed since.

Can you investigate what API is available (preferably command line or DLL) for Foobar2000?

Regarding an event for checking the exit code of a program. That is pretty straight forward and should get implemented later this year.

Offline

#3 2020-08-03 08:46

rol
Member
Registered: 2020-07-31
Posts: 2

Re: Suggestions for new events (Foobar2000 and program exit code)

Thanks !

I don't know if a foobar2000 API is directly available to do what I have suggested, but there is a SDK to build your own extension, possibly to verify if f2k is playing: https://www.foobar2000.org/SDK

Also, there are already several extensions available that should be sufficient.  For example, the foo_comserver2 extension is already used by several remote controllers for f2k, and might suit your needs: https://wiki.hydrogenaud.io/index.php?t … omserver2)
(Well, being obliged to install an extension is probably not a good point, but if someone really wants to check if f2k is playing, I'm sure he will accept to install it.  The problem for you will be to inform the user that an extension is required, and for the user to install it correctly.)

I can't help you much more, as I'm not a skilled programmer, but if you need some help, I suggest to post your questions at the HydrogenAudio forums, where foobar2000 is extensively discussed.  This thread is a good starting point: https://hydrogenaud.io/index.php?topic=42886.0

Anyway, thanks in advance for the exit code event !

Last edited by rol (2020-08-03 08:47)

Offline

Board footer

Powered by FluxBB