(android)Modify Play Audio Mechanism |
ancientli
|
On android, play audio is by creating a new thread(SDL_RunAudio), once app go into background, the thread will be suspended, result in app can not play audio when background.
To support play audio when background, I modified the audio play mechanism, it uses Service(). By the way, add a hint(SDL_HINT_BACKGROUND_AUDIO) whether to allow the play audio when the background. Source code on Github: https://github.com/freeors/SDL |
|||||||||||
|