与AVAudioPlayer同时播放多个声音 [英] Playing multiple sounds simultaneously with AVAudioPlayer

查看:169
本文介绍了与AVAudioPlayer同时播放多个声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我一个功能,同时触发多个 AVAudioPlayer ?现在我试图获得总共十二个 AVAudioPlayer s立即触发,如果十二个按钮被激活,但有一个延迟,它听起来像有人正在运行他们的手指下来一个钢琴,而不是一次击中所有的键。

Could someone help me with a function that fires multiple AVAudioPlayers at the same time? Right now I am trying to get a total of twelve AVAudioPlayers to fire at once if twelve buttons are activated, but there is a delay and it sounds like someone is running their finger down a piano instead of hitting all the keys at once.

我已经看过音频队列服务,不能理解如何将它实现到代码中,但它说它可以播放同步的声音。我不知道如何设置所有的。我试图重新创建一个Tone Grid应用程序。

I've looked at Audio Queue Services and can't understand how to actually implement that into code, but it says it can play synchronized sounds. I'm not sure sure how to set all of it up. I'm trying to remake a Tone Grid app.

推荐答案

为什么不使用 http://www.hollance.com/ 2011/02 / soundbankplayer-using-openal-to-play-musical-instruments-in-your-ios-app /

您有一个复音

我使用它在我的第一个应用程序一段时间: http://itunes.apple.com/gb/app/chordwheel-pro/id406836326?mt=8

I used it in my first app a while back: http://itunes.apple.com/gb/app/chordwheel-pro/id406836326?mt=8

这篇关于与AVAudioPlayer同时播放多个声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆