diff --git a/website/src/repl/useReplContext.jsx b/website/src/repl/useReplContext.jsx index f0895aaa4..9348fa8c1 100644 --- a/website/src/repl/useReplContext.jsx +++ b/website/src/repl/useReplContext.jsx @@ -10,6 +10,7 @@ import { transpiler } from '@strudel/transpiler'; import { getAudioContextCurrentTime, webaudioOutput, + webaudioPrepare, resetGlobalEffects, resetLoadedSounds, initAudioOnFirstClick, @@ -59,6 +60,7 @@ export function useReplContext() { const { isSyncEnabled, audioEngineTarget } = useSettings(); const shouldUseWebaudio = audioEngineTarget !== audioEngineTargets.osc; const defaultOutput = shouldUseWebaudio ? webaudioOutput : superdirtOutput; + const defaultPrepare = shouldUseWebaudio ? webaudioPrepare : undefined; const getTime = shouldUseWebaudio ? getAudioContextCurrentTime : getPerformanceTimeSeconds; const init = useCallback(() => { @@ -67,6 +69,7 @@ export function useReplContext() { const editor = new StrudelMirror({ sync: isSyncEnabled, defaultOutput, + defaultPrepare, getTime, setInterval, clearInterval,