views:

48

answers:

1

I want to develop a small Android app to measure the current noise level (probablyin dB). But I have no idea what to look for in the libs. I don't want to record the noise. Can someone give me a pointer what classes to look at?

+1  A: 

I recommend looking in these classes:

android.media.AudioFormat
android.media.AudioManager
android.media.AudioTrack

We used them in the Blinkendroid audio package a short while ago.

Keyboardsurfer
I had a look through those, it seems to me you'd have to record a file, immediately process that file to get the noise level, repeat, which would be extremely inefficient. There's no direct access to the microphone in there...
fredley
Maybe these three classes in the repository might help you there:http://code.google.com/p/blinkendroid/source/browse/trunk/blinkendroid/src/org/cbase/blinkendroid/audio/?r=96We've recorded, processed and visualized audio in this project, but dropped it again.
Keyboardsurfer
I was hoping to do it without recording, but I will check.
Sebi
In order to do something with the sound you have to record it. You don't have to save it on the device, though.
Keyboardsurfer
Now that I know what to search for, I also found this thread, which also uses recording: http://groups.google.com/group/android-developers/browse_thread/thread/504e8bb570cc6b08?pli=1
Sebi