Web-Multi-Media / multi-web-audio-sequencer

Web collaborative step sequencer
https://labs.freesound.org/sequencer
GNU General Public License v3.0
10 stars 2 forks source link

Iss20 - Sampler does not work when no tab focus #46

Closed DerouineauNicolas closed 6 years ago

DerouineauNicolas commented 6 years ago

This PR aims at solving issue #20 The Catarak Web Audio Sequencer is using requestAnimationFrame to schedule the next update. Unfortunately this function is paused when the application runs in background. This PR replace it with the setTimeout function. This will be less precise and more CPU consuming than the requestAnimationFrame, but at least the audio renderer will still work while in background mode.