ZDoom / ZMusic

GZDoom's music system as a standalone library
https://forum.zdoom.org/index.php
60 stars 32 forks source link

No music when compiled against FluidSynth 2.2.0 #26

Closed Eonfge closed 3 years ago

Eonfge commented 3 years ago

Discovered when I tried to update the sound library for the Flatpak version

GZDoom g4.5.0-m - 2020-10-31 10:07:33 +0100 - SDL version
Compiled on May 22 2021

M_LoadDefaults: Load system defaults.
Gtk-Message: 14:30:39.104: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:30:39.104: Failed to load module "pk-gtk-module"
Gtk-Message: 14:30:39.104: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:30:39.104: Failed to load module "pk-gtk-module"
W_Init: Init WADfiles.
 adding /app/share/games/doom/gzdoom.pk3, 630 lumps
 adding /app/share/games/doom/game_support.pk3, 2512 lumps
 adding /home/kevin/.config/gzdoom/IWAD/HERETIC.WAD, 2633 lumps
 adding /app/share/games/doom/game_widescreen_gfx.pk3, 39 lumps
 adding /app/share/games/doom/lights.pk3, 7 lumps
 adding /app/share/games/doom/brightmaps.pk3, 499 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
  Name: AMD Ryzen 7 2700 Eight-Core Processor 
  Family 23 (23), Model 8, Stepping 2
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 HyperThreading
V_Init: allocate screen.
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
  Opened device Sirus Headset Analog Surround 4.0
  EFX enabled
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 136.63 ms
R_Init: Init Heretic refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
Vulkan device: NVIDIA GeForce GTX 970
Vulkan device type: discrete gpu
Vulkan version: 1.2.168 (api) 465.108.0 (driver)
Max. texture size: 16384
Max. uniform buffer range: 65536
Min. uniform buffer offset alignment: 256
Resolution: 2560 x 1440
Could not load libfluidsynth.so.1 or libfluidsynth.so.2

Unable to start MUS_TITL: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

----------------------------------------

E1M1 - The Docks

Could not load libfluidsynth.so.1 or libfluidsynth.so.2

Unable to start MUS_TITL: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Could not load libfluidsynth.so.1 or libfluidsynth.so.2

Unable to start MUS_E1M1: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

This is likely a simple issue, since the acutal cause seems to be an outdated .so reference. 2.2.0 only gives you the following headers and .so files:

[0/1] Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /app/lib/pkgconfig/fluidsynth.pc
-- Installing: /app/bin/fluidsynth
-- Set runtime path of "/app/bin/fluidsynth" to ""
-- Installing: /app/lib/libfluidsynth.so.3.0.0
-- Installing: /app/lib/libfluidsynth.so.3
-- Installing: /app/lib/libfluidsynth.so
-- Installing: /app/include/fluidsynth/audio.h
-- Installing: /app/include/fluidsynth/event.h
-- Installing: /app/include/fluidsynth/gen.h
-- Installing: /app/include/fluidsynth/ladspa.h
-- Installing: /app/include/fluidsynth/log.h
-- Installing: /app/include/fluidsynth/midi.h
-- Installing: /app/include/fluidsynth/misc.h
-- Installing: /app/include/fluidsynth/mod.h
-- Installing: /app/include/fluidsynth/seq.h
-- Installing: /app/include/fluidsynth/seqbind.h
-- Installing: /app/include/fluidsynth/settings.h
-- Installing: /app/include/fluidsynth/sfont.h
-- Installing: /app/include/fluidsynth/shell.h
-- Installing: /app/include/fluidsynth/synth.h
-- Installing: /app/include/fluidsynth/types.h
-- Installing: /app/include/fluidsynth/voice.h
-- Installing: /app/include/fluidsynth/version.h
-- Installing: /app/include/fluidsynth.h
-- Installing: /app/share/man/man1/fluidsynth.1
alexey-lysiuk commented 3 years ago

Is it 1.1.7 or the current head 2b291705f2043f39d219a49c2671c80f1dd422e0?

Eonfge commented 3 years ago

Ow, this is build against the latest release of ZMusic 1.1.3. This means you've already fixed the issue and we must just wait for the next release?

alexey-lysiuk commented 3 years ago

The latest release is 1.1.7. GitHub shows a wrong version because the newer tags have no assets attached to them. Support for dynamic loading of FluidSynth 2.2.x was added in 2b291705f2043f39d219a49c2671c80f1dd422e0 which isn't a part of any release yet.

Eonfge commented 3 years ago

I've been sleeping on the job :scream:

Well, consider this issue resolved. https://github.com/coelckers/ZMusic/commit/2b291705f2043f39d219a49c2671c80f1dd422e0 fixes the issue with the dynamic loading. For the time being, I'll downgrade to FS 2.1.8 so that I don't have to package any unofficial version.

alexey-lysiuk commented 3 years ago

You can configure ZMusic with DYN_FLUIDSYNTH=OFF, and link to FluidSynth 2.2.x. Also, doing this prevents crashing when FluidSynth is built with libinstpatch. It's another issue fixed only in development version of ZMusic.

Eonfge commented 3 years ago

@alexey-lysiuk Those are some very useful titbits of information. Perhaps you should add a few of these things to a readme. Thanks anyway, as this allows me to fix some user-reported issues.

alexey-lysiuk commented 3 years ago

GZDoom 4.6.0 just has been released along with ZMusic 1.1.8. So, the mentioned information with quirks and workarounds is no longer relevant.

Eonfge commented 3 years ago

I'm on it. Hope to have an updated release in an hour or so. It's a shame though that Github can't notify me of new tags. That would make my live easier