AudioSession 实际上和 OpenAL 是一样的吗?

发布于 2024-08-31 04:23:59 字数 38 浏览 2 评论 0原文

AudioSession 实际上和 OpenAL 是一样的吗?

Is AudioSession actually the same thing as OpenAL?

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

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

发布评论

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

评论(1

一紙繁鸢 2024-09-07 04:23:59

它们的目的完全不同。

OpenAL 是一个低级、跨平台 API,用于播放和控制声音。

正如文档所述,AudioSession 是一个 C 接口,用于在其他应用程序的上下文中管理应用程序的音频行为。您可能想看看 AVAudioSession,它是 AudioSession 的便捷 Objective-C 替代品。

您通常会使用音频会话来获取声音硬件信息,确定其他应用程序是否正在播放声音,指定当您的应用程序也尝试播放声音时这些声音会发生什么情况等。

音频会话都是关于管理应用程序播放的环境声音。即使使用 OpenAL 播放的声音也受到应用程序音频会话所施加的规则的约束。

您确实应该查看文档。有很多内容需要涵盖。

They are quite different in purpose.

OpenAL is a low level, cross-platform API for playing and controlling sounds.

AudioSession, as the documentation puts it, is a C interface for managing an application’s audio behavior in the context of other applications. You may want to take a look at AVAudioSession which is a convenient Objective-C alternative to AudioSession.

You would typically use Audio Sessions for getting sound hardware information, determining if other applications are playing sounds, specifying what happens to those sounds when your application also tries to play sounds, etc.

Audio Sessions are all about managing the environment in which your application plays sounds. Even sounds played using OpenAL are subject to the rules imposed by your application's audio session.

You should really check out the docs. There is a lot to cover.

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