@@ -438,6 +438,80 @@ int lua_ax_audioengine_AudioEngine_getVolume(lua_State* tolua_S)
438
438
#endif
439
439
return 0 ;
440
440
}
441
+ int lua_ax_audioengine_AudioEngine_setPitch (lua_State* tolua_S)
442
+ {
443
+ int argc = 0 ;
444
+ bool ok = true ;
445
+
446
+ #if _AX_DEBUG >= 1
447
+ tolua_Error tolua_err;
448
+ #endif
449
+
450
+ #if _AX_DEBUG >= 1
451
+ if (!tolua_isusertable (tolua_S,1 ," ax.AudioEngine" ,0 ,&tolua_err)) goto tolua_lerror;
452
+ #endif
453
+
454
+ argc = lua_gettop (tolua_S) - 1 ;
455
+
456
+ if (argc == 2 )
457
+ {
458
+ int arg0;
459
+ double arg1;
460
+ ok &= luaval_to_int32 (tolua_S, 2 ,(int *)&arg0, " ax.AudioEngine:setPitch" );
461
+ ok &= luaval_to_number (tolua_S, 3 ,&arg1, " ax.AudioEngine:setPitch" );
462
+ if (!ok)
463
+ {
464
+ tolua_error (tolua_S," invalid arguments in function 'lua_ax_audioengine_AudioEngine_setPitch'" , nullptr );
465
+ return 0 ;
466
+ }
467
+ ax::AudioEngine::setPitch (arg0, arg1);
468
+ lua_settop (tolua_S, 1 );
469
+ return 1 ;
470
+ }
471
+ luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d\n " , " ax.AudioEngine:setPitch" ,argc, 2 );
472
+ return 0 ;
473
+ #if _AX_DEBUG >= 1
474
+ tolua_lerror:
475
+ tolua_error (tolua_S," #ferror in function 'lua_ax_audioengine_AudioEngine_setPitch'." ,&tolua_err);
476
+ #endif
477
+ return 0 ;
478
+ }
479
+ int lua_ax_audioengine_AudioEngine_getPitch (lua_State* tolua_S)
480
+ {
481
+ int argc = 0 ;
482
+ bool ok = true ;
483
+
484
+ #if _AX_DEBUG >= 1
485
+ tolua_Error tolua_err;
486
+ #endif
487
+
488
+ #if _AX_DEBUG >= 1
489
+ if (!tolua_isusertable (tolua_S,1 ," ax.AudioEngine" ,0 ,&tolua_err)) goto tolua_lerror;
490
+ #endif
491
+
492
+ argc = lua_gettop (tolua_S) - 1 ;
493
+
494
+ if (argc == 1 )
495
+ {
496
+ int arg0;
497
+ ok &= luaval_to_int32 (tolua_S, 2 ,(int *)&arg0, " ax.AudioEngine:getPitch" );
498
+ if (!ok)
499
+ {
500
+ tolua_error (tolua_S," invalid arguments in function 'lua_ax_audioengine_AudioEngine_getPitch'" , nullptr );
501
+ return 0 ;
502
+ }
503
+ auto && ret = ax::AudioEngine::getPitch (arg0);
504
+ tolua_pushnumber (tolua_S,(lua_Number)ret);
505
+ return 1 ;
506
+ }
507
+ luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d\n " , " ax.AudioEngine:getPitch" ,argc, 1 );
508
+ return 0 ;
509
+ #if _AX_DEBUG >= 1
510
+ tolua_lerror:
511
+ tolua_error (tolua_S," #ferror in function 'lua_ax_audioengine_AudioEngine_getPitch'." ,&tolua_err);
512
+ #endif
513
+ return 0 ;
514
+ }
441
515
int lua_ax_audioengine_AudioEngine_pause (lua_State* tolua_S)
442
516
{
443
517
int argc = 0 ;
@@ -1161,6 +1235,8 @@ int lua_register_ax_audioengine_AudioEngine(lua_State* tolua_S)
1161
1235
tolua_function (tolua_S," isLoop" , lua_ax_audioengine_AudioEngine_isLoop);
1162
1236
tolua_function (tolua_S," setVolume" , lua_ax_audioengine_AudioEngine_setVolume);
1163
1237
tolua_function (tolua_S," getVolume" , lua_ax_audioengine_AudioEngine_getVolume);
1238
+ tolua_function (tolua_S," setPitch" , lua_ax_audioengine_AudioEngine_setPitch);
1239
+ tolua_function (tolua_S," getPitch" , lua_ax_audioengine_AudioEngine_getPitch);
1164
1240
tolua_function (tolua_S," pause" , lua_ax_audioengine_AudioEngine_pause);
1165
1241
tolua_function (tolua_S," pauseAll" , lua_ax_audioengine_AudioEngine_pauseAll);
1166
1242
tolua_function (tolua_S," resume" , lua_ax_audioengine_AudioEngine_resume);
0 commit comments