34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
// Module ID: 8849
|
|
// Function ID: 8850
|
|
// Name: snapVolumeToDefault
|
|
// Dependencies: [685, 4290, 8850, 4641, 2]
|
|
// Exports: coerceAudioContextForProto, snapVolumeToDefault
|
|
|
|
// Module 8849 (snapVolumeToDefault)
|
|
import { ProtoAudioSettingsContextTypes as closure_2 } from "MAX_FAVORITES";
|
|
|
|
let result = require("AudioSettingsDefaultVolumes").fileFinishedImporting("modules/user_settings/voice/AudioSettingsUtils.tsx");
|
|
|
|
export const snapVolumeToDefault = function snapVolumeToDefault(USER, DEFAULT) {
|
|
if (DEFAULT === require(4290) /* BaseConnectionEvent */.MediaEngineContextTypes.STREAM) {
|
|
USER = tmp(8850).AudioSettingsDefaultVolumes.STREAM;
|
|
} else {
|
|
USER = tmp(8850).AudioSettingsDefaultVolumes.USER;
|
|
}
|
|
let tmp3 = USER;
|
|
let tmpResult = tmp(4641);
|
|
const result = tmpResult.amplitudeToPerceptual(USER);
|
|
tmpResult = tmp(4641);
|
|
if (Math.abs(result - tmpResult.amplitudeToPerceptual(USER)) < 1) {
|
|
tmp3 = USER;
|
|
}
|
|
return tmp3;
|
|
};
|
|
export const coerceAudioContextForProto = function coerceAudioContextForProto(first) {
|
|
if (require(4290) /* BaseConnectionEvent */.MediaEngineContextTypes.DEFAULT === first) {
|
|
return constants.USER;
|
|
} else if (tmp(4290).MediaEngineContextTypes.STREAM === first) {
|
|
return constants.STREAM;
|
|
}
|
|
tmp = require;
|
|
};
|