/* callback function for A2DP source audio data stream  */
static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len)
/* callback function for A2DP source audio data stream  */
static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len)
{
    if (len < 0 || data == NULL) {
        return 0;
    }
    int val = rand() % (1 << 16);
    for (int i = 0; i < (len >> 1); i++) {
        data[(i << 1)] = val & 0xff;
        data[(i << 1) + 1] = (val >> 8) & 0xff;
    }
    return len;
}