exult / exult

Exult is a project to recreate Ultima 7 for modern operating systems, using the game's original plot, data, and graphics files.
http://exult.info
GNU General Public License v2.0
491 stars 77 forks source link

Android: Noticeable delay on playing sfx #510

Open DominusExult opened 2 months ago

DominusExult commented 2 months ago

@ceckak introduced a noticeable delay in playing sfx with fa172c45c

Test case: open the inventory with 'i' with version 1.8 vs current code. Git bisect lead me to this commit.

@ceckak do you remember much about this case. I know we talked about it and I tested things. Maybe this needs to be an ifdef Android?

ceckak commented 2 months ago

Don't recall anything beyond what I noted in the commit comments. I think we tested other platforms at the time and didn't notice an adverse impact, but if we are seeing one now, an ifdef is fine (maybe with a comment linking to this issue).

Dragon-Baroque commented 2 months ago

Dominus, I have taken the liberty to rework your commit a bit, to ensure that the branches of the #ifdef ANDROID do not contain unpaired braces. This helps my syntax coloring editor not to get lost in finding pairing braces...

Also I think your commit helped my SDL 3 port. I have the feeling that the lip syncing of the Guardian during its speech in the Intro of The Black Gate is better with your commit. In SDL 2 and in SDL 3.

DominusExult commented 2 months ago

I have no problem with any change ;)

And yes, I didn't think of the lip synch but it makes sense that this was also affected. The iOS port also had stuttering that I couldn't pin point which is now also gone.

DominusExult commented 2 months ago

Don't recall anything beyond what I noted in the commit comments. I think we tested other platforms at the time and didn't notice an adverse impact, but if we are seeing one now, an ifdef is fine (maybe with a comment linking to this issue).

I think we only tested digital music and never thought of testing other outputs :) I'm seeing the sfx delay on Android in the emulator as well :(

DominusExult commented 2 months ago

I'm setting this to be an Android bug as it's fixed for other systems and might need a different fix than changing the Hz to avoid having the digital music stutter on Android.