From ee9010c31fdfc73aa066937680fc410c6592de4d Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 20 Aug 2020 15:55:36 +0200 Subject: [PATCH] a2dp-forwarding: pause/resume headset stream commands --- example/a2dp_mitm_demo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example/a2dp_mitm_demo.c b/example/a2dp_mitm_demo.c index f657ce88f..14e2fd400 100644 --- a/example/a2dp_mitm_demo.c +++ b/example/a2dp_mitm_demo.c @@ -575,6 +575,8 @@ static void show_usage(void){ printf("s - show status\n"); printf("d - disconnect all\n"); printf("c - delete all link keys\n"); + printf("w - pause headset stream\n"); + printf("W - resume headset stream\n"); printf("\nTo setup MITM, please connect to Headphone using 'h',\n"); printf("then connect from smartphone/laptop to BTstack.\n"); printf("Ctrl-c - exit\n"); @@ -612,9 +614,13 @@ static void stdin_process(char cmd){ gap_delete_all_link_keys(); break; case 'w': - printf("Pause stream.\n"); + printf("Pause headset stream.\n"); status = a2dp_source_pause_stream(mitm_context.a2dp_source_cid, mitm_context.a2dp_source_local_seid); break; + case 'W': + printf("Resume headset stream.\n"); + status = a2dp_source_start_stream(mitm_context.a2dp_source_cid, mitm_context.a2dp_source_local_seid); + break; default: show_usage(); break;