jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.52k stars 748 forks source link

How to get audio low latency #1407

Open michcan opened 8 years ago

michcan commented 8 years ago

Hi, Did you know how to have low audio latency (near 20ms) in snap. I tried different configuration browser (chrome/firefox) and OS (Raspbian / mac). And i never have realy "low latency" audio (to play rythmic pattern with touch of my keyboard). On all configuration there is too much delay between keypress and the sound playing. Is the problem from snap itself or from the browser (i read some topic about latency on web browser and it seems thats a big problem for JS/HTML5 developpers) Thank you

jmoenig commented 8 years ago

Music projects run best in turbo mode, which reduces the thread-switching "latency" you're experiencing.

michcan commented 8 years ago

Hello, I'm using this type of blocks: capture d ecran 2016-09-14 a 10 10 56 capture d ecran 2016-09-14 a 10 11 01

Using turbo mode increase the delay between keypress and sound playing (on firefox and chrome) :( Is the problem from the key event listener or from audio on turbo context ?