2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
25 #include "JSAudioPannerNode.h"
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>
39 ASSERT_CLASS_FITS_IN_CELL(JSAudioPannerNode);
43 #define THUNK_GENERATOR(generator) , generator
45 #define THUNK_GENERATOR(generator)
48 #define INTRINSIC(intrinsic) , intrinsic
50 #define INTRINSIC(intrinsic)
53 static const HashTableValue JSAudioPannerNodeTableValues[] =
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) }
69 #undef THUNK_GENERATOR
70 static const HashTable JSAudioPannerNodeTable = { 35, 31, JSAudioPannerNodeTableValues, 0 };
71 /* Hash table for constructor */
73 #define THUNK_GENERATOR(generator) , generator
75 #define THUNK_GENERATOR(generator)
78 #define INTRINSIC(intrinsic) , intrinsic
80 #define INTRINSIC(intrinsic)
83 static const HashTableValue JSAudioPannerNodeConstructorTableValues[] =
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) }
91 #undef THUNK_GENERATOR
92 static const HashTable JSAudioPannerNodeConstructorTable = { 9, 7, JSAudioPannerNodeConstructorTableValues, 0 };
94 COMPILE_ASSERT(0 == AudioPannerNode::EQUALPOWER, AudioPannerNodeEnumEQUALPOWERIsWrongUseDontCheckEnums);
95 COMPILE_ASSERT(1 == AudioPannerNode::HRTF, AudioPannerNodeEnumHRTFIsWrongUseDontCheckEnums);
96 COMPILE_ASSERT(2 == AudioPannerNode::SOUNDFIELD, AudioPannerNodeEnumSOUNDFIELDIsWrongUseDontCheckEnums);
98 const ClassInfo JSAudioPannerNodeConstructor::s_info = { "AudioPannerNodeConstructor", &DOMConstructorObject::s_info, &JSAudioPannerNodeConstructorTable, 0, CREATE_METHOD_TABLE(JSAudioPannerNodeConstructor) };
100 JSAudioPannerNodeConstructor::JSAudioPannerNodeConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
101 : DOMConstructorObject(structure, globalObject)
105 void JSAudioPannerNodeConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
107 Base::finishCreation(exec->globalData());
108 ASSERT(inherits(&s_info));
109 putDirect(exec->globalData(), exec->propertyNames().prototype, JSAudioPannerNodePrototype::self(exec, globalObject), DontDelete | ReadOnly);
112 bool JSAudioPannerNodeConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
114 return getStaticValueSlot<JSAudioPannerNodeConstructor, JSDOMWrapper>(exec, &JSAudioPannerNodeConstructorTable, static_cast<JSAudioPannerNodeConstructor*>(cell), propertyName, slot);
117 bool JSAudioPannerNodeConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
119 return getStaticValueDescriptor<JSAudioPannerNodeConstructor, JSDOMWrapper>(exec, &JSAudioPannerNodeConstructorTable, static_cast<JSAudioPannerNodeConstructor*>(object), propertyName, descriptor);
122 /* Hash table for prototype */
124 #define THUNK_GENERATOR(generator) , generator
126 #define THUNK_GENERATOR(generator)
129 #define INTRINSIC(intrinsic) , intrinsic
131 #define INTRINSIC(intrinsic)
134 static const HashTableValue JSAudioPannerNodePrototypeTableValues[] =
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) }
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) };
149 JSObject* JSAudioPannerNodePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
151 return getDOMPrototype<JSAudioPannerNode>(exec, globalObject);
154 bool JSAudioPannerNodePrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
156 JSAudioPannerNodePrototype* thisObject = jsCast<JSAudioPannerNodePrototype*>(cell);
157 return getStaticPropertySlot<JSAudioPannerNodePrototype, JSObject>(exec, &JSAudioPannerNodePrototypeTable, thisObject, propertyName, slot);
160 bool JSAudioPannerNodePrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
162 JSAudioPannerNodePrototype* thisObject = jsCast<JSAudioPannerNodePrototype*>(object);
163 return getStaticPropertyDescriptor<JSAudioPannerNodePrototype, JSObject>(exec, &JSAudioPannerNodePrototypeTable, thisObject, propertyName, descriptor);
166 const ClassInfo JSAudioPannerNode::s_info = { "AudioPannerNode", &JSAudioNode::s_info, &JSAudioPannerNodeTable, 0 , CREATE_METHOD_TABLE(JSAudioPannerNode) };
168 JSAudioPannerNode::JSAudioPannerNode(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<AudioPannerNode> impl)
169 : JSAudioNode(structure, globalObject, impl)
173 void JSAudioPannerNode::finishCreation(JSGlobalData& globalData)
175 Base::finishCreation(globalData);
176 ASSERT(inherits(&s_info));
179 JSObject* JSAudioPannerNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
181 return JSAudioPannerNodePrototype::create(exec->globalData(), globalObject, JSAudioPannerNodePrototype::createStructure(exec->globalData(), globalObject, JSAudioNodePrototype::self(exec, globalObject)));
184 bool JSAudioPannerNode::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
186 JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(cell);
187 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
188 return getStaticValueSlot<JSAudioPannerNode, Base>(exec, &JSAudioPannerNodeTable, thisObject, propertyName, slot);
191 bool JSAudioPannerNode::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
193 JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(object);
194 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
195 return getStaticValueDescriptor<JSAudioPannerNode, Base>(exec, &JSAudioPannerNodeTable, thisObject, propertyName, descriptor);
198 JSValue jsAudioPannerNodePanningModel(ExecState* exec, JSValue slotBase, const Identifier&)
200 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
202 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
203 JSValue result = jsNumber(imp->panningModel());
208 JSValue jsAudioPannerNodeDistanceModel(ExecState* exec, JSValue slotBase, const Identifier&)
210 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
212 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
213 JSValue result = jsNumber(imp->distanceModel());
218 JSValue jsAudioPannerNodeRefDistance(ExecState* exec, JSValue slotBase, const Identifier&)
220 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
222 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
223 JSValue result = jsNumber(imp->refDistance());
228 JSValue jsAudioPannerNodeMaxDistance(ExecState* exec, JSValue slotBase, const Identifier&)
230 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
232 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
233 JSValue result = jsNumber(imp->maxDistance());
238 JSValue jsAudioPannerNodeRolloffFactor(ExecState* exec, JSValue slotBase, const Identifier&)
240 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
242 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
243 JSValue result = jsNumber(imp->rolloffFactor());
248 JSValue jsAudioPannerNodeConeInnerAngle(ExecState* exec, JSValue slotBase, const Identifier&)
250 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
252 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
253 JSValue result = jsNumber(imp->coneInnerAngle());
258 JSValue jsAudioPannerNodeConeOuterAngle(ExecState* exec, JSValue slotBase, const Identifier&)
260 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
262 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
263 JSValue result = jsNumber(imp->coneOuterAngle());
268 JSValue jsAudioPannerNodeConeOuterGain(ExecState* exec, JSValue slotBase, const Identifier&)
270 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
272 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
273 JSValue result = jsNumber(imp->coneOuterGain());
278 JSValue jsAudioPannerNodeConeGain(ExecState* exec, JSValue slotBase, const Identifier&)
280 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
282 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
283 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->coneGain()));
288 JSValue jsAudioPannerNodeDistanceGain(ExecState* exec, JSValue slotBase, const Identifier&)
290 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(asObject(slotBase));
292 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
293 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->distanceGain()));
298 JSValue jsAudioPannerNodeConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
300 JSAudioPannerNode* domObject = static_cast<JSAudioPannerNode*>(asObject(slotBase));
301 return JSAudioPannerNode::getConstructor(exec, domObject->globalObject());
304 void JSAudioPannerNode::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
306 JSAudioPannerNode* thisObject = jsCast<JSAudioPannerNode*>(cell);
307 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
308 lookupPut<JSAudioPannerNode, Base>(exec, propertyName, value, &JSAudioPannerNodeTable, thisObject, slot);
311 void setJSAudioPannerNodePanningModel(ExecState* exec, JSObject* thisObject, JSValue value)
313 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
314 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
315 imp->setPanningModel(value.toUInt32(exec));
319 void setJSAudioPannerNodeDistanceModel(ExecState* exec, JSObject* thisObject, JSValue value)
321 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
322 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
323 imp->setDistanceModel(value.toUInt32(exec));
327 void setJSAudioPannerNodeRefDistance(ExecState* exec, JSObject* thisObject, JSValue value)
329 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
330 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
331 imp->setRefDistance(value.toFloat(exec));
335 void setJSAudioPannerNodeMaxDistance(ExecState* exec, JSObject* thisObject, JSValue value)
337 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
338 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
339 imp->setMaxDistance(value.toFloat(exec));
343 void setJSAudioPannerNodeRolloffFactor(ExecState* exec, JSObject* thisObject, JSValue value)
345 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
346 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
347 imp->setRolloffFactor(value.toFloat(exec));
351 void setJSAudioPannerNodeConeInnerAngle(ExecState* exec, JSObject* thisObject, JSValue value)
353 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
354 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
355 imp->setConeInnerAngle(value.toFloat(exec));
359 void setJSAudioPannerNodeConeOuterAngle(ExecState* exec, JSObject* thisObject, JSValue value)
361 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
362 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
363 imp->setConeOuterAngle(value.toFloat(exec));
367 void setJSAudioPannerNodeConeOuterGain(ExecState* exec, JSObject* thisObject, JSValue value)
369 JSAudioPannerNode* castedThis = static_cast<JSAudioPannerNode*>(thisObject);
370 AudioPannerNode* imp = static_cast<AudioPannerNode*>(castedThis->impl());
371 imp->setConeOuterGain(value.toFloat(exec));
375 JSValue JSAudioPannerNode::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
377 return getDOMConstructor<JSAudioPannerNodeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
380 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetPosition(ExecState* exec)
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());
403 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetOrientation(ExecState* exec)
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());
426 EncodedJSValue JSC_HOST_CALL jsAudioPannerNodePrototypeFunctionSetVelocity(ExecState* exec)
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());
451 JSValue jsAudioPannerNodeEQUALPOWER(ExecState* exec, JSValue, const Identifier&)
454 return jsNumber(static_cast<int>(0));
457 JSValue jsAudioPannerNodeHRTF(ExecState* exec, JSValue, const Identifier&)
460 return jsNumber(static_cast<int>(1));
463 JSValue jsAudioPannerNodeSOUNDFIELD(ExecState* exec, JSValue, const Identifier&)
466 return jsNumber(static_cast<int>(2));
469 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, AudioPannerNode* impl)
471 return wrap<JSAudioPannerNode>(exec, globalObject, impl);
477 #endif // ENABLE(WEB_AUDIO)