BSP_AUDIO_OUT_Play() Buffer Size Parameter
I am programming an SMT32F69I-DISCO board to output a SINE wave. I am having trouble with the Size parameter of the BSP_AUDIO_OUT_Play() function. I have a buffer of 100 that I am filling with my SINE values:
int16_t dataI2S[100];
Here are my calls of the functions to initialize and play audio @48 KHz:
BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, 80, 48);
BSP_AUDIO_OUT_Play(dataI2S, (uint32_t)200);
Here is what it looks like when I put 128 as the Size parameter:
When I set it to 100:
When I set to 200:
According to the function definition I put below, it sounds like it should be set to 200 because it's the size in bytes.
/**
* @brief Starts playing audio stream from a data buffer for a determined size.
* @param pBuffer: Pointer to the buffer
* @param Size: Number of audio data BYTES.
* @retval AUDIO_OK if correct communication, else wrong communication
*/
uint8_t BSP_AUDIO_OUT_Play(uint16_t* pBuffer, uint32_t Size)
Anyone have any ideas what I am doing wrong here? Many thanks!
