sauravpradhan / AnySound2BT

Force android to play audio and MP3 in non-A2DP BT headset.
Apache License 2.0
41 stars 16 forks source link

Long delay before audio plays #7

Open peterfhannon opened 7 years ago

peterfhannon commented 7 years ago

Thanks for developing this! Unfortunately, when playing audio for the first time after enabling, there is a long delay before the audio starts playing. We have experimented with a text-to-speech app (speaking a single short sentence), playing from a huawei P8 to a Jaguar FX in car stereo and it is generally around 15 seconds. Playing music from the built-in music app takes around 8 seconds to start. Any ideas why it is so long and what we could do about it? Without using this app for sco routing, Facebook messenger VOIP app is almost instantaneous to start, as are the built-in phone app and a number of iOS apps. Many thanks in advance

sauravpradhan commented 7 years ago

Hey @peterfhannon in the app there is no delay added. Even if there is delay it is to set mode and its of some 500-600ms i believe. Try playing a simple file using soundpool and let me know the results. I can debug further .

sauravpradhan commented 7 years ago

Tested with my audio recorder/player app (https://github.com/sauravpradhan/Audio-recorder-player), APK-https://drive.google.com/file/d/0Byaspar4S5SEaThQMXo2azlHZms/view?usp=sharing . This works absolutely fine with no delay. There is no delay added in the application. @peterfhannon Please debug from application side what might have gone wrong. What is the actual audio you are trying to play can you please clarify ? Might be the text to speech conversion is taking time !