add setting for sync flag

This commit is contained in:
Felix Roos 2024-03-28 11:49:32 +01:00
parent aa25265cc2
commit 126556634a
3 changed files with 26 additions and 11 deletions

View file

@ -61,12 +61,12 @@ async function getModule(name) {
export function Repl({ embedded = false }) {
const isEmbedded = embedded || isIframe;
const { panelPosition, isZen } = useSettings();
const { panelPosition, isZen, isSyncEnabled } = useSettings();
const init = useCallback(() => {
const drawTime = [-2, 2];
const drawContext = getDrawContext();
const editor = new StrudelMirror({
sync: false,
sync: isSyncEnabled,
defaultOutput: webaudioOutput,
getTime: () => getAudioContext().currentTime,
setInterval,