using PulseAudio;

void dopulse (string printout)
{
	var loop = new PulseAudio.GLibMainLoop ();
	var props = new Proplist();
	var context = new PulseAudio.Context (loop.get_api(), null, props);
	context.get_server_info(() => {
		debug("Print string: %s", printout);
	});
}

void timerfunc (string printout, GLib.MainLoop loop)
{
	GLib.Timeout.add_seconds(2, () => {
		debug("Print string: %s", printout);
		loop.quit();
		return false;
	});
}

int main (string[] argv)
{
	var loop = new GLib.MainLoop();

	timerfunc("foo", loop);
	dopulse("bar");

	loop.run();
	return 0;
}
