raspberrypi / scratch

Scratch releases
79 stars 21 forks source link

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

Open timrowledge opened 8 years ago

timrowledge commented 8 years ago

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

timrowledge commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

timrowledge commented 8 years ago

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

timrowledge commented 7 years ago

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