A2DP_sink track position detection
Posted: Sun Nov 03, 2019 2:53 pm
This is my first post on this forum, so first of all, I would like to say hello!
I started my project with example a2dp_sink from IDF examples. I wanted to make this example to get information about track position every second (e.g. in console). I found a function responsible for that and it is: (bt_app_av.c lines: 204-210)
[Codebox]
static void bt_av_play_pos_changed(void)
{
if (esp_avrc_rn_evt_bit_mask_operation(ESP_AVRC_BIT_MASK_OP_TEST, &s_avrc_peer_rn_cap,
ESP_AVRC_RN_PLAY_POS_CHANGED)) {
esp_avrc_ct_send_register_notification_cmd(APP_RC_CT_TL_RN_PLAY_POS_CHANGE, ESP_AVRC_RN_PLAY_POS_CHANGED, 10);
}
}
[/Codebox]
In the example code, information about track duration is being refreshed every 10 s because of last parameter of esp_avrc_ct_send_register_notification_cmd. Changing this value to 1, results in 3 s instead of 1 s. Every value equal and above 3 is correct.
My question is why minimum value of track positioning refresh is 3 s and how to change it?
I started my project with example a2dp_sink from IDF examples. I wanted to make this example to get information about track position every second (e.g. in console). I found a function responsible for that and it is: (bt_app_av.c lines: 204-210)
[Codebox]
static void bt_av_play_pos_changed(void)
{
if (esp_avrc_rn_evt_bit_mask_operation(ESP_AVRC_BIT_MASK_OP_TEST, &s_avrc_peer_rn_cap,
ESP_AVRC_RN_PLAY_POS_CHANGED)) {
esp_avrc_ct_send_register_notification_cmd(APP_RC_CT_TL_RN_PLAY_POS_CHANGE, ESP_AVRC_RN_PLAY_POS_CHANGED, 10);
}
}
[/Codebox]
In the example code, information about track duration is being refreshed every 10 s because of last parameter of esp_avrc_ct_send_register_notification_cmd. Changing this value to 1, results in 3 s instead of 1 s. Every value equal and above 3 is correct.
My question is why minimum value of track positioning refresh is 3 s and how to change it?