将 Remoteio 与 AudioServicesPlaySystemSound 一起使用

发布于 2024-09-26 16:09:33 字数 738 浏览 7 评论 0 原文

我们正在尝试结合使用 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);

非常感谢您的帮助

we are trying to use remoteio for audio recording in conjunction
with the AudioServicesPlaySystemSound function for audio playback. the problem is that whenever remoteio is running the playback volume drops
significantly. it seems like if some final mixing takes place behind the scene but we do not no how to change this behavior.

the implementation of the remoteio is based on the fallowing blog
http://atastypixel.com/blog/using-remoteio-audio-unit/

for audio playback we just use code like this one

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);

thanks a lot for any help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谜兔 2024-10-03 16:09:33

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

You may have to disable the voice processing AGC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文