Open JackXson-Real opened 4 months ago
Definitely would like this implemented. I took a stab at it and had a lot of trouble but if anyone wants to make a PR I'd gladly review it.
Definitely would like this implemented. I took a stab at it and had a lot of trouble but if anyone wants to make a PR I'd gladly review it.
Have you tried just making it fade in once the preview restarts? It would basically be the same effect, but I imagine would be easier to implement since the preview already fades in on the first listen
I'd prefer if it faded out too, so that it doesn't abruptly cut off after a while. It would be important to indicate whether the face-out begins or ends at the specified freeplay preview time.
I was originally thinking that the fade out should end at the time specified by the song metadata's playData.previewEnd
time, but on reflection it would actually be easier to make the fade start at that time, and then restart the song once the fade is done.
I had a lot of trouble because I was trying to make the fade out end at the specified time, which required doing a lot of additional math and checks. Might work on this myself later.
EDIT: Of note, there is a related issue in which FlxPartialSound relies on PERCENTAGES of total song duration, rather than timestamps, and provides no easy means of conversion.
Why does it only fade in, but not out lmao