[pulseaudio-discuss] [PATCH 3/4] Add A2DP aptX, aptX HD codecs support

Pali Rohár pali.rohar at gmail.com
Sat Dec 15 16:45:14 UTC 2018


On Friday 14 December 2018 00:16:24 Huang-Huang Bao wrote:
> 90 samples are only 90/44100 s = 2ms , which is ignorable.

Yes, this not a problem. Problem is that first 90 samples is just
"garbage" or rather initialization data for predictor.

And to prevent hearing such "garbage" when decoding stream, you need to
drop them. Put aptX stream into aptX decoder, but drop first 90 samples
of decoded output.

Hearing noise or any other disrupting sound also for just 2ms is not
something which you want to hear.

This also applies when resetting decoder, e.g. after aptX parity check
does not match.

In most cases, first 90 decoded samples should be just silence (at least
this is doing ffmpeg and android's proprietary encoders). But when you
start decoding not from beginning but from existing stream, then it is
a problem.

Decoding from the middle of stream happens when some A2DP packets are
lost and decoder needs to be reset and start decoding again.

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20181215/55b0c9d8/attachment.sig>


More information about the pulseaudio-discuss mailing list