Navigation Menu

Skip to content

Commit

Permalink
Android/openslES: fix Pause/ResumeDevices when openslES is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Jan 14, 2019
1 parent ae41831 commit 1b24b2e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/audio/openslES/SDL_openslES.c
Expand Up @@ -602,23 +602,23 @@ AudioBootStrap openslES_bootstrap = {

void openslES_ResumeDevices()
{
SLresult result;

/* set the player's state to 'playing' */
result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
if (SL_RESULT_SUCCESS != result) {
SDL_SetError("Play set state failed");
if (bqPlayerPlay != NULL) {
/* set the player's state to 'playing' */
SLresult result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
if (SL_RESULT_SUCCESS != result) {
SDL_SetError("openslES_ResumeDevices failed");
}
}
}

void openslES_PauseDevices()
{
SLresult result;

/* set the player's state to 'paused' */
result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PAUSED);
if (SL_RESULT_SUCCESS != result) {
SDL_SetError("Playe set state failed");
if (bqPlayerPlay != NULL) {
/* set the player's state to 'paused' */
SLresult result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PAUSED);
if (SL_RESULT_SUCCESS != result) {
SDL_SetError("openslES_PauseDevices failed");
}
}
}

Expand Down

0 comments on commit 1b24b2e

Please sign in to comment.