Skip to content

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

@p-himik

Description

@p-himik

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions