mtime_t length;
int buffers;
- mtime_t last_callback;
/* audio buffered through opensles */
block_t *p_chain;
SetPlayState( p_sys->playerPlay, SL_PLAYSTATE_PLAYING );
p_sys->length = 0;
- p_sys->last_callback = 0;
p_sys->buffers = 0;
/* release audio data not yet written to opensles */
vlc_mutex_lock( &p_sys->lock );
mtime_t delay = p_sys->length;
- mtime_t last_callback = p_sys->last_callback;
vlc_mutex_unlock( &p_sys->lock );
- if (last_callback != 0)
- delay += last_callback - mdate();
-
SLAndroidSimpleBufferQueueState st;
SLresult res = GetState(p_sys->playerBufferQueue, &st);
if (unlikely(res != SL_RESULT_SUCCESS)) {
vlc_mutex_lock( &p_sys->lock );
p_sys->buffers--;
- p_sys->last_callback = mdate();
p_block = p_sys->p_chain;
assert( p_block );