|
27 | 27 | // Source nodes are not included in this because the AudioParams for the |
28 | 28 | // source nodes only process when the node has been started. |
29 | 29 |
|
30 | | - audit.define('BiquadFilterNode', (task, should) => { |
| 30 | + audit.define('BiquadFilterNode', async (task, should) => { |
31 | 31 | let nodeName = 'BiquadFilterNode' |
32 | | - Promise |
33 | | - .all([ |
34 | | - testParamAutomation(should, { |
35 | | - nodeName: nodeName, |
36 | | - paramName: 'Q', |
37 | | - initialValue: 2, |
38 | | - rampFinalValue: 5 |
39 | | - }), |
40 | | - testParamAutomation(should, { |
41 | | - nodeName: nodeName, |
42 | | - paramName: 'detune', |
43 | | - initialValue: 1, |
44 | | - rampFinalValue: 0.5 |
45 | | - }), |
46 | | - testParamAutomation(should, { |
47 | | - nodeName: nodeName, |
48 | | - paramName: 'frequency', |
49 | | - initialValue: 1000, |
50 | | - rampFinalValue: 100 |
51 | | - }), |
52 | | - testParamAutomation(should, { |
53 | | - nodeName: nodeName, |
54 | | - paramName: 'gain', |
55 | | - initialValue: -3, |
56 | | - rampFinalValue: 3 |
57 | | - }), |
58 | | - ]) |
59 | | - .then(() => task.done()); |
| 32 | + await testParamAutomation(should, { |
| 33 | + nodeName: nodeName, |
| 34 | + paramName: 'Q', |
| 35 | + initialValue: 2, |
| 36 | + rampFinalValue: 5 |
| 37 | + }); |
| 38 | + await testParamAutomation(should, { |
| 39 | + nodeName: nodeName, |
| 40 | + paramName: 'detune', |
| 41 | + initialValue: 1, |
| 42 | + rampFinalValue: 0.5 |
| 43 | + }); |
| 44 | + await testParamAutomation(should, { |
| 45 | + nodeName: nodeName, |
| 46 | + paramName: 'frequency', |
| 47 | + initialValue: 1000, |
| 48 | + rampFinalValue: 100 |
| 49 | + }); |
| 50 | + await testParamAutomation(should, { |
| 51 | + nodeName: nodeName, |
| 52 | + paramName: 'gain', |
| 53 | + initialValue: -3, |
| 54 | + rampFinalValue: 3 |
| 55 | + }); |
| 56 | + task.done(); |
60 | 57 | }); |
61 | 58 |
|
62 | 59 | audit.define('DelayNode', (task, should) => { |
|
68 | 65 | }).then(() => task.done()); |
69 | 66 | }); |
70 | 67 |
|
71 | | - audit.define('DynamicsCompressorNode', (task, should) => { |
| 68 | + audit.define('DynamicsCompressorNode', async (task, should) => { |
72 | 69 | let nodeName = 'DynamicsCompressorNode'; |
73 | | - Promise |
74 | | - .all([ |
75 | | - testParamAutomation(should, { |
76 | | - nodeName: nodeName, |
77 | | - paramName: 'attack', |
78 | | - initialValue: 0.1, |
79 | | - rampFinalValue: 0.5 |
80 | | - }), |
81 | | - testParamAutomation(should, { |
82 | | - nodeName: nodeName, |
83 | | - paramName: 'knee', |
84 | | - initialValue: 0, |
85 | | - rampFinalValue: 25 |
86 | | - }), |
87 | | - testParamAutomation(should, { |
88 | | - nodeName: nodeName, |
89 | | - paramName: 'ratio', |
90 | | - initialValue: 1, |
91 | | - rampFinalValue: 15 |
92 | | - }), |
93 | | - testParamAutomation(should, { |
94 | | - nodeName: nodeName, |
95 | | - paramName: 'release', |
96 | | - initialValue: 0, |
97 | | - rampFinalValue: 0.75 |
98 | | - }), |
99 | | - testParamAutomation(should, { |
100 | | - nodeName: nodeName, |
101 | | - paramName: 'threshold', |
102 | | - initialValue: -50, |
103 | | - rampFinalValue: -10 |
104 | | - }) |
105 | | - ]) |
106 | | - .then(() => task.done()); |
| 70 | + await testParamAutomation(should, { |
| 71 | + nodeName: nodeName, |
| 72 | + paramName: 'attack', |
| 73 | + initialValue: 0.1, |
| 74 | + rampFinalValue: 0.5 |
| 75 | + }); |
| 76 | + await testParamAutomation(should, { |
| 77 | + nodeName: nodeName, |
| 78 | + paramName: 'knee', |
| 79 | + initialValue: 0, |
| 80 | + rampFinalValue: 25 |
| 81 | + }); |
| 82 | + await testParamAutomation(should, { |
| 83 | + nodeName: nodeName, |
| 84 | + paramName: 'ratio', |
| 85 | + initialValue: 1, |
| 86 | + rampFinalValue: 15 |
| 87 | + }); |
| 88 | + await testParamAutomation(should, { |
| 89 | + nodeName: nodeName, |
| 90 | + paramName: 'release', |
| 91 | + initialValue: 0, |
| 92 | + rampFinalValue: 0.75 |
| 93 | + }); |
| 94 | + await testParamAutomation(should, { |
| 95 | + nodeName: nodeName, |
| 96 | + paramName: 'threshold', |
| 97 | + initialValue: -50, |
| 98 | + rampFinalValue: -10 |
| 99 | + }); |
| 100 | + task.done(); |
107 | 101 | }); |
108 | 102 |
|
109 | 103 | audit.define('GainNode', (task, should) => { |
|
115 | 109 | }).then(() => task.done()); |
116 | 110 | }); |
117 | 111 |
|
118 | | - audit.define('PannerNode', (task, should) => { |
| 112 | + audit.define('PannerNode', async (task, should) => { |
119 | 113 | let nodeName = 'PannerNode'; |
120 | | - Promise |
121 | | - .all([ |
122 | | - testParamAutomation(should, { |
123 | | - nodeName: nodeName, |
124 | | - paramName: 'positionX', |
125 | | - initialValue: 0.1, |
126 | | - rampFinalValue: 0.5 |
127 | | - }), |
128 | | - testParamAutomation(should, { |
129 | | - nodeName: nodeName, |
130 | | - paramName: 'positionY', |
131 | | - initialValue: 2, |
132 | | - rampFinalValue: 30 |
133 | | - }), |
134 | | - testParamAutomation(should, { |
135 | | - nodeName: nodeName, |
136 | | - paramName: 'positionZ', |
137 | | - initialValue: 1, |
138 | | - rampFinalValue: 15 |
139 | | - }), |
140 | | - testParamAutomation(should, { |
141 | | - nodeName: nodeName, |
142 | | - paramName: 'orientationX', |
143 | | - initialValue: 0.1, |
144 | | - rampFinalValue: 0.5 |
145 | | - }), |
146 | | - testParamAutomation(should, { |
147 | | - nodeName: nodeName, |
148 | | - paramName: 'orientationY', |
149 | | - initialValue: 2, |
150 | | - rampFinalValue: 30 |
151 | | - }), |
152 | | - testParamAutomation(should, { |
153 | | - nodeName: nodeName, |
154 | | - paramName: 'orientationZ', |
155 | | - initialValue: 1, |
156 | | - rampFinalValue: 15 |
157 | | - }), |
158 | | - ]) |
159 | | - .then(() => task.done()); |
| 114 | + await testParamAutomation(should, { |
| 115 | + nodeName: nodeName, |
| 116 | + paramName: 'positionX', |
| 117 | + initialValue: 0.1, |
| 118 | + rampFinalValue: 0.5 |
| 119 | + }); |
| 120 | + await testParamAutomation(should, { |
| 121 | + nodeName: nodeName, |
| 122 | + paramName: 'positionY', |
| 123 | + initialValue: 2, |
| 124 | + rampFinalValue: 30 |
| 125 | + }); |
| 126 | + await testParamAutomation(should, { |
| 127 | + nodeName: nodeName, |
| 128 | + paramName: 'positionZ', |
| 129 | + initialValue: 1, |
| 130 | + rampFinalValue: 15 |
| 131 | + }); |
| 132 | + await testParamAutomation(should, { |
| 133 | + nodeName: nodeName, |
| 134 | + paramName: 'orientationX', |
| 135 | + initialValue: 0.1, |
| 136 | + rampFinalValue: 0.5 |
| 137 | + }); |
| 138 | + await testParamAutomation(should, { |
| 139 | + nodeName: nodeName, |
| 140 | + paramName: 'orientationY', |
| 141 | + initialValue: 2, |
| 142 | + rampFinalValue: 30 |
| 143 | + }); |
| 144 | + await testParamAutomation(should, { |
| 145 | + nodeName: nodeName, |
| 146 | + paramName: 'orientationZ', |
| 147 | + initialValue: 1, |
| 148 | + rampFinalValue: 15 |
| 149 | + }); |
| 150 | + task.done(); |
160 | 151 | }); |
161 | 152 |
|
162 | 153 | audit.define('StereoPannerNode', (task, should) => { |
|
168 | 159 | }).then(() => task.done()); |
169 | 160 | }); |
170 | 161 |
|
171 | | - audit.define('AudioListener', (task, should) => { |
172 | | - Promise |
173 | | - .all([ |
174 | | - testAudioListener(should, { |
175 | | - paramName: 'positionX', |
176 | | - initialValue: 1, |
177 | | - rampFinalValue: 100 |
178 | | - }), |
179 | | - testAudioListener(should, { |
180 | | - paramName: 'positionY', |
181 | | - initialValue: 1, |
182 | | - rampFinalValue: 200 |
183 | | - }), |
184 | | - testAudioListener(should, { |
185 | | - paramName: 'positionZ', |
186 | | - initialValue: 1, |
187 | | - rampFinalValue: 300 |
188 | | - }), |
189 | | - testAudioListener(should, { |
190 | | - paramName: 'forwardX', |
191 | | - initialValue: 1, |
192 | | - rampFinalValue: -100 |
193 | | - }), |
194 | | - testAudioListener(should, { |
195 | | - paramName: 'forwardY', |
196 | | - initialValue: 1, |
197 | | - rampFinalValue: -200 |
198 | | - }), |
199 | | - testAudioListener(should, { |
200 | | - paramName: 'forwardZ', |
201 | | - initialValue: 1, |
202 | | - rampFinalValue: -300 |
203 | | - }), |
204 | | - testAudioListener( |
205 | | - should, |
206 | | - {paramName: 'upX', initialValue: 1, rampFinalValue: 99}), |
207 | | - testAudioListener( |
208 | | - should, |
209 | | - {paramName: 'upY', initialValue: 1, rampFinalValue: 42}), |
210 | | - testAudioListener( |
211 | | - should, |
212 | | - {paramName: 'upZ', initialValue: 1, rampFinalValue: 137}), |
213 | | - ]) |
214 | | - .then(() => task.done()); |
| 162 | + audit.define('AudioListener', async (task, should) => { |
| 163 | + await testAudioListener(should, { |
| 164 | + paramName: 'positionX', |
| 165 | + initialValue: 1, |
| 166 | + rampFinalValue: 100 |
| 167 | + }); |
| 168 | + await testAudioListener(should, { |
| 169 | + paramName: 'positionY', |
| 170 | + initialValue: 1, |
| 171 | + rampFinalValue: 200 |
| 172 | + }); |
| 173 | + await testAudioListener(should, { |
| 174 | + paramName: 'positionZ', |
| 175 | + initialValue: 1, |
| 176 | + rampFinalValue: 300 |
| 177 | + }); |
| 178 | + await testAudioListener(should, { |
| 179 | + paramName: 'forwardX', |
| 180 | + initialValue: 1, |
| 181 | + rampFinalValue: -100 |
| 182 | + }); |
| 183 | + await testAudioListener(should, { |
| 184 | + paramName: 'forwardY', |
| 185 | + initialValue: 1, |
| 186 | + rampFinalValue: -200 |
| 187 | + }); |
| 188 | + await testAudioListener(should, { |
| 189 | + paramName: 'forwardZ', |
| 190 | + initialValue: 1, |
| 191 | + rampFinalValue: -300 |
| 192 | + }); |
| 193 | + await testAudioListener(should, { |
| 194 | + paramName: 'upX', |
| 195 | + initialValue: 1, |
| 196 | + rampFinalValue: 99 |
| 197 | + }); |
| 198 | + await testAudioListener(should, { |
| 199 | + paramName: 'upY', |
| 200 | + initialValue: 1, |
| 201 | + rampFinalValue: 42 |
| 202 | + }); |
| 203 | + await testAudioListener(should, { |
| 204 | + paramName: 'upZ', |
| 205 | + initialValue: 1, |
| 206 | + rampFinalValue: 137 |
| 207 | + }); |
| 208 | + task.done(); |
215 | 209 | }); |
216 | 210 |
|
217 | 211 | // Run test of automation processing. |options| is a dictionary that |
|
0 commit comments