Real time audio processing in Android
One of the topics in my masters project is about evaluating the performance of real time audio processing routines in Android systems. To obtain statistics about several devices, I developed an application which executes tests and sends reports by email.
Contents of this page:
Installing and executing the application
Thank you for being interested and collaborating with this research! Here are the instructions for installing, executing and sending the results of the tests:
- Unknown sources: Enable the installation of applications from unknown sources going to Configurations -> Security -> Unknown sources. In some Android versions, the path might be Configurations -> Applications -> Unknown sources*.
- Download: download the application here.
- Execution: please, put your device in "Airplane mode" and close any other applications that might be in execution before starting tests.
- Execution time: some tests look for maximal parameters for which algorithms are feasible in each device. Because of that, in less powerful devices, tests might take up to one hour to be executed.
- Send results: by the end of the tests, the application will compose an email with the results of the tests and you need to click to send them to me.
Thank you very much for your collaboration!
General information about tests
To evaluate the performance of a device on executing several common real time audio processing tasks, I developed an application that implements a minimal audio processing system. This system includes the possibility of obtaining audio samples from the microfone and WAV files, an infrastructure for periodic manipulation of blocks of samples, and the writing of the resulting samples to the audio output of the device.
Using this infrastructure, the application offers the possibility of execution of a series of tests for various sizes of blocks of samples, divided in two phases:
- Phase 1: measurement of execution time for distinct block sizes:
- DSP routine with immediate return, without sample modification.
- IIR Filter with 3 coefficients.
- Java FFT.
- Monothread FFTW using JNI.
- Multithread FFTW using JNI.
- JTransforms double floating point precision FFT.
- JTransforms double floating point precision DCT.
- JTransforms double floating point precision DST.
- JTransforms double floating point precision DHT.
- Phase 2: search for the largest instance possible of the following algorithms::
- Convolution.
- Additive synthesis using the sine function from the API.
- Additive synthesis using linear interpolation lookup table.
- Additive synthesis using cubic interpolation lookup table.
- Additive synthesis using no interpolation lookup table (truncated lookup).
Documentation
Verification of the binary package
In Linux, you can use the md5sum, sha1sum or sha256sum tools to obtain a hash of the binary package using the command line, and then compare with the hashes listed below. To verify the authenticity of the hashes, you can use gpg and my public key. To verify the authenticity of my public key, you can find me at IME or send me an email and we settle a place to gather.
- MD5SUM, MD5SUM.sign.
- SHA1SUM, SHA1SUM.sign.
- SHA256SUM, SHA256SUM.sign.
- My GPG public key.
- My email: ajb at ime.usp.br
Source code
Source code is available in github, published under GPLv3. The README.txt file contains instructions for compiling the project. The most up to date branch is develop.
Acknowledgements
- To DJ and Max Rosan for having forced me to document and improve the code, besides having contributed to improve the application logic and having added various algorithms in the tests.
- The the Computer Music Group folks for having helped me testing the tests (?).
- To all that have ran tests in their devices and so contributed to this research.