This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,15 @@
// Metro module 4638 (f4639).
export function perceptualToAmplitude(a0, r7 = 100) {
if (a0 === 0) {
return 0;
}
const r10 = a0 / r7;
return (r10 < 1 ? Math.pow(r10, 2.8) : Math.pow(10, 6 * (r10 - 1) / 20)) * r7;
}
export function amplitudeToPerceptual(a0, r6 = 100) {
if (a0 === 0) {
return 0;
}
const r9 = a0 / r6;
return (r9 < 1 ? Math.pow(r9, 0.35714285714285715) : 20 * Math.log10(r9) / 6 + 1) * r6;
}