Hi,

I am using the eyes free TTS framework, and am observing a repeatable
1 second lag in the AudioTrack output that I am trying to explain.

The problem occurs after the first or second callback (ttsSynchDoneCB,
see: frameworks/base/packages/TtsService/jni/
android_tts_SynthProxy.cpp).
The underlying tts engine seems to be producing the callbacks fast
enough, but for some reason there is a 1 second pause before playback.
I see the following warning message in logcat:

  W/AudioTrack( 1262): obtainBuffer timed out (is the CPU pegged?)
  0x11f650 user=0000894a, server=0000794a

That message from AudioTrack is coming right after executing a line
that looks like the following:
  result = cblk->cv.waitRelative(cblk->lock,
milliseconds(waitTimeMs));

The value of waitTimeMs is 1 second, which is the delay I am seeing.
I do not understand the cause of the delay however; the code calls
obtainBuffer, and the message happens only if "framesAvailable" equals
0.  I don't understand what framesAvailable means in this context,
however, since it is during a call to AudioTrack::write that this is
happening, and there is certainly something available to write.

Can someone describe why this delay is occurring, and if there is
anything I can try to get rid of it?  Note that the CPU is certainly
not pegged, the only thing going on at the time is the tts.


Thanks,
-Mark

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to