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 30db8863e3
Fix module initialization
The way C modules are initialized was affected by one of the major
breaking changes between 5.x versions.
Rather than trying to cater to each version individually, we now
just backport from newer versions. Namely from 5.2 to 5.1.
2023-11-01 20:24:06 +01:00
.ci bug(ci): Fix passing variables to task 2022-08-18 13:31:49 +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
spec bug: Fix installing 2022-08-10 13:07:34 +02:00
src/lua_libpulse_glib Fix module initialization 2023-11-01 20:24:06 +01:00
tools feat: Implement introspection for sinks and sources 2022-05-15 22:56:55 +02:00
.busted.lua feat: Implement Concourse CI pipeline 2022-08-14 16:58:00 +02:00
.clang-format chore: Configure tooling 2022-04-21 14:04:18 +02:00
.fdignore chore: Ignore SASS cache 2022-08-10 13:55:48 +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
COPYING chore: Initialize repository 2022-04-06 21:29:11 +02:00
Makefile ci: Build and deploy documentation 2022-08-17 15:13:56 +02:00
README.adoc doc: Fix CI badge 2022-08-14 17:37:17 +02:00

lua-libpulse-glib

License Build Status (Concourse CI) LuaRocks Package

libpulse bindings for use with a GLib MainLoop via LGI.

The project is still in a development state. It hasnt been fully tested yet, and not all functions from libpulse have a corresponding binding yet. Please do report anything thats missing or not working correctly.

Quick Start

Install lgi and lua_libpulse_glib from LuaRocks:

luarocks install lgi
luarocks install --dev 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()