从iOS的音频流 [英] Stream audio from iOS

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

问题描述

我怎么会去流式音频从iOS设备就像一台Mac或其他iOS设备其他设备?我只能找到像AirPlay的谷歌和任何关于如何做到这一点在自己的应用程序的解决方案。我会假设你会去通过某种形式的服务器。

How would I go about streaming audio FROM an iOS device to another device like a Mac or another iOS device? I can only find solutions like AirPlay on Google and nothing about how to do it in your own app. I would assume you would have to go through a server of some kind.

需要明确的是,我不是在寻找复制的AirPlay。我希望做非常基本的VoIP。

To be clear, I am not looking to replicate AirPlay. I am looking to do very basic VoIP.

推荐答案

编辑 - 2011年8月12日

我不知道你想从设备到设备的音频。您可以随时使用CFNetwork的,简单地插座到设备。诀窍是将要检测它。考虑卓悦服务,以及。您仍然需要使用AudioToolbox音频处理到缓冲区并可通过卓悦或套接字。

I didn't realize you wanted to go from device to device with the audio. You can always use CFNetwork and simply socket into a device. The trick is going to be detecting it. Look into bonjour services as well. You will still need to use AudioToolbox to process the audio into buffers and through either bonjour or a socket.

编辑完

@格雷格AVFoundation给你之类的东西AVAudioRecorder,但它并不完全让喜欢他想让你中流了出来包。

@greg AVFoundation gives you things like AVAudioRecorder, but it doesn't quite let you stream out packets like he wants.

我想看看AudioToolbox。如果使用AudioQueue,您可以指定流的格式。然后,添加输入队列回调,你可以访问录制音频的原始数据包。

I'd take a look at AudioToolbox. If you use an AudioQueue, you can specify a format for streaming. Then, add an input queue callback and you get access to the raw packets of recorded audio.

看看iLBC的为codeC。它有一个足够小的足迹,让你所做的一切在3G。

Take a look at iLBC for a codec. It has a small enough footprint to let you do everything over 3g.

下面是上AudioQueue编程一个伟大的苹果参考:
<一href=\"http://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html\" rel=\"nofollow\">http://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html

Here's a great apple reference on AudioQueue programming: http://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html

祝你好运!

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

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