1 module libwasm.bindings.AnalyserNode;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.AudioNode;
7 
8 @safe:
9 nothrow:
10 
11 struct AnalyserNode {
12   nothrow:
13   libwasm.bindings.AudioNode.AudioNode _parent;
14   alias _parent this;
15   this(Handle h) {
16     _parent = .AudioNode(h);
17   }
18   void getFloatFrequencyData()(scope ref Float32Array array) {
19     Object_Call_Handle__void(this._parent, "getFloatFrequencyData", array.handle);
20   }
21   void getByteFrequencyData()(scope ref Uint8Array array) {
22     Object_Call_Handle__void(this._parent, "getByteFrequencyData", array.handle);
23   }
24   void getFloatTimeDomainData()(scope ref Float32Array array) {
25     Object_Call_Handle__void(this._parent, "getFloatTimeDomainData", array.handle);
26   }
27   void getByteTimeDomainData()(scope ref Uint8Array array) {
28     Object_Call_Handle__void(this._parent, "getByteTimeDomainData", array.handle);
29   }
30   void fftSize()(uint fftSize) {
31     Object_Call_uint__void(this._parent, "fftSize", fftSize);
32   }
33   uint fftSize()() {
34     return Object_Getter__uint(this._parent, "fftSize");
35   }
36   uint frequencyBinCount()() {
37     return Object_Getter__uint(this._parent, "frequencyBinCount");
38   }
39   void minDecibels()(double minDecibels) {
40     Object_Call_double__void(this._parent, "minDecibels", minDecibels);
41   }
42   double minDecibels()() {
43     return Object_Getter__double(this._parent, "minDecibels");
44   }
45   void maxDecibels()(double maxDecibels) {
46     Object_Call_double__void(this._parent, "maxDecibels", maxDecibels);
47   }
48   double maxDecibels()() {
49     return Object_Getter__double(this._parent, "maxDecibels");
50   }
51   void smoothingTimeConstant()(double smoothingTimeConstant) {
52     Object_Call_double__void(this._parent, "smoothingTimeConstant", smoothingTimeConstant);
53   }
54   double smoothingTimeConstant()() {
55     return Object_Getter__double(this._parent, "smoothingTimeConstant");
56   }
57   void passThrough()(bool passThrough) {
58     Object_Call_bool__void(this._parent, "passThrough", passThrough);
59   }
60   bool passThrough()() {
61     return Object_Getter__bool(this._parent, "passThrough");
62   }
63 }
64 struct AnalyserOptions {
65   nothrow:
66   libwasm.bindings.AudioNode.AudioNodeOptions _parent;
67   alias _parent this;
68   this(Handle h) {
69     _parent = .AudioNodeOptions(h);
70   }
71   static auto create() {
72     return AnalyserOptions(libwasm_add__object());
73   }
74   void fftSize()(uint fftSize) {
75     Object_Call_uint__void(this._parent, "fftSize", fftSize);
76   }
77   uint fftSize()() {
78     return Object_Getter__uint(this._parent, "fftSize");
79   }
80   void maxDecibels()(double maxDecibels) {
81     Object_Call_double__void(this._parent, "maxDecibels", maxDecibels);
82   }
83   double maxDecibels()() {
84     return Object_Getter__double(this._parent, "maxDecibels");
85   }
86   void minDecibels()(double minDecibels) {
87     Object_Call_double__void(this._parent, "minDecibels", minDecibels);
88   }
89   double minDecibels()() {
90     return Object_Getter__double(this._parent, "minDecibels");
91   }
92   void smoothingTimeConstant()(double smoothingTimeConstant) {
93     Object_Call_double__void(this._parent, "smoothingTimeConstant", smoothingTimeConstant);
94   }
95   double smoothingTimeConstant()() {
96     return Object_Getter__double(this._parent, "smoothingTimeConstant");
97   }
98 }
99 
100