diff --git a/src/board/audio/index.ts b/src/board/audio/index.ts index 6473ae0a..5278eab9 100644 --- a/src/board/audio/index.ts +++ b/src/board/audio/index.ts @@ -200,7 +200,7 @@ export class BoardAudio { // what sample rates are actually supported this way? const recorder = this.context!.createScriptProcessor(2048, 1, 1); recorder.onaudioprocess = (e) => { - const offlineContext = new (OfflineAudioContext || + const offlineContext = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)({ sampleRate, length: sampleRate * (e.inputBuffer.length / e.inputBuffer.sampleRate),