Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32085
| References | <508839a7$0$785$58c7af7e@news.kabelfoon.nl> |
|---|---|
| Date | 2012-10-24 21:42 -0400 |
| Subject | Re: Listen for changes in variable (alsaaudio.Mixer(x, x).getvolume(x) |
| From | David Hutto <dwightdhutto@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2809.1351129376.27098.python-list@python.org> (permalink) |
On Wed, Oct 24, 2012 at 2:55 PM, Muffinman <news**REMOVETHIS**@koster.tk> wrote: > Hello all, > > I'm new to Python (running 2.6.6 but if necessary 3.x should also be > fine). I have a little idea I hope to accomplish with Python. I want to > listen for changes in Alsa sound volume level and base some actions on > that. With the few lines below I can check the current volume level. Can > I extend this so that the script listens for changes in the volume level > and I can base some actions on it? As speed is quite important it's not > an option to poll every second or so for changes, it has to be close to > instantaneous. > You might have to go to c++(ctypes function call), like I'm going to have to for a oscilloscope(using arecord probably, or other options), and use in line assembly to push straight from/to the register. I haven't had a good look at python's IO module yet though. Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Listen for changes in variable (alsaaudio.Mixer(x,x).getvolume(x) Muffinman <news**REMOVETHIS**@koster.tk> - 2012-10-24 20:55 +0200 Re: Listen for changes in variable (alsaaudio.Mixer(x,x).getvolume(x) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-24 22:58 +0000 Re: Listen for changes in variable (alsaaudio.Mixer(x, x).getvolume(x) David Hutto <dwightdhutto@gmail.com> - 2012-10-24 21:35 -0400 Re: Listen for changes in variable (alsaaudio.Mixer(x, x).getvolume(x) David Hutto <dwightdhutto@gmail.com> - 2012-10-24 21:42 -0400 Re: Listen for changes in variable (alsaaudio.Mixer(x,x).getvolume(x) Tim Roberts <timr@probo.com> - 2012-10-24 22:59 -0700
csiph-web