如何使用 iphone sdk 处理播放音乐的 FadeIn 和 FadeOut
我正在实现一个基于音频的应用程序,在我的应用程序中我需要集成 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道你问这个问题已经过去 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.