Update all comments for BT SCO Feature funtionality
This commit is contained in:
parent
e2d76e76cd
commit
73a26269e2
4 changed files with 5 additions and 5 deletions
|
@ -181,7 +181,7 @@ public class VoiceRouter {
|
|||
currentSpeed = DEFAULT_SPEED;
|
||||
}
|
||||
|
||||
// Trigger close prompts earlier to allow for BT SCO connection delay
|
||||
// Trigger close prompts earlier if delayed for BT SCO connection establishment
|
||||
if ((settings.AUDIO_STREAM_GUIDANCE.get() == 0) && !AbstractPrologCommandPlayer.btScoStatus) {
|
||||
btScoDelayDistance = currentSpeed * (double) AbstractPrologCommandPlayer.BT_SCO_DELAY / 1000;
|
||||
}
|
||||
|
|
|
@ -312,11 +312,10 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
|
|||
public static final int BT_SCO_DELAY = 1500;
|
||||
|
||||
private boolean startBtSco() {
|
||||
// Establish a low quality Synchronous Connection-Oriented link to BT to e.g. interrupt a car stereo
|
||||
// http://stackoverflow.com/questions/2144694/routing-audio-to-bluetooth-headset-non-a2dp-on-android
|
||||
// Hardy, 2016-07-03: Establish a low quality BT SCO (Synchronous Connection-Oriented) link to interrupt e.g. a car stereo FM radio
|
||||
try {
|
||||
AudioManager mAudioManager = (AudioManager) ctx.getSystemService(Context.AUDIO_SERVICE);
|
||||
//if (mAudioManager == null || !mAudioManager.isBluetoothScoAvailableOffCall()) {
|
||||
// Should we get error reports from users, let's check for "|| !mAudioManager.isBluetoothScoAvailableOffCall()" or even BT=ON here:
|
||||
if (mAudioManager == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
|
|||
// If we have not already started to play audio, start.
|
||||
if (mediaPlayer == null) {
|
||||
requestAudioFocus();
|
||||
// TODO: Delay first prompt of each batch to allow BT SCO connection being established (cf TTSCommandPlayerImpl)
|
||||
playQueue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
if (mTts != null && !vrt.isMute()) {
|
||||
if (ttsRequests++ == 0) {
|
||||
requestAudioFocus();
|
||||
// Delay prompts to allow BT SCO connection being established
|
||||
// Delay first prompt of each batch to allow BT SCO connection being established
|
||||
if (ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) {
|
||||
ttsRequests++;
|
||||
if (android.os.Build.VERSION.SDK_INT <= 21) {
|
||||
|
|
Loading…
Reference in a new issue