cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 - Discovery - Example ''Audio_playback_and_record''

fabrizio
Associate
Posted on November 08, 2013 at 10:28

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

0 REPLIES 0