Remove aggressive assert that fired on Cyanogen device (even with a valid CPU pause/resume lifecycle) ...

This commit is contained in:
Aaron Culliney 2015-12-20 15:04:20 -08:00
parent abe1346051
commit 9fd288c0b9

View File

@ -741,20 +741,17 @@ static long opensles_systemResume(AudioContext_s *audio_context) {
break;
}
#if !TESTING
assert(state != SL_PLAYSTATE_PLAYING && "mismatch between systemPause/systemResume");
#endif
if (state != SL_PLAYSTATE_PLAYING) {
ERRLOG("WARNING: possible audio lifecycle mismatch ... continuing anyway");
}
if (state == SL_PLAYSTATE_PAUSED) {
// Balanced resume OK here
SLresult result = (*(ctx->bqPlayerPlay))->SetPlayState(ctx->bqPlayerPlay, SL_PLAYSTATE_PLAYING);
#if !TESTING
} else {
} else if (state == SL_PLAYSTATE_STOPPED) {
// Do not resume for stopped state, let this get forced from CPU/speaker thread otherwise we starve. (The
// stopped state happens if user dynamically changed buffer parameters in menu settings which triggered an
// OpenSLES destroy/re-initialization ... e.g. audio_setLatency() was invoked)
assert(state == SL_PLAYSTATE_STOPPED);
#endif
}
} while (0);