mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 02:09:52 +00:00
ao_opensles: remove set_play_state()
Set play state to playing in init() instead. We no longer touch the play state afterwards.
This commit is contained in:
parent
ba68e570de
commit
0a9ab1b076
@ -198,6 +198,7 @@ static int init(struct ao *ao)
|
||||
(void*)&p->buffer_queue));
|
||||
CHK((*p->buffer_queue)->RegisterCallback(p->buffer_queue,
|
||||
buffer_callback, ao));
|
||||
CHK((*p->play)->SetPlayState(p->play, SL_PLAYSTATE_PLAYING));
|
||||
|
||||
return 1;
|
||||
error:
|
||||
@ -207,14 +208,6 @@ error:
|
||||
|
||||
#undef CHK
|
||||
|
||||
static void set_play_state(struct ao *ao, SLuint32 state)
|
||||
{
|
||||
struct priv *p = ao->priv;
|
||||
SLresult res = (*p->play)->SetPlayState(p->play, state);
|
||||
if (res != SL_RESULT_SUCCESS)
|
||||
MP_ERR(ao, "Failed to SetPlayState(%d): %d\n", state, res);
|
||||
}
|
||||
|
||||
static void reset(struct ao *ao)
|
||||
{
|
||||
struct priv *p = ao->priv;
|
||||
@ -224,8 +217,6 @@ static void reset(struct ao *ao)
|
||||
static void resume(struct ao *ao)
|
||||
{
|
||||
struct priv *p = ao->priv;
|
||||
set_play_state(ao, SL_PLAYSTATE_PLAYING);
|
||||
|
||||
// enqueue two buffers
|
||||
buffer_callback(p->buffer_queue, ao);
|
||||
buffer_callback(p->buffer_queue, ao);
|
||||
|
Loading…
Reference in New Issue
Block a user