如何解开AVAudioSession [英] How to unduck AVAudioSession

查看:158
本文介绍了如何解开AVAudioSession的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

kAudioSessionProperty_OtherMixableAudioShouldDuck用于允许将iPod音频与应用程序音频混合的音频会话类别,指定当应用程序产生声音时是否应降低iPod音频级别。默认情况下,此属性的值为FALSE(0)。将其设置为非零值以打开闪避。
我们怎么能解开这个?有没有房产?

kAudioSessionProperty_OtherMixableAudioShouldDuck is used For audio session categories that allow mixing of iPod audio with application audio, specifies whether iPod audio should be reduced in level when your application produces sound. This property has a value of FALSE (0) by default. Set it to a nonzero value to turn on ducking. How can we unduck this? Is there any property?

提前致谢,
钱德拉。

Thanks in advance, Chandra.

推荐答案

我遇到了同样的问题,并且难以让它始终如一地运作。我花了很多时间研究和调试这个,最后只是打电话给Apple。他们告诉我要查看面包屑示例代码。我遵循了这个例子,一切正常。

I had this same question and had trouble getting it to work consistently. I spent a lot of time researching and debugging this and finally just called Apple. They told me to look at the breadcrumb sample code. I followed that example and everything worked fine.

这里的问题是会话属性和时间等有很多不同的选项。你设置了属性,然后取消设置或离开它,然后开始和停止会话?

The issue here was that there are many different options for session properties and timing, etc. E.g. do you set the property and then unset it or leave it and then start and stop the session?

这是一个类似的问题:

音频会话躲避在iOS 4中断了??

这是Apple的示例代码:

Here is Apple's sample code:

http://developer.apple.com/library/ios/# samplecode / Breadcrumb / Introduction / Intro.html

这篇关于如何解开AVAudioSession的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆