mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-13 20:39:06 +00:00
making sure that the decibel values are propagated through to the filter
fixes #807
This commit is contained in:
parent
87cf66d772
commit
78452c65d2
2 changed files with 4 additions and 2 deletions
|
@ -47,7 +47,7 @@ export class BiquadFilter extends ToneAudioNode<BiquadFilterOptions> {
|
|||
/**
|
||||
* The gain of the filter. Its value is in dB units. The gain is only used for lowshelf, highshelf, and peaking filters.
|
||||
*/
|
||||
readonly gain: Param<"gain">;
|
||||
readonly gain: Param<"decibels">;
|
||||
|
||||
private readonly _filter: BiquadFilterNode;
|
||||
|
||||
|
@ -87,7 +87,8 @@ export class BiquadFilter extends ToneAudioNode<BiquadFilterOptions> {
|
|||
|
||||
this.gain = new Param({
|
||||
context: this.context,
|
||||
units: "gain",
|
||||
units: "decibels",
|
||||
convert: false,
|
||||
value: options.gain,
|
||||
param: this._filter.gain,
|
||||
});
|
||||
|
|
|
@ -90,6 +90,7 @@ export class Filter extends ToneAudioNode<FilterOptions> {
|
|||
this.gain = new Signal({
|
||||
context: this.context,
|
||||
units: "decibels",
|
||||
convert: false,
|
||||
value: options.gain,
|
||||
});
|
||||
this._type = options.type;
|
||||
|
|
Loading…
Reference in a new issue