1 进入《植物大战僵尸》:
galahad:/ $ logcat | grep -E “startOutput|stopOutput”
04-29 15:28:32.947 533 801 V AudioPolicyIntefaceImpl: startOutput()
04-29 15:28:32.947 533 801 D APM_AudioPolicyManager: startOutput() output 13, stream 3, session 57
04-29 15:28:32.956 491 3715 D AudioALSAHardwareResourceManager: +startOutputDevice(), new_devices = 0x2, mOutputDevices = 0x0, mStartOutputDevicesCount = 0 SampleRate = 48000
2将游戏调到后台,或者锁屏
galahad:/ $ logcat | grep -E “startOutput|stopOutput”
无log
3将游戏在后台,remove 掉;
galahad:/ $ logcat | grep -E “startOutput|stopOutput”
04-29 15:35:54.695 533 1103 V AudioPolicyIntefaceImpl: stopOutput()
04-29 15:35:54.696 533 686 D APM_AudioPolicyManager: stopOutput portId 29
04-29 15:35:54.696 533 686 D APM_AudioPolicyManager: stopOutput() output 13, stream 3, session 81
04-29 15:35:57.545 491 538 D AudioALSAHardwareResourceManager: +stopOutputDevice(), mOutputDevices = 0x2, mStartOutputDevicesCount = 1
说明,现在的喇叭贴近耳朵听到的底噪声是《植物大战僵尸》游戏的问题(没有关闭通路)