I have a Simulink model that uses a Matlab Function block. Such function does some audio processes. In the end I get an Nx2 array that contains the final stereo sound. This array is the output of the Matlab Function block.
Now I want to send this output to the ALSA Audio Playback block which is specific for Raspberry.
I get the following error:
Error reported by S-function 'alsa_audio_playback_sfcn' in 'prueba/ALSA Audio Playback': Sample rate of the signal connected to the input port is not consistent with the sample rate of 44100 Hz set on the block mask. This block requires 44100 samples per second for correct operation. You are supplying 61440 samples per second instead.
Firstly, I unsuccessfully tried to change the value of N.
Then, I tried to change the "Sample Time" of the Matlab Function Block, so that it can supply the correct number of samples per second. Eventually, I managed it to supply 44100 samples per second, but I got the following 'surrealistic' error: