且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从iOS的音频流

更新时间:2023-11-18 17:53:04

编辑 - 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编程一个伟大的苹果参考:
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

祝你好运!