Skip to content

Commit

Permalink
FACT: Comment out the 0ms fade handler.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flibitijibibo authored Dec 18, 2024
1 parent e7ae9cd commit 89d2e29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FACT_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 89d2e29

Please sign in to comment.