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.74k stars 377 forks source link

Broken sound on android version 1.1.3 #9234

Closed Mr-Bajs closed 3 weeks ago

Mr-Bajs commented 1 month ago

Preliminary checks

Platform

Android

Describe the bug

Opening the app and when the main menu starts there is no music just a hammering bashing repeating sound, same issue persists in games etx.

Save file

.

Additional info

OS: GrapheneOS 2024102400 (Android version 15) Device Pixel tablet. Datafiles from GOG.

ihhub commented 1 month ago

Hi @Mr-Bajs , have you tried 1.1.2 version? Does it work properly?

ihhub commented 1 month ago

It could be a regression from #9108 but it needs verification.

Mr-Bajs commented 1 month ago

Hi @Mr-Bajs , have you tried 1.1.2 version? Does it work properly?

I certainly do remember that 1.1.2 worked just fine. But I can double check.

The linux flatpak also seems to have some issue with sound in the new 1.1.3 version. There is no music at all. Could be related to that, or might be another issue.

oleg-derevenetz commented 1 month ago

For now, I was unable to reproduce this with the latest 1.1.3 from Google Play neither on my Android 14 phone, nor on my ancient Android 6 tablet. Here is the video from tablet, for instance:

https://github.com/user-attachments/assets/df20fad0-af80-4adf-b2d3-a4430670f9e1

Both External and MIDI music plays just fine.

zenseii commented 1 month ago

I also can't reproduce this on my Android 14 phone.

Mr-Bajs commented 1 month ago

Somehow i couldn't install the 1.1.2 apk.

I found no problem with fheroes 1.1.3 on my android 13 phone. So maybe it's something up with Android 15.

oleg-derevenetz commented 1 month ago

I don't have a "real" Android 15 device, but I just ran fheroes2 in the Android Studio emulator with Android 15 OS image and it seems that music and sounds generally work (this video was recorded by the emulator):

https://github.com/user-attachments/assets/8f042437-6ece-4a4b-b284-8dac798b9c79

There are some pops and clicks, but they may be related to some emulator "pecularities". At least there is nothing suspicious in the logs...

Mr-Bajs commented 3 weeks ago

I had fheroes2 installed on a secondary user, so that was the problem why i couldn't install another version of fheroes2.

However 1.1.2 also have this sound problem. I would assume that this has to do with the update to android 15.

oleg-derevenetz commented 3 weeks ago

If this is a widespread problem, then it should appear in the SDL issues. I look in there periodically.

ihhub commented 3 weeks ago

Hi @Mr-Bajs , can you please record the issue on your phone and attach here?

miaw7 commented 3 weeks ago

I have the same problem on my android 15, 1.1.3 game version

Haven't played for a while, not sure on which version it was working fine last time

Tried to record the video, but for some reason I can't capture the sound in the game

oleg-derevenetz commented 3 weeks ago

Looks like this SDL issue:

https://github.com/libsdl-org/SDL/issues/11376

It has been fixed for SDL2 recently, let's wait for a new version.

Mr-Bajs commented 3 weeks ago

Hi @Mr-Bajs , can you please record the issue on your phone and attach here?

Sure i could do that. But same as @miaw7 android screen recorder doesn't seam to capture the sound. I could however just record my tablet screen with my phone. But I assume that oleg might just found out the cause anyway.

oleg-derevenetz commented 3 weeks ago

Hi @Mr-Bajs @miaw7 could you please try to install the APK from here on your Android 15 devices to verify that audio issues are gone? Please note that you will need to uninstall the Google Play version first, because it is signed by a different certificate.

Branikolog commented 3 weeks ago

Hi, @Mr-Bajs I also suggest moving save files into a separate folder as sometimes save files disappear during uninstall process.

oleg-derevenetz commented 3 weeks ago

Hi @Branikolog

I also suggest moving save files into a separate folder as sometimes save files disappear during uninstall process.

On Android, all files in the personal app data directory are automatically removed during app uninstallation process, but they can be sometimes (not always) automatically restored from online backup when you install app once again (and online backups are created for fheroes2 save files and configs, but not for OG data files). So yes, it is better to export the save files before uninstalling the app using the fheroes2 Toolkit app.

Mr-Bajs commented 3 weeks ago

Hi @Mr-Bajs @miaw7 could you please try to install the APK from here on your Android 15 devices to verify that audio issues are gone? Please note that you will need to uninstall the Google Play version first, because it is signed by a different certificate.

Yes. Now it works just fine. :)

ihhub commented 3 weeks ago

Awesome! Closing this issue.