julianxhokaxhiu / FFNx

Next generation modding platform for Final Fantasy VII and Final Fantasy VIII ( with native Steam 2013 release support! )
GNU General Public License v3.0
356 stars 48 forks source link

[ FF7 ] SFX sound bug #35

Closed satsukiyatoshi closed 3 years ago

satsukiyatoshi commented 4 years ago

In the game SFX sounds are randomly played The SFX sound volume is not applyied too

myst6re commented 4 years ago

Is it related to the "escape sound only played once" bug? The original PC game always had this bug?

satsukiyatoshi commented 4 years ago

Not this bug but sfx sometime play, sometime not, seems realy random. And yes i think pc version always had this bug

myst6re commented 4 years ago

I heard something like this once, it was like two sounds cannot be played at the same time.

Rumbah2 commented 4 years ago

For me it's in the original game, too, and dependent on the SFX volume I set in game. For different setting different sounds disappear. With set to 100 I have all sounds.

Reproducible for me: Set SFX to 30 completely exit the menu enter the menu menu cursor sounds are gone

when setting the sfx back to 100 you'll notice how the cursor sound slowly comes back but stays quiet completely exit the menu again enter the menu sounds back to normal expected volume at 100

myst6re commented 4 years ago

Dunno if it is related, but on the original game (without music plugin) about volume changes when there is a music fade out, the volume is globally modified, and can be muted completely. For example the prelude in credits, after the fade out you cannot hear anymore the sound of the start / load menu, because the application volume is globally muted. Since we moved music to directsound with the external_music plugin, this problem is fixed.

myst6re commented 4 years ago

For me it's in the original game, too, and dependent on the SFX volume I set in game. For different setting different sounds disappear. With set to 100 I have all sounds.

Reproducible for me: Set SFX to 30 completely exit the menu enter the menu menu cursor sounds are gone

when setting the sfx back to 100 you'll notice how the cursor sound slowly comes back but stays quiet completely exit the menu again enter the menu sounds back to normal expected volume at 100

This bug is not related to the SFX bug in this issue (or maybe the "The SFX volume is not applied too" part?). The game doesn't change the SFX volume dynamically when you set it in menus. But it does save it in the register when you quit the main menu. If you close and restart the game after your change, you will hear the modification.

I can fix it, in fact I already made a patch. We'll see if the PR is relevant or not :)

Is it related to the "escape sound only played once" bug?

This bug is also not related to the current issue. Bug I found how to fix it aswell. The sound is started in a loop at the end of the battle, so a flag is set to prevent the sound to be played several times at once. The problem is that this flag is never reset.

myst6re commented 4 years ago

In the game SFX sounds are randomly played @satsukiyatoshi

This is not fixed. I didn't reproduced this myself, but I have a theory: I think in some cases that's possible to unpause a previously played sound. But when unpause happen, the played SFX is not what was paused initialy, but some SFX from battle module! That's possible because the battle module share few sound buffers with the field module, and don't restore sound data after the battle.

@Rumbah2 your bug is fixed now, feel free to try the last canary :)

satsukiyatoshi commented 4 years ago

Maybe the bug have been fixed with the whole sound modification. Donc have much time to test ATM but i'll do some game run asap and report you if it's happening again (with log, place,...)

Rumbah2 commented 4 years ago

I can confirm that it fixes it for me in German Steam version (and those are improvements over vanilla steam as it is bugged there, too):

The volume selection ingame works instantly The ratio of ambient and the sfx volume stays the same over the whole sfx volume range The volume levels in menu, field and fight are the same

myst6re commented 4 years ago

There are two more locations in the code where the SFX does not apply the master volume. When you summon in battle for example. I'm on it.

myst6re commented 4 years ago

About remaining bugs:

julianxhokaxhiu commented 4 years ago

Thank you for this brief report. I hope others may hopefully hop in and help us in tackling this!

satsukiyatoshi commented 4 years ago

In my recent play test i wasn't able to reproduice "SFX sounds are randomly played" So we can set this part as solved ^^

myst6re commented 4 years ago

Still two known issues:

julianxhokaxhiu commented 4 years ago

Maybe related? https://github.com/julianxhokaxhiu/FFNx/issues/83

julianxhokaxhiu commented 3 years ago

@myst6re Do you happen to know if the remaining issues in list are fixed by now?

myst6re commented 3 years ago

I don't think it was fixed, see the last list I have posted for the remaining issues.

julianxhokaxhiu commented 3 years ago

Only one bug left:

julianxhokaxhiu commented 3 years ago

I don't know if it's related, but do you know the sound effects that play immediately after Tifa falls in the lifestream with Cloud, where she "speaks" with the "voices" (the field with the black background)? The sfx (i.e. the radio interferences, Kefka's laugh, the Bio sfx and Barret's Machine Gun) are played too quietly, some are played randomly and sometimes not at all.

This one too.

As much as I recall I never had this issue personally so it could be related to sound volume settings in game. I think we discussed this already elsewhere and, as far as I can remember, I wasn't able to replicate it nor @myst6re.

So, for as much as I am concerned, only one bug is left.

julianxhokaxhiu commented 3 years ago

This is how the scene should sound: https://www.youtube.com/watch?v=ih7s1e55tZI (from 1:36 to 2:22)

This is how it sounds on PC, and on my end: https://www.youtube.com/watch?v=A53Xc_0HA-M (from 2:30 to 3:16)

Ok my bad, I always compared FFNx to the vanilla PC so basically sounded ok, but compared to PSX looks like it's broken. Most probably it requires an flevel fix though, so nothing I could code. I'll try to investigate and report back.

julianxhokaxhiu commented 3 years ago

I tested the scene in both vanilla and with external SFX:

This means that the bug is only present in vanilla, and as I overwrite the behavior of the SFX playback, it could be I'm not inheriting some logics from the engine, which are on the other hand triggered by the engine through flevel ( field ID 111 - Id 0 - S0 Main ).

Therefore, I'd say that if you don't want to patch the flevel, you can easily use the external SFX layer.

Finally, if you want you can open a new issue mentioning only the Tifa Lifestream issue, so we can flag that as "external fix required". Because of this, I'll therefore close the current issue as all the left known bugs, that could be fixed via code, are fixed.