[vlc-devel] [PATCH 2/2] audiotrack: deactivate getTimestamp

Thomas Guillem thomas at gllm.fr
Wed Feb 25 19:29:09 CET 2015


It is maybe miss used, but the delay reported by this function is not coherent.
---
 modules/audio_output/audiotrack.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index e1e0b8b..3434b6d 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -78,6 +78,8 @@ struct aout_sys_t {
 #include "audio_output/volume.h"
 
 //#define AUDIOTRACK_USE_FLOAT
+// TODO: activate getTimestamp for new android versions
+//#define AUDIOTRACK_USE_TIMESTAMP
 
 vlc_module_begin ()
     set_shortname( "AudioTrack" )
@@ -248,8 +250,10 @@ InitJNIFields( audio_output_t *p_aout )
     GET_ID( GetMethodID, AudioTrack.pause, "pause", "()V", true );
     GET_ID( GetMethodID, AudioTrack.write, "write", "([BII)I", true );
 
+#ifdef AUDIOTRACK_USE_TIMESTAMP
     GET_ID( GetMethodID, AudioTrack.getTimestamp,
             "getTimestamp", "(Landroid/media/AudioTimestamp;)Z", false );
+#endif
     GET_ID( GetMethodID, AudioTrack.getPlaybackHeadPosition,
             "getPlaybackHeadPosition", "()I", true );
 
-- 
2.1.3




More information about the vlc-devel mailing list