Android app pauses during sleep lock, but not its running native threads?
I am having a problem with the sleep lock in my application. I am using a native thread which is using sockets to retrieve RTP packets who contains audio data. This audio data is then sent to the android audio player class in Java (MediaPlayer, I think - didn't write that piece myself) and is being played out.
What happens if, if I manually(not because its "idle") engage the sleep-lock, it seems the native threads keeps buffering audio data but the media player is not requesting it, which means once you deactivate the sleep lock you get like a 5-seconds delay.
I am using native library for buffering the RTP packtets (speex ji开发者_JAVA百科tterbuffer) and cannot do much about it im afraid. My question is then: how do I tell my app to continue playing sound after having manually activated the sleep lock?
Thanks
精彩评论