discord-player-play-dl/src/smoothVolume.ts
2022-01-31 17:29:00 +05:45

12 lines
439 B
TypeScript

import { VolumeTransformer as VolumeTransformerMock } from "./VoiceInterface/VolumeTransformer";
try {
// eslint-disable-next-line
const mod = require("prism-media") as typeof import("prism-media") & { VolumeTransformer: typeof VolumeTransformerMock };
if (typeof mod.VolumeTransformer.hasSmoothing !== "boolean") {
Reflect.set(mod, "VolumeTransformer", VolumeTransformerMock);
}
} catch {
/* do nothing */
}