diff options
| author | LLLL Colonq <llll@colonq> | 2024-11-05 02:59:06 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-11-05 02:59:06 -0500 |
| commit | c8e4f88739d52717de9e5faea4e752918e6457b3 (patch) | |
| tree | cae66186cbb569026ddc90e4d6573e020435c08a /fig-frontend-client/src/Audio.js | |
| parent | e1a38bb1fa9bd08633c4e760997ee5571a962505 (diff) | |
Move frontend out of repo
Diffstat (limited to 'fig-frontend-client/src/Audio.js')
| -rw-r--r-- | fig-frontend-client/src/Audio.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fig-frontend-client/src/Audio.js b/fig-frontend-client/src/Audio.js deleted file mode 100644 index 2a9ae54..0000000 --- a/fig-frontend-client/src/Audio.js +++ /dev/null @@ -1,30 +0,0 @@ -let initialized = false; -let ctx = null; -let voiceTracks = null; - -function initializeCtx() { - if (!initialized) { - try { - initialized = true; - ctx = new window.AudioContext(); - voiceTracks = [ - document.getElementById("lcolonq-audio-voice-0"), - document.getElementById("lcolonq-audio-voice-1"), - document.getElementById("lcolonq-audio-voice-2"), - document.getElementById("lcolonq-audio-voice-3"), - document.getElementById("lcolonq-audio-voice-4"), - document.getElementById("lcolonq-audio-voice-5"), - document.getElementById("lcolonq-audio-voice-6"), - ]; - } catch (e) { - initialized = false; - } - } -} - -export const _playVoice = (b) => (i) => () => { - if (b) initializeCtx(); - try { - if (initialized) voiceTracks[i].play(); - } catch (e) {} -}; |
