From 8bd3b4d3f0cd1de9456cad9acddd00418201deb6 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Fri, 5 Jan 2024 23:23:39 +0900 Subject: [PATCH] fix(visualizer): fixed an issue with audio getting unusually loud --- package.json | 3 +++ patches/vudio@2.1.1.patch | 20 ++++++++++++++++++++ pnpm-lock.yaml | 10 ++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 patches/vudio@2.1.1.patch diff --git a/package.json b/package.json index 15e3f419..ee08f39f 100644 --- a/package.json +++ b/package.json @@ -131,6 +131,9 @@ "node-fetch": "3.3.2", "@electron/universal": "2.0.1", "@babel/runtime": "7.23.7" + }, + "patchedDependencies": { + "vudio@2.1.1": "patches/vudio@2.1.1.patch" } }, "dependencies": { diff --git a/patches/vudio@2.1.1.patch b/patches/vudio@2.1.1.patch new file mode 100644 index 00000000..261d58c0 --- /dev/null +++ b/patches/vudio@2.1.1.patch @@ -0,0 +1,20 @@ +diff --git a/umd/vudio.js b/umd/vudio.js +index d0d1127e57125ad4e77442af2db4a26998c7b385..c0b66bd4327c65c31dc6e588bfa4ae6ec70bd3b8 100644 +--- a/umd/vudio.js ++++ b/umd/vudio.js +@@ -147,7 +147,6 @@ + + source.connect(this.analyser); + this.analyser.fftSize = this.option.accuracy * 2; +- this.analyser.connect(audioContext.destination); + + this.freqByteData = new Uint8Array(this.analyser.frequencyBinCount); + +@@ -207,7 +206,6 @@ + + source.connect(this.analyser); + this.analyser.fftSize = this.option.accuracy * 2; +- this.analyser.connect(audioContext.destination); + }, + + __rebuildData : function (freqByteData, horizontalAlign) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7b2049b..647fc993 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,11 @@ overrides: '@electron/universal': 2.0.1 '@babel/runtime': 7.23.7 +patchedDependencies: + vudio@2.1.1: + hash: 7iux5msqpgl3octdmwy4uspwoe + path: patches/vudio@2.1.1.patch + dependencies: '@cliqz/adblocker-electron': specifier: 1.26.12 @@ -134,7 +139,7 @@ dependencies: version: 21.0.1 vudio: specifier: 2.1.1 - version: 2.1.1 + version: 2.1.1(patch_hash=7iux5msqpgl3octdmwy4uspwoe) x11: specifier: 2.3.0 version: 2.3.0 @@ -6267,9 +6272,10 @@ packages: fsevents: 2.3.3 dev: true - /vudio@2.1.1: + /vudio@2.1.1(patch_hash=7iux5msqpgl3octdmwy4uspwoe): resolution: {integrity: sha512-VkFQcFt/b/kpF5Eg5Sq+oXUo1Zp5aRFF4BSmIrOzau5o+5WMWwX9ae/EGJZstCyZFiCTU5iw1Y+u2BCGW6Y6Jw==} dev: false + patched: true /web-streams-polyfill@3.3.2: resolution: {integrity: sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==}