Android 2.1 上的 OpenSL

发布于 2024-11-19 12:22:58 字数 193 浏览 2 评论 0原文

在检查 Android 原生游戏开发的框架选项时,我发现 OpenSL ES 作为首选的原生声音库。

然后我发现它是2.3添加的。

Android 2.1 和 2.2 是否可以访问 OpenSL ES?这些版本是否还有其他音频库选项,或者我是否会被困在从本机代码调用 Android Java 音频播放器?

谢谢! 龙鹩莺

In examining framework options for Android native game development, I came across OpenSL ES as the native sound library of choice.

Then I found that it was added for 2.3.

Is OpenSL ES accessible at all for Android 2.1 and 2.2? Are there any other audio library options for these versions or am I going to be stuck calling the Android Java audio players from native code?

Thanks!
Dragonwrenn

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

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

发布评论

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

评论(1

零度° 2024-11-26 12:22:58

您可以手动构建 libmedia.so 并将其链接到您的应用程序中。您必须根据您正在运行的特定 Android 版本的 Android 源代码构建 libmedia.so(为 2.1 构建的库不适用于 2.2)。显然,这超出了标准 API 的范围,并且不太可移植。 请参阅此问题,获取有关如何执行此操作的良好示例的链接。

You can manually build and link the libmedia.so into your app. You will have to build libmedia.so from the android source code for the specific version of android you are running (the library built for 2.1 will not work with 2.2). Obviously, this is going outside the standard API and is not very portable. See this question for a link to a good example of how to do this.

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