mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 15:25:44 +00:00
fix(recording): declip native Windows mic peaks
This commit is contained in:
@@ -116,11 +116,11 @@ describe("getAudioSyncAdjustment", () => {
|
||||
it("can prepend mic normalization filters before sync handling", () => {
|
||||
const filterParts: string[] = [];
|
||||
appendSyncedAudioFilter(filterParts, "[1:a]", "aout", getAudioSyncAdjustment(120, 120), {
|
||||
preFilters: ["loudnorm=I=-16:TP=-1.5:LRA=11"],
|
||||
preFilters: ["adeclip=threshold=1", "loudnorm=I=-16:TP=-1.5:LRA=11"],
|
||||
});
|
||||
|
||||
expect(filterParts).toEqual([
|
||||
"[1:a]loudnorm=I=-16:TP=-1.5:LRA=11,aresample=async=1:first_pts=0,asetpts=PTS-STARTPTS[aout]",
|
||||
"[1:a]adeclip=threshold=1,loudnorm=I=-16:TP=-1.5:LRA=11,aresample=async=1:first_pts=0,asetpts=PTS-STARTPTS[aout]",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -32,9 +32,9 @@ import {
|
||||
import { emitRecordingInterrupted } from "./events";
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
// Match the browser path's "usable speech level" intent with a standard
|
||||
// loudness pass on native Windows mic audio instead of a fixed tiny boost.
|
||||
const WINDOWS_NATIVE_MIC_PRE_FILTERS = ["loudnorm=I=-16:TP=-1.5:LRA=11"];
|
||||
// Repair rare clipped mic peaks before loudness normalization so headset/driver
|
||||
// overloads do not get amplified into audible pops during mux/export.
|
||||
const WINDOWS_NATIVE_MIC_PRE_FILTERS = ["adeclip=threshold=1", "loudnorm=I=-16:TP=-1.5:LRA=11"];
|
||||
const MIN_NATIVE_WINDOWS_VIDEO_PAD_MS = 500;
|
||||
|
||||
export async function isNativeWindowsCaptureAvailable(): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user