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,3 @@
// Metro module 12868 (f12869).
import * as _KrispUtils from "./native/KrispUtils";
export default _KrispUtils;
@@ -0,0 +1,10 @@
// Metro module 10788 (f10789).
import MediaEngineStore from "../../stores/MediaEngineStore";
import getEffectiveNoiseCancellation from "./getEffectiveNoiseCancellation";
import { useStateFromStores } from "../../_bundle/Module589";
export function getNoiseCancellationDeferredToSystem(r4 = MediaEngineStore) {
return !getEffectiveNoiseCancellation(true, r4.getSystemMicrophoneMode());
}
export function useNoiseCancellationDeferredToSystem() {
return useStateFromStores([MediaEngineStore], () => !getEffectiveNoiseCancellation(true, MediaEngineStore.getSystemMicrophoneMode()));
}
@@ -0,0 +1,28 @@
// Metro module 10790 (f10791).
import ApexExperimentStore from "../experiments/apex/ApexExperimentStore";
import { createApexExperiment } from "../experiments/apex/index";
import { useStateFromStores } from "../../_bundle/Module589";
const defaultConfig = {
preferSystemEffects: false
};
const apexExperiment = createApexExperiment({
name: "2025-12-windows-audio-effects",
kind: "user",
defaultConfig,
variations: {
1: {
...defaultConfig,
preferSystemEffects: true
}
}
});
export function getWindowsAudioEffectsExperimentConfig(a0) {
return apexExperiment.getConfig({
location: a0.location
});
}
export function useWindowsAudioEffectsExperimentConfig({ location: location2 }) {
return useStateFromStores([ApexExperimentStore], () => apexExperiment.getConfig({
location: location2
}));
}
@@ -0,0 +1,24 @@
// Metro module 10789 (f10790).
import { isIOS, isMac, isWindows } from "../../utils/PlatformUtils";
import { getWindowsAudioEffectsExperimentConfig } from "./WindowsEffectsExperiment";
let c7252_2 = "deep_noise_suppression";
let c7252_3 = new Set(["voice_isolation", "wide_spectrum"]);
export default function getEffectiveNoiseCancellation(a0, a1) {
let r17;
L18: {
if (!isIOS() && !isMac()) {
r17 = a0;
if (!a0) {
break L18;
}
r17 = (a1 == null || a1 === "" || !isWindows() || a1 !== c7252_2 || !getWindowsAudioEffectsExperimentConfig({
location: "setNoiseCancellation"
}).preferSystemEffects) && a0;
} else {
const r31 = c7252_3.has(a1);
r17 = r31 ? !r31 : a0;
}
}
return r17;
};
export const WINDOWS_NOISE_SUPPRESSION_EFFECT = "deep_noise_suppression";
@@ -0,0 +1,14 @@
// Metro module 12869 (f12870).
import { getVoiceEngine } from "../../../_bundle/Module4238";
export function getKrispModel() {
return new Promise((resolve) => {
const voiceEngine = getVoiceEngine();
if (voiceEngine.getNcModelFilename != null) {
voiceEngine.getNcModelFilename((a0) => resolve(a0));
} else {
resolve(null);
}
});
}
export function setKrispSuppressionLevel() {}
export function setKrispModelOverride() {}
@@ -0,0 +1,66 @@
// Metro module 12959 (f12960).
import { AnalyticEvents } from "../../Constants";
import { Logger } from "../../_bundle/log";
import { isWindows } from "../../_bundle/Module501";
import Dispatcher from "../../Dispatcher";
import AnalyticsUtils from "../../utils/AnalyticsUtils";
let c8947_5 = new Logger("AudioEffects");
export default async function queryAudioEffects(c27387_0, c27387_1, c27387_2) {
let r46, r90;
let c27387_5;
let c27387_6 = 0;
let c30594_0, c30594_1, c30594_2;
const r13 = "Audio effects querying not supported on non-Windows platforms";
L12: {
try {
c30594_0 = c27387_1;
c30594_1 = void 0;
if (isWindows()) {
c27387_6 = 1;
c30594_1 = await c27387_2.getDeviceAudioEffects(c27387_0);
Dispatcher.dispatch({
type: "MEDIA_ENGINE_SET_DEVICE_AUDIO_EFFECTS",
deviceId: c30594_0,
...c30594_1
});
AnalyticsUtils.track(AnalyticEvents.AUDIO_EFFECTS_PROBE_COMPLETED, {
succeeded: true,
active_effects: c30594_1.active,
available_effects: c30594_1.available
});
r90 = c30594_1;
c27387_6 = 0;
break L12;
}
r46 = Promise.reject(new Error(r13));
} catch ($e) {
const r30 = $e;
let r8 = r30;
c27387_5 = r30;
if (c27387_6 !== 0) {
while (true) {
try {
const r99 = c27387_5;
c27387_6 = 0;
c30594_2 = r99;
c8947_5.error("Failed to probe audio effects for device", c30594_2);
AnalyticsUtils.track(AnalyticEvents.AUDIO_EFFECTS_PROBE_COMPLETED, {
succeeded: false
});
} catch (r95) {
r8 = r95;
c27387_5 = r95;
if (c27387_6 === 0) {
break;
}
continue;
}
return void 0;
}
}
throw r8;
}
return r46;
}
return r90;
};