Minimum Battery Consumption for Microphone Threshold Control in Android

I would like to create a small Android application that fires an event when the microphone threshold is above a certain initial value.

Something like this: http://code.google.com/p/android-labs/wiki/NoiseAlert

As it always works, I would like to keep the battery consumption to a minimum.

I understand that the amplitude of the sound is not something that is processed by the system (am I right?), So I have to calculate it from the raw values. Also, I cannot measure amplitude without recording ...

Thus, this leaves me with the concern that there will be minimal effort for the CPU. I can use the lowest selection of 8 kHz, but even this is too much to calculate the amplitude.

Is there a way to use an ultra-low sampling rate, such as 50 Hz or even 20 Hz?

And anyway, what advice is there to help me, with minimal use, maintain bat consumption ...?

Many thanks!

+4
source share
1 answer

It is very fast to suck the battery. And a flat battery phone is a terrible user experience.

I doubt that the sampling rate will have a huge impact on power consumption. However, there will be a buffer period.

, DMA , , ( ). , , .

, AudioFlinger , . , ALSA ( , ). , .

0

Source: https://habr.com/ru/post/1525801/


All Articles