Nexus One / Android “CPU may be pegged” bug

前端 未结 5 1711
生来不讨喜
生来不讨喜 2021-02-05 12:36

I\'m writing a graphically intense game for the Nexus One, using the NDK (revision 4) and OpenGL ES 2.0. We\'re really pushing the hardware here, and for the most part it works

5条回答
  •  甜味超标
    2021-02-05 13:33

    I got CPU may be pegged messages on LogCat because I had a ArrayBlockingQueue in my code. If you have any blocking queue (as seems to be the case with audio buffers), be sure to BlockingQueue.put() only if you have timing control enough to properly BlockingQueue.take() elements to make room for it. Or else, have a look on using BlockingQueue.offer().

提交回复
热议问题