ScratchJr.m: runtime: UI API called from background thread: -[UIView removeFromSuperview] must be used from main thread only
IO.m: runtime: UI API called from background thread: -[UIWebView stringByEvaluatingJavaScriptFromString:] must be used from main thread only
We know that projects with lots of (large) sounds tend to crash ScratchJr. Hopefully reducing the size of the sounds will help to reduce the number of crashes.
If the same sound gets triggered while it’s playing, the sound restarts and both sound blocks will be highlighted until the sound completes - this matches what happens on Android.
Also more formatting changes.
In the current system you can’t have the same sound playing more than once at the same time - this is how it was implemented on Android, so we used the same restriction on iOS.
However in the previous version if you interrupted the sound to play it again, it continued from where it was instead of starting over. So it didn’t appear to do anything. Added resetting the current time to 0.0 on play to restart sounds.