![]() |
N900 Microphone, monitor volume...
Hi Guys,
Can anybody point me in the right direction for a simple way to read the values from the Microphone? I'm not interested in recording the results just a simple method of monitoring volume from the built in mic. Something as simple as the sysfs method of reading the accelerometer would be awesome, is this possible? Cheers Jamie |
Re: N900 Microphone, monitor volume...
Working on that at the moment, i can get a pulse-audio recording working... - but not sure on peeling out any extra information at the moment...
(Using 'parec' to record) - i think that is a good start- but pulseaudio commands arn't easy to figure out :( |
Re: N900 Microphone, monitor volume...
In short, no you're not going to have a simple way of doing it... nowhere near as simple as sysfs... audio just does not work that way in Linux (or anywhere in general it seems). I looked into this a while ago and hacked up a version of arecord (alsa's cli recording tool) to do exactly what you describe... it would sit there "listening" to the microphone and spit out the "detected sound level" so a file that you could then poll from other applications.
Unfortunately I didn't ever get it working on the NITs because at the time they didn't have proper ALSA libs working (or maybe I just couldn't get them to compile, don't remember now it was a while ago), but if the N900/maemo5 has proper ALSA support now it might work. As far as doing it through pulse... eee I've never used the pulse api, but last time I looked I didn't see anything even indicating how you'd start going about doing it... |
All times are GMT. The time now is 20:22. |
vBulletin® Version 3.8.8