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: New SDK with foobar2000 v2.0 features released (2022-08-10) (Read 22552 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

New SDK with foobar2000 v2.0 features released (2022-08-10)

https://foobar2000.org/SDK
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Development:SDK_2022-08-10_Release_Notes

You can start preparing 64bit versions of your components already.

foobar2000 v2.0 beta will be released within the next two weeks, immediately after 1.6.12 stable.

Have fun.
Microsoft Windows: We can't script here, this is bat country.


Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #2
PS: since SDK uses v143, "Included project files are for Visual Studio 2019" note on SDK page is no longer valid.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #3
Yay, I was able to make my Preferences go dark with 5 lines of code. Great stuff!



I had to comment out line 104 of DarkMode.h though...

Code: [Select]
void SubclassDialog(HWND);

If present, it won't compile.

Code: [Select]
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003: not enough arguments for function-like macro invocation 'SubclassDialog'
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003: void SubclassDialog(HWND);
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003:      ^
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059: syntax error: 'constant'
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059: void SubclassDialog(HWND);
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059:

VS2022 17.4 Preview 1, v143, stdcpplatest if it makes any difference

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #4
Just to follow on from the error I posted  above, I didn't have any issue with a different project using a modeless dialog. It worked just fine without changes.



I just need to figure out if I can change the text colour of the SysLink control on the bottom left.


Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #5
Yay, I was able to make my Preferences go dark with 5 lines of code. Great stuff!
Noticed that the surrounding preferences dialog is rendered in light mode in your screenshot. I've observed the same for my component and just learned that (also) returning preferences_state::dark_mode_supported from your get_state() is the way to tell foobar2000 to stay in dark mode there.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #6
I'm still slumming it with the publicly available v1.6.12 so the rest of the preferences being light was expected. I had to hardcode wanting dark mode rather than using fb2k APIs which will be available with v2.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #7
Please don't make these statements. You just release the SW. We are people with anxiety problems. Don't add more to us.

I'll wait for it.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #8
Great!
Now time to let them devs of the old plugins to know this

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #9
Please don't make these statements. You just release the SW. We are people with anxiety problems. Don't add more to us.

I'll wait for it.

X

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #10
I had to comment out line 104 of DarkMode.h though...

Code: [Select]
void SubclassDialog(HWND);

If present, it won't compile.

Code: [Select]
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003: not enough arguments for function-like macro invocation 'SubclassDialog'
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003: void SubclassDialog(HWND);
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): warning C4003:      ^
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059: syntax error: 'constant'
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059: void SubclassDialog(HWND);
3>Z:\Git\foo_jscript_panel3\foobar2000-sdk\libPPUI\DarkMode.h(104,7): error C2059:

I've isolated the cause of this. Including windowsx.h for the Columns UI SDK is the problem.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #11
Please don't make these statements. You just release the SW. We are people with anxiety problems. Don't add more to us.

I'll wait for it.

[attach type=image]23039[/attach]

You didn't get the irony. We love that software despite the rising of alternative solutions like Roon and Plex. And of course the streaming services. Although I use the above programs F2K is my absolute best for local listening. It's an excellent program with very little flaws.

But we want it to come to a more modern era with 64bit support and maybe new tricks. When Peter wrote that he would release it in a few days we can't wait. We want it NOW. So it would be better not to dad it announced.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #12
We?

"Only kings, presidents, editors, and people with tapeworms have the right to use the editorial ‘we’." (С) probably Mark Twain

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #13
WOW!!!

The first guy called me an idiot and the second megalomaniac. I'm old enough to care if Iget offended from an anonymous guy on the internet.

BUT I DON'T CHANGE MY WORDS. I'm still excited like a small child waiting for Christmas when there are updates on software I use everyday. F2K is one of that. It's like Swiss army knife. It can do anything with music. From playing to tagging and file management.

And WE are a lot of people to understand how a computer works and what are the benefits of evolution. If WE weren't aware of that, WE would still be on 640KB of RAM maximum as Bill Gates suggested back in the 80's.

A few days ago Winamp team released a "new" version. You can test it and see what I mean. It has a lot of old code which is not optimized for the new OS's. If you load a ton of music it is very slow. But F2K which is actively maintained and upgraded to the newest OS system calls is very responsive. Peter gave some information about the new version which may clear why I used the word WE.

I have many examples of people denying that WE. In computing things run so fast that a slight delay of releasing may be catastrophic for the project. A few years ago some guy insisted on 32bit video processing. He thought that it was enough. But when Blu-Ray's finally were decrypted and we jumped from 8.5GB DVDrip to 85 Remux he changed his mind. The competitors had worse SW but it was already 64bit and the processing was very easy. So he changed his mind and finally released a 64bit version.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #14
I do have a question for @Peter : Is it possible to switch between 32-bit floats and 64-bit floats internally in the 64-bit version or is 64-bit version only 64-bit float?  Moving stuff between some effect and conversion DSPs and certain freeware DAWs that top out at 32-bits floats comes to mind.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #15
So these dark mode helpers have it ridiculously easy to implement dark mode for all my dialogs so huge thanks to Peter for that.

But I'm a bit stumped with this menu/toolbar because it doesn't appear as any kind of window when checking it out with Spy++?? I don't even what kind of control it is??? It's fair to say I have no idea what I'm doing....  :))  :))



Bits of code...

Code: [Select]
IDR_MENU MENU
BEGIN
    POPUP "DUMMY"
    BEGIN
        MENUITEM "DUMMY", IDC_STATIC
    END
END

It's a modal dialog...

Code: [Select]
class CDialogConfigure : public CDialogImpl<CDialogConfigure>, public fb2k::CDarkModeHooks
{
};

Then I'm using GetMenu in my OnInitDialog

Code: [Select]
auto menu = wil::unique_hmenu(GetMenu());
auto file = wil::unique_hmenu(CreateMenu());
auto samples = wil::unique_hmenu(CreateMenu());
auto licenses = wil::unique_hmenu(CreateMenu());
auto help = wil::unique_hmenu(CreateMenu());

// append stuff goes here


Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #16
Does this effect the current state of Visual Studio Compatibility at all?

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #17
Perhaps a stupid question but Is there a ""Docker"" Or VM available with the development environment ready to go?

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #18
Well in my source tree I had the FB2K SDK already in it.

I most likely will update it with the *public* code tree.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #19
thx Peter for the timetable update.
I can't wait to test out Foobar2000 (v2.0.0).
now its just a wait till all my favorite videogame music components are hopefully updated for 64bit.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #20
I do have a question for @Peter : Is it possible to switch between 32-bit floats and 64-bit floats internally in the 64-bit version or is 64-bit version only 64-bit float?  Moving stuff between some effect and conversion DSPs and certain freeware DAWs that top out at 32-bits floats comes to mind.

No. 64bit builds are hard coded to use audio_sample which is defined as a double. DSPs would need to be ported or rewritten to take advantage of doubles. My SoundTouch based stuff comes to mind, rest were easily ported, minus the Windows DMO stuff, though I can use DMO/EAX emulation for those in future.

You could internally do 32bit > 64bit and back I suppose.

I want to at some point lean further and assume SSE2 to SSE4/AVX, even.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #21
I do have a question for @Peter : Is it possible to switch between 32-bit floats and 64-bit floats internally in the 64-bit version or is 64-bit version only 64-bit float?  Moving stuff between some effect and conversion DSPs and certain freeware DAWs that top out at 32-bits floats comes to mind.
It's the format used to transfer data between different components, a part of the specification - changing it breaks all components that touch it.
Since this is the last historical opportunity to make such change (64bit foobar2000 can't load old components), I opted for changing the format to be futureproof, as there will not be another new major release that needs new components.
If your specific audio processing library needs 32bit float, that's cool, conversion is practically free compared to any other kind of audio workload, especially now that SSE2 or ARM Neon available on every machine running foobar2000.

So these dark mode helpers have it ridiculously easy to implement dark mode for all my dialogs so huge thanks to Peter for that.

But I'm a bit stumped with this menu/toolbar because it doesn't appear as any kind of window when checking it out with Spy++?? I don't even what kind of control it is??? It's fair to say I have no idea what I'm doing....  :))  :))
Heh, I don't use normal menus anywhere, only rebar control with text-only toolbar... Will investigate this for the next SDK update.

Does this effect the current state of Visual Studio Compatibility at all?
VS2017 with Windows 10 SDK works, after manually setting proper toolchain & SDK versions in all projects.
Dark mode stuff needs declarations from the Windows 10 SDK.
Microsoft Windows: We can't script here, this is bat country.

Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #22
Hello,
very interesting info!
I can't wait! :)
I will test and if I notice any bugs, I will of course report them.
One more question. Did I understand correctly that foobar2000 v2.0 will only be 64-bit without a separate 32-bit build, or will be maintained in two separate versions as some other programs are distributed?
Kind regards
DJ Graco


Re: New SDK with foobar2000 v2.0 features released (2022-08-10)

Reply #24
IIUC, there will be 3 builds. 32bit, 64bit and ARM64.
nice.
I have been looking forward to a native 64bit Windows version for some time.. lol
all that is left is to see to updates to the videogame music components I use everyday.