[vlc-devel] [RFC] Android OpenSL ES audio output

Dominique Martinet asmadeus at codewreck.org
Tue Jun 7 08:02:46 CEST 2011


Rémi Denis-Courmont wrote on Thu, Jun 02, 2011 :
> Le jeudi 2 juin 2011 01:30:55 Jean-Baptiste Kempf, vous avez écrit :
> > On Wed, Jun 01, 2011 at 04:21:25PM +0200, Rémi Denis-Courmont wrote :
> > > >     // set the player's state to playing
> > > >     result = (*p_sys->playerPlay)->SetPlayState( p_sys->playerPlay,
> > > >     
> > > >                                                 SL_PLAYSTATE_PLAYING );
> > > >     
> > > >     CHECK_OPENSL_ERROR( result, "Failed to switch to play state" );
> I don't see the point in uncorking while there are no audio samples to be 
> played yet.

I do understand this, but I'm not familiar enough with the architecture
to figure where to put it.

It could probably be called the first time play() is called, even though
I'd find it kind of ugly to check that it's called for the first time,
but if you want to be this precise I suppose you'd also want to put the
state back to pause/stop when we pause the player.. so maybe using the
event system?
(so defining a function InputEvent and using something like:
var_AddCallback( p_input, "intf-event", InputEvent, &cond );
in the open()? I'm not even sure if I can call playlist_CurrentInput or
something similar to get a p_input at this stage... (the line comes
from src/playlist/fetcher.c, I just random-greped on event and picked
something that looked appropriate without any deep reading))

I'm open to suggestions.

Asmadeus | Dominique Martinet

More information about the vlc-devel mailing list