代码库> 音频视频> 高性能的音频开源项目--novocaine
高性能的音频开源项目--novocaine
关注
上传者:ccsupport 分类:音频视频(Audio & Video)
查看次数:4433 下载次数:436
上传时间:2014-01-06 大小:8 KB
novocaine是iOS和Mac OS X上一个高性能的音频开源项目。
测试环境:Xcode 5.0,iOS 5.0以上

Getting Audio
Novocaine *audioManager = [Novocaine audioManager];
[audioManager setInputBlock:^(float *newAudio, UInt32 numSamples, UInt32 numChannels) {
    // Now you're getting audio from the microphone every 20 milliseconds or so. How's that for easy?
    // Audio comes in interleaved, so,
    // if numChannels = 2, newAudio[0] is channel 1, newAudio[1] is channel 2, newAudio[2] is channel 1, etc.
}];
[audioManager play];

Playing Audio
Novocaine *audioManager = [Novocaine audioManager];
[audioManager setOutputBlock:^(float *audioToPlay, UInt32 numSamples, UInt32 numChannels) {
    // All you have to do is put your audio into "audioToPlay".
}];
[audioManager play];
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0
提示
sina weixin mail 回到顶部