diff options
author | Sylvain Becker <sylvain.becker@gmail.com> | 2019-01-14 14:31:06 +0100 |
---|---|---|
committer | Sylvain Becker <sylvain.becker@gmail.com> | 2019-01-14 14:31:06 +0100 |
commit | 23ad908d9447d051ce1f19b01138a5b327bbcbad (patch) | |
tree | 5439d5cc79cdafe5670e6bc253fa1a8855718a42 | |
parent | 6590fe7d441909502e39dbdb8bec35a27c459a53 (diff) |
Android/openslES: start playing, after creating ressources
-rw-r--r-- | src/audio/openslES/SDL_openslES.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/audio/openslES/SDL_openslES.c b/src/audio/openslES/SDL_openslES.c index 187e6e5adb..397a3013d8 100644 --- a/src/audio/openslES/SDL_openslES.c +++ b/src/audio/openslES/SDL_openslES.c @@ -399,13 +399,6 @@ openslES_CreatePCMPlayer(_THIS) /* goto failed; */ } - /* set the player's state to playing */ - result = (*bqPlayerItf)->SetPlayState(bqPlayerItf, SL_PLAYSTATE_PLAYING); - if (SL_RESULT_SUCCESS != result) { - LOGE("Play set state failed"); - goto failed; - } - /* Create the audio buffer semaphore */ audiodata->playsem = SDL_CreateSemaphore(NUM_BUFFERS - 1); if (!audiodata->playsem) { @@ -424,6 +417,13 @@ openslES_CreatePCMPlayer(_THIS) audiodata->pmixbuff[i] = audiodata->mixbuff + i * this->spec.size; } + /* set the player's state to playing */ + result = (*bqPlayerItf)->SetPlayState(bqPlayerItf, SL_PLAYSTATE_PLAYING); + if (SL_RESULT_SUCCESS != result) { + LOGE("Play set state failed"); + goto failed; + } + return 0; failed: |