fix(visualizer): fixed an issue with audio getting unusually loud

This commit is contained in:
JellyBrick
2024-01-05 23:23:39 +09:00
parent 4e3cb5806d
commit 8bd3b4d3f0
3 changed files with 31 additions and 2 deletions

View File

@ -131,6 +131,9 @@
"node-fetch": "3.3.2", "node-fetch": "3.3.2",
"@electron/universal": "2.0.1", "@electron/universal": "2.0.1",
"@babel/runtime": "7.23.7" "@babel/runtime": "7.23.7"
},
"patchedDependencies": {
"vudio@2.1.1": "patches/vudio@2.1.1.patch"
} }
}, },
"dependencies": { "dependencies": {

20
patches/vudio@2.1.1.patch Normal file
View File

@ -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) {

10
pnpm-lock.yaml generated
View File

@ -14,6 +14,11 @@ overrides:
'@electron/universal': 2.0.1 '@electron/universal': 2.0.1
'@babel/runtime': 7.23.7 '@babel/runtime': 7.23.7
patchedDependencies:
vudio@2.1.1:
hash: 7iux5msqpgl3octdmwy4uspwoe
path: patches/vudio@2.1.1.patch
dependencies: dependencies:
'@cliqz/adblocker-electron': '@cliqz/adblocker-electron':
specifier: 1.26.12 specifier: 1.26.12
@ -134,7 +139,7 @@ dependencies:
version: 21.0.1 version: 21.0.1
vudio: vudio:
specifier: 2.1.1 specifier: 2.1.1
version: 2.1.1 version: 2.1.1(patch_hash=7iux5msqpgl3octdmwy4uspwoe)
x11: x11:
specifier: 2.3.0 specifier: 2.3.0
version: 2.3.0 version: 2.3.0
@ -6267,9 +6272,10 @@ packages:
fsevents: 2.3.3 fsevents: 2.3.3
dev: true dev: true
/vudio@2.1.1: /vudio@2.1.1(patch_hash=7iux5msqpgl3octdmwy4uspwoe):
resolution: {integrity: sha512-VkFQcFt/b/kpF5Eg5Sq+oXUo1Zp5aRFF4BSmIrOzau5o+5WMWwX9ae/EGJZstCyZFiCTU5iw1Y+u2BCGW6Y6Jw==} resolution: {integrity: sha512-VkFQcFt/b/kpF5Eg5Sq+oXUo1Zp5aRFF4BSmIrOzau5o+5WMWwX9ae/EGJZstCyZFiCTU5iw1Y+u2BCGW6Y6Jw==}
dev: false dev: false
patched: true
/web-streams-polyfill@3.3.2: /web-streams-polyfill@3.3.2:
resolution: {integrity: sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==} resolution: {integrity: sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==}