L4. LAB 4: IPHONE AUDIO SIGNAL SAMPLIN 71
After audio frames are processed, they are then up-sampled and outputted through the smart-
phone speakers at 48 kHz. is multi-rate approach is discussed in more detail in [1], whose app
codes are publicly available. A comprehensive list of Android smartphones and their preferred
frame sizes are listed at https://superpowered.com/latency.
L3.9 LAB EXERCISES
1. How much memory is required to buffer a 1-s length recording of audio signal samples?
State your assumptions when determining this number.
2. Experiment with various frame sizes and computation delays to find the maximum ac-
ceptable computation delay for a given frame size. Explain the situations when real-time
processing breaks down.
Hints—Here are the steps that need to be taken for running the prebuilt app code on your
Android smartphone target.
Enable application installation from unknown sources. On Android 4.3, this option is in
the Settings > More > Security section of the Settings menu. is option may also be in
Settings > Applications on older Android versions.
Put the application APK on the smartphone and open the APK to install the app.
You should then be able to run the app. You can record your own audio samples by selecting
a sampling rate from the app Settings menu. Set the Debugging Level to Wave for the audio to
be saved. Test the case when recording audio and the processing takes too long, and then the
case when reading from a file and the processing takes too long.
L4 LAB 4:
IPHONE AUDIO SIGNAL SAMPLING
is lab is the iOS version of Lab L3 for capturing audio signals and outputting processed
audio signals on an iPhone smartphone target. e iOS API documentation is available on-
line at https://developer.apple.com/documentation/. e relevant framework for this
lab is AudioToolbox. As noted previously, the iPhone simulator does not support audio input.
Additionally, the computation time on the simulator is not accurate or stable, thus an actual
smartphone target is required in order to obtain actual computation times in the exercises.
e structure of the previous debugging lab is re-used here. is lab involves an example
app demonstrating how to use the iOS APIs supplied in Objective-C and how to properly link
C code segments so that they can be executed using just a header file. e example app records
an audio signal from the smartphone microphone and applies a lowpass filter to the audio signal.
An overview of the dataflow is shown in Figure L4.1.
..................Content has been hidden....................

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