Capture audio stream from device microphone
Simulink Support Package for Android Devices / Audio & Video
Get the stereo audio stream from the audio input, such as the built-in or an external microphone, attached to the Android™ device.
The Audio Capture block outputs an N-by-2 array of
int16 values. The left and right audio channels are assigned
to the first and second columns of the output array, respectively.
The sample time of the block is the Frame size (N) divided by the Audio sampling frequency (Hz). For example, with sample rate of 44,100 Hz and Frame size of 4410, the sample time of the block is 0.1 s. You reduce sample time by either increasing the frame size or decreasing the sampling frequency.
During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation.
Specify the sample rate of the input device. The default value is 44100 Hz.
Specify the frame size, N, in samples.