Author Topic: Audio Output over Bluetooth HFP  (Read 3387 times)

Offline Matthias1912

  • Newbie
  • *
  • Posts: 8
  • Thanked: 2 times
    • View Profile
Re: Audio Output over Bluetooth HFP
« Reply #15 on: August 02, 2021, 12:06:53 »
Hi Menion,

your modification Is not working. It is like before. (SCO enabled successfully, speach comes successfully but after finishing speaking there is no SCO release). I think you are not calling "abandonAudioFocus(null)" from your AudioManager instance. Can you please look inside my function "onPlaybackDoneOrError". When I do not call "abandonAudioFocus(null)" I have the same behavior like your implementation.

For testing, you can use almost every Bluetooth communication headset. All headsets have HFP support (using SCO). With enabled SCO support (of your code), your headset use this interrupt channel and you can test your implementation.

Test condition for SCO without car radio are similar to A2DP normal music audio modus:
run amazon music or other music player in background and call your SCO speech output. It should interrupt (stop) music, speech output should appear and after finishing speaking the music should come back.

When this SCO release problem is solved, your implementation will work perfectly.

Kind regards
Matthias
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12539
  • Thanked: 800 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 5, A12
Re: Audio Output over Bluetooth HFP
« Reply #16 on: August 04, 2021, 22:20:57 »
Hello Matthias,
oki, you are right, it does not work correctly even with a basic BT headset. I've spent another few hours with testing a few more options and .. this is the end of this story. It simply does not work. I'm quite sure I do all correctly, even `abandonAudioFocus` is called correctly based on logs, but still, some part is missing. So in the next version, support for SCO will be completely removed because it is still not a reliable feature. Thanks for understanding.
Menion
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline Matthias1912

  • Newbie
  • *
  • Posts: 8
  • Thanked: 2 times
    • View Profile
Re: Audio Output over Bluetooth HFP
« Reply #17 on: August 05, 2021, 01:54:45 »
Hi, mhh, what should I say. This is a hard decision.

I gave you 2 working solutions and spent some hours too. I do not know how your code looks like but I think I can help you if you let me, but you made such a secret about your text to speech part. But ok, I have to accept your decision.

Just as an hint, locus is now an abonnement version and I think this is a base feature (against your opinion) if you want to use it as a car navi too. If you are willing to add this feature somehow in the future you will get a new gold user.

Thanks for trying.

Kind regards
Matthias
 
The following users thanked this post: Menion