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

Runtime Load MediaFoundation dlls on Windows #5020

Merged
merged 2 commits into from Dec 14, 2019

Conversation

jroweboy
Copy link
Contributor

@jroweboy jroweboy commented Dec 8, 2019

This should resolve issues people have with mf.dll missing errors by changing mf.dll from loadtime loading to runtime loading. If the user doesn't have Media Foundation it will try FFMpeg (if the compilation option for that was turned on) and lastly it'll fall back to the null decoder option if all else fails. I haven't throughly tested the MF -> FFMPEG fallback but it should be good enough i hope.


This change is Reviewable

@jroweboy jroweboy requested a review from B3n30 Dec 8, 2019
@wwylele
Copy link
Member

wwylele commented Dec 8, 2019

Should we explicitly warn the user that they are using Windows N (and maybe additionally provide the link to install the missing component) instead of silently fall back to no music?

LOG_WARNING(Audio_DSP, "Unable to load MediaFoundation. Attempting to load FFMPEG instead");
decoder = std::make_unique<HLE::FFMPEGDecoder>(memory);
}
#elif defined(HAVE_MF)
decoder = std::make_unique<HLE::WMFDecoder>(memory);
#elif HAVE_FFMPEG
Copy link
Member

@wwylele wwylele Dec 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you are on this, this likely should be #elif defined(HAVE_FFMPEG)

@tywald
Copy link
Contributor

tywald commented Dec 14, 2019

Citra was able to open on a VM running Windows 10 Home N with this change while Nightly/Canary had MFPlat.DLL and MF.dll errors.

@jroweboy
Copy link
Contributor Author

jroweboy commented Dec 14, 2019

@wwylele due to the infrequency of the issue, I would rather just leave that for another day. We don't have a way for Audio core to pass startup issues back to the frontend atm, so its a tad bit more work than i want to do. (And this only affects AAC games like pokemon x so they still have audio in almost all the games)

@jroweboy jroweboy merged commit ddb7ead into citra-emu:master Dec 14, 2019
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants