Skip to content

Committing luabindings for commit 94cb826#2782

Closed
axmol-bot wants to merge 1 commit intoaxmolengine:release/2.xfrom
axmol-bot:luabindings_for_94cb826
Closed

Committing luabindings for commit 94cb826#2782
axmol-bot wants to merge 1 commit intoaxmolengine:release/2.xfrom
axmol-bot:luabindings_for_94cb826

Conversation

@axmol-bot
Copy link
Collaborator

RT

@rh101
Copy link
Contributor

rh101 commented Sep 20, 2025

There still seems to be some odd issue with wasm and lua bindings:

 /home/runner/work/axmol/axmol/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp:1682:15: error: unknown type name 'EFXEAXREVERBPROPERTIES'
 1682 |         const EFXEAXREVERBPROPERTIES* arg1;
      |               ^
1 error generated.

We may as well not use EFXEAXREVERBPROPERTIES with typedef EFXEAXREVERBPROPERTIES ReverbProperties;, and just use our own definition of ReverbProperties. If ever the structure of EFXEAXREVERBPROPERTIES changes, then we can just update the struct ReverbProperties to match so that the presets defined in efx-presets.h still map correctly.

@halx99
Copy link
Collaborator

halx99 commented Sep 20, 2025

There still seems to be some odd issue with wasm and lua bindings:

 /home/runner/work/axmol/axmol/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp:1682:15: error: unknown type name 'EFXEAXREVERBPROPERTIES'
 1682 |         const EFXEAXREVERBPROPERTIES* arg1;
      |               ^
1 error generated.

We may as well not use EFXEAXREVERBPROPERTIES with typedef EFXEAXREVERBPROPERTIES ReverbProperties;, and just use our own definition of ReverbProperties. If ever the structure of EFXEAXREVERBPROPERTIES changes, then we can just update the struct ReverbProperties to match so that the presets defined in efx-presets.h still map correctly.

OK, change it

@halx99
Copy link
Collaborator

halx99 commented Sep 20, 2025

There still seems to be some odd issue with wasm and lua bindings:

 /home/runner/work/axmol/axmol/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp:1682:15: error: unknown type name 'EFXEAXREVERBPROPERTIES'
 1682 |         const EFXEAXREVERBPROPERTIES* arg1;
      |               ^
1 error generated.

We may as well not use EFXEAXREVERBPROPERTIES with typedef EFXEAXREVERBPROPERTIES ReverbProperties;, and just use our own definition of ReverbProperties. If ever the structure of EFXEAXREVERBPROPERTIES changes, then we can just update the struct ReverbProperties to match so that the presets defined in efx-presets.h still map correctly.

but, maybe should modify lua binding .ini, skip the API ,since the parameter is traited as plan pointer, and actually not support lua yet.

@halx99
Copy link
Collaborator

halx99 commented Sep 20, 2025

The generated code snippet:

    argc = lua_gettop(tolua_S) - 1;

    if (argc == 2)
    {
        int arg0;
        const EFXEAXREVERBPROPERTIES* arg1;
        ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:setReverbProperties");
        #pragma warning NO CONVERSION TO NATIVE FOR EFXEAXREVERBPROPERTIES*
		ok = false;
        if(!ok)
        {

@rh101
Copy link
Contributor

rh101 commented Sep 20, 2025

but, maybe should modify lua binding .ini, skip the API ,since the parameter is traited as plan pointer, and actually not support lua yet.

I'm not familiar enough with the lua bindings to make the necessary changes. PR #2783 submitted with the change I described above in case you want to use that.

@halx99
Copy link
Collaborator

halx99 commented Sep 20, 2025

but, maybe should modify lua binding .ini, skip the API ,since the parameter is traited as plan pointer, and actually not support lua yet.

I'm not familiar enough with the lua bindings to make the necessary changes. PR #2783 submitted with the change I described above in case you want to use that.

I will modify luabinding

@halx99 halx99 added the invalid This doesn't seem right label Sep 20, 2025
@halx99 halx99 closed this Sep 20, 2025
@axmol-bot axmol-bot deleted the luabindings_for_94cb826 branch September 21, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants