开发者

Iphone thread priorities

My application processes audio in its own thread and uses AudioUnits to play the buffers.

When my app enters the background I start to hear quiet a few glitches from my audio.

Now this isn't the worst part.

Before I enter the background I can scroll through my apps UIScrollView with no issues in my audio thread, but after I return from the background any scrolling causes glitches in my audio.

I've checked开发者_JAVA技巧 my thread priorities using [[NSThread currentThread] threadPriority] before and after the backgrounding and those don't seem to be any different.

What might be the issue?


What might be the issue?

Most likely, your audio processing is compute intensive and there aren't enough CPU cycles left for the system to both remain responsive to the user's input and allow your computation to run full throttle. The system is attempting to keep the UI responsive and throttling your computation, leading to skips.

The fix is probably going to be to make your computation use less CPU, either by increasing efficiency or doing less work.


Figured it out. I rebuilt the app under the release setting and everything works and sounds amazing now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜