如何从iOS的远程端播放音频缓冲区?
问题描述:
我是后一个问题,其中约从记录仪获取AudioBuffer,如何从iOS的远程端播放音频缓冲区?
我的相关问题: Is there any high level Audio Queue Record Service Library for iOS?
我可以从刻录机读取缓冲区并把它放到一个NSData的,然后发送由udp插座。
但如何在另一台iOS设备上使用缓冲区?
有什么方法可以播放缓冲区?
我已经研究了一些示例代码,但其中大多数只是在录音机录音时播放。
是否有任何更详细的教程,从远程玩缓冲区?
更新:我只是解决现在
的主要功能是播放回调函数!
static OSStatus playbackCallback(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData) {
// Notes: ioData contains buffers (may be more than one!)
// Fill them up as much as you can. Remember to set the size value in each buffer to match how
// much data is in the buffer.
return noErr;
}
BTW,应经常检查低水平你使用的是什么充塞!
例如:的malloc的memcpy免费