更改设备音量
我正在开发一个 Iphone/Ipod 应用程序,其中使用 AVAudioPlayer。我正在通过滑块更改音频音量,该滑块可以正常工作,但现在我必须通过按设备加号和减号按钮来更改(增加/减少)滑块,而不是自己更改滑块。当我按下设备的加号/减号按钮时,不知道控件去哪里了?有谁知道吗,欢迎帮忙。
I am developing an Iphone/Ipod Application, in which I am using AVAudioPlayer. I am changing volume of audio through slider, which works correctly, but now I have to change(increase/decrease) slider by pressing the device plus and minus button instead of changing slider by myself. When I press plus/minus button of device, don't know where the control goes? Does anybody know, feel free to help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以下是链接,请阅读此处
希望它能帮助你:)
Here is link kindly read it here
Hope it will help you :)
我不太清楚这个问题,但您似乎想要在系统音量变化时收到通知?如果是这样,这是可能的,我希望我正确理解你的问题。以下怎么样:
我从 这里,桑迪的回答。
The question isn't entirely clear to me, but it seems you're wanting a notification when the system volume changes? If so, this is possible, I hope I understand your question correctly. How about the following:
I grabbed this from here, Sandy's answer.
猛击并感谢大家!我已经搜索过了。这对于 MPMusicPlayer 有效,但对于 AVAudioPlayer 无效。
你可以做到的。
但对于 AVAudioPlayer 来说不是这样,
Slam and thanks all! I have searched on it. This is valid for MPMusicPlayer, but not for AVAudioPlayer.
You can do it.
But not this for AVAudioPlayer,