libmpq is a much simpler alternative to StormLib for reading MPQ archives.
We use our own fork of libmpq: https://github.com/diasurgical/libmpq
Impact:
* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
Build currently fails with:
build-gkd350h/_deps/libzt-src/src/Controls.cpp:144:60: error: ‘pthread_setname_np’ was not declared in this scope
pthread_setname_np(service_thread, ZTS_SERVICE_THREAD_NAME);
^
Does not build with the current buildroot:
build-retrofw/_deps/asio-src/asio/include/asio/detail/memory.hpp:87:20: error: ‘aligned_alloc’ is not a member of ‘std’
void* ptr = std::aligned_alloc(align, size);
Fixes a formatting inconsistency I inadvertently
introduced in a previous change. Apologies!
Fixes: 012f3aa90c
Signed-off-by: Sam James <sam@gentoo.org>
Our previous processing would throw away all but the last
entry in the found STATIC_LIBRARIES, which in newer versions
of libsodium, might be "pthread" -- hence not trying to link
against libsodium at all.
We now generate a temporary list, mangle it, then return that.
Bug: https://bugs.gentoo.org/791031
Fixes: https://github.com/diasurgical/devilutionX/issues/2615
Signed-off-by: Sam James <sam@gentoo.org>
SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.