AudioLuaAPI.cpp 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261
  1. /*
  2. ** Lua binding: Audio
  3. ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:48.
  4. */
  5. //
  6. // Copyright (c) 2008-2013 the Urho3D project.
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining a copy
  9. // of this software and associated documentation files (the "Software"), to deal
  10. // in the Software without restriction, including without limitation the rights
  11. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. // copies of the Software, and to permit persons to whom the Software is
  13. // furnished to do so, subject to the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be included in
  16. // all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. // THE SOFTWARE.
  25. //
  26. #include "Precompiled.h"
  27. #include "tolua++.h"
  28. /* Exported function */
  29. TOLUA_API int tolua_Audio_open (lua_State* tolua_S);
  30. #define TOLUA_RELEASE
  31. #include "AudioLuaAPI.h"
  32. #include "Audio.h"
  33. #include "Sound.h"
  34. #include "SoundListener.h"
  35. #include "SoundSource.h"
  36. #include "SoundSource3D.h"
  37. using namespace Urho3D;
  38. #pragma warning(disable:4800)
  39. /* function to release collected object via destructor */
  40. #ifdef __cplusplus
  41. static int tolua_collect_SoundType (lua_State* tolua_S)
  42. {
  43. SoundType* self = (SoundType*) tolua_tousertype(tolua_S,1,0);
  44. Mtolua_delete(self);
  45. return 0;
  46. }
  47. #endif
  48. /* function to register type */
  49. static void tolua_reg_types (lua_State* tolua_S)
  50. {
  51. tolua_usertype(tolua_S,"Resource");
  52. tolua_usertype(tolua_S,"SoundListener");
  53. tolua_usertype(tolua_S,"SoundType");
  54. tolua_usertype(tolua_S,"Component");
  55. tolua_usertype(tolua_S,"Object");
  56. tolua_usertype(tolua_S,"SoundSource");
  57. tolua_usertype(tolua_S,"SoundSource3D");
  58. tolua_usertype(tolua_S,"Sound");
  59. tolua_usertype(tolua_S,"Audio");
  60. }
  61. /* method: SetMode of class Audio */
  62. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_SetMode00
  63. static int tolua_Audio_Audio_SetMode00(lua_State* tolua_S)
  64. {
  65. #ifndef TOLUA_RELEASE
  66. tolua_Error tolua_err;
  67. if (
  68. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  69. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  70. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  71. !tolua_isboolean(tolua_S,4,0,&tolua_err) ||
  72. !tolua_isboolean(tolua_S,5,1,&tolua_err) ||
  73. !tolua_isnoobj(tolua_S,6,&tolua_err)
  74. )
  75. goto tolua_lerror;
  76. else
  77. #endif
  78. {
  79. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  80. int bufferLengthMSec = ((int) tolua_tonumber(tolua_S,2,0));
  81. int mixRate = ((int) tolua_tonumber(tolua_S,3,0));
  82. bool stereo = ((bool) tolua_toboolean(tolua_S,4,0));
  83. bool interpolation = ((bool) tolua_toboolean(tolua_S,5,true));
  84. #ifndef TOLUA_RELEASE
  85. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMode'", NULL);
  86. #endif
  87. {
  88. bool tolua_ret = (bool) self->SetMode(bufferLengthMSec,mixRate,stereo,interpolation);
  89. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  90. }
  91. }
  92. return 1;
  93. #ifndef TOLUA_RELEASE
  94. tolua_lerror:
  95. tolua_error(tolua_S,"#ferror in function 'SetMode'.",&tolua_err);
  96. return 0;
  97. #endif
  98. }
  99. #endif //#ifndef TOLUA_DISABLE
  100. /* method: Update of class Audio */
  101. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_Update00
  102. static int tolua_Audio_Audio_Update00(lua_State* tolua_S)
  103. {
  104. #ifndef TOLUA_RELEASE
  105. tolua_Error tolua_err;
  106. if (
  107. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  108. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  109. !tolua_isnoobj(tolua_S,3,&tolua_err)
  110. )
  111. goto tolua_lerror;
  112. else
  113. #endif
  114. {
  115. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  116. float timeStep = ((float) tolua_tonumber(tolua_S,2,0));
  117. #ifndef TOLUA_RELEASE
  118. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Update'", NULL);
  119. #endif
  120. {
  121. self->Update(timeStep);
  122. }
  123. }
  124. return 0;
  125. #ifndef TOLUA_RELEASE
  126. tolua_lerror:
  127. tolua_error(tolua_S,"#ferror in function 'Update'.",&tolua_err);
  128. return 0;
  129. #endif
  130. }
  131. #endif //#ifndef TOLUA_DISABLE
  132. /* method: Play of class Audio */
  133. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_Play00
  134. static int tolua_Audio_Audio_Play00(lua_State* tolua_S)
  135. {
  136. #ifndef TOLUA_RELEASE
  137. tolua_Error tolua_err;
  138. if (
  139. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  140. !tolua_isnoobj(tolua_S,2,&tolua_err)
  141. )
  142. goto tolua_lerror;
  143. else
  144. #endif
  145. {
  146. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  147. #ifndef TOLUA_RELEASE
  148. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Play'", NULL);
  149. #endif
  150. {
  151. bool tolua_ret = (bool) self->Play();
  152. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  153. }
  154. }
  155. return 1;
  156. #ifndef TOLUA_RELEASE
  157. tolua_lerror:
  158. tolua_error(tolua_S,"#ferror in function 'Play'.",&tolua_err);
  159. return 0;
  160. #endif
  161. }
  162. #endif //#ifndef TOLUA_DISABLE
  163. /* method: Stop of class Audio */
  164. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_Stop00
  165. static int tolua_Audio_Audio_Stop00(lua_State* tolua_S)
  166. {
  167. #ifndef TOLUA_RELEASE
  168. tolua_Error tolua_err;
  169. if (
  170. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  171. !tolua_isnoobj(tolua_S,2,&tolua_err)
  172. )
  173. goto tolua_lerror;
  174. else
  175. #endif
  176. {
  177. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  178. #ifndef TOLUA_RELEASE
  179. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Stop'", NULL);
  180. #endif
  181. {
  182. self->Stop();
  183. }
  184. }
  185. return 0;
  186. #ifndef TOLUA_RELEASE
  187. tolua_lerror:
  188. tolua_error(tolua_S,"#ferror in function 'Stop'.",&tolua_err);
  189. return 0;
  190. #endif
  191. }
  192. #endif //#ifndef TOLUA_DISABLE
  193. /* method: SetMasterGain of class Audio */
  194. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_SetMasterGain00
  195. static int tolua_Audio_Audio_SetMasterGain00(lua_State* tolua_S)
  196. {
  197. #ifndef TOLUA_RELEASE
  198. tolua_Error tolua_err;
  199. if (
  200. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  201. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"SoundType",0,&tolua_err)) ||
  202. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  203. !tolua_isnoobj(tolua_S,4,&tolua_err)
  204. )
  205. goto tolua_lerror;
  206. else
  207. #endif
  208. {
  209. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  210. SoundType type = *((SoundType*) tolua_tousertype(tolua_S,2,0));
  211. float gain = ((float) tolua_tonumber(tolua_S,3,0));
  212. #ifndef TOLUA_RELEASE
  213. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMasterGain'", NULL);
  214. #endif
  215. {
  216. self->SetMasterGain(type,gain);
  217. }
  218. }
  219. return 0;
  220. #ifndef TOLUA_RELEASE
  221. tolua_lerror:
  222. tolua_error(tolua_S,"#ferror in function 'SetMasterGain'.",&tolua_err);
  223. return 0;
  224. #endif
  225. }
  226. #endif //#ifndef TOLUA_DISABLE
  227. /* method: SetListener of class Audio */
  228. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_SetListener00
  229. static int tolua_Audio_Audio_SetListener00(lua_State* tolua_S)
  230. {
  231. #ifndef TOLUA_RELEASE
  232. tolua_Error tolua_err;
  233. if (
  234. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  235. !tolua_isusertype(tolua_S,2,"SoundListener",0,&tolua_err) ||
  236. !tolua_isnoobj(tolua_S,3,&tolua_err)
  237. )
  238. goto tolua_lerror;
  239. else
  240. #endif
  241. {
  242. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  243. SoundListener* listener = ((SoundListener*) tolua_tousertype(tolua_S,2,0));
  244. #ifndef TOLUA_RELEASE
  245. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetListener'", NULL);
  246. #endif
  247. {
  248. self->SetListener(listener);
  249. }
  250. }
  251. return 0;
  252. #ifndef TOLUA_RELEASE
  253. tolua_lerror:
  254. tolua_error(tolua_S,"#ferror in function 'SetListener'.",&tolua_err);
  255. return 0;
  256. #endif
  257. }
  258. #endif //#ifndef TOLUA_DISABLE
  259. /* method: StopSound of class Audio */
  260. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_StopSound00
  261. static int tolua_Audio_Audio_StopSound00(lua_State* tolua_S)
  262. {
  263. #ifndef TOLUA_RELEASE
  264. tolua_Error tolua_err;
  265. if (
  266. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  267. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  268. !tolua_isnoobj(tolua_S,3,&tolua_err)
  269. )
  270. goto tolua_lerror;
  271. else
  272. #endif
  273. {
  274. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  275. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  276. #ifndef TOLUA_RELEASE
  277. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'StopSound'", NULL);
  278. #endif
  279. {
  280. self->StopSound(sound);
  281. }
  282. }
  283. return 0;
  284. #ifndef TOLUA_RELEASE
  285. tolua_lerror:
  286. tolua_error(tolua_S,"#ferror in function 'StopSound'.",&tolua_err);
  287. return 0;
  288. #endif
  289. }
  290. #endif //#ifndef TOLUA_DISABLE
  291. /* method: GetSampleSize of class Audio */
  292. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetSampleSize00
  293. static int tolua_Audio_Audio_GetSampleSize00(lua_State* tolua_S)
  294. {
  295. #ifndef TOLUA_RELEASE
  296. tolua_Error tolua_err;
  297. if (
  298. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  299. !tolua_isnoobj(tolua_S,2,&tolua_err)
  300. )
  301. goto tolua_lerror;
  302. else
  303. #endif
  304. {
  305. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  306. #ifndef TOLUA_RELEASE
  307. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSampleSize'", NULL);
  308. #endif
  309. {
  310. unsigned tolua_ret = (unsigned) self->GetSampleSize();
  311. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  312. }
  313. }
  314. return 1;
  315. #ifndef TOLUA_RELEASE
  316. tolua_lerror:
  317. tolua_error(tolua_S,"#ferror in function 'GetSampleSize'.",&tolua_err);
  318. return 0;
  319. #endif
  320. }
  321. #endif //#ifndef TOLUA_DISABLE
  322. /* method: GetMixRate of class Audio */
  323. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetMixRate00
  324. static int tolua_Audio_Audio_GetMixRate00(lua_State* tolua_S)
  325. {
  326. #ifndef TOLUA_RELEASE
  327. tolua_Error tolua_err;
  328. if (
  329. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  330. !tolua_isnoobj(tolua_S,2,&tolua_err)
  331. )
  332. goto tolua_lerror;
  333. else
  334. #endif
  335. {
  336. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  337. #ifndef TOLUA_RELEASE
  338. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMixRate'", NULL);
  339. #endif
  340. {
  341. int tolua_ret = (int) self->GetMixRate();
  342. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  343. }
  344. }
  345. return 1;
  346. #ifndef TOLUA_RELEASE
  347. tolua_lerror:
  348. tolua_error(tolua_S,"#ferror in function 'GetMixRate'.",&tolua_err);
  349. return 0;
  350. #endif
  351. }
  352. #endif //#ifndef TOLUA_DISABLE
  353. /* method: GetInterpolation of class Audio */
  354. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetInterpolation00
  355. static int tolua_Audio_Audio_GetInterpolation00(lua_State* tolua_S)
  356. {
  357. #ifndef TOLUA_RELEASE
  358. tolua_Error tolua_err;
  359. if (
  360. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  361. !tolua_isnoobj(tolua_S,2,&tolua_err)
  362. )
  363. goto tolua_lerror;
  364. else
  365. #endif
  366. {
  367. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  368. #ifndef TOLUA_RELEASE
  369. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInterpolation'", NULL);
  370. #endif
  371. {
  372. bool tolua_ret = (bool) self->GetInterpolation();
  373. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  374. }
  375. }
  376. return 1;
  377. #ifndef TOLUA_RELEASE
  378. tolua_lerror:
  379. tolua_error(tolua_S,"#ferror in function 'GetInterpolation'.",&tolua_err);
  380. return 0;
  381. #endif
  382. }
  383. #endif //#ifndef TOLUA_DISABLE
  384. /* method: IsStereo of class Audio */
  385. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_IsStereo00
  386. static int tolua_Audio_Audio_IsStereo00(lua_State* tolua_S)
  387. {
  388. #ifndef TOLUA_RELEASE
  389. tolua_Error tolua_err;
  390. if (
  391. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  392. !tolua_isnoobj(tolua_S,2,&tolua_err)
  393. )
  394. goto tolua_lerror;
  395. else
  396. #endif
  397. {
  398. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  399. #ifndef TOLUA_RELEASE
  400. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsStereo'", NULL);
  401. #endif
  402. {
  403. bool tolua_ret = (bool) self->IsStereo();
  404. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  405. }
  406. }
  407. return 1;
  408. #ifndef TOLUA_RELEASE
  409. tolua_lerror:
  410. tolua_error(tolua_S,"#ferror in function 'IsStereo'.",&tolua_err);
  411. return 0;
  412. #endif
  413. }
  414. #endif //#ifndef TOLUA_DISABLE
  415. /* method: IsPlaying of class Audio */
  416. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_IsPlaying00
  417. static int tolua_Audio_Audio_IsPlaying00(lua_State* tolua_S)
  418. {
  419. #ifndef TOLUA_RELEASE
  420. tolua_Error tolua_err;
  421. if (
  422. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  423. !tolua_isnoobj(tolua_S,2,&tolua_err)
  424. )
  425. goto tolua_lerror;
  426. else
  427. #endif
  428. {
  429. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  430. #ifndef TOLUA_RELEASE
  431. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsPlaying'", NULL);
  432. #endif
  433. {
  434. bool tolua_ret = (bool) self->IsPlaying();
  435. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  436. }
  437. }
  438. return 1;
  439. #ifndef TOLUA_RELEASE
  440. tolua_lerror:
  441. tolua_error(tolua_S,"#ferror in function 'IsPlaying'.",&tolua_err);
  442. return 0;
  443. #endif
  444. }
  445. #endif //#ifndef TOLUA_DISABLE
  446. /* method: IsInitialized of class Audio */
  447. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_IsInitialized00
  448. static int tolua_Audio_Audio_IsInitialized00(lua_State* tolua_S)
  449. {
  450. #ifndef TOLUA_RELEASE
  451. tolua_Error tolua_err;
  452. if (
  453. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  454. !tolua_isnoobj(tolua_S,2,&tolua_err)
  455. )
  456. goto tolua_lerror;
  457. else
  458. #endif
  459. {
  460. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  461. #ifndef TOLUA_RELEASE
  462. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInitialized'", NULL);
  463. #endif
  464. {
  465. bool tolua_ret = (bool) self->IsInitialized();
  466. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  467. }
  468. }
  469. return 1;
  470. #ifndef TOLUA_RELEASE
  471. tolua_lerror:
  472. tolua_error(tolua_S,"#ferror in function 'IsInitialized'.",&tolua_err);
  473. return 0;
  474. #endif
  475. }
  476. #endif //#ifndef TOLUA_DISABLE
  477. /* method: GetMasterGain of class Audio */
  478. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetMasterGain00
  479. static int tolua_Audio_Audio_GetMasterGain00(lua_State* tolua_S)
  480. {
  481. #ifndef TOLUA_RELEASE
  482. tolua_Error tolua_err;
  483. if (
  484. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  485. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"SoundType",0,&tolua_err)) ||
  486. !tolua_isnoobj(tolua_S,3,&tolua_err)
  487. )
  488. goto tolua_lerror;
  489. else
  490. #endif
  491. {
  492. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  493. SoundType type = *((SoundType*) tolua_tousertype(tolua_S,2,0));
  494. #ifndef TOLUA_RELEASE
  495. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMasterGain'", NULL);
  496. #endif
  497. {
  498. float tolua_ret = (float) self->GetMasterGain(type);
  499. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  500. }
  501. }
  502. return 1;
  503. #ifndef TOLUA_RELEASE
  504. tolua_lerror:
  505. tolua_error(tolua_S,"#ferror in function 'GetMasterGain'.",&tolua_err);
  506. return 0;
  507. #endif
  508. }
  509. #endif //#ifndef TOLUA_DISABLE
  510. /* method: GetListener of class Audio */
  511. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetListener00
  512. static int tolua_Audio_Audio_GetListener00(lua_State* tolua_S)
  513. {
  514. #ifndef TOLUA_RELEASE
  515. tolua_Error tolua_err;
  516. if (
  517. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  518. !tolua_isnoobj(tolua_S,2,&tolua_err)
  519. )
  520. goto tolua_lerror;
  521. else
  522. #endif
  523. {
  524. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  525. #ifndef TOLUA_RELEASE
  526. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetListener'", NULL);
  527. #endif
  528. {
  529. SoundListener* tolua_ret = (SoundListener*) self->GetListener();
  530. tolua_pushusertype(tolua_S,(void*)tolua_ret,"SoundListener");
  531. }
  532. }
  533. return 1;
  534. #ifndef TOLUA_RELEASE
  535. tolua_lerror:
  536. tolua_error(tolua_S,"#ferror in function 'GetListener'.",&tolua_err);
  537. return 0;
  538. #endif
  539. }
  540. #endif //#ifndef TOLUA_DISABLE
  541. /* method: AddSoundSource of class Audio */
  542. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_AddSoundSource00
  543. static int tolua_Audio_Audio_AddSoundSource00(lua_State* tolua_S)
  544. {
  545. #ifndef TOLUA_RELEASE
  546. tolua_Error tolua_err;
  547. if (
  548. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  549. !tolua_isusertype(tolua_S,2,"SoundSource",0,&tolua_err) ||
  550. !tolua_isnoobj(tolua_S,3,&tolua_err)
  551. )
  552. goto tolua_lerror;
  553. else
  554. #endif
  555. {
  556. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  557. SoundSource* soundSource = ((SoundSource*) tolua_tousertype(tolua_S,2,0));
  558. #ifndef TOLUA_RELEASE
  559. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddSoundSource'", NULL);
  560. #endif
  561. {
  562. self->AddSoundSource(soundSource);
  563. }
  564. }
  565. return 0;
  566. #ifndef TOLUA_RELEASE
  567. tolua_lerror:
  568. tolua_error(tolua_S,"#ferror in function 'AddSoundSource'.",&tolua_err);
  569. return 0;
  570. #endif
  571. }
  572. #endif //#ifndef TOLUA_DISABLE
  573. /* method: RemoveSoundSource of class Audio */
  574. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_RemoveSoundSource00
  575. static int tolua_Audio_Audio_RemoveSoundSource00(lua_State* tolua_S)
  576. {
  577. #ifndef TOLUA_RELEASE
  578. tolua_Error tolua_err;
  579. if (
  580. !tolua_isusertype(tolua_S,1,"Audio",0,&tolua_err) ||
  581. !tolua_isusertype(tolua_S,2,"SoundSource",0,&tolua_err) ||
  582. !tolua_isnoobj(tolua_S,3,&tolua_err)
  583. )
  584. goto tolua_lerror;
  585. else
  586. #endif
  587. {
  588. Audio* self = (Audio*) tolua_tousertype(tolua_S,1,0);
  589. SoundSource* soundSource = ((SoundSource*) tolua_tousertype(tolua_S,2,0));
  590. #ifndef TOLUA_RELEASE
  591. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveSoundSource'", NULL);
  592. #endif
  593. {
  594. self->RemoveSoundSource(soundSource);
  595. }
  596. }
  597. return 0;
  598. #ifndef TOLUA_RELEASE
  599. tolua_lerror:
  600. tolua_error(tolua_S,"#ferror in function 'RemoveSoundSource'.",&tolua_err);
  601. return 0;
  602. #endif
  603. }
  604. #endif //#ifndef TOLUA_DISABLE
  605. /* method: GetSoundSourceMasterGain of class Audio */
  606. #ifndef TOLUA_DISABLE_tolua_Audio_Audio_GetSoundSourceMasterGain00
  607. static int tolua_Audio_Audio_GetSoundSourceMasterGain00(lua_State* tolua_S)
  608. {
  609. #ifndef TOLUA_RELEASE
  610. tolua_Error tolua_err;
  611. if (
  612. !tolua_isusertype(tolua_S,1,"const Audio",0,&tolua_err) ||
  613. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"SoundType",0,&tolua_err)) ||
  614. !tolua_isnoobj(tolua_S,3,&tolua_err)
  615. )
  616. goto tolua_lerror;
  617. else
  618. #endif
  619. {
  620. const Audio* self = (const Audio*) tolua_tousertype(tolua_S,1,0);
  621. SoundType type = *((SoundType*) tolua_tousertype(tolua_S,2,0));
  622. #ifndef TOLUA_RELEASE
  623. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSoundSourceMasterGain'", NULL);
  624. #endif
  625. {
  626. float tolua_ret = (float) self->GetSoundSourceMasterGain(type);
  627. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  628. }
  629. }
  630. return 1;
  631. #ifndef TOLUA_RELEASE
  632. tolua_lerror:
  633. tolua_error(tolua_S,"#ferror in function 'GetSoundSourceMasterGain'.",&tolua_err);
  634. return 0;
  635. #endif
  636. }
  637. #endif //#ifndef TOLUA_DISABLE
  638. /* function: GetAudio */
  639. #ifndef TOLUA_DISABLE_tolua_Audio_GetAudio00
  640. static int tolua_Audio_GetAudio00(lua_State* tolua_S)
  641. {
  642. #ifndef TOLUA_RELEASE
  643. tolua_Error tolua_err;
  644. if (
  645. !tolua_isnoobj(tolua_S,1,&tolua_err)
  646. )
  647. goto tolua_lerror;
  648. else
  649. #endif
  650. {
  651. {
  652. Audio* tolua_ret = (Audio*) GetAudio();
  653. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Audio");
  654. }
  655. }
  656. return 1;
  657. #ifndef TOLUA_RELEASE
  658. tolua_lerror:
  659. tolua_error(tolua_S,"#ferror in function 'GetAudio'.",&tolua_err);
  660. return 0;
  661. #endif
  662. }
  663. #endif //#ifndef TOLUA_DISABLE
  664. /* method: SetFormat of class Sound */
  665. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_SetFormat00
  666. static int tolua_Audio_Sound_SetFormat00(lua_State* tolua_S)
  667. {
  668. #ifndef TOLUA_RELEASE
  669. tolua_Error tolua_err;
  670. if (
  671. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  672. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  673. !tolua_isboolean(tolua_S,3,0,&tolua_err) ||
  674. !tolua_isboolean(tolua_S,4,0,&tolua_err) ||
  675. !tolua_isnoobj(tolua_S,5,&tolua_err)
  676. )
  677. goto tolua_lerror;
  678. else
  679. #endif
  680. {
  681. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  682. unsigned frequency = ((unsigned) tolua_tonumber(tolua_S,2,0));
  683. bool sixteenBit = ((bool) tolua_toboolean(tolua_S,3,0));
  684. bool stereo = ((bool) tolua_toboolean(tolua_S,4,0));
  685. #ifndef TOLUA_RELEASE
  686. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFormat'", NULL);
  687. #endif
  688. {
  689. self->SetFormat(frequency,sixteenBit,stereo);
  690. }
  691. }
  692. return 0;
  693. #ifndef TOLUA_RELEASE
  694. tolua_lerror:
  695. tolua_error(tolua_S,"#ferror in function 'SetFormat'.",&tolua_err);
  696. return 0;
  697. #endif
  698. }
  699. #endif //#ifndef TOLUA_DISABLE
  700. /* method: SetLooped of class Sound */
  701. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_SetLooped00
  702. static int tolua_Audio_Sound_SetLooped00(lua_State* tolua_S)
  703. {
  704. #ifndef TOLUA_RELEASE
  705. tolua_Error tolua_err;
  706. if (
  707. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  708. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  709. !tolua_isnoobj(tolua_S,3,&tolua_err)
  710. )
  711. goto tolua_lerror;
  712. else
  713. #endif
  714. {
  715. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  716. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  717. #ifndef TOLUA_RELEASE
  718. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLooped'", NULL);
  719. #endif
  720. {
  721. self->SetLooped(enable);
  722. }
  723. }
  724. return 0;
  725. #ifndef TOLUA_RELEASE
  726. tolua_lerror:
  727. tolua_error(tolua_S,"#ferror in function 'SetLooped'.",&tolua_err);
  728. return 0;
  729. #endif
  730. }
  731. #endif //#ifndef TOLUA_DISABLE
  732. /* method: SetLoop of class Sound */
  733. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_SetLoop00
  734. static int tolua_Audio_Sound_SetLoop00(lua_State* tolua_S)
  735. {
  736. #ifndef TOLUA_RELEASE
  737. tolua_Error tolua_err;
  738. if (
  739. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  740. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  741. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  742. !tolua_isnoobj(tolua_S,4,&tolua_err)
  743. )
  744. goto tolua_lerror;
  745. else
  746. #endif
  747. {
  748. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  749. unsigned repeatOffset = ((unsigned) tolua_tonumber(tolua_S,2,0));
  750. unsigned endOffset = ((unsigned) tolua_tonumber(tolua_S,3,0));
  751. #ifndef TOLUA_RELEASE
  752. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLoop'", NULL);
  753. #endif
  754. {
  755. self->SetLoop(repeatOffset,endOffset);
  756. }
  757. }
  758. return 0;
  759. #ifndef TOLUA_RELEASE
  760. tolua_lerror:
  761. tolua_error(tolua_S,"#ferror in function 'SetLoop'.",&tolua_err);
  762. return 0;
  763. #endif
  764. }
  765. #endif //#ifndef TOLUA_DISABLE
  766. /* method: FixInterpolation of class Sound */
  767. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_FixInterpolation00
  768. static int tolua_Audio_Sound_FixInterpolation00(lua_State* tolua_S)
  769. {
  770. #ifndef TOLUA_RELEASE
  771. tolua_Error tolua_err;
  772. if (
  773. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  774. !tolua_isnoobj(tolua_S,2,&tolua_err)
  775. )
  776. goto tolua_lerror;
  777. else
  778. #endif
  779. {
  780. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  781. #ifndef TOLUA_RELEASE
  782. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FixInterpolation'", NULL);
  783. #endif
  784. {
  785. self->FixInterpolation();
  786. }
  787. }
  788. return 0;
  789. #ifndef TOLUA_RELEASE
  790. tolua_lerror:
  791. tolua_error(tolua_S,"#ferror in function 'FixInterpolation'.",&tolua_err);
  792. return 0;
  793. #endif
  794. }
  795. #endif //#ifndef TOLUA_DISABLE
  796. /* method: GetLength of class Sound */
  797. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_GetLength00
  798. static int tolua_Audio_Sound_GetLength00(lua_State* tolua_S)
  799. {
  800. #ifndef TOLUA_RELEASE
  801. tolua_Error tolua_err;
  802. if (
  803. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  804. !tolua_isnoobj(tolua_S,2,&tolua_err)
  805. )
  806. goto tolua_lerror;
  807. else
  808. #endif
  809. {
  810. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  811. #ifndef TOLUA_RELEASE
  812. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLength'", NULL);
  813. #endif
  814. {
  815. float tolua_ret = (float) self->GetLength();
  816. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  817. }
  818. }
  819. return 1;
  820. #ifndef TOLUA_RELEASE
  821. tolua_lerror:
  822. tolua_error(tolua_S,"#ferror in function 'GetLength'.",&tolua_err);
  823. return 0;
  824. #endif
  825. }
  826. #endif //#ifndef TOLUA_DISABLE
  827. /* method: GetDataSize of class Sound */
  828. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_GetDataSize00
  829. static int tolua_Audio_Sound_GetDataSize00(lua_State* tolua_S)
  830. {
  831. #ifndef TOLUA_RELEASE
  832. tolua_Error tolua_err;
  833. if (
  834. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  835. !tolua_isnoobj(tolua_S,2,&tolua_err)
  836. )
  837. goto tolua_lerror;
  838. else
  839. #endif
  840. {
  841. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  842. #ifndef TOLUA_RELEASE
  843. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDataSize'", NULL);
  844. #endif
  845. {
  846. unsigned tolua_ret = (unsigned) self->GetDataSize();
  847. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  848. }
  849. }
  850. return 1;
  851. #ifndef TOLUA_RELEASE
  852. tolua_lerror:
  853. tolua_error(tolua_S,"#ferror in function 'GetDataSize'.",&tolua_err);
  854. return 0;
  855. #endif
  856. }
  857. #endif //#ifndef TOLUA_DISABLE
  858. /* method: GetSampleSize of class Sound */
  859. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_GetSampleSize00
  860. static int tolua_Audio_Sound_GetSampleSize00(lua_State* tolua_S)
  861. {
  862. #ifndef TOLUA_RELEASE
  863. tolua_Error tolua_err;
  864. if (
  865. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  866. !tolua_isnoobj(tolua_S,2,&tolua_err)
  867. )
  868. goto tolua_lerror;
  869. else
  870. #endif
  871. {
  872. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  873. #ifndef TOLUA_RELEASE
  874. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSampleSize'", NULL);
  875. #endif
  876. {
  877. unsigned tolua_ret = (unsigned) self->GetSampleSize();
  878. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  879. }
  880. }
  881. return 1;
  882. #ifndef TOLUA_RELEASE
  883. tolua_lerror:
  884. tolua_error(tolua_S,"#ferror in function 'GetSampleSize'.",&tolua_err);
  885. return 0;
  886. #endif
  887. }
  888. #endif //#ifndef TOLUA_DISABLE
  889. /* method: GetFrequency of class Sound */
  890. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_GetFrequency00
  891. static int tolua_Audio_Sound_GetFrequency00(lua_State* tolua_S)
  892. {
  893. #ifndef TOLUA_RELEASE
  894. tolua_Error tolua_err;
  895. if (
  896. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  897. !tolua_isnoobj(tolua_S,2,&tolua_err)
  898. )
  899. goto tolua_lerror;
  900. else
  901. #endif
  902. {
  903. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  904. #ifndef TOLUA_RELEASE
  905. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFrequency'", NULL);
  906. #endif
  907. {
  908. float tolua_ret = (float) self->GetFrequency();
  909. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  910. }
  911. }
  912. return 1;
  913. #ifndef TOLUA_RELEASE
  914. tolua_lerror:
  915. tolua_error(tolua_S,"#ferror in function 'GetFrequency'.",&tolua_err);
  916. return 0;
  917. #endif
  918. }
  919. #endif //#ifndef TOLUA_DISABLE
  920. /* method: GetIntFrequency of class Sound */
  921. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_GetIntFrequency00
  922. static int tolua_Audio_Sound_GetIntFrequency00(lua_State* tolua_S)
  923. {
  924. #ifndef TOLUA_RELEASE
  925. tolua_Error tolua_err;
  926. if (
  927. !tolua_isusertype(tolua_S,1,"Sound",0,&tolua_err) ||
  928. !tolua_isnoobj(tolua_S,2,&tolua_err)
  929. )
  930. goto tolua_lerror;
  931. else
  932. #endif
  933. {
  934. Sound* self = (Sound*) tolua_tousertype(tolua_S,1,0);
  935. #ifndef TOLUA_RELEASE
  936. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIntFrequency'", NULL);
  937. #endif
  938. {
  939. unsigned tolua_ret = (unsigned) self->GetIntFrequency();
  940. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  941. }
  942. }
  943. return 1;
  944. #ifndef TOLUA_RELEASE
  945. tolua_lerror:
  946. tolua_error(tolua_S,"#ferror in function 'GetIntFrequency'.",&tolua_err);
  947. return 0;
  948. #endif
  949. }
  950. #endif //#ifndef TOLUA_DISABLE
  951. /* method: IsLooped of class Sound */
  952. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_IsLooped00
  953. static int tolua_Audio_Sound_IsLooped00(lua_State* tolua_S)
  954. {
  955. #ifndef TOLUA_RELEASE
  956. tolua_Error tolua_err;
  957. if (
  958. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  959. !tolua_isnoobj(tolua_S,2,&tolua_err)
  960. )
  961. goto tolua_lerror;
  962. else
  963. #endif
  964. {
  965. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  966. #ifndef TOLUA_RELEASE
  967. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsLooped'", NULL);
  968. #endif
  969. {
  970. bool tolua_ret = (bool) self->IsLooped();
  971. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  972. }
  973. }
  974. return 1;
  975. #ifndef TOLUA_RELEASE
  976. tolua_lerror:
  977. tolua_error(tolua_S,"#ferror in function 'IsLooped'.",&tolua_err);
  978. return 0;
  979. #endif
  980. }
  981. #endif //#ifndef TOLUA_DISABLE
  982. /* method: IsSixteenBit of class Sound */
  983. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_IsSixteenBit00
  984. static int tolua_Audio_Sound_IsSixteenBit00(lua_State* tolua_S)
  985. {
  986. #ifndef TOLUA_RELEASE
  987. tolua_Error tolua_err;
  988. if (
  989. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  990. !tolua_isnoobj(tolua_S,2,&tolua_err)
  991. )
  992. goto tolua_lerror;
  993. else
  994. #endif
  995. {
  996. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  997. #ifndef TOLUA_RELEASE
  998. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSixteenBit'", NULL);
  999. #endif
  1000. {
  1001. bool tolua_ret = (bool) self->IsSixteenBit();
  1002. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1003. }
  1004. }
  1005. return 1;
  1006. #ifndef TOLUA_RELEASE
  1007. tolua_lerror:
  1008. tolua_error(tolua_S,"#ferror in function 'IsSixteenBit'.",&tolua_err);
  1009. return 0;
  1010. #endif
  1011. }
  1012. #endif //#ifndef TOLUA_DISABLE
  1013. /* method: IsStereo of class Sound */
  1014. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_IsStereo00
  1015. static int tolua_Audio_Sound_IsStereo00(lua_State* tolua_S)
  1016. {
  1017. #ifndef TOLUA_RELEASE
  1018. tolua_Error tolua_err;
  1019. if (
  1020. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  1021. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1022. )
  1023. goto tolua_lerror;
  1024. else
  1025. #endif
  1026. {
  1027. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  1028. #ifndef TOLUA_RELEASE
  1029. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsStereo'", NULL);
  1030. #endif
  1031. {
  1032. bool tolua_ret = (bool) self->IsStereo();
  1033. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1034. }
  1035. }
  1036. return 1;
  1037. #ifndef TOLUA_RELEASE
  1038. tolua_lerror:
  1039. tolua_error(tolua_S,"#ferror in function 'IsStereo'.",&tolua_err);
  1040. return 0;
  1041. #endif
  1042. }
  1043. #endif //#ifndef TOLUA_DISABLE
  1044. /* method: IsCompressed of class Sound */
  1045. #ifndef TOLUA_DISABLE_tolua_Audio_Sound_IsCompressed00
  1046. static int tolua_Audio_Sound_IsCompressed00(lua_State* tolua_S)
  1047. {
  1048. #ifndef TOLUA_RELEASE
  1049. tolua_Error tolua_err;
  1050. if (
  1051. !tolua_isusertype(tolua_S,1,"const Sound",0,&tolua_err) ||
  1052. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1053. )
  1054. goto tolua_lerror;
  1055. else
  1056. #endif
  1057. {
  1058. const Sound* self = (const Sound*) tolua_tousertype(tolua_S,1,0);
  1059. #ifndef TOLUA_RELEASE
  1060. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCompressed'", NULL);
  1061. #endif
  1062. {
  1063. bool tolua_ret = (bool) self->IsCompressed();
  1064. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1065. }
  1066. }
  1067. return 1;
  1068. #ifndef TOLUA_RELEASE
  1069. tolua_lerror:
  1070. tolua_error(tolua_S,"#ferror in function 'IsCompressed'.",&tolua_err);
  1071. return 0;
  1072. #endif
  1073. }
  1074. #endif //#ifndef TOLUA_DISABLE
  1075. /* method: Play of class SoundSource */
  1076. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_Play00
  1077. static int tolua_Audio_SoundSource_Play00(lua_State* tolua_S)
  1078. {
  1079. #ifndef TOLUA_RELEASE
  1080. tolua_Error tolua_err;
  1081. if (
  1082. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1083. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  1084. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1085. )
  1086. goto tolua_lerror;
  1087. else
  1088. #endif
  1089. {
  1090. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1091. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  1092. #ifndef TOLUA_RELEASE
  1093. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Play'", NULL);
  1094. #endif
  1095. {
  1096. self->Play(sound);
  1097. }
  1098. }
  1099. return 0;
  1100. #ifndef TOLUA_RELEASE
  1101. tolua_lerror:
  1102. tolua_error(tolua_S,"#ferror in function 'Play'.",&tolua_err);
  1103. return 0;
  1104. #endif
  1105. }
  1106. #endif //#ifndef TOLUA_DISABLE
  1107. /* method: Play of class SoundSource */
  1108. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_Play01
  1109. static int tolua_Audio_SoundSource_Play01(lua_State* tolua_S)
  1110. {
  1111. tolua_Error tolua_err;
  1112. if (
  1113. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1114. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  1115. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1116. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1117. )
  1118. goto tolua_lerror;
  1119. else
  1120. {
  1121. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1122. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  1123. float frequency = ((float) tolua_tonumber(tolua_S,3,0));
  1124. #ifndef TOLUA_RELEASE
  1125. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Play'", NULL);
  1126. #endif
  1127. {
  1128. self->Play(sound,frequency);
  1129. }
  1130. }
  1131. return 0;
  1132. tolua_lerror:
  1133. return tolua_Audio_SoundSource_Play00(tolua_S);
  1134. }
  1135. #endif //#ifndef TOLUA_DISABLE
  1136. /* method: Play of class SoundSource */
  1137. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_Play02
  1138. static int tolua_Audio_SoundSource_Play02(lua_State* tolua_S)
  1139. {
  1140. tolua_Error tolua_err;
  1141. if (
  1142. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1143. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  1144. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1145. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  1146. !tolua_isnoobj(tolua_S,5,&tolua_err)
  1147. )
  1148. goto tolua_lerror;
  1149. else
  1150. {
  1151. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1152. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  1153. float frequency = ((float) tolua_tonumber(tolua_S,3,0));
  1154. float gain = ((float) tolua_tonumber(tolua_S,4,0));
  1155. #ifndef TOLUA_RELEASE
  1156. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Play'", NULL);
  1157. #endif
  1158. {
  1159. self->Play(sound,frequency,gain);
  1160. }
  1161. }
  1162. return 0;
  1163. tolua_lerror:
  1164. return tolua_Audio_SoundSource_Play01(tolua_S);
  1165. }
  1166. #endif //#ifndef TOLUA_DISABLE
  1167. /* method: Play of class SoundSource */
  1168. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_Play03
  1169. static int tolua_Audio_SoundSource_Play03(lua_State* tolua_S)
  1170. {
  1171. tolua_Error tolua_err;
  1172. if (
  1173. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1174. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  1175. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1176. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  1177. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  1178. !tolua_isnoobj(tolua_S,6,&tolua_err)
  1179. )
  1180. goto tolua_lerror;
  1181. else
  1182. {
  1183. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1184. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  1185. float frequency = ((float) tolua_tonumber(tolua_S,3,0));
  1186. float gain = ((float) tolua_tonumber(tolua_S,4,0));
  1187. float panning = ((float) tolua_tonumber(tolua_S,5,0));
  1188. #ifndef TOLUA_RELEASE
  1189. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Play'", NULL);
  1190. #endif
  1191. {
  1192. self->Play(sound,frequency,gain,panning);
  1193. }
  1194. }
  1195. return 0;
  1196. tolua_lerror:
  1197. return tolua_Audio_SoundSource_Play02(tolua_S);
  1198. }
  1199. #endif //#ifndef TOLUA_DISABLE
  1200. /* method: Stop of class SoundSource */
  1201. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_Stop00
  1202. static int tolua_Audio_SoundSource_Stop00(lua_State* tolua_S)
  1203. {
  1204. #ifndef TOLUA_RELEASE
  1205. tolua_Error tolua_err;
  1206. if (
  1207. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1208. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1209. )
  1210. goto tolua_lerror;
  1211. else
  1212. #endif
  1213. {
  1214. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1215. #ifndef TOLUA_RELEASE
  1216. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Stop'", NULL);
  1217. #endif
  1218. {
  1219. self->Stop();
  1220. }
  1221. }
  1222. return 0;
  1223. #ifndef TOLUA_RELEASE
  1224. tolua_lerror:
  1225. tolua_error(tolua_S,"#ferror in function 'Stop'.",&tolua_err);
  1226. return 0;
  1227. #endif
  1228. }
  1229. #endif //#ifndef TOLUA_DISABLE
  1230. /* method: SetSoundType of class SoundSource */
  1231. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetSoundType00
  1232. static int tolua_Audio_SoundSource_SetSoundType00(lua_State* tolua_S)
  1233. {
  1234. #ifndef TOLUA_RELEASE
  1235. tolua_Error tolua_err;
  1236. if (
  1237. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1238. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"SoundType",0,&tolua_err)) ||
  1239. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1240. )
  1241. goto tolua_lerror;
  1242. else
  1243. #endif
  1244. {
  1245. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1246. SoundType type = *((SoundType*) tolua_tousertype(tolua_S,2,0));
  1247. #ifndef TOLUA_RELEASE
  1248. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSoundType'", NULL);
  1249. #endif
  1250. {
  1251. self->SetSoundType(type);
  1252. }
  1253. }
  1254. return 0;
  1255. #ifndef TOLUA_RELEASE
  1256. tolua_lerror:
  1257. tolua_error(tolua_S,"#ferror in function 'SetSoundType'.",&tolua_err);
  1258. return 0;
  1259. #endif
  1260. }
  1261. #endif //#ifndef TOLUA_DISABLE
  1262. /* method: SetFrequency of class SoundSource */
  1263. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetFrequency00
  1264. static int tolua_Audio_SoundSource_SetFrequency00(lua_State* tolua_S)
  1265. {
  1266. #ifndef TOLUA_RELEASE
  1267. tolua_Error tolua_err;
  1268. if (
  1269. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1270. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1271. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1272. )
  1273. goto tolua_lerror;
  1274. else
  1275. #endif
  1276. {
  1277. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1278. float frequency = ((float) tolua_tonumber(tolua_S,2,0));
  1279. #ifndef TOLUA_RELEASE
  1280. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFrequency'", NULL);
  1281. #endif
  1282. {
  1283. self->SetFrequency(frequency);
  1284. }
  1285. }
  1286. return 0;
  1287. #ifndef TOLUA_RELEASE
  1288. tolua_lerror:
  1289. tolua_error(tolua_S,"#ferror in function 'SetFrequency'.",&tolua_err);
  1290. return 0;
  1291. #endif
  1292. }
  1293. #endif //#ifndef TOLUA_DISABLE
  1294. /* method: SetGain of class SoundSource */
  1295. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetGain00
  1296. static int tolua_Audio_SoundSource_SetGain00(lua_State* tolua_S)
  1297. {
  1298. #ifndef TOLUA_RELEASE
  1299. tolua_Error tolua_err;
  1300. if (
  1301. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1302. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1303. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1304. )
  1305. goto tolua_lerror;
  1306. else
  1307. #endif
  1308. {
  1309. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1310. float gain = ((float) tolua_tonumber(tolua_S,2,0));
  1311. #ifndef TOLUA_RELEASE
  1312. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGain'", NULL);
  1313. #endif
  1314. {
  1315. self->SetGain(gain);
  1316. }
  1317. }
  1318. return 0;
  1319. #ifndef TOLUA_RELEASE
  1320. tolua_lerror:
  1321. tolua_error(tolua_S,"#ferror in function 'SetGain'.",&tolua_err);
  1322. return 0;
  1323. #endif
  1324. }
  1325. #endif //#ifndef TOLUA_DISABLE
  1326. /* method: SetAttenuation of class SoundSource */
  1327. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetAttenuation00
  1328. static int tolua_Audio_SoundSource_SetAttenuation00(lua_State* tolua_S)
  1329. {
  1330. #ifndef TOLUA_RELEASE
  1331. tolua_Error tolua_err;
  1332. if (
  1333. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1334. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1335. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1336. )
  1337. goto tolua_lerror;
  1338. else
  1339. #endif
  1340. {
  1341. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1342. float attenuation = ((float) tolua_tonumber(tolua_S,2,0));
  1343. #ifndef TOLUA_RELEASE
  1344. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAttenuation'", NULL);
  1345. #endif
  1346. {
  1347. self->SetAttenuation(attenuation);
  1348. }
  1349. }
  1350. return 0;
  1351. #ifndef TOLUA_RELEASE
  1352. tolua_lerror:
  1353. tolua_error(tolua_S,"#ferror in function 'SetAttenuation'.",&tolua_err);
  1354. return 0;
  1355. #endif
  1356. }
  1357. #endif //#ifndef TOLUA_DISABLE
  1358. /* method: SetPanning of class SoundSource */
  1359. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetPanning00
  1360. static int tolua_Audio_SoundSource_SetPanning00(lua_State* tolua_S)
  1361. {
  1362. #ifndef TOLUA_RELEASE
  1363. tolua_Error tolua_err;
  1364. if (
  1365. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1366. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1367. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1368. )
  1369. goto tolua_lerror;
  1370. else
  1371. #endif
  1372. {
  1373. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1374. float panning = ((float) tolua_tonumber(tolua_S,2,0));
  1375. #ifndef TOLUA_RELEASE
  1376. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPanning'", NULL);
  1377. #endif
  1378. {
  1379. self->SetPanning(panning);
  1380. }
  1381. }
  1382. return 0;
  1383. #ifndef TOLUA_RELEASE
  1384. tolua_lerror:
  1385. tolua_error(tolua_S,"#ferror in function 'SetPanning'.",&tolua_err);
  1386. return 0;
  1387. #endif
  1388. }
  1389. #endif //#ifndef TOLUA_DISABLE
  1390. /* method: SetAutoRemove of class SoundSource */
  1391. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetAutoRemove00
  1392. static int tolua_Audio_SoundSource_SetAutoRemove00(lua_State* tolua_S)
  1393. {
  1394. #ifndef TOLUA_RELEASE
  1395. tolua_Error tolua_err;
  1396. if (
  1397. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1398. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  1399. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1400. )
  1401. goto tolua_lerror;
  1402. else
  1403. #endif
  1404. {
  1405. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1406. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  1407. #ifndef TOLUA_RELEASE
  1408. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAutoRemove'", NULL);
  1409. #endif
  1410. {
  1411. self->SetAutoRemove(enable);
  1412. }
  1413. }
  1414. return 0;
  1415. #ifndef TOLUA_RELEASE
  1416. tolua_lerror:
  1417. tolua_error(tolua_S,"#ferror in function 'SetAutoRemove'.",&tolua_err);
  1418. return 0;
  1419. #endif
  1420. }
  1421. #endif //#ifndef TOLUA_DISABLE
  1422. /* method: SetPlayPosition of class SoundSource */
  1423. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_SetPlayPosition00
  1424. static int tolua_Audio_SoundSource_SetPlayPosition00(lua_State* tolua_S)
  1425. {
  1426. #ifndef TOLUA_RELEASE
  1427. tolua_Error tolua_err;
  1428. if (
  1429. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1430. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1431. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1432. )
  1433. goto tolua_lerror;
  1434. else
  1435. #endif
  1436. {
  1437. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1438. signed char* pos = ((signed char*) tolua_tostring(tolua_S,2,0));
  1439. #ifndef TOLUA_RELEASE
  1440. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPlayPosition'", NULL);
  1441. #endif
  1442. {
  1443. self->SetPlayPosition(pos);
  1444. }
  1445. }
  1446. return 0;
  1447. #ifndef TOLUA_RELEASE
  1448. tolua_lerror:
  1449. tolua_error(tolua_S,"#ferror in function 'SetPlayPosition'.",&tolua_err);
  1450. return 0;
  1451. #endif
  1452. }
  1453. #endif //#ifndef TOLUA_DISABLE
  1454. /* method: GetSound of class SoundSource */
  1455. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetSound00
  1456. static int tolua_Audio_SoundSource_GetSound00(lua_State* tolua_S)
  1457. {
  1458. #ifndef TOLUA_RELEASE
  1459. tolua_Error tolua_err;
  1460. if (
  1461. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1462. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1463. )
  1464. goto tolua_lerror;
  1465. else
  1466. #endif
  1467. {
  1468. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1469. #ifndef TOLUA_RELEASE
  1470. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSound'", NULL);
  1471. #endif
  1472. {
  1473. Sound* tolua_ret = (Sound*) self->GetSound();
  1474. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sound");
  1475. }
  1476. }
  1477. return 1;
  1478. #ifndef TOLUA_RELEASE
  1479. tolua_lerror:
  1480. tolua_error(tolua_S,"#ferror in function 'GetSound'.",&tolua_err);
  1481. return 0;
  1482. #endif
  1483. }
  1484. #endif //#ifndef TOLUA_DISABLE
  1485. /* method: GetPlayPosition of class SoundSource */
  1486. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetPlayPosition00
  1487. static int tolua_Audio_SoundSource_GetPlayPosition00(lua_State* tolua_S)
  1488. {
  1489. #ifndef TOLUA_RELEASE
  1490. tolua_Error tolua_err;
  1491. if (
  1492. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1493. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1494. )
  1495. goto tolua_lerror;
  1496. else
  1497. #endif
  1498. {
  1499. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1500. #ifndef TOLUA_RELEASE
  1501. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPlayPosition'", NULL);
  1502. #endif
  1503. {
  1504. volatile signed char* tolua_ret = (volatile signed char*) self->GetPlayPosition();
  1505. tolua_pushstring(tolua_S,(const char*)tolua_ret);
  1506. }
  1507. }
  1508. return 1;
  1509. #ifndef TOLUA_RELEASE
  1510. tolua_lerror:
  1511. tolua_error(tolua_S,"#ferror in function 'GetPlayPosition'.",&tolua_err);
  1512. return 0;
  1513. #endif
  1514. }
  1515. #endif //#ifndef TOLUA_DISABLE
  1516. /* method: GetSoundType of class SoundSource */
  1517. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetSoundType00
  1518. static int tolua_Audio_SoundSource_GetSoundType00(lua_State* tolua_S)
  1519. {
  1520. #ifndef TOLUA_RELEASE
  1521. tolua_Error tolua_err;
  1522. if (
  1523. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1524. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1525. )
  1526. goto tolua_lerror;
  1527. else
  1528. #endif
  1529. {
  1530. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1531. #ifndef TOLUA_RELEASE
  1532. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSoundType'", NULL);
  1533. #endif
  1534. {
  1535. SoundType tolua_ret = (SoundType) self->GetSoundType();
  1536. {
  1537. #ifdef __cplusplus
  1538. void* tolua_obj = Mtolua_new((SoundType)(tolua_ret));
  1539. tolua_pushusertype(tolua_S,tolua_obj,"SoundType");
  1540. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1541. #else
  1542. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(SoundType));
  1543. tolua_pushusertype(tolua_S,tolua_obj,"SoundType");
  1544. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1545. #endif
  1546. }
  1547. }
  1548. }
  1549. return 1;
  1550. #ifndef TOLUA_RELEASE
  1551. tolua_lerror:
  1552. tolua_error(tolua_S,"#ferror in function 'GetSoundType'.",&tolua_err);
  1553. return 0;
  1554. #endif
  1555. }
  1556. #endif //#ifndef TOLUA_DISABLE
  1557. /* method: GetTimePosition of class SoundSource */
  1558. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetTimePosition00
  1559. static int tolua_Audio_SoundSource_GetTimePosition00(lua_State* tolua_S)
  1560. {
  1561. #ifndef TOLUA_RELEASE
  1562. tolua_Error tolua_err;
  1563. if (
  1564. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1565. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1566. )
  1567. goto tolua_lerror;
  1568. else
  1569. #endif
  1570. {
  1571. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1572. #ifndef TOLUA_RELEASE
  1573. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTimePosition'", NULL);
  1574. #endif
  1575. {
  1576. float tolua_ret = (float) self->GetTimePosition();
  1577. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1578. }
  1579. }
  1580. return 1;
  1581. #ifndef TOLUA_RELEASE
  1582. tolua_lerror:
  1583. tolua_error(tolua_S,"#ferror in function 'GetTimePosition'.",&tolua_err);
  1584. return 0;
  1585. #endif
  1586. }
  1587. #endif //#ifndef TOLUA_DISABLE
  1588. /* method: GetFrequency of class SoundSource */
  1589. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetFrequency00
  1590. static int tolua_Audio_SoundSource_GetFrequency00(lua_State* tolua_S)
  1591. {
  1592. #ifndef TOLUA_RELEASE
  1593. tolua_Error tolua_err;
  1594. if (
  1595. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1596. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1597. )
  1598. goto tolua_lerror;
  1599. else
  1600. #endif
  1601. {
  1602. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1603. #ifndef TOLUA_RELEASE
  1604. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFrequency'", NULL);
  1605. #endif
  1606. {
  1607. float tolua_ret = (float) self->GetFrequency();
  1608. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1609. }
  1610. }
  1611. return 1;
  1612. #ifndef TOLUA_RELEASE
  1613. tolua_lerror:
  1614. tolua_error(tolua_S,"#ferror in function 'GetFrequency'.",&tolua_err);
  1615. return 0;
  1616. #endif
  1617. }
  1618. #endif //#ifndef TOLUA_DISABLE
  1619. /* method: GetGain of class SoundSource */
  1620. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetGain00
  1621. static int tolua_Audio_SoundSource_GetGain00(lua_State* tolua_S)
  1622. {
  1623. #ifndef TOLUA_RELEASE
  1624. tolua_Error tolua_err;
  1625. if (
  1626. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1627. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1628. )
  1629. goto tolua_lerror;
  1630. else
  1631. #endif
  1632. {
  1633. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1634. #ifndef TOLUA_RELEASE
  1635. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGain'", NULL);
  1636. #endif
  1637. {
  1638. float tolua_ret = (float) self->GetGain();
  1639. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1640. }
  1641. }
  1642. return 1;
  1643. #ifndef TOLUA_RELEASE
  1644. tolua_lerror:
  1645. tolua_error(tolua_S,"#ferror in function 'GetGain'.",&tolua_err);
  1646. return 0;
  1647. #endif
  1648. }
  1649. #endif //#ifndef TOLUA_DISABLE
  1650. /* method: GetAttenuation of class SoundSource */
  1651. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetAttenuation00
  1652. static int tolua_Audio_SoundSource_GetAttenuation00(lua_State* tolua_S)
  1653. {
  1654. #ifndef TOLUA_RELEASE
  1655. tolua_Error tolua_err;
  1656. if (
  1657. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1658. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1659. )
  1660. goto tolua_lerror;
  1661. else
  1662. #endif
  1663. {
  1664. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1665. #ifndef TOLUA_RELEASE
  1666. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAttenuation'", NULL);
  1667. #endif
  1668. {
  1669. float tolua_ret = (float) self->GetAttenuation();
  1670. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1671. }
  1672. }
  1673. return 1;
  1674. #ifndef TOLUA_RELEASE
  1675. tolua_lerror:
  1676. tolua_error(tolua_S,"#ferror in function 'GetAttenuation'.",&tolua_err);
  1677. return 0;
  1678. #endif
  1679. }
  1680. #endif //#ifndef TOLUA_DISABLE
  1681. /* method: GetPanning of class SoundSource */
  1682. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetPanning00
  1683. static int tolua_Audio_SoundSource_GetPanning00(lua_State* tolua_S)
  1684. {
  1685. #ifndef TOLUA_RELEASE
  1686. tolua_Error tolua_err;
  1687. if (
  1688. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1689. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1690. )
  1691. goto tolua_lerror;
  1692. else
  1693. #endif
  1694. {
  1695. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1696. #ifndef TOLUA_RELEASE
  1697. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPanning'", NULL);
  1698. #endif
  1699. {
  1700. float tolua_ret = (float) self->GetPanning();
  1701. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1702. }
  1703. }
  1704. return 1;
  1705. #ifndef TOLUA_RELEASE
  1706. tolua_lerror:
  1707. tolua_error(tolua_S,"#ferror in function 'GetPanning'.",&tolua_err);
  1708. return 0;
  1709. #endif
  1710. }
  1711. #endif //#ifndef TOLUA_DISABLE
  1712. /* method: GetAutoRemove of class SoundSource */
  1713. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_GetAutoRemove00
  1714. static int tolua_Audio_SoundSource_GetAutoRemove00(lua_State* tolua_S)
  1715. {
  1716. #ifndef TOLUA_RELEASE
  1717. tolua_Error tolua_err;
  1718. if (
  1719. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1720. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1721. )
  1722. goto tolua_lerror;
  1723. else
  1724. #endif
  1725. {
  1726. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1727. #ifndef TOLUA_RELEASE
  1728. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAutoRemove'", NULL);
  1729. #endif
  1730. {
  1731. bool tolua_ret = (bool) self->GetAutoRemove();
  1732. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1733. }
  1734. }
  1735. return 1;
  1736. #ifndef TOLUA_RELEASE
  1737. tolua_lerror:
  1738. tolua_error(tolua_S,"#ferror in function 'GetAutoRemove'.",&tolua_err);
  1739. return 0;
  1740. #endif
  1741. }
  1742. #endif //#ifndef TOLUA_DISABLE
  1743. /* method: IsPlaying of class SoundSource */
  1744. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_IsPlaying00
  1745. static int tolua_Audio_SoundSource_IsPlaying00(lua_State* tolua_S)
  1746. {
  1747. #ifndef TOLUA_RELEASE
  1748. tolua_Error tolua_err;
  1749. if (
  1750. !tolua_isusertype(tolua_S,1,"const SoundSource",0,&tolua_err) ||
  1751. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1752. )
  1753. goto tolua_lerror;
  1754. else
  1755. #endif
  1756. {
  1757. const SoundSource* self = (const SoundSource*) tolua_tousertype(tolua_S,1,0);
  1758. #ifndef TOLUA_RELEASE
  1759. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsPlaying'", NULL);
  1760. #endif
  1761. {
  1762. bool tolua_ret = (bool) self->IsPlaying();
  1763. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1764. }
  1765. }
  1766. return 1;
  1767. #ifndef TOLUA_RELEASE
  1768. tolua_lerror:
  1769. tolua_error(tolua_S,"#ferror in function 'IsPlaying'.",&tolua_err);
  1770. return 0;
  1771. #endif
  1772. }
  1773. #endif //#ifndef TOLUA_DISABLE
  1774. /* method: PlayLockless of class SoundSource */
  1775. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_PlayLockless00
  1776. static int tolua_Audio_SoundSource_PlayLockless00(lua_State* tolua_S)
  1777. {
  1778. #ifndef TOLUA_RELEASE
  1779. tolua_Error tolua_err;
  1780. if (
  1781. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1782. !tolua_isusertype(tolua_S,2,"Sound",0,&tolua_err) ||
  1783. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1784. )
  1785. goto tolua_lerror;
  1786. else
  1787. #endif
  1788. {
  1789. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1790. Sound* sound = ((Sound*) tolua_tousertype(tolua_S,2,0));
  1791. #ifndef TOLUA_RELEASE
  1792. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'PlayLockless'", NULL);
  1793. #endif
  1794. {
  1795. self->PlayLockless(sound);
  1796. }
  1797. }
  1798. return 0;
  1799. #ifndef TOLUA_RELEASE
  1800. tolua_lerror:
  1801. tolua_error(tolua_S,"#ferror in function 'PlayLockless'.",&tolua_err);
  1802. return 0;
  1803. #endif
  1804. }
  1805. #endif //#ifndef TOLUA_DISABLE
  1806. /* method: StopLockless of class SoundSource */
  1807. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource_StopLockless00
  1808. static int tolua_Audio_SoundSource_StopLockless00(lua_State* tolua_S)
  1809. {
  1810. #ifndef TOLUA_RELEASE
  1811. tolua_Error tolua_err;
  1812. if (
  1813. !tolua_isusertype(tolua_S,1,"SoundSource",0,&tolua_err) ||
  1814. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1815. )
  1816. goto tolua_lerror;
  1817. else
  1818. #endif
  1819. {
  1820. SoundSource* self = (SoundSource*) tolua_tousertype(tolua_S,1,0);
  1821. #ifndef TOLUA_RELEASE
  1822. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'StopLockless'", NULL);
  1823. #endif
  1824. {
  1825. self->StopLockless();
  1826. }
  1827. }
  1828. return 0;
  1829. #ifndef TOLUA_RELEASE
  1830. tolua_lerror:
  1831. tolua_error(tolua_S,"#ferror in function 'StopLockless'.",&tolua_err);
  1832. return 0;
  1833. #endif
  1834. }
  1835. #endif //#ifndef TOLUA_DISABLE
  1836. /* method: SetDistanceAttenuation of class SoundSource3D */
  1837. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_SetDistanceAttenuation00
  1838. static int tolua_Audio_SoundSource3D_SetDistanceAttenuation00(lua_State* tolua_S)
  1839. {
  1840. #ifndef TOLUA_RELEASE
  1841. tolua_Error tolua_err;
  1842. if (
  1843. !tolua_isusertype(tolua_S,1,"SoundSource3D",0,&tolua_err) ||
  1844. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1845. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1846. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  1847. !tolua_isnoobj(tolua_S,5,&tolua_err)
  1848. )
  1849. goto tolua_lerror;
  1850. else
  1851. #endif
  1852. {
  1853. SoundSource3D* self = (SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  1854. float nearDistance = ((float) tolua_tonumber(tolua_S,2,0));
  1855. float farDistance = ((float) tolua_tonumber(tolua_S,3,0));
  1856. float rolloffFactor = ((float) tolua_tonumber(tolua_S,4,0));
  1857. #ifndef TOLUA_RELEASE
  1858. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDistanceAttenuation'", NULL);
  1859. #endif
  1860. {
  1861. self->SetDistanceAttenuation(nearDistance,farDistance,rolloffFactor);
  1862. }
  1863. }
  1864. return 0;
  1865. #ifndef TOLUA_RELEASE
  1866. tolua_lerror:
  1867. tolua_error(tolua_S,"#ferror in function 'SetDistanceAttenuation'.",&tolua_err);
  1868. return 0;
  1869. #endif
  1870. }
  1871. #endif //#ifndef TOLUA_DISABLE
  1872. /* method: SetNearDistance of class SoundSource3D */
  1873. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_SetNearDistance00
  1874. static int tolua_Audio_SoundSource3D_SetNearDistance00(lua_State* tolua_S)
  1875. {
  1876. #ifndef TOLUA_RELEASE
  1877. tolua_Error tolua_err;
  1878. if (
  1879. !tolua_isusertype(tolua_S,1,"SoundSource3D",0,&tolua_err) ||
  1880. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1881. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1882. )
  1883. goto tolua_lerror;
  1884. else
  1885. #endif
  1886. {
  1887. SoundSource3D* self = (SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  1888. float distance = ((float) tolua_tonumber(tolua_S,2,0));
  1889. #ifndef TOLUA_RELEASE
  1890. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetNearDistance'", NULL);
  1891. #endif
  1892. {
  1893. self->SetNearDistance(distance);
  1894. }
  1895. }
  1896. return 0;
  1897. #ifndef TOLUA_RELEASE
  1898. tolua_lerror:
  1899. tolua_error(tolua_S,"#ferror in function 'SetNearDistance'.",&tolua_err);
  1900. return 0;
  1901. #endif
  1902. }
  1903. #endif //#ifndef TOLUA_DISABLE
  1904. /* method: SetFarDistance of class SoundSource3D */
  1905. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_SetFarDistance00
  1906. static int tolua_Audio_SoundSource3D_SetFarDistance00(lua_State* tolua_S)
  1907. {
  1908. #ifndef TOLUA_RELEASE
  1909. tolua_Error tolua_err;
  1910. if (
  1911. !tolua_isusertype(tolua_S,1,"SoundSource3D",0,&tolua_err) ||
  1912. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1913. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1914. )
  1915. goto tolua_lerror;
  1916. else
  1917. #endif
  1918. {
  1919. SoundSource3D* self = (SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  1920. float distance = ((float) tolua_tonumber(tolua_S,2,0));
  1921. #ifndef TOLUA_RELEASE
  1922. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFarDistance'", NULL);
  1923. #endif
  1924. {
  1925. self->SetFarDistance(distance);
  1926. }
  1927. }
  1928. return 0;
  1929. #ifndef TOLUA_RELEASE
  1930. tolua_lerror:
  1931. tolua_error(tolua_S,"#ferror in function 'SetFarDistance'.",&tolua_err);
  1932. return 0;
  1933. #endif
  1934. }
  1935. #endif //#ifndef TOLUA_DISABLE
  1936. /* method: SetRolloffFactor of class SoundSource3D */
  1937. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_SetRolloffFactor00
  1938. static int tolua_Audio_SoundSource3D_SetRolloffFactor00(lua_State* tolua_S)
  1939. {
  1940. #ifndef TOLUA_RELEASE
  1941. tolua_Error tolua_err;
  1942. if (
  1943. !tolua_isusertype(tolua_S,1,"SoundSource3D",0,&tolua_err) ||
  1944. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1945. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1946. )
  1947. goto tolua_lerror;
  1948. else
  1949. #endif
  1950. {
  1951. SoundSource3D* self = (SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  1952. float factor = ((float) tolua_tonumber(tolua_S,2,0));
  1953. #ifndef TOLUA_RELEASE
  1954. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRolloffFactor'", NULL);
  1955. #endif
  1956. {
  1957. self->SetRolloffFactor(factor);
  1958. }
  1959. }
  1960. return 0;
  1961. #ifndef TOLUA_RELEASE
  1962. tolua_lerror:
  1963. tolua_error(tolua_S,"#ferror in function 'SetRolloffFactor'.",&tolua_err);
  1964. return 0;
  1965. #endif
  1966. }
  1967. #endif //#ifndef TOLUA_DISABLE
  1968. /* method: CalculateAttenuation of class SoundSource3D */
  1969. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_CalculateAttenuation00
  1970. static int tolua_Audio_SoundSource3D_CalculateAttenuation00(lua_State* tolua_S)
  1971. {
  1972. #ifndef TOLUA_RELEASE
  1973. tolua_Error tolua_err;
  1974. if (
  1975. !tolua_isusertype(tolua_S,1,"SoundSource3D",0,&tolua_err) ||
  1976. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1977. )
  1978. goto tolua_lerror;
  1979. else
  1980. #endif
  1981. {
  1982. SoundSource3D* self = (SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  1983. #ifndef TOLUA_RELEASE
  1984. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CalculateAttenuation'", NULL);
  1985. #endif
  1986. {
  1987. self->CalculateAttenuation();
  1988. }
  1989. }
  1990. return 0;
  1991. #ifndef TOLUA_RELEASE
  1992. tolua_lerror:
  1993. tolua_error(tolua_S,"#ferror in function 'CalculateAttenuation'.",&tolua_err);
  1994. return 0;
  1995. #endif
  1996. }
  1997. #endif //#ifndef TOLUA_DISABLE
  1998. /* method: GetNearDistance of class SoundSource3D */
  1999. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_GetNearDistance00
  2000. static int tolua_Audio_SoundSource3D_GetNearDistance00(lua_State* tolua_S)
  2001. {
  2002. #ifndef TOLUA_RELEASE
  2003. tolua_Error tolua_err;
  2004. if (
  2005. !tolua_isusertype(tolua_S,1,"const SoundSource3D",0,&tolua_err) ||
  2006. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2007. )
  2008. goto tolua_lerror;
  2009. else
  2010. #endif
  2011. {
  2012. const SoundSource3D* self = (const SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  2013. #ifndef TOLUA_RELEASE
  2014. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNearDistance'", NULL);
  2015. #endif
  2016. {
  2017. float tolua_ret = (float) self->GetNearDistance();
  2018. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2019. }
  2020. }
  2021. return 1;
  2022. #ifndef TOLUA_RELEASE
  2023. tolua_lerror:
  2024. tolua_error(tolua_S,"#ferror in function 'GetNearDistance'.",&tolua_err);
  2025. return 0;
  2026. #endif
  2027. }
  2028. #endif //#ifndef TOLUA_DISABLE
  2029. /* method: GetFarDistance of class SoundSource3D */
  2030. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_GetFarDistance00
  2031. static int tolua_Audio_SoundSource3D_GetFarDistance00(lua_State* tolua_S)
  2032. {
  2033. #ifndef TOLUA_RELEASE
  2034. tolua_Error tolua_err;
  2035. if (
  2036. !tolua_isusertype(tolua_S,1,"const SoundSource3D",0,&tolua_err) ||
  2037. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2038. )
  2039. goto tolua_lerror;
  2040. else
  2041. #endif
  2042. {
  2043. const SoundSource3D* self = (const SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  2044. #ifndef TOLUA_RELEASE
  2045. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFarDistance'", NULL);
  2046. #endif
  2047. {
  2048. float tolua_ret = (float) self->GetFarDistance();
  2049. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2050. }
  2051. }
  2052. return 1;
  2053. #ifndef TOLUA_RELEASE
  2054. tolua_lerror:
  2055. tolua_error(tolua_S,"#ferror in function 'GetFarDistance'.",&tolua_err);
  2056. return 0;
  2057. #endif
  2058. }
  2059. #endif //#ifndef TOLUA_DISABLE
  2060. /* method: RollAngleoffFactor of class SoundSource3D */
  2061. #ifndef TOLUA_DISABLE_tolua_Audio_SoundSource3D_RollAngleoffFactor00
  2062. static int tolua_Audio_SoundSource3D_RollAngleoffFactor00(lua_State* tolua_S)
  2063. {
  2064. #ifndef TOLUA_RELEASE
  2065. tolua_Error tolua_err;
  2066. if (
  2067. !tolua_isusertype(tolua_S,1,"const SoundSource3D",0,&tolua_err) ||
  2068. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2069. )
  2070. goto tolua_lerror;
  2071. else
  2072. #endif
  2073. {
  2074. const SoundSource3D* self = (const SoundSource3D*) tolua_tousertype(tolua_S,1,0);
  2075. #ifndef TOLUA_RELEASE
  2076. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RollAngleoffFactor'", NULL);
  2077. #endif
  2078. {
  2079. float tolua_ret = (float) self->RollAngleoffFactor();
  2080. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2081. }
  2082. }
  2083. return 1;
  2084. #ifndef TOLUA_RELEASE
  2085. tolua_lerror:
  2086. tolua_error(tolua_S,"#ferror in function 'RollAngleoffFactor'.",&tolua_err);
  2087. return 0;
  2088. #endif
  2089. }
  2090. #endif //#ifndef TOLUA_DISABLE
  2091. /* Open function */
  2092. TOLUA_API int tolua_Audio_open (lua_State* tolua_S)
  2093. {
  2094. tolua_open(tolua_S);
  2095. tolua_reg_types(tolua_S);
  2096. tolua_module(tolua_S,NULL,0);
  2097. tolua_beginmodule(tolua_S,NULL);
  2098. tolua_cclass(tolua_S,"Audio","Audio","Object",NULL);
  2099. tolua_beginmodule(tolua_S,"Audio");
  2100. tolua_function(tolua_S,"SetMode",tolua_Audio_Audio_SetMode00);
  2101. tolua_function(tolua_S,"Update",tolua_Audio_Audio_Update00);
  2102. tolua_function(tolua_S,"Play",tolua_Audio_Audio_Play00);
  2103. tolua_function(tolua_S,"Stop",tolua_Audio_Audio_Stop00);
  2104. tolua_function(tolua_S,"SetMasterGain",tolua_Audio_Audio_SetMasterGain00);
  2105. tolua_function(tolua_S,"SetListener",tolua_Audio_Audio_SetListener00);
  2106. tolua_function(tolua_S,"StopSound",tolua_Audio_Audio_StopSound00);
  2107. tolua_function(tolua_S,"GetSampleSize",tolua_Audio_Audio_GetSampleSize00);
  2108. tolua_function(tolua_S,"GetMixRate",tolua_Audio_Audio_GetMixRate00);
  2109. tolua_function(tolua_S,"GetInterpolation",tolua_Audio_Audio_GetInterpolation00);
  2110. tolua_function(tolua_S,"IsStereo",tolua_Audio_Audio_IsStereo00);
  2111. tolua_function(tolua_S,"IsPlaying",tolua_Audio_Audio_IsPlaying00);
  2112. tolua_function(tolua_S,"IsInitialized",tolua_Audio_Audio_IsInitialized00);
  2113. tolua_function(tolua_S,"GetMasterGain",tolua_Audio_Audio_GetMasterGain00);
  2114. tolua_function(tolua_S,"GetListener",tolua_Audio_Audio_GetListener00);
  2115. tolua_function(tolua_S,"AddSoundSource",tolua_Audio_Audio_AddSoundSource00);
  2116. tolua_function(tolua_S,"RemoveSoundSource",tolua_Audio_Audio_RemoveSoundSource00);
  2117. tolua_function(tolua_S,"GetSoundSourceMasterGain",tolua_Audio_Audio_GetSoundSourceMasterGain00);
  2118. tolua_endmodule(tolua_S);
  2119. tolua_function(tolua_S,"GetAudio",tolua_Audio_GetAudio00);
  2120. tolua_cclass(tolua_S,"Sound","Sound","Resource",NULL);
  2121. tolua_beginmodule(tolua_S,"Sound");
  2122. tolua_function(tolua_S,"SetFormat",tolua_Audio_Sound_SetFormat00);
  2123. tolua_function(tolua_S,"SetLooped",tolua_Audio_Sound_SetLooped00);
  2124. tolua_function(tolua_S,"SetLoop",tolua_Audio_Sound_SetLoop00);
  2125. tolua_function(tolua_S,"FixInterpolation",tolua_Audio_Sound_FixInterpolation00);
  2126. tolua_function(tolua_S,"GetLength",tolua_Audio_Sound_GetLength00);
  2127. tolua_function(tolua_S,"GetDataSize",tolua_Audio_Sound_GetDataSize00);
  2128. tolua_function(tolua_S,"GetSampleSize",tolua_Audio_Sound_GetSampleSize00);
  2129. tolua_function(tolua_S,"GetFrequency",tolua_Audio_Sound_GetFrequency00);
  2130. tolua_function(tolua_S,"GetIntFrequency",tolua_Audio_Sound_GetIntFrequency00);
  2131. tolua_function(tolua_S,"IsLooped",tolua_Audio_Sound_IsLooped00);
  2132. tolua_function(tolua_S,"IsSixteenBit",tolua_Audio_Sound_IsSixteenBit00);
  2133. tolua_function(tolua_S,"IsStereo",tolua_Audio_Sound_IsStereo00);
  2134. tolua_function(tolua_S,"IsCompressed",tolua_Audio_Sound_IsCompressed00);
  2135. tolua_endmodule(tolua_S);
  2136. tolua_cclass(tolua_S,"SoundListener","SoundListener","Component",NULL);
  2137. tolua_beginmodule(tolua_S,"SoundListener");
  2138. tolua_endmodule(tolua_S);
  2139. tolua_cclass(tolua_S,"SoundSource","SoundSource","Component",NULL);
  2140. tolua_beginmodule(tolua_S,"SoundSource");
  2141. tolua_function(tolua_S,"Play",tolua_Audio_SoundSource_Play00);
  2142. tolua_function(tolua_S,"Play",tolua_Audio_SoundSource_Play01);
  2143. tolua_function(tolua_S,"Play",tolua_Audio_SoundSource_Play02);
  2144. tolua_function(tolua_S,"Play",tolua_Audio_SoundSource_Play03);
  2145. tolua_function(tolua_S,"Stop",tolua_Audio_SoundSource_Stop00);
  2146. tolua_function(tolua_S,"SetSoundType",tolua_Audio_SoundSource_SetSoundType00);
  2147. tolua_function(tolua_S,"SetFrequency",tolua_Audio_SoundSource_SetFrequency00);
  2148. tolua_function(tolua_S,"SetGain",tolua_Audio_SoundSource_SetGain00);
  2149. tolua_function(tolua_S,"SetAttenuation",tolua_Audio_SoundSource_SetAttenuation00);
  2150. tolua_function(tolua_S,"SetPanning",tolua_Audio_SoundSource_SetPanning00);
  2151. tolua_function(tolua_S,"SetAutoRemove",tolua_Audio_SoundSource_SetAutoRemove00);
  2152. tolua_function(tolua_S,"SetPlayPosition",tolua_Audio_SoundSource_SetPlayPosition00);
  2153. tolua_function(tolua_S,"GetSound",tolua_Audio_SoundSource_GetSound00);
  2154. tolua_function(tolua_S,"GetPlayPosition",tolua_Audio_SoundSource_GetPlayPosition00);
  2155. tolua_function(tolua_S,"GetSoundType",tolua_Audio_SoundSource_GetSoundType00);
  2156. tolua_function(tolua_S,"GetTimePosition",tolua_Audio_SoundSource_GetTimePosition00);
  2157. tolua_function(tolua_S,"GetFrequency",tolua_Audio_SoundSource_GetFrequency00);
  2158. tolua_function(tolua_S,"GetGain",tolua_Audio_SoundSource_GetGain00);
  2159. tolua_function(tolua_S,"GetAttenuation",tolua_Audio_SoundSource_GetAttenuation00);
  2160. tolua_function(tolua_S,"GetPanning",tolua_Audio_SoundSource_GetPanning00);
  2161. tolua_function(tolua_S,"GetAutoRemove",tolua_Audio_SoundSource_GetAutoRemove00);
  2162. tolua_function(tolua_S,"IsPlaying",tolua_Audio_SoundSource_IsPlaying00);
  2163. tolua_function(tolua_S,"PlayLockless",tolua_Audio_SoundSource_PlayLockless00);
  2164. tolua_function(tolua_S,"StopLockless",tolua_Audio_SoundSource_StopLockless00);
  2165. tolua_endmodule(tolua_S);
  2166. tolua_cclass(tolua_S,"SoundSource3D","SoundSource3D","SoundSource",NULL);
  2167. tolua_beginmodule(tolua_S,"SoundSource3D");
  2168. tolua_function(tolua_S,"SetDistanceAttenuation",tolua_Audio_SoundSource3D_SetDistanceAttenuation00);
  2169. tolua_function(tolua_S,"SetNearDistance",tolua_Audio_SoundSource3D_SetNearDistance00);
  2170. tolua_function(tolua_S,"SetFarDistance",tolua_Audio_SoundSource3D_SetFarDistance00);
  2171. tolua_function(tolua_S,"SetRolloffFactor",tolua_Audio_SoundSource3D_SetRolloffFactor00);
  2172. tolua_function(tolua_S,"CalculateAttenuation",tolua_Audio_SoundSource3D_CalculateAttenuation00);
  2173. tolua_function(tolua_S,"GetNearDistance",tolua_Audio_SoundSource3D_GetNearDistance00);
  2174. tolua_function(tolua_S,"GetFarDistance",tolua_Audio_SoundSource3D_GetFarDistance00);
  2175. tolua_function(tolua_S,"RollAngleoffFactor",tolua_Audio_SoundSource3D_RollAngleoffFactor00);
  2176. tolua_endmodule(tolua_S);
  2177. tolua_endmodule(tolua_S);
  2178. return 1;
  2179. }
  2180. #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
  2181. TOLUA_API int luaopen_Audio (lua_State* tolua_S) {
  2182. return tolua_Audio_open(tolua_S);
  2183. };
  2184. #endif