1
Fork 0
libpulse bindings for use with a GLib Mainloop via LGI. https://docs.sclu1034.dev/lua-libpulse-glib/index.html
Find a file
Lucas Schwiderski e0aaa99cb1
fix(context): Fix callback functions
The stack setup for callback threads was all over the place, and pretty
messed up.
2022-05-23 14:52:55 +02:00
.github/workflows chore: Initialize repository 2022-04-06 21:29:11 +02:00
.vscode chore: Initialize repository 2022-04-06 21:29:11 +02:00
doc doc: Fix missing function parameter in example 2022-05-20 19:50:24 +02:00
rocks build: Remove unused dependencies 2022-05-15 23:17:36 +02:00
src/lua_libpulse_glib fix(context): Fix callback functions 2022-05-23 14:52:55 +02:00
tools feat: Implement introspection for sinks and sources 2022-05-15 22:56:55 +02:00
.busted.lua chore: Initialize repository 2022-04-06 21:29:11 +02:00
.clang-format chore: Configure tooling 2022-04-21 14:04:18 +02:00
.fdignore chore: Configure tooling 2022-04-21 14:04:18 +02:00
.gitignore chore: Ignore LuaRocks working files 2022-05-15 23:11:00 +02:00
.luacheckrc chore: Initialize repository 2022-04-06 21:29:11 +02:00
bors.toml chore: Initialize repository 2022-04-06 21:29:11 +02:00
COPYING chore: Initialize repository 2022-04-06 21:29:11 +02:00
Makefile chore: Improve make recipe echoing 2022-04-22 10:35:13 +02:00
README.adoc doc: Fix missing function parameter in example 2022-05-20 19:50:24 +02:00

lua-libpulse-glib

License LuaRocks Package

libpulse bindings for use with a GLib MainLoop via LGI.

Quick Start

Install lgi and lua_libpulse_glib from LuaRocks:

luarocks install lgi
luarocks install lua-libpulse-glib
local lgi = require("lgi")
local pulseaudio = require("lua_libpulse_glib")
local ppretty = require("pl.pretty")

local pa = pulseaudio.new()
local ctx = pa:context("My Test App")

local loop = lgi.GLib.MainLoop.new()

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)

loop:run()