fix(audio): offline mix limiter -3dBFS, 2-stage normalize (-14 LUFS + hard peak -1 dBTP), OGG export

This commit is contained in:
2026-08-24 09:10:00 +07:00
parent 10997a65b9
commit 708e7de32b
7 changed files with 221 additions and 96 deletions
+8 -5
View File
@@ -1,14 +1,17 @@
// Rebuild app.precompiled.js from app.jsx using @babel/standalone (avoids the
// Babel 8 ESM-only CLI conflict). Mirrors package.json's build script:
// babel app/static/js/app.jsx --config-file ./babel.config.json -o app/static/js/app.precompiled.js
import * as Babel from '@babel/standalone';
import { readFileSync, writeFileSync } from 'fs';
// Cache-buster: argv[2] = 'yyyyMMddHHmm' (build_windows.ps1 truyen); mac dinh
// = thoi diem build. Stamp MOI URL asset (?v=) TRONG OUTPUT (khong sua source
// app.jsx) -> khong bao gio quen bump version sau khi rebuild bundle.
const ver = process.argv[2] || new Date().toISOString().replace(/\D/g, '').slice(0, 12);
const src = readFileSync('app/static/js/app.jsx', 'utf8');
const out = Babel.transform(src, {
const transformed = Babel.transform(src, {
presets: ['react'],
filename: 'app.jsx',
sourceType: 'script',
}).code;
const out = transformed.replace(/(sf-fx-realtime\.js\?v=)\d+/g, '$1' + ver);
writeFileSync('app/static/js/app.precompiled.js', out.replace(/\r?\n/g, '\r\n')); // repo CRLF
console.log('BUILD OK', out.length, 'bytes');
console.log('BUILD OK', 'v=' + ver, out.length, 'bytes');