mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-07 09:55:45 +00:00
a2dp source demo: fix playback stop when 'z' is hit twice
This commit is contained in:
parent
c5ee5b328f
commit
87e914e548
@ -489,11 +489,19 @@ static void stdin_process(char cmd){
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
if (data_source == STREAM_SINE) {
|
||||
printf("Already playing sine.\n");
|
||||
return;
|
||||
}
|
||||
printf("Playing sine.\n");
|
||||
data_source = STREAM_SINE;
|
||||
status = a2dp_source_start_stream(media_tracker.a2dp_cid, media_tracker.local_seid);
|
||||
break;
|
||||
case 'z':
|
||||
if (data_source == STREAM_SINE) {
|
||||
printf("Already playing mode.\n");
|
||||
return;
|
||||
}
|
||||
printf("Playing mod.\n");
|
||||
data_source = STREAM_MOD;
|
||||
status = a2dp_source_start_stream(media_tracker.a2dp_cid, media_tracker.local_seid);
|
||||
|
Loading…
Reference in New Issue
Block a user