android 音频焦点

音频焦点分为两种

1永久占用((AudioManager) getSystemService(AUDIO_SERVICE)) .requestAudioFocus(null, AudioManager.STREAM_MUSIC,
                AudioManager.AUDIOFOCUS_GAIN);

2临时占用((AudioManager) getSystemService(AUDIO_SERVICE)) .requestAudioFocus(null, AudioManager.STREAM_MUSIC,
                AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);

释放音频焦点((AudioManager) getSystemService(AUDIO_SERVICE)).abandonAudioFocus(null);

上一篇:BZOJ-3670 动物园 KMP+奇怪的东西


下一篇:php项目,cpu暴增问题查找