有一种简单的方法来控制声音文件循环的播放速度/节奏使用音频队列服务播放?例如,如果一个游戏正在播放的背景音乐,我想使BGM加快,随着时间耗尽,但没有改变音乐的音调。 THX!
Is there an easy way to control the playback speed/tempo of a sound file loop played using Audio Queue Services? For example, if a game is playing background music, I want to make the BGM speed up as time runs out, but without changing the pitch of the music. Thx!
推荐答案有就是要做到这一点,我知道非同小可方式。在Mac上,你会presumably使用音频单位要做到这一点,但我认为对于那些支持是有限的iPhone SDK。
There's no trivial way to do this that I know of. On the Mac, you'd presumably use Audio Units to do this, but I think the support for those is limited on the iPhone SDK.
您可以将您的播放AudioQueue回调过程中做一些处理,AudioFileReadPackets()和AudioQueueEnqueueBuffer(),但我认为在不改变基调将需要相当大量的CPU时间的速度移。
You can do some processing during your AudioQueue playback callback, between AudioFileReadPackets() and AudioQueueEnqueueBuffer() but I think speed-shifting without changing the tone will require rather a lot of CPU time.
有很可能会更容易有音乐的一个以上的记录,和音乐的无声通路过程中切换文件
It'd probably be easier to have more than one recording of the music, and switch files during a silent passage of the music.
更多推荐
我如何可以加快或放慢的背景音乐曲目与iPhone SDK?
发布评论