背景 iPod 音乐音量与音效混合

发布于 2024-12-14 13:44:27 字数 202 浏览 1 评论 0原文

将 iPod 背景音乐与音效混合的最佳方法是什么?音效需要可调,有时比背景音乐响亮得多。当我使用 MPMusicPlayerController 时,音量是系统范围的,并且也会降低效果音量。我一直在阅读有关 AVPlayerAVAudipPlayer 的内容,但似乎找不到可行的解决方案。

任何帮助和建议将不胜感激。

What would the best method be for mixing background iPod music with sound effects? The sound effects need to be adjustable and sometimes much louder than the background music. When I use MPMusicPlayerController the volume is system-wide and reduces the effects volume as well. I have been reading about AVPlayer and AVAudipPlayer but can't seem to locate a viable solution.

Any help and suggestions would be greatly appreciated.

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

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

发布评论

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

评论(2

书间行客 2024-12-21 13:44:27

问题是您无法通过 iPod 音乐库播放更大的声音,因为您编写 iPod 音乐时使用系统音量。除非您的 iPod 库中的音乐文件被压缩得非常低。

Cocos 2D 框架集成了混合更多声源的非常好的方法,但它再次使用 AVAudioPlayer 来播放背景音乐,使用 Open AL 来播放其他声音。

The problem is that you cannot play much louder sound over iPod music library because as you wrote iPod music use system volume. Unless the music files in your iPod library is compressed with very low volume.

Cocos 2D framework integrates very nice way how to mix-up more sound sources, but again it uses AVAudioPlayer for background music and Open AL for other sounds.

强者自强 2024-12-21 13:44:27

您看过 AVAudioSession 类别吗?我认为这可以帮助你解决你的问题。 Apple 的文档。

Have you looked at AVAudioSession Categories? I think that could help you with your problem. The docs at Apple.

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