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: Foobar GUI? (Read 7513 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar GUI?

is it possible to make a gui for foobar using .net?  which can be selected from the "user interface module" dropdown in foobars preferences?

Foobar GUI?

Reply #1
Theoretically yes, practically perhaps. It all depends on how much time you are willing to spend on writing the glue code that translates calls between .NET (your UI) and native/unmanaged code (foobar2000).

Foobar GUI?

Reply #2
hmm. ok just to help me get an idea of how complex this might be.  How or what would i have to do to create a user interface dll (which does nothing, only displays a blank window) and make it selectable from within foobar2000's preferences screen?

Foobar GUI?

Reply #3
I don't suppose someone here can compile a fb2k sdk dll for me can they?  So I can simply add a reference to this sdk dll allowing me to easily get access to all of fb2k's commands through vs.net!

please ?

Foobar GUI?

Reply #4
I think you are seriously underestimating the complexity of this. When I said that writing a foobar2000 component ih .NET was theoretically possible, I meant that it is possible for a skilled and very dedicated person. One would have to write a whole lot of code to wrap managed classes to unmanaged ones and vice versa. So whoever wants to tackle this needs a thorough understanding of .NET and interoperability with native code - and of the foobar2000 SDK.
It is not as simple as spending a few minutes to compile a COM library that allows embedding foobar2000 in another application (COM automation libraries can be used quite easily through COM Interop in .NET, I know that), simply because foobar2000 was not designed in this way. The effort to create a compatibility layer between foobar2000 and .NET, so you can write plugins on .NET, is more likely to measure in days.

Foobar GUI?

Reply #5
I think I'm fairly skilled in .net but unmanaged code I know nothing about.  So I guess that means no .net UIs from me then

Thanks anyway

Foobar GUI?

Reply #6
Quote
I think you are seriously underestimating the complexity of this. When I said that writing a foobar2000 component ih .NET was theoretically possible, I meant that it is possible for a skilled and very dedicated person.
[a href="index.php?act=findpost&pid=276657"][{POST_SNAPBACK}][/a]


lol well thanks

I have pulled this off, and it is indeed a fairly complex solution. It was more like a week off and on to get the system working right. Not just days. However, I don't even think I did it "right." It's certainly not "generic." However it does work, and it's really quite amazing.

The main problem is that when using a .NET Form, it wants its own message loop. AFAIK, the only way I could pull this off was using a seperate thread for the .NET Form. This meant communication between threads, which is pretty nasty. Now, I'm a little unsure if it would be possible to hook onto Foobar's message loop using the modeless dialog manager. I don't know how that service works, and using a seperate thread is working okay for me. Perhaps someone could offer suggestions here.

As far as mixing managed and unmanaged code, not really *that* big of a deal when using Managed C++. I wrote everything, including the .NET Form, in Managed C++. I realize that's a pretty perverse thing to do, but it made mixing managed & unmanged just that much easier.

Anyways, JEN, I sent you a PM. I can try to offer any help for people who want to write a .NET plugin... but it is a very complex issue.

Foobar GUI?

Reply #7
Thanks for the reply FrozenSpoon

I am constantly combining C++ and C# or vb.net.  But the only thing is I normally use compiled C++ dlls or ocx.  Meaning I never need to deal with the C++ code itself, only the properties which the compiled dlls make available when referenced!

I then add a reference in my .net form to get access to the C++ stuff.

But with the foobar sdk, im getting the raw uncompiled dlls

Foobar GUI?

Reply #8
Do you know C++ though? If you use C++ exclusively, getting .NET to work with Foobar isn't all that bad. Just have to use Managed C++ and the "it just works" greatness of Managed C++. However, if you want to use C# or VB.NET, be prepared for a lot more work.

Foobar GUI?

Reply #9
Hi,

I've just get into this thread and i have some curiosity user questions . If this .NET UI is implemented someday (pure speculation here...), what could be also use for, apart of having a complete new UI?

I mean, (and excuse my complete ignorance in this .net framework), could it also works for i.e. to integrate completely foobar2000 in a application that also use .net? I'm thinking i.e. Mediaportal, that now can use foobar2000 for playback as external player, but can't integrate (afaik) in the main appz windows (mediaportal) things like album list, or Playlist Tree, etc...