Rewrite the whole thing using Lua
No more Guile, no more threads. Pustule is now single-threaded and uses Lua.
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
Move volume request to a different callback
Which also probably fixes a memory leak…
Prepare for having different event types
Replace "sink" by "input"
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.