1 module libwasm.bindings.BiquadFilterNode;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.AudioNode;
7 import libwasm.bindings.AudioParam;
8 
9 @safe:
10 nothrow:
11 
12 struct BiquadFilterNode {
13   nothrow:
14   libwasm.bindings.AudioNode.AudioNode _parent;
15   alias _parent this;
16   this(Handle h) {
17     _parent = .AudioNode(h);
18   }
19   void type()(BiquadFilterType type) {
20     Object_Call_int__void(this._parent, "type", type);
21   }
22   BiquadFilterType type()() {
23     return Object_Getter__int(this._parent, "type");
24   }
25   auto frequency()() {
26     return AudioParam(Object_Getter__Handle(this._parent, "frequency"));
27   }
28   auto detune()() {
29     return AudioParam(Object_Getter__Handle(this._parent, "detune"));
30   }
31   auto Q()() {
32     return AudioParam(Object_Getter__Handle(this._parent, "Q"));
33   }
34   auto gain()() {
35     return AudioParam(Object_Getter__Handle(this._parent, "gain"));
36   }
37   void getFrequencyResponse()(scope ref Float32Array frequencyHz, scope ref Float32Array magResponse, scope ref Float32Array phaseResponse) {
38     Serialize_Object_VarArgCall!void(this._parent, "getFrequencyResponse", "Handle;Handle;Handle", tuple(cast(Handle)frequencyHz.handle, cast(Handle)magResponse.handle, cast(Handle)phaseResponse.handle));
39   }
40   void passThrough()(bool passThrough) {
41     Object_Call_bool__void(this._parent, "passThrough", passThrough);
42   }
43   bool passThrough()() {
44     return Object_Getter__bool(this._parent, "passThrough");
45   }
46 }
47 struct BiquadFilterOptions {
48   nothrow:
49   libwasm.bindings.AudioNode.AudioNodeOptions _parent;
50   alias _parent this;
51   this(Handle h) {
52     _parent = .AudioNodeOptions(h);
53   }
54   static auto create() {
55     return BiquadFilterOptions(libwasm_add__object());
56   }
57   void type()(BiquadFilterType type) {
58     Object_Call_int__void(this._parent, "type", type);
59   }
60   BiquadFilterType type()() {
61     return Object_Getter__int(this._parent, "type");
62   }
63   void Q()(float q) {
64     Object_Call_float__void(this._parent, "Q", Q);
65   }
66   float Q()() {
67     return Object_Getter__float(this._parent, "Q");
68   }
69   void detune()(float detune) {
70     Object_Call_float__void(this._parent, "detune", detune);
71   }
72   float detune()() {
73     return Object_Getter__float(this._parent, "detune");
74   }
75   void frequency()(float frequency) {
76     Object_Call_float__void(this._parent, "frequency", frequency);
77   }
78   float frequency()() {
79     return Object_Getter__float(this._parent, "frequency");
80   }
81   void gain()(float gain) {
82     Object_Call_float__void(this._parent, "gain", gain);
83   }
84   float gain()() {
85     return Object_Getter__float(this._parent, "gain");
86   }
87 }
88 enum BiquadFilterType {
89   lowpass,
90   highpass,
91   bandpass,
92   lowshelf,
93   highshelf,
94   peaking,
95   notch,
96   allpass
97 }
98 
99