Audio strage 声音相关

AudioSystem::VOICE_CALL: // 电话来了
AudioSystem::BLUETOOTH_SCO: // 蓝牙耳机接通了

AudioSystem::RING: // 铃声响了

AudioSystem::NOTIFICATION: // 通知,例如界面中最上面一栏中有消息了

AudioSystem::ALARM: // 警告,电池没电时的警告?

AudioSystem::DTMF: // 可参考链接:http://baike.baidu.com/view/171916.htm

AudioSystem::SYSTEM: // 系统声音采用 media strategy, 例如,如果正在播放音乐的时候按键,
// mute 掉音乐,并切换 output 的话,将导致 很差的用户体验。
// 其中可以得到以下信息:
// 1、按键声音属于 system stream type 。
// 2、策略的改变将会导致 output 的切换
// 3、优先级高的策略 start 时会 mute 掉优先级低的策略

uint32_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, bool fromCache)

// check the following by order of priority to request a routing change if necessary:
// 1: we are in call or the strategy phone is active on the hardware output:
// use device for strategy phone
// 2: the strategy sonification is active on the hardware output:
// use device for strategy sonification
// 3: the strategy media is active on the hardware output:
// use device for strategy media
// 4: the strategy DTMF is active on the hardware output:
// use device for strategy DTMF

// 1、如果来电话了,或者 hardware output 中的 strategy phone 是活动的,
// 则使用 phone strategy 。
// 有两种情况会使用到 strategy phone ,来电话了和蓝牙耳机接通了。
// 2、如果 hardware output 中的 strategy sonification 是活动的,
// 则使用 strategy sonification .
// 有四种情况会使用 stratety sonification ,来电铃声,通知,警告,
// 和是 ENFORCED_AUDIBLE stream 的时候。
// 3、如果 hardware output 中的 strategy media 是活动的,
// 则使用 strategy media .
// Media 播放, 系统声音和 TTS 会使用 media 策略。
// 4、如果 hardware output 中的 strategy DTMF 是活动的,
// 则使用 strategy DTMF .
// 在 stream type 是 DTMF 的时候会使用 DTMF 策略。
// 关于 DTMF 请参考 http://baike.baidu.com/view/171916.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值