Audio Capture

Capture audio from device microphone

  • Library:
  • Simulink Support Package for Apple iOS Devices / Audio & Video

Description

The Audio Capture block captures an audio sample from the device microphone. The block outputs the left and right audio channels as an N-by-2 int16 matrix. N is the number of audio samples per frame, and the columns of the matrix represent the left and right audio channels, respectively. The Frame size (N) parameter sets the value of N.

The sample time of the block is derived from Frame size (N) and Audio Sampling frequency (Hz) parameter values. For example, if Audio Sampling frequency (Hz) is 44100 Hz and the Frame size (N) is 4410, then the sample time is 4410/44100 = 0.1s.

Note

During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation (Simulink).

Ports

Output

expand all

Audio samples captured from device microphone, returned as an N-by-2 numeric matrix. N is the number of audio samples per frame. The columns of the matrix represent the left and right audio channels, respectively.

Data Types: int16

Parameters

expand all

Specify the sample rate of the device microphone.

Specify the number of audio samples per frame.

Introduced in R2015a