Skip to content

Fix: 64bit Mudlet on Windows does not play sounds#7391

Merged
vadi2 merged 11 commits intoMudlet:developmentfrom
joaquin30:development
Aug 19, 2024
Merged

Fix: 64bit Mudlet on Windows does not play sounds#7391
vadi2 merged 11 commits intoMudlet:developmentfrom
joaquin30:development

Conversation

@joaquin30
Copy link
Copy Markdown
Contributor

Brief overview of PR changes/additions

Added package mingw-w64-x86_64-qt6-multimedia-wmf to Windows 64bits build and added enviroment variable QT_MEDIA_BACKEND=windows in the main function (code by @SlySven).

Motivation for adding to Mudlet

Solving audio problem in Windows and earning bounty

Other info (issues closed, discussion etc)

Closes #7311.
/claim #7311

@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Aug 12, 2024

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

I don't think this will be enough - you also need to modify the CI/package-mudlet-for-windows.sh file (a bash script) to ensure the library is copied from the place where the MSYS2+Mingw-w64 system keeps it into the package's files...

@joaquin30
Copy link
Copy Markdown
Contributor Author

I checked that winqt6deploy copies the DLL file to the folder, but I will modify the script to be sure.

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Aug 12, 2024

Sorry, I've been playing with winqtdeploy-qt6.exe myself and, yeah, if the library is in the system then it will copy it to the right subdirectory - so you were okay to begin with.

Copying a file across manually only becomes an issue when building a debug version (and the CI script versions are not currently set up to do that) as the tool does not copy the .debug files with the debug info for each Qt library file - the ones I have do (but they are not complete for building and uploading proper signed official "Release" builds)...

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Aug 13, 2024

Perhaps I wasn't clear - you can revert 5499794 as "we ain't gonna need it"... 😊

@SlySven SlySven dismissed their stale review August 13, 2024 18:57

I was on the wrong track and requested something that wasn't/isn't needed.

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

This works for me. Fair enough I suggested the code but @joaquin30 deserves the reward for tracking down the needed environmental variable...

... it is theoretically possible that the scope of this setting might need to be expanded to also do something for other OSes when we start working on Qt6 for those as well.

In practice the supposed "default" value of ffmpeg as a setting for QT_MEDIA_BACKEND will also work - but why Qt requires it to be specified by this setting instead of defaulting to it in the absence of the variable is not clear...

@vadi2 vadi2 merged commit a7adf81 into Mudlet:development Aug 19, 2024
@SlySven
Copy link
Copy Markdown
Member

SlySven commented Aug 20, 2024

... it is theoretically possible that the scope of this setting might need to be expanded to also do something for other OSes when we start working on Qt6 for those as well.

Turns out that for Qt of the same version on GNU/Linux there is no problem with not defining QT_MEDIA_BACKEND - it seems to be a Windows only thing.

😕

@ssbssa
Copy link
Copy Markdown

ssbssa commented Aug 22, 2024

* windows 64 bit: https://make.mudlet.org/snapshots/028732/Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64.zip

If you don't plan to fix ffmpegmediaplugin.dll by including all the necessary dependencies, you should consider removing the following DLLs:

multimedia/ffmpegmediaplugin.dll
avcodec-61.dll
avformat-61.dll
avutil-59.dll
libtiff-6.dll
libwebp-7.dll
libwebpdemux-2.dll
swresample-5.dll
swscale-8.dll

None of them can be used currently, and removing them would free up 20MB (and 10MB in the ZIP file).

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Aug 22, 2024

Thanks for the tip. Using the WMF backend on windows is enough for us, so we'll remove the extra libraries.

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Aug 22, 2024

I think all can go except for libwebp-7.dll, we might want to keep that one around to to show webp images in Mudlet.

@ssbssa
Copy link
Copy Markdown

ssbssa commented Aug 22, 2024

I think all can go except for libwebp-7.dll, we might want to keep that one around to to show webp images in Mudlet.

But then you have to add libsharpyuv-0.dll, because libwebp-7.dll depends on it:

dll dependency check:
  C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libwebp-7.dll
  │ can't load libsharpyuv-0.dll

Also, I didn't check the Qt-dlls before, but now I see that the following also have missing dependencies, so are currently useless:

dll dependency check:
  C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\qglib.dll
  │ can't load libgio-2.0-0.dll
  │ can't load libgobject-2.0-0.dll

dll dependency check:
  C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\qmng.dll
  │ can't load libmng-2.dll

dll dependency check:
  C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\qtiff.dll
  │ C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libtiff-6.dll
  │ │ can't load libdeflate.dll
  │ │ can't load libjbig-0.dll
  │ │ can't load libLerc.dll
  │ │ C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libwebp-7.dll
  │ │ │ can't load libsharpyuv-0.dll

dll dependency check:
  C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\qwebp.dll
  │ C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libwebp-7.dll
  │ │ can't load libsharpyuv-0.dll
  │ C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libwebpdemux-2.dll
  │ │ C:\src\Mudlet-4.18.5-testing-pr7391-5e12b3ee-windows-64\libwebp-7.dll
  │ │ │ can't load libsharpyuv-0.dll
  │ can't load libwebpmux-3.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

64bit Mudlet on Windows does not play sounds

4 participants