In some cases, it happens that chaning the "Smoothen last n samples" setting while a video is playing causes Lecture Speedrun to break.
More precisely, it happens when you decrease that number. Apparently the indexSmoothing
variable is not reset when updating settings. That means that it may happen that current loudness gets written into the array at some out-of-bound index (which apparently extends the array, creating something like [0.16436233363224984, 0.13041777660688667, empty ร 39, 0.17346392315239798]
).
However, in the subsequent line the index gets moduled to the new smoothing value, preventing it from reaching the last few elements of the array. Therefore, the last elements of the array may remain "loud" forever, preventing the silence from being sped up.
Possible solution: Reset the indexSmoothing
variable in the updateSettings
function.