58 4. ANALOG-TO-DIGITAL SIGNAL CONVERSION
WaveFrame
Objects
Android.Media
.AudioRecord
Blocking Queue Filter File Storage
JNI
Native C Code
Blocking Queue
Figure L3.1: Dataflow.
functioning as a First-In-First-Out (FIFO) queue. e WaveFrame objects are helper objects
which serve to store audio samples in an array. ese objects are stored and re-used to reduce
garbage collection in the Java VM.
L3.1 DEMO APPLICATION
For this lab, a prebuilt Android app APK is provided in the book software package. e app is
built for compatibility with Android 3.0 ensuring compatibility with new versions of Android.
e app is called RealTime and can be found in the Lab L3 folder in the software package.
is application allows studying sampling rate and frame size and their effects on the maximum
computation delay allowable in a real-time signal processing pipeline. It is required to use a real
Android target for these experiments as the emulator timings do not reflect those of an actual
target device. Additionally, the emulator does not allow testing of alternate sampling rates or
audio recording. In order to install the application on your smartphone, it may be necessary to
enable software installation from Unknown sources. e Unknown sources option can be found
in the general Settings configuration on the smartphone. Look for the Unknown sources option
found in the Security submenu.
e project source of the app is also provided for your reference. is app performs signal
sampling using the smartphone microphone. It can also read in a previously sampled signal from
Wav or PCM files in the device storage. e input signal is accumulated into frames of audio
data and then passed through JNI to C code for lowpass filtering. An artificial computational
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.157.186