From 4f1baa380c312e38b9b456989079f000d4e91ef0 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Wed, 3 Apr 2024 09:51:10 +0100 Subject: [PATCH] Tweak Safari workaround --- src/board/audio/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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),