xbmc/xbmc — pull request #3823 by t-nelson (2013-12-12 21:54:14+00:00)
Title: [DROID][AE] Audiotrack sink improvements

Thanks to @davilla and @fritsch for the help.

Special thanks to @FernetMenta for his help and the sink rewrite with pull model.

This significantly simplifies the AudioTrack sink. Re-implementation using the pull model drops a thread and a buffer. Proper encapsulation of JNI into classes provides greater data access protection and readability. This drops (fake) float support from the sink. NEON fast float > s16le conversion will be moved into AEUtils in a later commit. A consequence was the re-exposure of a bug in which the sink was reinitialized to the same format, which the last commit takes care of. Track changes are now seemless and blip-free. :)

One outstanding issue is an ~600ms audio delay, which will be addressed ASAP.

@koying, care to review?

Supersedes #3811.