开发者

AudioOutputUnitStart takes time

开发者 https://www.devze.com 2022-12-24 05:36 出处:网络
I\'m making an iPhone game application using Core Audio, Extended Audio File Services. It works OK, but when I first call AudioOutputUnitStart, it takes about 1-2 seconds.

I'm making an iPhone game application using Core Audio, Extended Audio File Services.

It works OK, but when I first call AudioOutputUnitStart, it takes about 1-2 seconds. After the second call, no problem. For a game application, 1-2 seconds is very noticeable. (I tested this on iPhone simulator, and iPhone 3GS)

Also, if I leave the game for about 10 seconds, first call of AudioOutputUnitStart afte开发者_StackOverflow社区r the leave also takes time.

I'm using a 5-second AAC 160kbps file to play.


For a 5-second file, why not convert that file into a linear PCM wav or aif file? It shouldn't be that much bigger, plus you don't have to involve the AAC decoder in the process.

0

精彩评论

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