From 4814d399d802d73a800af5144cd12386b8cd12b6 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 18 Dec 2024 08:30:02 -0500 Subject: [PATCH] FACT: Comment out the 0ms fade handler. There's a 1-frame timing issue where two sounds in the same category being played consecutively should still have both sounds _technically_ playing, even if the fade time is 0ms. See #368 for details. --- src/FACT_internal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/FACT_internal.c b/src/FACT_internal.c index a18f37a57..42957edf0 100644 --- a/src/FACT_internal.c +++ b/src/FACT_internal.c @@ -940,12 +940,18 @@ void FACT_INTERNAL_DestroySound(FACTSoundInstance *sound) void FACT_INTERNAL_BeginFadeOut(FACTSoundInstance *sound, uint16_t fadeOutMS) { + /* FIXME: Even for 0ms it seems to want to be in STOPPING for one frame. + * Should we still destroy but defer state changes to the next frame? + * -flibit + */ +#if 0 if (fadeOutMS == 0) { /* No fade? Screw it, just delete us */ FACT_INTERNAL_DestroySound(sound); return; } +#endif sound->fadeType = 2; /* Out */ sound->fadeStart = FAudio_timems();