Gemessen an Filipes Chrome 156: ohne Unterdrückung kommt Ton aus dem YouTube-Rahmen voll ins Mikro (-33 dB), mit ihr nicht (-76 dB). Der Pultmodus schaltete sie ab, der PC-Ton lief übers Pult zurück zu allen. - echoSoll(): ohne Pult an, mit Pult in der Reaction an, beim Zocken aus (oder wenn die Echo-Probe „frei“ misst); Rauschen/Automatik wie bisher - Wechsel Reaction/Zocken tauscht nur die Tonspur (Kamera bleibt) - Chrome liefert die Unterdrückung nicht, solange die alte Spur offen ist: nach dem Öffnen nachmessen, sonst alte zuerst schließen - Echo-Probe im Probeabend (7. Punkt), neue Prüfung pruef-echo-blick Co-Authored-By: Claude Opus 5.5 <[email protected]>
54 lines
2.8 KiB
JavaScript
54 lines
2.8 KiB
JavaScript
/* =====================================================================
|
||
DER PROBEABEND (05.11.2026, Perfektionsplan Runde 3)
|
||
|
||
Was nur an Filipes Rechner messbar ist (Saal-Fenster über GTA,
|
||
Freistellen auf der RTX, Clip aus dem echten OBS, Stream Deck …), misst
|
||
die Seite selbst – hier wird nur das ERGEBNIS je Punkt aufgehoben, damit
|
||
die Regie es beim nächsten Mal noch weiß. Eine Zeile in `einstellungen`
|
||
(kein neues Schema), nur die Regie liest und schreibt.
|
||
===================================================================== */
|
||
import { db, protokolliere, echteIp } from "./workspace.js";
|
||
|
||
export const PROBE_PUNKTE = ["fenster", "freistellen", "echo", "clip", "meinmix", "streamdeck", "lautheit"];
|
||
const STAENDE = ["offen", "geht", "knapp", "geht_nicht"];
|
||
const SCHLUESSEL = "reaktion_probeabend";
|
||
|
||
export function probeLesen() {
|
||
try {
|
||
const z = db().prepare("SELECT wert FROM einstellungen WHERE schluessel = ?").get(SCHLUESSEL);
|
||
const roh = z ? JSON.parse(z.wert) : {};
|
||
const aus = {};
|
||
for (const p of PROBE_PUNKTE) {
|
||
const e = roh[p];
|
||
aus[p] = e && STAENDE.includes(e.stand) ? { stand: e.stand, wann: String(e.wann || ""), wert: String(e.wert || "").slice(0, 160) } : { stand: "offen", wann: "", wert: "" };
|
||
}
|
||
return aus;
|
||
} catch { return Object.fromEntries(PROBE_PUNKTE.map((p) => [p, { stand: "offen", wann: "", wert: "" }])); }
|
||
}
|
||
|
||
export function probeabendWege(probeRouter, { nurHost, kleinerRumpf }) {
|
||
probeRouter.use(["/workspace/api/reaktion/probeabend"], kleinerRumpf(1024));
|
||
probeRouter.get("/workspace/api/reaktion/probeabend", nurHost, (req, res) => {
|
||
res.set("Cache-Control", "no-store");
|
||
res.json({ punkte: probeLesen() });
|
||
});
|
||
probeRouter.put("/workspace/api/reaktion/probeabend", nurHost, (req, res) => {
|
||
try {
|
||
const punkt = String(req.body?.punkt || "");
|
||
const stand = String(req.body?.stand || "");
|
||
if (!PROBE_PUNKTE.includes(punkt) || !STAENDE.includes(stand)) return res.status(400).json({ fehler: "probe_unklar" });
|
||
const wert = String(req.body?.wert ?? "").replace(/[\u0000-\u001f\u007f]/g, " ").trim().slice(0, 160);
|
||
const alle = probeLesen();
|
||
alle[punkt] = { stand, wann: new Date().toISOString(), wert };
|
||
db().prepare(`INSERT INTO einstellungen (schluessel, wert, geaendert, von) VALUES (?,?,?,?)
|
||
ON CONFLICT(schluessel) DO UPDATE SET wert = excluded.wert, geaendert = excluded.geaendert, von = excluded.von`)
|
||
.run(SCHLUESSEL, JSON.stringify(alle), new Date().toISOString(), req.person.id);
|
||
protokolliere("reaktion_probeabend", { personId: req.person.id, detail: `${punkt}: ${stand}`, ip: echteIp(req) });
|
||
res.json({ punkte: alle });
|
||
} catch (f) {
|
||
console.error("[probeabend]", f?.message);
|
||
res.status(503).json({ fehler: "nicht_verfuegbar" });
|
||
}
|
||
});
|
||
}
|