Add BT SCO delay for MediaCommandPlayer

This commit is contained in:
sonora 2016-07-04 23:15:36 +02:00
parent 194ebc7edc
commit debcf6e576

View file

@ -73,7 +73,14 @@ 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)
// Delay first prompt of each batch to allow BT SCO connection being established
if (ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) {
try {
log.debug("Delaying MediaCommandPlayer for BT SCO");
Thread.sleep(BT_SCO_DELAY);
} catch (InterruptedException e) {
}
}
playQueue();
}
}