How to modify audio buffer for i.MXRT1050-EVKB

cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify audio buffer for i.MXRT1050-EVKB

274 Views
marcus_masca
Contributor I

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:

xfer.data = 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.

Thanks

0 Kudos
1 Reply

86 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Marcus,

    On your question, I asked the MCU Expert team, and got reply, see below, please!

--------------------------------------

pastedImage_1.png

--------------------------------------

Best Regards,

TIC weidong sun

0 Kudos