android playback suddenly stopping
I have an app that is streaming audio content and sometimes it just stops all of the suddent.
the logcat windows shows --
AudioHardware pcm playback开发者_如何学Go is going to standby
and that's it.
I saw on another thread (pun intended) that someone was saying it was because he was using too many threads. Could that really be causing this? Could i give the audio thread higher priority?
Anyway to prevent the audio hardware pcm from going to standby?
I too am having this problem, and have nearly exhausted all my resources trying to find a workaround. I found an article on how to prevent this with AudioRecord, and maybe the same principles he talks about there will apply to you as well:
http://hificorder.blogspot.com/
In my case, I am having lockups using SoundPool. Increasing the number of max streams allowed prevented this from happening in most cases, but it still happens in other situations. I really wish there was better information about how to handled this correctly, because as it is, this is a show stopping bug in my app which may force me to abandon it all together.
Be sure to post back if you have any findings to add.
精彩评论