Help - Search - Members - Calendar
Full Version: Foobar GUI?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
JEN
is it possible to make a gui for foobar using .net? which can be selected from the "user interface module" dropdown in foobars preferences?
foosion
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).
JEN
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?
JEN
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! biggrin.gif

please ? smile.gif
foosion
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.
JEN
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 smile.gif

Thanks anyway
FrozenSpoon
QUOTE(foosion @ Feb 24 2005, 01:14 PM)
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.
*



lol well thanks smile.gif

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.
JEN
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
FrozenSpoon
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.
jkwarras
Hi,

I've just get into this thread and i have some curiosity user questions wink.gif. 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...

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.