AnsweredAssumed Answered

How to modify audio buffer for i.MXRT1050-EVKB

Question asked by Marcus Mascarenhas on Aug 14, 2018
Latest reply on Aug 23, 2018 by Wigros Sun

Hi there,


I am trying to copy my own audio data into the audio buffer through which the i.MX plays through the speakers/jack.


Attached is the code taken from "sai_edma_record_playback" example where the program records and plays back audio data. This example is located in the SDK at C:\...\EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\sai\edma_record_playback


I try to modify the audio buffer by changing (line 265) to: = my_audio;


where 'my_audio' is declared as a uint8_t of size [480] and contains the correct data.


There is a problem as I cannot hear any audio. Also it goes into a Hard Fault.


I cannot modify the 'Buffer' variable directly because when I try that, I get the error 'Expression must be a modifiable lvalue'.


I would be grateful for any help on this.