Universite-Gustave-Eiffel / NoiseCapture

Android App dedicated to the measurement of environmental noise.
http://noise-planet.org/fr/noisecapture.html
GNU General Public License v3.0
95 stars 45 forks source link

OutOfMemory may happen? #381

Closed Marukohe closed 1 year ago

Marukohe commented 1 year ago

Is there any underlying issue that might trigger OutOfMemory?

In AudioProcess class, one thread is used to collect audios, and save the results in a ConcurrentLinkedQueue bufferToProcess. Also, there are two thread process audios in bufferToProcess, and remove audio values stored in bufferToProcess. But in the following picture, bufferToProcess stores too much values. I tried but could't find why this happens.

debug picture

Device: Android Emulator, Pixel XL Api Version: API 28

nicolas-f commented 1 year ago

Hi,

If the processing power is not able to process audio in realtime as it is not a bounded queue this would raise this kind of issues. Maybe you have to find a way to increase the performance of your emulator using hardware instead of software.

Marukohe commented 1 year ago

@nicolas-f All right, maybe that's the problem. Thanks for your answer.