summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomty89 <tom.ty89@gmail.com>2018-01-24 14:21:52 +0800
committerJan Ekström <jeebjp@gmail.com>2018-03-07 01:40:05 +0200
commit0a9ab1b076fa43cfbdfa7aee01d723fe400396fd (patch)
treee5acb071762a70688615a68eb417d1a3399ed848
parentba68e570dedc61c331dab79cc0027fb5529037fa (diff)
downloadmpv-0a9ab1b076fa43cfbdfa7aee01d723fe400396fd.tar.bz2
mpv-0a9ab1b076fa43cfbdfa7aee01d723fe400396fd.tar.xz
ao_opensles: remove set_play_state()
Set play state to playing in init() instead. We no longer touch the play state afterwards.
-rw-r--r--audio/out/ao_opensles.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/audio/out/ao_opensles.c b/audio/out/ao_opensles.c
index bff94b29e2..e92b530938 100644
--- a/audio/out/ao_opensles.c
+++ b/audio/out/ao_opensles.c
@@ -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);