OSDN Git Service

A2DP: SBC encoding counter errata
authorCheney Ni <cheneyni@google.com>
Fri, 14 Feb 2020 12:29:54 +0000 (20:29 +0800)
committerCheney Ni <cheneyni@google.com>
Tue, 10 Mar 2020 03:55:57 +0000 (11:55 +0800)
commitc8537f844d1c052e5c9d93981e270dd45d73a709
treee00573966323bb1e7f27cec63f7b5f0dd7c91bda
parentbae2582df32576f8e95aa78f039fcfdecc962086
A2DP: SBC encoding counter errata

When the encoder interval is 20 milliseconds per tick for {44.1 kHz /
16 bits per sample / Stereo}, there were around three microseconds shift
every tick, but would cause one SBC frame mismatched after 20 seconds.
Here try to adjust the timeline to increase the accuracy by following
methods:

1. add the remainder back to the timeline when converting the time
   period to data size.
2. change the timestamp to be presented by values in 1/10 microseconds.

Bug: 149546181
Test: manually
Change-Id: Ic42b2f331628c44aa927c7b9e35562be1fa750c7
stack/a2dp/a2dp_sbc_encoder.cc