I do not know why or when - but it happened.
The current song skipped back a few milliseconds and replayed a section constantly.
Some factors however do stop this, like MAYBE switching current GUI or end of track.
Disregard my previous comment – there was some confusion about which music-randomly-resetting bug we were talking about. The one I described in my previous comment was about stutters of a few milliseconds, and is now being tracked at https://logicworld.net/tracker/464.
This issue report was about the music resetting to several whole seconds ago. I have properly fixed it for the next preview :)
Good grief, this was a hard bug to track down. Especially since you can never prove the absence of occasional random audio stutters in a build, only their direct presence. It took me FOREVER.
Here’s what’s happening:
I’ve tweaked the music component code to make sure OnAudioFilterReadonly gets called when it actually needs to be called, so the thumbnail rendering doesn’t trigger that method (thus dooming the audio thread) anymore. This reverts the status of this issue to the much better 0.90 behavior (actually slightly better – in 0.90, the audio thread gets doomed if a music component is placed in the world; in 0.91, you actually need to play a sound with a music component).
Unfortunately I don’t think a full solution is possible for now. I don’t think there’s a way to synthesize sounds with the built-in Unity audio system besides OnAudioFilterRead, and even the shortest pauses due to GC are liable to cause distortion in the playing music. I’m not 100% sure about that, it’s possible that expanding the audio buffer size and eliminating the most egregious allocations in the code would totally eliminate these issues, but I’ve already spent 30 goddamn hours on this and I’m moving on for now.
Later in Early Access, I was already planning to replace the built-in Unity audio system with a third-party solution to enable some epic upcoming features. This third-party system does not have the terrible awful no-good very bad audio thread pausing problems that Unity’s system does, so when we eventually make that upgrade, this issue will be fixed for good.
Oh noes, thanks for this explanation
I’ve also experienced this. The only fix I’ve found for my case has been setting the frequency to Never, then changing it back.
This actually happens extremely often for me, so I’ve resorted to just turning the music off for the time being.
Difficult to reproduce, I wonder if I will experience this again…