This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Audio mixing efficiently and hard realtime requirment

warm greetings, I would want to know how capable is ARM M4 in handling up to 4 channel audio mixing of 24bits 44khz audio.

Audio fetching will be from Sd card system with FAT32 FS, QSPI to have high speed fetch. and once the audio is mixed it will stream to an I2S peripheral via DMA.

The scenario of mixing will be random and dynamically selected which mean say there are 10 audio files in sd card, An audio might be playing and in (n) th seconds there will a trigger signalling to mix the current playing audio with another audio fetched from the sd card. The latency of this process should be less than 50ms.

The MCU I have in mind to use is STM32F429IGT6.

1. Is there any specific DSP set that could speed up this process of mixing?

2. Anyone can point me which algorithms suit this mixing and that's efficient?

Thanks

  • So you will need to be reading data from SD card at 44,000*4*3 = 528k bytes per second.  So if your SD card stalls on the read for 1 second you will need a buffer of 528k of SRAM. If your max stall on the SD card is 1/2 second then you need at least have that buffer size. 

    For the mixting if you are mixing 4 channels to one, with scaler on each channel then you need 4 multiples and sum of 4 values every sample.  This should not be a problem on the processor.  

    If you are mixing multiple 4 channel audio tracks then do the math above and estimate the SRAM and clock rate needed. Most likely you will not have enough SRAM to handle the potential delays in the SD card, this is often a bigger problem when writing to SD cards. 

    The I2S needs to be able to stream the data out, and to mange this you will most likely need a DMA engine to transfer data to the I2S peripheral. 

    There are some DSP libraries that can help with the multiple and adds, but if you have good peripherals, drivers, and dma you most likely can do without them.