🐛Fix initialVolume bug

This commit is contained in:
DevAndromeda 2022-07-19 20:22:26 +05:45
parent 9e934fa6f6
commit 430d18ea3b

View file

@ -708,7 +708,7 @@ class Queue<T = unknown> {
this._filtersUpdate = options.filtersUpdate;
const volumeTransformer = resource.volume as VolumeTransformer;
if (volumeTransformer && typeof this.options.initialVolume === "number") Reflect.set(volumeTransformer, "volume", Math.pow(this.options.initialVolume, 1.660964));
if (volumeTransformer && typeof this.options.initialVolume === "number") Reflect.set(volumeTransformer, "volume", Math.pow(this.options.initialVolume / 100, 1.660964));
if (volumeTransformer?.hasSmoothness && typeof this.options.volumeSmoothness === "number") {
if (typeof volumeTransformer.setSmoothness === "function") volumeTransformer.setSmoothness(this.options.volumeSmoothness || 0);
}