summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-04-12 11:53:11 -0700
committerJohn Grossman <johngro@google.com>2012-04-19 12:21:20 -0700
commitbe02f32cff3861ba5e7ec29344f5a6fc0049554f (patch)
tree231f20f7e78419bc7ca06150162ab3fd97164046 /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parentf609b661a610c79f615036fd6b9547afb1b364d4 (diff)
TimedAudioTrack: Optimize the queue trim operation.
DO NOT MERGE this change must be hand-merged into master due to directory restructuring. Don't perform the end PTS calculation for each buffer during trimming. Instead, only calculate the ending PTS of a buffer if there is no next buffer in the queue. This optimization assumes that the buffers being queued are in monotonic media time order (a fair assumption for now) and that the timestamps in the audio are contiguous (not a requirement for this API, but a reality of how it is being used right now). In the case where the audio is discontinuous on purpose, it is that this optimization will cause the system hold one extra buffer which it could have safely trimmed. It should not be much of an issue since in real life the audio is almost always contiguous, and as long as the media clock is running and the mixer is mixing, the buffer will be used up and discard as part of the normal flow anyway. Change-Id: I00061e85ee7d5651fcf80751646c7d7415894a14 Signed-off-by: John Grossman <johngro@google.com>
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions