我们正在尝试将 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);
非常感谢您的帮助