mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-11 03:47:01 +00:00
a2dp sink demo: add register track changed event
This commit is contained in:
parent
19af95b439
commit
8177fff398
@ -765,7 +765,10 @@ static void avrcp_controller_packet_handler(uint8_t packet_type, uint16_t channe
|
|||||||
if (!avrcp_cid) return;
|
if (!avrcp_cid) return;
|
||||||
|
|
||||||
// ignore INTERIM status
|
// ignore INTERIM status
|
||||||
if (status == AVRCP_CTYPE_RESPONSE_INTERIM) return;
|
if (status == AVRCP_CTYPE_RESPONSE_INTERIM){
|
||||||
|
printf(" INTERIM response \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
printf("AVRCP demo: command status: %s, ", avrcp_ctype2str(status));
|
printf("AVRCP demo: command status: %s, ", avrcp_ctype2str(status));
|
||||||
switch (packet[2]){
|
switch (packet[2]){
|
||||||
@ -982,6 +985,9 @@ static void show_usage(void){
|
|||||||
printf("X - disable repeat mode\n");
|
printf("X - disable repeat mode\n");
|
||||||
printf("z - shuffle all tracks\n");
|
printf("z - shuffle all tracks\n");
|
||||||
printf("Z - disable shuffle mode\n");
|
printf("Z - disable shuffle mode\n");
|
||||||
|
|
||||||
|
printf("a/A - register/deregister TRACK_CHANGED\n");
|
||||||
|
|
||||||
printf("---\n");
|
printf("---\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1112,6 +1118,15 @@ static void stdin_process(char cmd){
|
|||||||
printf(" - disable shuffle mode\n");
|
printf(" - disable shuffle mode\n");
|
||||||
status = avrcp_controller_set_shuffle_mode(avrcp_cid, AVRCP_SHUFFLE_MODE_OFF);
|
status = avrcp_controller_set_shuffle_mode(avrcp_cid, AVRCP_SHUFFLE_MODE_OFF);
|
||||||
break;
|
break;
|
||||||
|
case 'a':
|
||||||
|
printf("AVRCP: enable notification TRACK_CHANGED\n");
|
||||||
|
avrcp_controller_enable_notification(avrcp_cid, AVRCP_NOTIFICATION_EVENT_TRACK_CHANGED);
|
||||||
|
break;
|
||||||
|
case 'A':
|
||||||
|
printf("AVRCP: disable notification TRACK_CHANGED\n");
|
||||||
|
avrcp_controller_disable_notification(avrcp_cid, AVRCP_NOTIFICATION_EVENT_TRACK_CHANGED);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
show_usage();
|
show_usage();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user