From 35d603d303c202ddff985bccfa284031966a306d Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Mon, 1 Mar 2021 15:14:34 -0600 Subject: [PATCH 1/9] add manual clear of audio input array --- src/background/audio.ts | 2 +- tests/audio.js | 65 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index 4424d44..50c052f 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -58,7 +58,7 @@ export const updateRecorder = (_event, record: boolean): void => { ai.pause(); const audio = Buffer.concat(audioInput); sendAudio(audio); - audioInput = []; + while (audioInput.length) { audioInput.pop(); } } } diff --git a/tests/audio.js b/tests/audio.js index ea08fac..c4d645f 100644 --- a/tests/audio.js +++ b/tests/audio.js @@ -20,7 +20,6 @@ const config = { * Note that transcription is limited to 60 seconds audio. * Use a GCS file for audio longer than 1 minute. */ -let audio; async function transcribeSpeech (audio) { const request = { @@ -54,30 +53,81 @@ const ia = new portAudio.AudioIO({ }); ia.setEncoding('base64'); ia.start(); -ia.on('error', (e) => { - console.log('error recording audio', + e); -}); ia.on('data', (chunk) => { - const buf = Buffer.from(chunk, 'base64'); audioInput.push(buf); }); +const ao = new portAudio.AudioIO({ + outOptions: { + sampleFormat: 16, + channelCount: 1, + sampleRate: 16000, + deviceId: -1, + closeOnError: false, + } +}); +ao.start(); + async function processAudio() { const buf = Buffer.concat(audioInput); + play(audioInput); - audioInput = []; + while(audioInput.length) { audioInput.pop() }; transcribeSpeech({ content: buf }); } + + function play(input) { + let i = 0; + // format buffers into half their size to account for writable highwaterMark. + const audio = bufSplit(input); + // call this fuction after last audio chunk has been written. + const callback = () => { + // TODO: clear portAudio writable buffer on write end. + } + write(); + // iterate through audio array and write buffers to portAudio writable. + function write() { + let chunk; + let ok = true; + do { + chunk = audio[i]; + if (i === audio.length - 1) { + // write last chunk. + ao.write(chunk, null, callback); + } else { + // check for backpreassure. + ok = ao.write(chunk, null); + } + i++; + } while (i < audio.length && ok); + + if (i < audio.length) { + // Had to stop early! + // Write some more once it drains. + ao.once('drain', write); + } + } +} + +// utility function used by play func +function bufSplit(input){ + let result = []; + input.forEach((b) => { + // split buffer into two. + result.push(b.slice(0, b.length / 2), b.slice(b.length / 2, b.length)); + }); + return result; +} + setTimeout(async () => { ia.pause(); processAudio(); - // ia.resume(); }, 3000); setTimeout(() => { @@ -87,7 +137,6 @@ setTimeout(() => { setTimeout(async () => { ia.pause(); processAudio(); - // ia.resume(); }, 8000); setTimeout(() => { From 4517752ed8a4a7bd5752ee1ea6927dbe9ffdbb5e Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Tue, 2 Mar 2021 08:42:30 -0600 Subject: [PATCH 2/9] manual remove audioInput after write --- src/background/audio.ts | 7 ++++--- tests/audio.js | 13 +++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index 50c052f..4739b0c 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -7,7 +7,7 @@ const portAudio = require('naudiodon'); let ai: typeof portAudio.AudioIO; let ao: typeof portAudio.AudioIO; -let audioInput: Buffer[] = []; +const audioInput: Buffer[] = []; const encoding = "base64"; const audioOptions = { channelCount: 1, @@ -57,7 +57,8 @@ export const updateRecorder = (_event, record: boolean): void => { // stop mic data flow on space bar key up. ai.pause(); const audio = Buffer.concat(audioInput); - sendAudio(audio); + play(audioInput); + // sendAudio(audio); while (audioInput.length) { audioInput.pop(); } } } @@ -98,7 +99,7 @@ export const play = (input: Array) => { // utility function used by play func function bufSplit(input: Array): Array { - let result: Buffer[] = []; + const result: Buffer[] = []; input.forEach((b: Buffer) => { // split buffer into two. result.push(b.slice(0, b.length / 2), b.slice(b.length / 2, b.length)); diff --git a/tests/audio.js b/tests/audio.js index c4d645f..7ffe6d0 100644 --- a/tests/audio.js +++ b/tests/audio.js @@ -40,7 +40,7 @@ async function transcribeSpeech (audio) { console.log(`Transcription: ${transcription}`); } -let audioInput = []; +const audioInput = []; // Create an instance of AudioIO with inOptions (defaults are as below), which will return a ReadableStream const ia = new portAudio.AudioIO({ inOptions: { @@ -74,7 +74,7 @@ async function processAudio() { const buf = Buffer.concat(audioInput); play(audioInput); - while(audioInput.length) { audioInput.pop() }; + while(audioInput.length) { audioInput.pop() } transcribeSpeech({ content: buf @@ -117,7 +117,7 @@ async function processAudio() { // utility function used by play func function bufSplit(input){ - let result = []; + const result = []; input.forEach((b) => { // split buffer into two. result.push(b.slice(0, b.length / 2), b.slice(b.length / 2, b.length)); @@ -140,5 +140,10 @@ setTimeout(async () => { }, 8000); setTimeout(() => { + ia.resume(); +}, 10000) + +setTimeout(async () => { ia.pause(); -}, 9000) + processAudio(); +}, 15000); From 426b847ccecc51b0725e81c1652cdade213612e4 Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Wed, 3 Mar 2021 11:20:16 -0600 Subject: [PATCH 3/9] minor improvements to background audio & window modules --- src/background/audio.ts | 65 ++++++++++++++++++++++------------------ src/background/window.ts | 64 ++++++++++++++++++++------------------- 2 files changed, 70 insertions(+), 59 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index 4424d44..7b8066b 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -3,6 +3,7 @@ "use strict"; import { sendAudio } from './session' +import { ipcMain } from "electron"; const portAudio = require('naudiodon'); let ai: typeof portAudio.AudioIO; @@ -17,39 +18,39 @@ const audioOptions = { closeOnError: false, } -// run every time the main function launches. -export const initAudioIO = () => { - // init portAudio readable stream once. - if (!ai) { - ai = new portAudio.AudioIO({ inOptions: audioOptions }); +// main function run by run.ts module. +export function initAudioIO(): void { + // init portAudio readable stream once. + if (!ai) { + ai = new portAudio.AudioIO({ inOptions: audioOptions }); - // base64 encoding needed for google speech to text. - ai.setEncoding(encoding); + // base64 encoding needed for google speech to text. + ai.setEncoding(encoding); - // pause the portAudio data flow as soon as stream is initiated. - ai.start(); - ai.pause(); + // pause the portAudio data flow as soon as stream is initiated. + ai.start(); + ai.pause(); - ai.on('error', (e: Error) => { - console.log('Error recording audio', + e); - }); - ai.on('data', (chunk: string) => { - // turn string base64 data into buffer object. - console.log('received string chunk of length', chunk.length) - const buf = Buffer.from(chunk, encoding); - audioInput.push(buf); - }); - } + ai.on('error', (e: Error) => { + console.log('Error recording audio', + e); + }); + ai.on('data', (chunk: string) => { + // turn string base64 data into buffer object. + console.log('received string chunk of length', chunk.length) + const buf = Buffer.from(chunk, encoding); + audioInput.push(buf); + }); + } - // init portAudio writable stream once. - if (!ao) { - ao = new portAudio.AudioIO({ outOptions: audioOptions }); - ao.start(); - } + // init portAudio writable stream once. + if (!ao) { + ao = new portAudio.AudioIO({ outOptions: audioOptions }); + ao.start(); + } } // run this function on space bar key up and down. -export const updateRecorder = (_event, record: boolean): void => { +const updateRecorder = (_event, record: boolean): void => { if (record) { // resume mic data flow on space bar key down. ai.resume(); @@ -58,12 +59,17 @@ export const updateRecorder = (_event, record: boolean): void => { ai.pause(); const audio = Buffer.concat(audioInput); sendAudio(audio); - audioInput = []; + // clear audioInput. + while(audioInput.length) { audioInput.pop()} } } +// listen for space key up/down event. +ipcMain.removeAllListeners('update-recorder'); +ipcMain.on('update-recorder', updateRecorder); + // play audio buffers. -export const play = (input: Array) => { +export function play(input: Array): void { let i = 0; // format buffers into half their size to account for writable highwaterMark. const audio = bufSplit(input); @@ -76,6 +82,7 @@ export const play = (input: Array) => { function write() { let chunk: Buffer; let ok = true; + do { chunk = audio[i]; if (i === audio.length - 1) { @@ -96,7 +103,7 @@ export const play = (input: Array) => { } } -// utility function used by play func +// utility function used by play func. function bufSplit(input: Array): Array { let result: Buffer[] = []; input.forEach((b: Buffer) => { diff --git a/src/background/window.ts b/src/background/window.ts index b84a742..6d1002b 100644 --- a/src/background/window.ts +++ b/src/background/window.ts @@ -3,7 +3,6 @@ import { BrowserWindow, ipcMain } from "electron"; import { createProtocol } from "vue-cli-plugin-electron-builder/lib"; import { backgroundMitt } from './emitter'; -import { updateRecorder } from './audio'; import * as path from "path"; interface WindowSettings { @@ -28,31 +27,48 @@ interface IpcRendererPayload { let win: BrowserWindow | null; +// Util function to handle window close & minimize. +const navBarHandler = (_event, action: string): void => { + switch(action) { + case 'close': + if (win) win.close(); + break; + case 'min': + if (win) win.minimize(); + break; + } +} + +// Util function to render message on ipc-renderer event. +const renderMessage = (payload: IpcRendererPayload): void => { + if (win) { + win.webContents.send(payload.endpoint, { + message: payload.message + }); + } +} + +// Do this on window mount. const windowMount = (): void => { - backgroundMitt.emit('window-active', true); - ipcMain.removeAllListeners('update-recorder'); - ipcMain.on('update-recorder', updateRecorder); - // handle renderer auth-token event - ipcMain.removeHandler('nav-bar'); // avoid setting duplicate handlers - ipcMain.handle('nav-bar', navBarHandler); + backgroundMitt.emit('window-active', true); + // handle win nav-bar event. + ipcMain.removeHandler('nav-bar'); // avoid setting duplicate handlers + ipcMain.handle('nav-bar', navBarHandler); + // render messages through ipc-renderer. + backgroundMitt.once('ipc-renderer', renderMessage); } +// do this on window dismount. const windowDismount = (): void => { - win = null; - backgroundMitt.emit('window-active', false); - ipcMain.removeAllListeners('update-recorder'); + win = null; + backgroundMitt.emit('window-active', false); } -backgroundMitt.on('ipc-renderer', (payload: IpcRendererPayload) => { - if (win) - win.webContents.send(payload.endpoint, { - message: payload.message - }); -}); - -export const createWindow = async (options: WindowSettings): Promise => { +// function used by run.ts to create the main window. +export async function createWindow(options: WindowSettings): Promise { return new Promise((resolve, _reject) => { + // avoid creating duplicate windows. if (win) resolve(); win = new BrowserWindow({ @@ -95,15 +111,3 @@ export const createWindow = async (options: WindowSettings): Promise => { }); }; - -// call this function on nav bar click -function navBarHandler(_event, action: string) { - switch(action) { - case 'close': - if (win) win.close(); - break; - case 'min': - if (win) win.minimize(); - break; - } -} From d113de2aa1b9e8519a990d833157b3117ec9d150 Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Wed, 3 Mar 2021 12:49:32 -0600 Subject: [PATCH 4/9] testing audio --- src/background/audio.ts | 78 ++++++++++++++++++++++++---------------- src/background/init.ts | 4 +-- src/background/window.ts | 2 +- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index 7b8066b..e1e7562 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -4,10 +4,11 @@ import { sendAudio } from './session' import { ipcMain } from "electron"; +import { backgroundMitt } from './emitter'; const portAudio = require('naudiodon'); -let ai: typeof portAudio.AudioIO; -let ao: typeof portAudio.AudioIO; +let ai: typeof portAudio.AudioIO | null = null; +let ao: typeof portAudio.AudioIO | null = null; let audioInput: Buffer[] = []; const encoding = "base64"; const audioOptions = { @@ -18,41 +19,47 @@ const audioOptions = { closeOnError: false, } -// main function run by run.ts module. +backgroundMitt.once('window-active', (state: boolean) => { + if(!state) { + stopStream(); + } +}); + +// main audio function run by run.ts module. export function initAudioIO(): void { - // init portAudio readable stream once. - if (!ai) { - ai = new portAudio.AudioIO({ inOptions: audioOptions }); - // base64 encoding needed for google speech to text. - ai.setEncoding(encoding); - - // pause the portAudio data flow as soon as stream is initiated. - ai.start(); - ai.pause(); - - ai.on('error', (e: Error) => { - console.log('Error recording audio', + e); - }); - ai.on('data', (chunk: string) => { - // turn string base64 data into buffer object. - console.log('received string chunk of length', chunk.length) - const buf = Buffer.from(chunk, encoding); - audioInput.push(buf); - }); + if (ai != null) { + ai.quit(); + audioInput = []; } - // init portAudio writable stream once. - if (!ao) { - ao = new portAudio.AudioIO({ outOptions: audioOptions }); - ao.start(); - } + ai = new portAudio.AudioIO({ inOptions: audioOptions }); + + // base64 encoding needed for google speech to text. + ai.setEncoding(encoding); + + // pause the portAudio data flow as soon as stream is initiated. + ai.start(); + ai.pause(); + + ai.on('data', (chunk: string) => { + // turn string base64 data into buffer object. + const buf = Buffer.from(chunk, encoding); + audioInput.push(buf); + }); + + if (ao != null) { + ao.end(); + } + ao = new portAudio.AudioIO({ outOptions: audioOptions }); + ao.start(); } -// run this function on space bar key up and down. +// callback run on space bar key up and down. const updateRecorder = (_event, record: boolean): void => { if (record) { // resume mic data flow on space bar key down. + while(audioInput.length) { audioInput.pop() } ai.resume(); } else { // stop mic data flow on space bar key up. @@ -60,7 +67,7 @@ const updateRecorder = (_event, record: boolean): void => { const audio = Buffer.concat(audioInput); sendAudio(audio); // clear audioInput. - while(audioInput.length) { audioInput.pop()} + while(audioInput.length) { audioInput.pop() } } } @@ -103,9 +110,20 @@ export function play(input: Array): void { } } +function stopStream() { + if(ai != null) { + ai.quit(); + ai = null; + } + if (ao != null) { + ao.quit(); + ao = null; + } +} + // utility function used by play func. function bufSplit(input: Array): Array { - let result: Buffer[] = []; + const result: Buffer[] = []; input.forEach((b: Buffer) => { // split buffer into two. result.push(b.slice(0, b.length / 2), b.slice(b.length / 2, b.length)); diff --git a/src/background/init.ts b/src/background/init.ts index d41ab56..c7e0082 100644 --- a/src/background/init.ts +++ b/src/background/init.ts @@ -1,3 +1,4 @@ + "use strict"; import { app } from "electron"; @@ -6,7 +7,7 @@ import { backgroundMitt } from './emitter'; let winActive: boolean; -backgroundMitt.on('window-active', (state: boolean) => { +backgroundMitt.once('window-active', (state: boolean) => { winActive = state; }); @@ -23,7 +24,6 @@ export function initApp(dev: boolean): void { } }); - // TODO: Debug activate functionaity: currently not working. // Might have to de-reference window object app.on("activate", () => { if (winActive === false) { diff --git a/src/background/window.ts b/src/background/window.ts index 6d1002b..fdf5403 100644 --- a/src/background/window.ts +++ b/src/background/window.ts @@ -110,4 +110,4 @@ export async function createWindow(options: WindowSettings): Promise { }); }); -}; +} From f43960b3a1c777a1f5e4f6bbabc7732cd253be86 Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Wed, 3 Mar 2021 14:29:00 -0600 Subject: [PATCH 5/9] minor tweaks to audioInput --- src/background/audio.ts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index e1e7562..a34a59d 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -10,6 +10,10 @@ const portAudio = require('naudiodon'); let ai: typeof portAudio.AudioIO | null = null; let ao: typeof portAudio.AudioIO | null = null; let audioInput: Buffer[] = []; +const audioContainer = { + input: '', +} +let audio: Buffer | null = null; const encoding = "base64"; const audioOptions = { channelCount: 1, @@ -19,8 +23,8 @@ const audioOptions = { closeOnError: false, } -backgroundMitt.once('window-active', (state: boolean) => { - if(!state) { +backgroundMitt.once('window-active', (active: boolean) => { + if(!active) { stopStream(); } }); @@ -30,7 +34,6 @@ export function initAudioIO(): void { if (ai != null) { ai.quit(); - audioInput = []; } ai = new portAudio.AudioIO({ inOptions: audioOptions }); @@ -44,8 +47,9 @@ export function initAudioIO(): void { ai.on('data', (chunk: string) => { // turn string base64 data into buffer object. - const buf = Buffer.from(chunk, encoding); - audioInput.push(buf); + audioContainer.input += chunk; + // const buf = Buffer.from(chunk, encoding); + // audioInput.push(buf); }); if (ao != null) { @@ -59,15 +63,17 @@ export function initAudioIO(): void { const updateRecorder = (_event, record: boolean): void => { if (record) { // resume mic data flow on space bar key down. - while(audioInput.length) { audioInput.pop() } + // while(audioInput.length) { audioInput.pop() } + if(audioContainer.input.length) audioContainer.input = ''; ai.resume(); } else { // stop mic data flow on space bar key up. ai.pause(); - const audio = Buffer.concat(audioInput); - sendAudio(audio); + const buf = Buffer.from(audioContainer.input, encoding); + sendAudio(buf); // clear audioInput. - while(audioInput.length) { audioInput.pop() } + audioContainer.input = ''; + // while(audioInput.length) { audioInput.pop() } } } From 409dad47374d971edd16bdee0c7c532f2ebd52a7 Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Wed, 3 Mar 2021 14:29:13 -0600 Subject: [PATCH 6/9] minor tweaks to audioInput --- src/background/audio.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index a34a59d..ac41d40 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -9,11 +9,11 @@ const portAudio = require('naudiodon'); let ai: typeof portAudio.AudioIO | null = null; let ao: typeof portAudio.AudioIO | null = null; -let audioInput: Buffer[] = []; +const audioInput: Buffer[] = []; const audioContainer = { input: '', } -let audio: Buffer | null = null; +const audio: Buffer | null = null; const encoding = "base64"; const audioOptions = { channelCount: 1, From 854d6dd6a26ef1b61ad5c00e8f09657538c67db5 Mon Sep 17 00:00:00 2001 From: Enrique Hernandez Date: Thu, 4 Mar 2021 09:20:07 -0600 Subject: [PATCH 7/9] remove stream pause and resume method calls --- src/background/audio.ts | 4 +- tests/audio.js | 88 ++++++++++++++++++++++++++--------------- 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/src/background/audio.ts b/src/background/audio.ts index ac41d40..b3ba491 100644 --- a/src/background/audio.ts +++ b/src/background/audio.ts @@ -54,7 +54,7 @@ export function initAudioIO(): void { if (ao != null) { ao.end(); - } + } ao = new portAudio.AudioIO({ outOptions: audioOptions }); ao.start(); } @@ -77,7 +77,7 @@ const updateRecorder = (_event, record: boolean): void => { } } -// listen for space key up/down event. +// listen for space key up/down event. ipcMain.removeAllListeners('update-recorder'); ipcMain.on('update-recorder', updateRecorder); diff --git a/tests/audio.js b/tests/audio.js index 7ffe6d0..ee6ae26 100644 --- a/tests/audio.js +++ b/tests/audio.js @@ -10,6 +10,11 @@ const encoding = 'LINEAR16'; const sampleRateHertz = 16000; const languageCode = 'en-US'; +const audioContainer = { + input: '', + buffers: [] +} + const config = { encoding: encoding, sampleRateHertz: sampleRateHertz, @@ -20,7 +25,6 @@ const config = { * Note that transcription is limited to 60 seconds audio. * Use a GCS file for audio longer than 1 minute. */ - async function transcribeSpeech (audio) { const request = { config: config, @@ -40,7 +44,8 @@ async function transcribeSpeech (audio) { console.log(`Transcription: ${transcription}`); } -const audioInput = []; +let record = true; + // Create an instance of AudioIO with inOptions (defaults are as below), which will return a ReadableStream const ia = new portAudio.AudioIO({ inOptions: { @@ -54,8 +59,13 @@ const ia = new portAudio.AudioIO({ ia.setEncoding('base64'); ia.start(); ia.on('data', (chunk) => { - const buf = Buffer.from(chunk, 'base64'); - audioInput.push(buf); + if (record) { + console.log('recording data') + audioContainer.input += chunk; + // audioContainer.buffers.push(Buffer.from(chunk, 'base64')); + } else { + if (audioContainer.input.length) audioContainer.input = ""; + } }); const ao = new portAudio.AudioIO({ @@ -69,40 +79,38 @@ const ao = new portAudio.AudioIO({ }); ao.start(); -async function processAudio() { +let counter = 0; +let tests = []; - const buf = Buffer.concat(audioInput); - play(audioInput); - - while(audioInput.length) { audioInput.pop() } - - transcribeSpeech({ - content: buf - }); +function testCallback() { + tests.forEach(t => console.log(t)) + console.log(tests[0]) + play(tests[0]) } - - function play(input) { +function play(bufArray) { let i = 0; // format buffers into half their size to account for writable highwaterMark. - const audio = bufSplit(input); + const audio = bufSplit(bufArray); // call this fuction after last audio chunk has been written. const callback = () => { // TODO: clear portAudio writable buffer on write end. + console.log('Finished writing test number %d', counter) + if (counter === 3) { + console.log('finished test writing!') + } } write(); // iterate through audio array and write buffers to portAudio writable. function write() { - let chunk; let ok = true; do { - chunk = audio[i]; if (i === audio.length - 1) { // write last chunk. - ao.write(chunk, null, callback); + ao.write(audio[i], null, callback); } else { // check for backpreassure. - ok = ao.write(chunk, null); + ok = ao.write(audio[i], null); } i++; } while (i < audio.length && ok); @@ -125,25 +133,41 @@ function bufSplit(input){ return result; } +async function test() { + transcribeSpeech({ + content: Buffer.from(audioContainer.input, 'base64') + }); + tests.push(audioContainer.buffers) + counter++; + console.log('audio string length:', audioContainer.input.length) + console.log('buffers written: ', audioContainer.buffers.length) +} + setTimeout(async () => { - ia.pause(); - processAudio(); + record = false; + test() }, 3000); setTimeout(() => { - ia.resume(); -}, 5000) + record = true; +}, 6000) setTimeout(async () => { - ia.pause(); - processAudio(); -}, 8000); + record = false; + test(); +}, 9000); setTimeout(() => { - ia.resume(); -}, 10000) + record = true; +}, 11000) setTimeout(async () => { - ia.pause(); - processAudio(); -}, 15000); + record = false; + test(); +}, 14000); + +setTimeout(async () => { + ia.quit(); + // testCallback() + return; +}, 16000); From c7f91d3e6b32a2c1f7846c1e1895bcb1ce33f33e Mon Sep 17 00:00:00 2001 From: riqo Date: Thu, 4 Mar 2021 10:36:53 -0600 Subject: [PATCH 8/9] fix splash screen --- src/App.vue | 19 +++++-- src/background/audio.ts | 104 +++++++++++++++------------------------ src/background/init.ts | 5 +- src/background/window.ts | 10 ++-- src/main.ts | 1 + src/modules/auth.ts | 5 -- src/views/messenger.vue | 2 +- tests/audio.js | 2 +- 8 files changed, 66 insertions(+), 82 deletions(-) diff --git a/src/App.vue b/src/App.vue index 17e28a1..3c96bf1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@