18 lines
667 B
TypeScript
18 lines
667 B
TypeScript
// Metro module 13594 (f13595).
|
|
import MediaEngineStore from "../../stores/MediaEngineStore";
|
|
import { amplitudeToPerceptual } from "../../utils/PerceptualVolumeUtils";
|
|
import { SoundboardSettings } from "../user_settings/UserSettings";
|
|
export default function getVolumeForSound(a0, r8) {
|
|
if (r8 === void 0) {
|
|
let r17 = SoundboardSettings.getSetting()?.volume;
|
|
if (r17 == null) {
|
|
r17 = 100;
|
|
}
|
|
r8 = r17;
|
|
}
|
|
return Math.min(a0 * (amplitudeToPerceptual(r8) / 100) * Math.min(MediaEngineStore.getOutputVolume() / 100, 1), 1);
|
|
};
|
|
export function getPerceptualSoundboardVolume(a0) {
|
|
return amplitudeToPerceptual(a0 == null ? 100 : a0) / 100;
|
|
}
|