ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.6k stars 365 forks source link

No music (External, MIDI & MIDI Expansion) #5267

Closed Monstanner closed 2 years ago

Monstanner commented 2 years ago

Preliminary checks

Platform

Linux

Describe the bug

When I start fheroes2 (.desktop or Terminal), it doesn't play music. However, effects are there.

Save file

Savefile.zip

Additional info

Another user had the problem before. However, this was on Windows. But I don't understand oleg-derevenetz's solution (sorry). I could only take something with UTF. If it helps, I only use de_DE.UTF-8 UTF-8 in my /etc/locale.gen. I also use Arch Linux with the latest updates. I installed fheroes2 from the AUR. I use sdl2_mixer from the Arch - Repository. But qark recommends sdl2_mixer (sdl2_mixer-minimal-git). But when I did this, the game crashes after the intro. The console says that there are no write permissions. With version 0.9.13 I also had music with sdl2_mixer from the Arch Repository before. I have also copied the required files / folders into /home/marcel/.local/share/fheroes2/ again.

Here are the outputs of the console with the different Music Types:

Extern Output:

fheroes2 Free Heroes of Might and Magic II, version: 0.9.14 18:46:19: [ERROR] Play: Couldn't open '/home/marcel/.local/share/fheroes2/music/homm2_41.ogg'

MIDI Output:

fheroes2 Free Heroes of Might and Magic II, version: 0.9.14 18:50:49: [ERROR] Play: Couldn't open /etc/timidity++/freepats.cfg

MIDI Expansion Output:

fheroes2 Free Heroes of Might and Magic II, version: 0.9.14 18:52:33: [ERROR] Play: Couldn't open /etc/timidity++/freepats.cfg

The Intro plays sound on all three Music Types. As well as the effects. timidity++ is installed, but there is no timidity++ folder in /etc/. Just one folder called timidity, which contains a config file called timidity.cfg.

oleg-derevenetz commented 2 years ago

Hi @Monstanner

Free Heroes of Might and Magic II, version: 0.9.14 18:46:19: [ERROR] Play: Couldn't open '/home/marcel/.local/share/fheroes2/music/homm2_41.ogg'

Do you really have this OGG file?

Free Heroes of Might and Magic II, version: 0.9.14 18:50:49: [ERROR] Play: Couldn't open /etc/timidity++/freepats.cfg

It seems that SDL Mixer expects timidity++ (software MIDI synthesizer) to play MIDI files, and it is absent on your machine (or improperly configured).

Monstanner commented 2 years ago

Hi @Monstanner

Free Heroes of Might and Magic II, version: 0.9.14 18:46:19: [ERROR] Play: Couldn't open '/home/marcel/.local/share/fheroes2/music/homm2_41.ogg'

Do you really have this OGG file?

Yes I have. This is the output from dir /home/marcel/.local/share/fheroes2/MUSIC/:

homm2_01.ogg homm2_10.ogg homm2_19.ogg homm2_28.ogg homm2_37.ogg homm2_02.ogg homm2_11.ogg homm2_20.ogg homm2_29.ogg homm2_38.ogg homm2_03.ogg homm2_12.ogg homm2_21.ogg homm2_30.ogg homm2_39.ogg homm2_04.ogg homm2_13.ogg homm2_22.ogg homm2_31.ogg homm2_40.ogg homm2_05.ogg homm2_14.ogg homm2_23.ogg homm2_32.ogg homm2_41.ogg homm2_06.ogg homm2_15.ogg homm2_24.ogg homm2_33.ogg homm2_42.ogg homm2_07.ogg homm2_16.ogg homm2_25.ogg homm2_34.ogg pol homm2_08.ogg homm2_17.ogg homm2_26.ogg homm2_35.ogg sw homm2_09.ogg homm2_18.ogg homm2_27.ogg homm2_36.ogg

This from dir /home/marcel/.local/share/fheroes2/MUSIC/pol/:

homm2_04.ogg homm2_06.ogg homm2_08.ogg homm2_05.ogg homm2_07.ogg homm2_09.ogg

and from dir /home/marcel/.local/share/fheroes2/MUSIC/sw/:

homm2_04.ogg homm2_06.ogg homm2_08.ogg homm2_05.ogg homm2_07.ogg homm2_09.ogg

Free Heroes of Might and Magic II, version: 0.9.14 18:50:49: [ERROR] Play: Couldn't open /etc/timidity++/freepats.cfg

It seems that SDL Mixer expects timidity++ (software MIDI synthesizer) to play MIDI files, and it is absent on your machine (or improperly configured).

Yes, I also find it strange because it is installed. No idea what it is, but in 0.9.13 the music was still there. I can't say if it was just at Extern. Because where I started fheroes2 for the first time, everything went normally. I left everything on standard, except for the resolution.

oleg-derevenetz commented 2 years ago

@Monstanner

Yes I have. This is the output from dir /home/marcel/.local/share/fheroes2/MUSIC/:

Let's try first to rename it as music (in lowercase) instead of MUSIC. Will it help?

Monstanner commented 2 years ago

@Monstanner

Yes I have. This is the output from dir /home/marcel/.local/share/fheroes2/MUSIC/:

Let's try first to rename it as music (in lowercase) instead of MUSIC. Will it help?

What a coincidence. That's what I thought to myself, where I looked at the error again. And yes, I had to rename it to music. Thank you very much for the quick help.

oleg-derevenetz commented 2 years ago

@Monstanner the music has now appeared? Nevertheless, this is undoubtedly a regression.

Hi @ihhub could you please take a look? It seems that this issue is related to our latest changes in working with directory contents.