Question
DFSDM STM32F413
while (1) {
if (DmaRecHalfBuffCplt == 1) {
/* Store values on Play buff */
for (int i = 0; i < 1024; i++) {
PlayBuff[2 * i] = (int16_t) SaturaLH((RecBuff[i] >> 8), -32768,
32767);
PlayBuff[(2 * i) + 1] = PlayBuff[2 * i];
}
HAL_UART_Transmit_DMA(&huart1, (uint8_t*) PlayBuff, 4096);
DmaRecHalfBuffCplt = 0;
}
if (DmaRecBuffCplt == 1) {
/* Store values on Play buff */
for (int i = 1024; i < 2048; i++) {
PlayBuff[2 * i] = (int16_t) SaturaLH((RecBuff[i] >> 8), -32768,
32767);
PlayBuff[(2 * i) + 1] = PlayBuff[2 * i];
}
DmaRecBuffCplt = 0;
}
/* USER CODE END WHILE */
}
I try to use the AudioTrack Android SDK api to play the PlayBuff data,but i saw The PlayBuff array consists mainly of repeated values FF 7F 80 00. What could be the reason for this?
