Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Port #7

Open
OfficialIncubo opened this issue Nov 24, 2022 · 7 comments
Open

MacOS Port #7

OfficialIncubo opened this issue Nov 24, 2022 · 7 comments
Labels
can't do This feature can't be added need help Anyone needs help! porting OS porting
Milestone

Comments

@OfficialIncubo
Copy link
Owner

OfficialIncubo commented Nov 24, 2022

The BeatDrop Music Visualizer is only supported for Windows.
I am waiting for porting this visualizer for MacOS, so it should be working.

So, anyone can try to google ".exe to MacOS" or "Windows app to MacOS", or I just try myself.

@OfficialIncubo OfficialIncubo added the porting OS porting label Nov 27, 2022
@OfficialIncubo
Copy link
Owner Author

The one thing and a single solution is: Wine!

Wine is a free program that runs Windows apps on MacOS, Linux and BSD.

I will try this soon or later.

@OfficialIncubo OfficialIncubo moved this from Version 2.1.1 Milestone to Version 2.1 Milestone in BeatDrop Version Milestone Sep 16, 2023
@OfficialIncubo OfficialIncubo added this to the Version 2.1 milestone Sep 24, 2023
@adbX
Copy link

adbX commented Oct 12, 2023

I've tried it with both Wine and Crossover on Mac (14.0) but doesn't work unfortunately. Probably something to do with the audio input. Here are my logs in case it helps someone:

➜ wine MilkDrop3/MilkDrop\ 3.exe 
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:err:environ:init_peb starting L"Z:\\Users\\adb\\Desktop\\MilkDrop3\\MilkDrop 3.exe" in experimental wow64 mode
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:fixme:thread:get_thread_times not implemented on this platform
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0x190
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0108:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0108:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0024:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0012FEAC

@OfficialIncubo
Copy link
Owner Author

Same happened with my Exagear.
I have no clue.....

I think Wine doesn't support loopback-capture or WASAPI.

@OfficialIncubo OfficialIncubo added need help Anyone needs help! can't do This feature can't be added labels Oct 12, 2023
@OfficialIncubo OfficialIncubo moved this from Version 2.1 Milestone to Version 2.0 Milestone in BeatDrop Version Milestone Nov 4, 2023
@OfficialIncubo
Copy link
Owner Author

OfficialIncubo commented Dec 11, 2023

Suddenly, @gth001 posted a comment that Milkdrop3 worked with Parallels Desktop! Can you try this? If it works, then I can close this issue. That's it.

milkdrop2077/MilkDrop3#29 (comment)

@kblaschke
Copy link

Wine supports whatever capture/playback devices are provded by the host OS. The issue on macOS is rather that CoreAudio doesn't support looback capture at all, it can only capture from external input sources like webcams, line-in and microphones. There are some commercial kernel-level drivers which add "virtual loopback cables" to capture application output and make it available as a virtual line-in adapter. That said, on a standard macOS device, you're just out of luck, we have the exact same issue with projectM.

If you really want to do a native port, you'd have to replace all Win32-specific code with the respective macOS pendants, like:

  • WASAPI -> CoreAudio
  • DirectX -> Metal (OpenGL is long deprecated on macOS and will probably be removed completely in a couple of years)
  • Intel i386/Win32 assembly in ns-eel2 ->Mach-O assembly (or use projectm-eval instead)
  • Any other code using Win32 strings ("LPC[W]STR" etc.) and HRESULT/HWND stuff

You'd end up with similar issues regarding the preset shaders as we have in projectM as Metal doesn't understand HLSL, but uses the MSL, the Metal Shading Language, which is even different from GLSL.

@OfficialIncubo
Copy link
Owner Author

You are free to PR. Any help is appreciated! :)

@kblaschke
Copy link

Not an easy task, especially given the decades-old code in the original Milkdrop. Main issue will be the shader translation, which we had lots of fun with in projectM. There are libraries which can do this like niceshade, but I guess none of these will be able to properly translate the undocumented quirks existing in DirectX/HLSL which preset authors inadvertently rely on in many presets. Some HLSL math functions do not return NaN for invalid inputs as documented, but some other result. For example, pow() with a negative base and a fractional exponent should return NaN as this operation is undefined within real numbers, but it actually returns the result as if the base was positive, e.g. taking its absolute value.
Other shading languages behave properly, but break those presets, resulting in (partially) black images. We've added some special treatments in our shader translator to a few functions we could identify and guessed how they actually behave, fixing most of these issues. Not sure how easy this will be with a third-party translator.

All in all, even with Wine or any other compatibility layer, I'd guess those presets will all look bad unless there's a generic way to fix the issue. We can't fix the presets as they're user-supplied, so this has to be part of the "player". Not really great, but that's what you get if some API designer (Microsoft/HLSL in this case) doesn't stick to their own documentation. Can't even blame the preset authors, as they'll just work by trial and error. If it looks okay, most of them won't get deep into the shader math to see if they ended up with some invalid inputs. But if the presets don't render properly, the users will blame us as the authors of Milkdrop renderers for not being thorough enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't do This feature can't be added need help Anyone needs help! porting OS porting
Projects
Status: Version 2.0 Milestone
Development

No branches or pull requests

3 participants