From: Jaroslav Kysela Date: Mon, 26 Feb 2007 08:10:44 +0000 (+0100) Subject: added remove-user-ctl.py script, fixed alsahcontrol.Info bool values X-Git-Tag: v1.0.14rc3~6 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=fe91f4722218977ba55d16946d1478c2953d6648;p=alsa-python.git added remove-user-ctl.py script, fixed alsahcontrol.Info bool values --- diff --git a/pyalsa/alsahcontrol.c b/pyalsa/alsahcontrol.c index 11ee21f..1977a2a 100644 --- a/pyalsa/alsahcontrol.c +++ b/pyalsa/alsahcontrol.c @@ -650,7 +650,7 @@ typedef int (*fcn2)(void *); static PyObject * pyalsahcontrolinfo_bool(struct pyalsahcontrolinfo *pyinfo, void *fcn) { - return get_bool(((fcn2)fcn)(pyinfo->elem)); + return get_bool(((fcn2)fcn)(pyinfo->info)); } static PyObject * diff --git a/utils/remove-user-ctl.py b/utils/remove-user-ctl.py new file mode 100755 index 0000000..5fdb48a --- /dev/null +++ b/utils/remove-user-ctl.py @@ -0,0 +1,13 @@ +#! /usr/bin/python +# -*- Python -*- + +from pyalsa.alsahcontrol import HControl, Element, Info + +hctl = HControl() +list = hctl.list() +for id in list: + elem = Element(hctl, id[1:]) + info = Info(elem) + if info.isUser: + print 'Removing element %s' % id + hctl.elementRemove(id[1:])