From 0a0ed8702a470ac52318c928eb0782358aa1fdbf Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 11 Sep 2021 18:46:22 +0100 Subject: [PATCH 1/4] Only import news files when not using BAPSicle. --- src/mixer/audio.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index cf85ee3..2816b4e 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -9,6 +9,13 @@ import NewsIntro from "../assets/audio/NewsIntro.wav"; import StereoAnalyserNode from "stereo-analyser-node"; +let NewsEndCountdown: any; +let NewsIntro: any; +if (!process.env.REACT_APP_BAPSICLE_INTERFACE) { + NewsEndCountdown = require("../assets/audio/NewsEndCountdown.wav"); + NewsIntro = require("../assets/audio/NewsIntro.wav"); +} + export const DEFAULT_TRIM_DB = -6; // The default trim applied to channel players. export const OFF_LEVEL_DB = -40; From 3b5677e4824c8365492a0132037fe60d7e43932e Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 11 Sep 2021 19:15:08 +0100 Subject: [PATCH 2/4] Delete the other old wav import. --- src/mixer/audio.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index 2816b4e..e35c8e4 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -4,7 +4,6 @@ import StrictEmitter from "strict-event-emitter-types"; import WaveSurfer from "wavesurfer.js"; import CursorPlugin from "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js"; import RegionsPlugin from "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js"; -import NewsEndCountdown from "../assets/audio/NewsEndCountdown.wav"; import NewsIntro from "../assets/audio/NewsIntro.wav"; import StereoAnalyserNode from "stereo-analyser-node"; From a909a9eb89969003bcfcf89cbb8e4b4666fa126e Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 11 Sep 2021 19:22:11 +0100 Subject: [PATCH 3/4] Remove other import. --- src/mixer/audio.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index e35c8e4..c33e5f2 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -4,7 +4,6 @@ import StrictEmitter from "strict-event-emitter-types"; import WaveSurfer from "wavesurfer.js"; import CursorPlugin from "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js"; import RegionsPlugin from "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js"; -import NewsIntro from "../assets/audio/NewsIntro.wav"; import StereoAnalyserNode from "stereo-analyser-node"; From a1f4bd0d858055bda3731a9b64b8a0f6f7056071 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 11 Sep 2021 19:54:25 +0100 Subject: [PATCH 4/4] Update type to string. --- src/mixer/audio.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index c33e5f2..366c7f4 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -7,8 +7,8 @@ import RegionsPlugin from "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js"; import StereoAnalyserNode from "stereo-analyser-node"; -let NewsEndCountdown: any; -let NewsIntro: any; +let NewsEndCountdown: string; +let NewsIntro: string; if (!process.env.REACT_APP_BAPSICLE_INTERFACE) { NewsEndCountdown = require("../assets/audio/NewsEndCountdown.wav"); NewsIntro = require("../assets/audio/NewsIntro.wav");