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:
xfer.data = my_audio;
where 'my_audio' is declared as a uint8_t of size  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.