如何使用 iphone sdk 处理播放音乐的 FadeIn 和 FadeOut

发布于 2024-11-26 20:06:25 字数 127 浏览 3 评论 0原文

我正在实现一个基于音频的应用程序,在我的应用程序中我需要集成 FadeIn 和 FadeOut 功能。

我需要做的是,当应用程序的音频以高音量启动时,我需要降低音乐播放器的音量。这可能吗?

谢谢你, 钱德拉。

I am implementing an audio based application, in my application I need to integrate FadeIn and FadeOut feature.

What I need to do is I need to use down the volume level of the music player when an audio of the application is started with high volume level. Is this possible?

Thank you,
Chandra.

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

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

发布评论

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

评论(1

画离情绘悲伤 2024-12-03 20:06:25

我知道你问这个问题已经过去 5 个月了,但我的答案仍然在这里。

我尝试了一种相当愚蠢的技术。我将播放器的音量递归地减小 0.1,直到从 1.0 减小到 0.0。当它变成 0.0 时我停止了播放器。它给了我淡出效果。我希望这对你有帮助。如果您找到更好的方法,请与我分享。

I know its 5 months since you asked this question but still here is my answer.

I tried a rather stupid technique. I decreased the volume of the player by 0.1 recursively till it reached from 1.0 to 0.0. When it became 0.0 I stopped the player. It gave me a fade out effect. I hope this helps you. If you find a better way to do it, please do share it with me.

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