如何玩iPhone上的音 [英] How to play a tone on iPhone

查看:177
本文介绍了如何玩iPhone上的音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以轻松播放音频或iPhone上(如莫尔斯code,哔哔beeeeeep)系列的色调?

有什么样code在那里,会点我在正确的方向?

(我记得在Commodore 64是大约4 code线!)


解决方案

  1. 想象的不同。使用的音频文件。 :)简单的方法很多玩的。


  2. 看那AudioQueue库 AudioToolbox.framework AudioQueueNewOutput 可能是你要找的东西,虽然我还没有在使用了一段时间这些。您可以提供在回调的音频数据。


Is it possible to easily play a tone, or series of tones on the iPhone (like morse code, beep beeeeeep beep)?

Is there any sample code out there that would point me in the right direction?

(I remember on the Commodore 64 it was about 4 lines of code !)

解决方案

  1. Think different. Use an audio file. :) Lots of easy ways to play those.

  2. Look at the AudioQueue library in AudioToolbox.framework. AudioQueueNewOutput might be what you're looking for, though I haven't used these in a while. You can provide your audio data in the callback.

这篇关于如何玩iPhone上的音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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