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: View the played song in an other application (Read 6897 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

View the played song in an other application

Hey,

I have to write a small program showing some infos about foobar, for example the name of the played track, the played and remaining time, kpbs etc.

I guess that it's possible, but how? Is there any example how these infos can be shown in a Visual Basic 6 Program? If not, how can I get these infos out of foobar?!

greetings Orikson

PS: Sorry for my bad englisch > German 

View the played song in an other application

Reply #1
I'm not sure what the current state of play is, but it's possible that foosion's COM automation server may be of help, if you are working with VB6.

If not, maybe one of these.
I'm on a horse.

View the played song in an other application

Reply #2
Well, the COM automation server is working fine so far, but for this oppinion I have to install an extra plugin... And I can only see the trackname, but not the remaining and already played time.

I don't even want to control my foobar2000 with Visual Basic 6, I just want to read the trackinformation...

Does anyone knows how Foxytunes is working? It's also showing information from foobar2000

View the played song in an other application

Reply #3
Is this solely for you, or for others to use?  I.e.: can it make use of other components or does it need to be a standalone app that solely relies on a standard foobar install?

Does it need to be VB6?  I assume the best way would be to utilise the foobar SDK using C[++].

Why I just don't wait for someone who knows what they are talking about to respond I really don't know...
I'm on a horse.

View the played song in an other application

Reply #4
Yes, it should work with a standart installation of foobar, 'cause it's going to be an plugin for the "ct'mausekino", a german project for connecting an GLCD Display over an USB connection with the computer.

The plugin itselves will be written by "rage", the designer of this nice displaysoftware, in Pascal. The problem is, that I never ever saw an Pascal code. So we made a deal: I'm going to check, how to get the titel an so out of foobar2000 into Visual Basic 6, because "rage" can read this programming language.

View the played song in an other application

Reply #5
A standard installation of foobar2000 does not contain functionality to let another process read information about the playback state and the currently played track. You will have to use some additional plugin; the COM Automation Server is one possibility.

View the played song in an other application

Reply #6
@foosion: I don't think so. Look at the screenshot which shows the Foxytunes Plugin for Firefox. I don't need to install any plugins in foobar2000!

 

View the played song in an other application

Reply #7
Let me rephrase my previous post. foobar2000 itself does not contain any API for let other applications read information from it. This is a fact.

FoxyTunes grabs information from the main window caption. If you change the format of that caption, it will get confused. If you change to a user interface module it does not know, it will not display any information at all. For example this could also happen, if the name of the main window class of the default user interface would be changed in a future version of foobar2000. This name is considered an implementation detail of the user interface, so it may be changed at any time without further notice. In summary FoxyTunes relies on an implementation detail and the user's configuration which makes it quite fragile.

View the played song in an other application

Reply #8
Let me rephrase my previous post. foobar2000 itself does not contain any API for let other applications read information from it. This is a fact.

FoxyTunes grabs information from the main window caption. If you change the format of that caption, it will get confused. If you change to a user interface module it does not know, it will not display any information at all. For example this could also happen, if the name of the main window class of the default user interface would be changed in a future version of foobar2000. This name is considered an implementation detail of the user interface, so it may be changed at any time without further notice. In summary FoxyTunes relies on an implementation detail and the user's configuration which makes it quite fragile.


You could use DLL calls and the foo_info_samurize.dll component (I've been using this for a reasonable while now)

View the played song in an other application

Reply #9
You could use DLL calls and the foo_info_samurize.dll component (I've been using this for a reasonable while now)
Yes, it should work with a standart installation of foobar, 'cause it's going to be an plugin for the "ct'mausekino", a german project for connecting an GLCD Display over an USB connection with the computer.
I'm on a horse.

View the played song in an other application

Reply #10
if its really like foosion said, than the only way to make a plugin that is getting the information out of foobar without another plugin is also over window titles oO

View the played song in an other application

Reply #11
And how is that problem solved in WinAmp? I know lots of programs working with winamp since version 2...

View the played song in an other application

Reply #12
And how is that problem solved in WinAmp? I know lots of programs working with winamp since version 2...


Winamp api si completly different, it use simple SendMessage function call to obtain information you need (like bitrate, channels, atc.). You should call SendMessage function to send specified message to specified window from 'outside world'. But IPC_GETPLAYLISTFILE message (you can use it to obtain current item title) is marked as in-process only so window capturing method (calling GetWindowText function) is used to capture item title from other application.