Skip to content

Commit

Permalink
Android/openslES: start playing, after creating ressources
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Jan 14, 2019
1 parent 955d878 commit 7b1cc44
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/audio/openslES/SDL_openslES.c
Expand Up @@ -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) {
Expand All @@ -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:
Expand Down

0 comments on commit 7b1cc44

Please sign in to comment.