No need to create a package to reproduce this, I made this simple script: drive.google.com/file/d/1xV-ycvhv605MwlpwJTVqef66niTaLrAY/view?usp=sharing 1) Add the script in a scene where there is a playlist using crossfade 2) Start the scene and press "space" few seconds before the begin of the crossfade. => you will see that crossfade is ignored (in my test crossfade duration is 3 seconds)
By default the script will simulate 1 FPS for 20 seconds, so you will have difficulties to interact with editor during this period. Maybe you can have a look to Time.maximumDeltaTime to see if it can help. (On my side, it's not changing anything when I set it to 1.5 seconds)
I tried it with zero crossfading and your script and the gapless song transitions and it seems to work properly. Do you have to have crossfading or something?
When I tried it with 3 seconds crossfading it does play the next song. What exactly are you seeing or hearing when you do that? To me it looks like the first song may stop, and then it plays the 2nd song and starts crossfading it at the same time, instead of the last 3 seconds of the previous song. Is that what you see?
My use case is: I have a playlist that loop the same song with a crossfade transition to simulate an endless music. At 1FPS the crossfade is not working as intended, causing a brutal transition when looping the music. (the next song is always played)
After a new test to check what you say, I am experiencing the same result as you: The first song stops brutally, then the second starts crossfading (at 1FPS). It plays the 1st song until the end instead of starting the crossfade 3 seconds earlier. I think even at 1 FPS this should not happen.
It would be perfect that when MA detect the crossfade it starts the crossfade depending of the difference with the normal start: for exemple if you detect 0.589 seconds later that the crossfade should have been started, you could start the next song at 0.589 seconds instead of from the beginning? This will keep the 2 tracks in sync.
yield return new WaitForSecondsRealtime(duration);
// use default behavior for framerate Application.targetFrameRate = -1; }
So that will mean that even if I were to make this "work", a 3 second crossfade would be reduced to 3 huge volume "chunks", 1 per second. It will sound like a really terrible crossfade and won't be smooth. I'd think you'd rather avoid that and just use gapless transitions with no fade? I confirmed this through logs. Volume is full. 1 second later it's 0.66 (CHUNK). 1 second later it's 0.33 (CHUNK). 1 second later it's 0 (CHUNK).
In my case the gapless settings do not fit my needs, because it means I should modify all the music assets of my game to have the end corresponding to the begin of my music. I already done all these adjustement a while ago and don't want to make it again.
So even if the crossfade is not perfect at 1FPS it will be better for me to keep my musics synchronized when looped. Or maybe if you have a way to also set a end music time (like the start settings) in the settings of a clip I could have a good result. But it's also more work to find the right delay...