stm32f746g disco play pcm audio from udp
hi
i am working on stm32f746 disco board and i want to play audio with board from online udp data. for this target i wrote a qt application to send pcm audio data over udp protocol and in stm32 program i use lwip receive function in a freertos task for receive data and play it. here is my code :
BSP_AUDIO_OUT_Play((uint16_t*)&audio_buf[0], sizeof(audio_buf));
nb = netbuf_new();
for(;;)
{
res=netconn_recv(nc,&nb);
len=netbuf_len(nb);
if(len>0)
{
netbuf_copy(nb,audio_buf,len);
}
netbuf_delete(nb);
osDelay(1);
}
whit this code i can receive and play audio but my audio is very noisy. iam not sure whats the best way to doing this. i think i shoud use interrups and freertos features like queue for best quality of audio but i dont know how to implement that. please help me.
thanks
