zilk
New Member
Posts: 3
Posts: 3
|
Post by zilk on Nov 28, 2015 19:21:12 GMT
Just wanted to let you know that there is a bug in the PlaylistController.cs that makes playlist stop moving to the next clip if timescale is zero (game is paused for instance).
bool shouldAdvance;
if (PlaylistState == PlaylistStates.Stopped) { shouldAdvance = true; // this will advance even if the code below didn't and the clip stopped due to excessive lag. } else { var currentClipTime = _activeAudio.clip.length - _activeAudio.time - (CrossFadeTime * _activeAudio.pitch); var clipFadeStartTime = Time.deltaTime * MasterAudio.FramesEarlyToTrigger * _activeAudio.pitch; shouldAdvance = currentClipTime <= clipFadeStartTime; }
The issue is fixed by switching Time.deltaTime to Time.unscaledDeltaTime.
Thanks, Zilk
|
|
|
Post by DarkTonic Dev on Nov 28, 2015 21:53:23 GMT
I tried and failed to reproduce this bug last time someone reported it. Are you using crossfading and / or auto advance? At any rate, I changed the code for the next version to use UnscaledDeltaTime in all cases for everything now.
|
|
zilk
New Member
Posts: 3
Posts: 3
|
Post by zilk on Nov 28, 2015 23:12:02 GMT
It worked if I was using cross fade. The bug only happened when timescale was 0, crossfade was 0 and auto advance was checked. Changing to unscaled time solved it though, just wanted to report it so you could add it to the next release
|
|
|
Post by DarkTonic Dev on Nov 29, 2015 2:08:46 GMT
Ok cool.
|
|