- task_read_pcm_data running on core 1 - low priority
- task_send_data_to_dac running on core 0 - high priority
- buf0 loads data from the SD card, while buf1 plays
- buf1 loads data from the SD card, while buf0 plays
I am able to play the PCM file using I2S. However, each time when fread() starts to load data from the SD card to a buffer, I will not be able to hear the DAC output for a small period. The audio will then resume - not from where it stops, but elapses during the no audio period.
I monitored the I2S DMA buffer and saw correct amount of data was sent out with the correct time interval.
When I loaded two buffers, then swapped them without reading data from the SD card, the sound did not have any gap.
Anyone had this issue before? Any suggestions?
Thank you in advance.
Tom