我已经使用Android的分页库(https://developer.android.com/topic/libraries/architecture/paging.html)实现了分页回收视图.它在获取数据和检索后续页面时工作正常.但是,如何过滤PagedList?假设我有一个搜索小部件,我想搜索当前屏幕上的列表.PagedList.filter()返回a List并且PagedListAdapter.setList()不接受a List.
我想通过Multipeer Connectivity(iOS 8)发送麦克风音频数据,并通过接收对等体的扬声器播放.我还设置了AVAudioEngine,我可以听到(上方)扬声器输出的麦克风数据,但我不知道如何通过网络发送AVAudioPCMBuffer.这是我的代码片段:
AVAudioInputNode *inputNode =[self.engine inputNode];
AVAudioMixerNode *mainMixer = [self.engine mainMixerNode];
[self.engine connect:inputNode to:mainMixer format:[inputNode inputFormatForBus:0]];
[mainMixer installTapOnBus:0 bufferSize:4096 format:[mainMixer outputFormatForBus:0]
block:^(AVAudioPCMBuffer *buffer, AVAudioTime *when) {
//==== How to send the PCMBuffer ?? ======//
}];
NSError *error = nil;
[self.engine startAndReturnError:&error];
if(error)
{
NSLog(@"error: %@", [error localizedDescription]);
}
Run Code Online (Sandbox Code Playgroud)
我是以NSData还是NSStream发送的?
感谢您的帮助.谢谢.
core-audio avfoundation nsstream multipeer-connectivity ios8