diff --git a/src/utils/AudioFilters.ts b/src/utils/AudioFilters.ts index 4c1fa3f..9544903 100644 --- a/src/utils/AudioFilters.ts +++ b/src/utils/AudioFilters.ts @@ -51,6 +51,16 @@ const FilterList = { .filter((predicate) => typeof predicate === 'string') .map((m) => this[m]) .join(','); + }, + define(filterName: string, value: string) { + /* @ts-ignore */ + if (typeof this[filterName] !== "string") return; + + /* @ts-ignore */ + this[filterName] = value; + }, + defineBulk(filterArray: { name: string, value: string }[]) { + filterArray.forEach(arr => this.define(arr.name, arr.value)); } };