Expose log functions in Lua
Don't let Lua errors crash pustule itself
Use protected calls and log errors instead.
Rewrite the whole thing using Lua
No more Guile, no more threads. Pustule is now single-threaded and uses Lua.
Add function to suspend/resume a device
Add functions to get/set the default device
Implement device events
Run new hooks when a device ("sink" in PulseAudio) is added or removed,
and make it possible to change their volumes.
More preparation for other events
Prepare for having different event types
Replace "sink" by "input"
Replace pustule-set-handlers with two hooks
Feels more natural to me.
Move Guile init to guile.c
Run the PulseAudio event loop in another thread
And avoir running Guile code from the PulseAudio thread. It tends to
It is therefore necessary to run the handlers functions from the main
thread (or any other Guile thread), so there's a very simple mutex-based
event loop in pustule_run() which does just that. So far it seems to
There are still some quirks regarding memory usage and the Guile GC;
hopefully more testing will reveal what the problems are.