I am attempting to show the audio intensity in Android and in order to do it, I am recording data in stereo PCM 16 bit with AudioRecord
, so I have a buffer with the values.
The recording sample rate is 48kHz since it is supported by all the devices, but I need much less values (I am using 60 per second).
So the question is how do I downsample from 48kHz to 60Hz? Now I am picking a sample every 48k/60, is there a way to smooth the sampling?
I want to do it in real time and with the least added latency.
I am coding in Kotlin, I wouldn't like to work with NDK only for this thing.