将remoteio与AudioServicesPlaySystemSound一起使用

时间:2010-10-07 14:26:31

标签: iphone audio audiotoolbox

我们正在尝试将remoteio用于录音 使用AudioServicesPlaySystemSound功能进行音频播放。问题是每当remoteio运行时播放音量下降 显著。看起来如果最后的混音发生在幕后,但我们不知道如何改变这种行为。

remoteio的实施基于以下博客 http://atastypixel.com/blog/using-remoteio-audio-unit/

对于音频播放,我们只使用这样的代码

NSString *sndPath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"wav" inDirectory:@"/"];
CFURLRef sndURL = (CFURLRef)[[NSURL alloc] initFileURLWithPath:sndPath];
SystemSoundID soundID;

int e = AudioServicesCreateSystemSoundID(sndURL, &soundID);
if (e) {
  NSLog(@"couldn't create sound");
  exit(0);
}
AudioServicesPlaySystemSound(soundID);

非常感谢任何帮助

1 个答案:

答案 0 :(得分:0)

您可能必须禁用语音处理AGC。