Release Notes for 655

i see it and I’m not staff, any clue why it popped up?

Last year, I imported a multi-sample chiptune beep instrument and was quickly disappointed by a bug, where the engine would play the full sound from the beginning for specific sample splits, even though its loop and playback regions were being set correctly…


I’m not sure if this release fixed this specific bug, since I was too afraid to hear that weird glitch again, but I tried again today and it sounds perfect. If this fix was related, thank you, Roblox!

4 Likes

I think the issue was that the Properties pane rounded the sound length up and you set the end of the loop region to that. A friend of mine did that recently and we had to lower the loop region end to a tiny fraction of a second before the actual sound length.

Glad that won’t be necessary anymore!

2 Likes

Yep! The bug was similar to what @Bergan mentioned.

There’s some number of samples in a file; so e.x. a 1-second-long audio file at a sample-rate of 44.1kHz contains exactly 44100 samples.

Internally, the audio engine tracks loop points in samples; so if you wanted to loop the first half (0.5 seconds) of that 1-second-long audio file, the loop points would be placed at sample 0 and sample 22050 internally.

But, since the LoopRegion property is in seconds, there’s a conversion from seconds → samples that happens under the hood.

Taking the same example, if you wanted to loop the second half of the file, the loop points should be 22050 and 44100 – but sometimes, floating point is weird, and this would end up placing the loop points at e.x. 22049, or 44101. The audio engine interpreted loop points that are “out of bounds” as invalid, and ignored them completely – even if it was just minor rounding errors like this :expressionless:

5 Likes

CreateEditableImageAsync rbxthumb support is now released!

1 Like