scratch icon indicating copy to clipboard operation
scratch copied to clipboard

Annoying delay between pressing a key and a sound starting to play

Open timrowledge opened this issue 9 years ago • 5 comments

See https://www.raspberrypi.org/forums/viewtopic.php?f=77&t=159235&p=1037137#p1037137 for original details.

timrowledge avatar Sep 13 '16 18:09 timrowledge

Found two important issues involved here a) the intercyclepause gets used between the key press and Scratch getting around to doing something with it. This can be obviated as a hack by setting the 'higher performance' preference but really I suspect some tweak in actual Scratch code would be more appropriate for the long term. Since there is clearly something useful to do there ought not be any surrendering of time to the OS at this point. b) unix sound - yes again - is maddening. We need the insertSample primitive implemented.

timrowledge avatar Sep 13 '16 18:09 timrowledge

As an experiment add a way to use the .scratch.ini file to specify soundbufferlength=x where x is the milliseconds length of the sound player buffer. Normally this is 120mS and the allowable range here is 5 to 500. Under 20 will almost certainly make nasty broken noises.

timrowledge avatar Sep 15 '16 20:09 timrowledge

Changes in NuScratch-tpr.367 etc. zipped image released to github

timrowledge avatar Sep 15 '16 20:09 timrowledge

https://github.com/raspberrypi/scratch/blob/master/NuScratch20160915-exp.tgz

timrowledge avatar Sep 15 '16 20:09 timrowledge

Apparently this didn't help; experimental version withdrawn. We really need a proper sound output for linux, with the instant start code working.

timrowledge avatar Nov 29 '16 00:11 timrowledge