Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Lua 5.3 at least some callbacks seem to be getting an extra argument #1

Open
p-himik opened this issue Feb 28, 2024 · 0 comments
Open

Comments

@p-himik
Copy link

p-himik commented Feb 28, 2024

Thanks for the library! PipeWire proves to be incredibly hard to work with for something simple like programmatically changing the volume of the current sink, so your library is a savior (assuming I'll end up at the goal, of course - I just started experimenting).

Couldn't install the library with luarocks, had to compile manually.

Callbacks for both ctx:connect and ctx:get_sinks now receive something extra as the first argument, which at least in my case is always nil. So I had to change the code from the README to this (note the underscores):

ctx:connect(nil, function(_, state)
    if state == 4 then
        print("Connection is ready")
        ctx:get_sinks(function(_, sinks)
            ppretty.dump(sinks)
            loop:quit()
        end)
    end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant