[vlc-devel] [PATCH 0/4] Fix AudioTrack

Thomas Guillem thomas at gllm.fr
Tue Mar 3 18:05:36 CET 2015


This set of patches fixes a lot of errors in the initial AudioTrack java module.

I'm now able to get a very stable delay, that can be very high (see defines,
it's actually 1 seconds).

The main issue was that the JNIThread was always waiting in the
AudioTrack.write method since the internal AudioTrack buffer was full. While
waiting in write, JNIThread was not able to process any others commands (like
TIME_GET). In android Lollipop, there is a new write method that can be non
blocking. For previous android versions, I try to anticipate when the internal
buffer is full and wait in a timecond (in order to be able to process others
commands).

Regards,
Thomas Guillem.

Thomas Guillem (4):
  audiotrack: check init state
  audiotrack: fix too unstable delay and write taking too much time
  audiotrack: add WriteV21 (for Lollipop)
  audiotrack: deactivate getTimestamp

 modules/audio_output/audiotrack.c | 356 +++++++++++++++++++++++++++-----------
 1 file changed, 259 insertions(+), 97 deletions(-)

-- 
2.1.3




More information about the vlc-devel mailing list