AnsweredAssumed Answered

STM32F4 - Discovery - Example "Audio_playback_and_record"

Question asked by belloni.fabrizio on Nov 8, 2013
Good morning,

i have a problem with the board STM32F4 - Discovery. I'm using the example "Audio_playback_and_record" for this board. I configured this example to read file from a media usb key ( i have uncommented the code #define MEDIA_USB_KEY) .

To play a file .wav this example use the double buffering technical :

1- play data with the function  Audio_MAL_Play((uint32_t)buffer1, _MAX_SS) using DMA;
2-store data in buffer2;
3- play data with the function  Audio_MAL_Play((uint32_t)buffer2, _MAX_SS) using DMA;
4-store data in buffer1;

My problem is that i want reduce the sizes of buffer1 and buffer2 because for me application with 512 byte ( size buffers, i have configured it in main.h file) i have a big latency. 

If I modify the sizes of buffer1 and buffer2 and the play function in this way: 

buffer1[_MAX_SS/2];
buffer2[_MAX_SS/2];
Audio_MAL_Play((uint32_t)buffer2, _MAX_SS/2);

the code don't work and the file .wav is not played.

How can i do to reduce the number of bytes played with the function Audio_MAL_Play((uint32_t)buffer2, _MAX_SS)?

Thank a lot for your help.

Fabrizio

Outcomes