tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSAudioPannerNode.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #include "config.h"
22
23 #if ENABLE(WEB_AUDIO)
24
25 #include "JSAudioPannerNode.h"
26
27 #include "AudioGain.h"
28 #include "AudioPannerNode.h"
29 #include "ExceptionCode.h"
30 #include "JSAudioGain.h"
31 #include "JSDOMBinding.h"
32 #include <runtime/Error.h>
33 #include <wtf/GetPtr.h>
34
35 using namespace JSC;
36
37 namespace WebCore {
38
39 ASSERT_CLASS_FITS_IN_CELL(JSAudioPannerNode);
40
41 /* Hash table */
42 #if ENABLE(JIT)
43 #define THUNK_GENERATOR(generator) , generator
44 #else
45 #define THUNK_GENERATOR(generator)
46 #endif
47 #if ENABLE(DFG_JIT)
48 #define INTRINSIC(intrinsic) , intrinsic
49 #else
50 #define INTRINSIC(intrinsic)
51 #endif
52
53 static const HashTableValue JSAudioPannerNodeTableValues[] =
54 {
55     { "panningModel", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodePanningModel), (intptr_t)setJSAudioPannerNodePanningModel THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56     { "distanceModel", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeDistanceModel), (intptr_t)setJSAudioPannerNodeDistanceModel THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57     { "refDistance", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeRefDistance), (intptr_t)setJSAudioPannerNodeRefDistance THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58     { "maxDistance", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeMaxDistance), (intptr_t)setJSAudioPannerNodeMaxDistance THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59     { "rolloffFactor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeRolloffFactor), (intptr_t)setJSAudioPannerNodeRolloffFactor THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60     { "coneInnerAngle", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeConeInnerAngle), (intptr_t)setJSAudioPannerNodeConeInnerAngle THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61     { "coneOuterAngle", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeConeOuterAngle), (intptr_t)setJSAudioPannerNodeConeOuterAngle THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62     { "coneOuterGain", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeConeOuterGain), (intptr_t)setJSAudioPannerNodeConeOuterGain THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63     { "coneGain", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeConeGain), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64     { "distanceGain", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeDistanceGain), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
67 };
68
69 #undef THUNK_GENERATOR
70 static const HashTable JSAudioPannerNodeTable = { 35, 31, JSAudioPannerNodeTableValues, 0 };
71 /* Hash table for constructor */
72 #if ENABLE(JIT)
73 #define THUNK_GENERATOR(generator) , generator
74 #else
75 #define THUNK_GENERATOR(generator)
76 #endif
77 #if ENABLE(DFG_JIT)
78 #define INTRINSIC(intrinsic) , intrinsic
79 #else
80 #define INTRINSIC(intrinsic)
81 #endif
82
83 static const HashTableValue JSAudioPannerNodeConstructorTableValues[] =
84 {
85     { "EQUALPOWER", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeEQUALPOWER), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
86     { "HRTF", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeHRTF), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
87     { "SOUNDFIELD", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeSOUNDFIELD), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
88     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
89 };
90
91 #undef THUNK_GENERATOR
92 static const HashTable JSAudioPannerNodeConstructorTable = { 9, 7, JSAudioPannerNodeConstructorTableValues, 0 };
93
94 COMPILE_ASSERT(0 == AudioPannerNode::EQUALPOWER, AudioPannerNodeEnumEQUALPOWERIsWrongUseDontCheckEnums);
95 COMPILE_ASSERT(1 == AudioPannerNode::HRTF, AudioPannerNodeEnumHRTFIsWrongUseDontCheckEnums);
96 COMPILE_ASSERT(2 == AudioPannerNode::SOUNDFIELD, AudioPannerNodeEnumSOUNDFIELDIsWrongUseDontCheckEnums);
97
98 const ClassInfo JSAudioPannerNodeConstructor::s_info = { "AudioPannerNodeConstructor", &DOMConstructorObject::s_info, &JSAudioPannerNodeConstructorTable, 0, CREATE_METHOD_TABLE(JSAudioPannerNodeConstructor) };
99
100 JSAudioPannerNodeConstructor::JSAudioPannerNodeConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
101     : DOMConstructorObject(structure, globalObject)
102 {
103 }
104
105 void JSAudioPannerNodeConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
106 {
107     Base::finishCreation(exec->globalData());
108     ASSERT(inherits(&s_info));
109     putDirect(exec->globalData(), exec->propertyNames().prototype, JSAudioPannerNodePrototype::self(exec, globalObject), DontDelete | ReadOnly);
110 }
111
112 bool JSAudioPannerNodeConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
113 {
114     return getStaticValueSlot<JSAudioPannerNodeConstructor, JSDOMWrapper>(exec, &JSAudioPannerNodeConstructorTable, static_cast<JSAudioPannerNodeConstructor*>(cell), propertyName, slot);
115 }
116
117 bool JSAudioPannerNodeConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
118 {
119     return getStaticValueDescriptor<JSAudioPannerNodeConstructor, JSDOMWrapper>(exec, &JSAudioPannerNodeConstructorTable, static_cast<JSAudioPannerNodeConstructor*>(object), propertyName, descriptor);
120 }
121
122 /* Hash table for prototype */
123 #if ENABLE(JIT)
124 #define THUNK_GENERATOR(generator) , generator
125 #else
126 #define THUNK_GENERATOR(generator)
127 #endif
128 #if ENABLE(DFG_JIT)
129 #define INTRINSIC(intrinsic) , intrinsic
130 #else
131 #define INTRINSIC(intrinsic)
132 #endif
133
134 static const HashTableValue JSAudioPannerNodePrototypeTableValues[] =
135 {
136     { "EQUALPOWER", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeEQUALPOWER), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
137     { "HRTF", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeHRTF), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
138     { "SOUNDFIELD", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsAudioPannerNodeSOUNDFIELD), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
139     { "setPosition", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsAudioPannerNodePrototypeFunctionSetPosition), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
140     { "setOrientation", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsAudioPannerNodePrototypeFunctionSetOrientation), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
141     { "setVelocity", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsAudioPannerNodePrototypeFunctionSetVelocity), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
142     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
143 };
144
145 #undef THUNK_GENERATOR
146 static const HashTable JSAudioPannerNodePrototypeTable = { 17, 15, JSAudioPannerNodePrototypeTableValues, 0 };
147 const ClassInfo JSAudioPannerNodePrototype::s_info = { "AudioPannerNodePrototype", &JSC::JSNonFinalObject::s_info, &JSAudioPannerNodePrototypeTable, 0, CREATE_METHOD_TABLE(JSAudioPannerNodePrototype) };
148
149 JSObject* JSAudioPannerNodePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
150 {
151     return getDOMPrototype<JSAudioPannerNode>(exec, globalObject);
152 }
153
154 bool JSAudioPannerNodePrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
155 {
156     JSAudioPannerNodePrototype* thisObject = jsCast<JSAudioPannerNodePrototype*>(cell);
157     return getStaticPropertySlot<JSAudioPannerNodePrototype, JSObject>(exec, &JSAudioPannerNodePrototypeTable, thisObject, propertyName, slot);
158 }
159
160 bool JSAudioPannerNodePrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
161 {
162     JSAudioPannerNodePrototype* thisObject = jsCast<JSAudioPannerNodePrototype*>(object);
163     return getStaticPropertyDescriptor<JSAudioPannerNodePrototype, JSObject>(exec, &JSAudioPannerNodePrototypeTable, thisObject, propertyName, descriptor);
164 }
165
166 const ClassInfo JSAudioPannerNode::s_info = { "AudioPannerNode", &JSAudioNode::s_info, &JSAudioPannerNodeTable, 0 , CREATE_METHOD_TABLE(JSAudioPannerNode) };
167
168 JSAudioPannerNode::JSAudioPannerNode(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<AudioPannerNode> impl)
169     : JSAudioNode(structure, globalObject, impl)
170 {
171 }
172
173 void JSAudioPannerNode::finishCreation(JSGlobalData& globalData)
174 {
175     Base::finishCreation(globalData);
176     ASSERT(inherits(&s_info));
177 }
178
179 JSObject* JSAudioPannerNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
180 {
181     return JSAudioPannerNodePrototype::create(exec->globalData(), globalObject, JSAudioPannerNodePrototype::createStructure(exec->globalData(), globalObject, JSAudioNodePrototype::self(exec, globalObject)));
182 }
183
184 bool JSAudioPannerNode::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
185 {
186     JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(cell);
187     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
188     return getStaticValueSlot<JSAudioPannerNode, Base>(exec, &JSAudioPannerNodeTable, thisObject, propertyName, slot);
189 }
190
191 bool JSAudioPannerNode::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
192 {
193     JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(object);
194     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
195     return getStaticValueDescriptor<JSAudioPannerNode, Base>(exec, &JSAudioPannerNodeTable, thisObject, propertyName, descriptor);
196 }
197
198 JSValue jsAudioPannerNodePanningModel(ExecState* exec, JSValue slotBase, const Identifier&)
199 {
200     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
201     UNUSED_PARAM(exec);
202     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
203     JSValue result = jsNumber(imp->panningModel());
204     return result;
205 }
206
207
208 JSValue jsAudioPannerNodeDistanceModel(ExecState* exec, JSValue slotBase, const Identifier&)
209 {
210     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
211     UNUSED_PARAM(exec);
212     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
213     JSValue result = jsNumber(imp->distanceModel());
214     return result;
215 }
216
217
218 JSValue jsAudioPannerNodeRefDistance(ExecState* exec, JSValue slotBase, const Identifier&)
219 {
220     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
221     UNUSED_PARAM(exec);
222     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
223     JSValue result = jsNumber(imp->refDistance());
224     return result;
225 }
226
227
228 JSValue jsAudioPannerNodeMaxDistance(ExecState* exec, JSValue slotBase, const Identifier&)
229 {
230     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
231     UNUSED_PARAM(exec);
232     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
233     JSValue result = jsNumber(imp->maxDistance());
234     return result;
235 }
236
237
238 JSValue jsAudioPannerNodeRolloffFactor(ExecState* exec, JSValue slotBase, const Identifier&)
239 {
240     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
241     UNUSED_PARAM(exec);
242     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
243     JSValue result = jsNumber(imp->rolloffFactor());
244     return result;
245 }
246
247
248 JSValue jsAudioPannerNodeConeInnerAngle(ExecState* exec, JSValue slotBase, const Identifier&)
249 {
250     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
251     UNUSED_PARAM(exec);
252     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
253     JSValue result = jsNumber(imp->coneInnerAngle());
254     return result;
255 }
256
257
258 JSValue jsAudioPannerNodeConeOuterAngle(ExecState* exec, JSValue slotBase, const Identifier&)
259 {
260     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
261     UNUSED_PARAM(exec);
262     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
263     JSValue result = jsNumber(imp->coneOuterAngle());
264     return result;
265 }
266
267
268 JSValue jsAudioPannerNodeConeOuterGain(ExecState* exec, JSValue slotBase, const Identifier&)
269 {
270     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
271     UNUSED_PARAM(exec);
272     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
273     JSValue result = jsNumber(imp->coneOuterGain());
274     return result;
275 }
276
277
278 JSValue jsAudioPannerNodeConeGain(ExecState* exec, JSValue slotBase, const Identifier&)
279 {
280     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
281     UNUSED_PARAM(exec);
282     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
283     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->coneGain()));
284     return result;
285 }
286
287
288 JSValue jsAudioPannerNodeDistanceGain(ExecState* exec, JSValue slotBase, const Identifier&)
289 {
290     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
291     UNUSED_PARAM(exec);
292     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
293     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->distanceGain()));
294     return result;
295 }
296
297
298 JSValue jsAudioPannerNodeConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
299 {
300     JSAudioPannerNode* domObject = static_cast<JSAudioPannerNode*>(asObject(slotBase));
301     return JSAudioPannerNode::getConstructor(exec, domObject->globalObject());
302 }
303
304 void JSAudioPannerNode::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
305 {
306     JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(cell);
307     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
308     lookupPut<JSAudioPannerNode, Base>(exec, propertyName, value, &JSAudioPannerNodeTable, thisObject, slot);
309 }
310
311 void setJSAudioPannerNodePanningModel(ExecState* exec, JSObject* thisObject, JSValue value)
312 {
313     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
314     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
315     imp->setPanningModel(value.toUInt32(exec));
316 }
317
318
319 void setJSAudioPannerNodeDistanceModel(ExecState* exec, JSObject* thisObject, JSValue value)
320 {
321     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
322     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
323     imp->setDistanceModel(value.toUInt32(exec));
324 }
325
326
327 void setJSAudioPannerNodeRefDistance(ExecState* exec, JSObject* thisObject, JSValue value)
328 {
329     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
330     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
331     imp->setRefDistance(value.toFloat(exec));
332 }
333
334
335 void setJSAudioPannerNodeMaxDistance(ExecState* exec, JSObject* thisObject, JSValue value)
336 {
337     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
338     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
339     imp->setMaxDistance(value.toFloat(exec));
340 }
341
342
343 void setJSAudioPannerNodeRolloffFactor(ExecState* exec, JSObject* thisObject, JSValue value)
344 {
345     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
346     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
347     imp->setRolloffFactor(value.toFloat(exec));
348 }
349
350
351 void setJSAudioPannerNodeConeInnerAngle(ExecState* exec, JSObject* thisObject, JSValue value)
352 {
353     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
354     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
355     imp->setConeInnerAngle(value.toFloat(exec));
356 }
357
358
359 void setJSAudioPannerNodeConeOuterAngle(ExecState* exec, JSObject* thisObject, JSValue value)
360 {
361     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
362     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
363     imp->setConeOuterAngle(value.toFloat(exec));
364 }
365
366
367 void setJSAudioPannerNodeConeOuterGain(ExecState* exec, JSObject* thisObject, JSValue value)
368 {
369     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
370     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
371     imp->setConeOuterGain(value.toFloat(exec));
372 }
373
374
375 JSValue JSAudioPannerNode::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
376 {
377     return getDOMConstructor<JSAudioPannerNodeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
378 }
379
380 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetPosition(ExecState* exec)
381 {
382     JSValue thisValue = exec->hostThisValue();
383     if (!thisValue.inherits(&JSAudioPannerNode::s_info))
384         return throwVMTypeError(exec);
385     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(thisValue));
386     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSAudioPannerNode::s_info);
387     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
388     if (exec->argumentCount() < 3)
389         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
390     float x(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toFloat(exec));
391     if (exec->hadException())
392         return JSValue::encode(jsUndefined());
393     float y(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toFloat(exec));
394     if (exec->hadException())
395         return JSValue::encode(jsUndefined());
396     float z(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined).toFloat(exec));
397     if (exec->hadException())
398         return JSValue::encode(jsUndefined());
399     imp->setPosition(x, y, z);
400     return JSValue::encode(jsUndefined());
401 }
402
403 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetOrientation(ExecState* exec)
404 {
405     JSValue thisValue = exec->hostThisValue();
406     if (!thisValue.inherits(&JSAudioPannerNode::s_info))
407         return throwVMTypeError(exec);
408     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(thisValue));
409     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSAudioPannerNode::s_info);
410     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
411     if (exec->argumentCount() < 3)
412         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
413     float x(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toFloat(exec));
414     if (exec->hadException())
415         return JSValue::encode(jsUndefined());
416     float y(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toFloat(exec));
417     if (exec->hadException())
418         return JSValue::encode(jsUndefined());
419     float z(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined).toFloat(exec));
420     if (exec->hadException())
421         return JSValue::encode(jsUndefined());
422     imp->setOrientation(x, y, z);
423     return JSValue::encode(jsUndefined());
424 }
425
426 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetVelocity(ExecState* exec)
427 {
428     JSValue thisValue = exec->hostThisValue();
429     if (!thisValue.inherits(&JSAudioPannerNode::s_info))
430         return throwVMTypeError(exec);
431     JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(thisValue));
432     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSAudioPannerNode::s_info);
433     AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
434     if (exec->argumentCount() < 3)
435         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
436     float x(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toFloat(exec));
437     if (exec->hadException())
438         return JSValue::encode(jsUndefined());
439     float y(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toFloat(exec));
440     if (exec->hadException())
441         return JSValue::encode(jsUndefined());
442     float z(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined).toFloat(exec));
443     if (exec->hadException())
444         return JSValue::encode(jsUndefined());
445     imp->setVelocity(x, y, z);
446     return JSValue::encode(jsUndefined());
447 }
448
449 // Constant getters
450
451 JSValue jsAudioPannerNodeEQUALPOWER(ExecState* exec, JSValue, const Identifier&)
452 {
453     UNUSED_PARAM(exec);
454     return jsNumber(static_cast<int>(0));
455 }
456
457 JSValue jsAudioPannerNodeHRTF(ExecState* exec, JSValue, const Identifier&)
458 {
459     UNUSED_PARAM(exec);
460     return jsNumber(static_cast<int>(1));
461 }
462
463 JSValue jsAudioPannerNodeSOUNDFIELD(ExecState* exec, JSValue, const Identifier&)
464 {
465     UNUSED_PARAM(exec);
466     return jsNumber(static_cast<int>(2));
467 }
468
469 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, AudioPannerNode* impl)
470 {
471     return wrap<JSAudioPannerNode>(exec, globalObject, impl);
472 }
473
474
475 }
476
477 #endif // ENABLE(WEB_AUDIO)