使用运行API24 Nougat的Android App上的MediaFocusControl问题

时间:2017-11-01 16:13:07

标签: android audio

我正在编写一个应用程序,通过USB输出完美地发送音频到所有Android版本直到Marshmallow,但是在Nougat(API24)音频播放将开始,但稍后音频焦点将去,音频口吃和应用程序然后会崩溃。较高的比特率文件在崩溃之前播放的时间更长,但正常的44.1文件在焦点播放之前仅播放15秒。我真的很乐意为此提供任何帮助。

这是logcat

11-01 15:06:46.624  4950  6816 I MediaFocusControl:  AudioFocus  requestAudioFocus() from uid/pid 10380/21138 clientId=android.media.AudioManager$6f5e0f7com.android.app.Core$7463b64 req=1 flags=0x0: system_server
11-01 15:06:46.624 21138 21245 D AudioManager: requestAudioFocus status : 1: com.android.app
11-01 15:06:46.626  4950  7001 I MediaFocusControl:  AudioFocus  requestAudioFocus() from uid/pid 10380/21138 clientId=android.media.AudioManager$6f5e0f7com.android.app.Core$7463b64 req=1 flags=0x0: system_server
11-01 15:06:46.627 21138 21245 D AudioManager: requestAudioFocus status : 1: com.android.app
11-01 15:06:46.635  4950  5524 D MediaSessionRecord: setPlaybackState oldState:1, newState:0, packageName:com.android.app: system_server
11-01 15:06:46.636  4950  5283 D MediaSessionRecord: setPlaybackState oldState:0, newState:3, packageName:com.android.app: system_server
11-01 15:06:46.637  4950  6533 D MediaSessionRecord: setPlaybackState oldState:3, newState:3, packageName:com.android.app: system_server
11-01 15:06:46.643  4950  6234 D MediaSessionRecord: setPlaybackState oldState:3, newState:1, packageName:com.android.app: system_server
11-01 15:06:46.644  4950  6851 D MediaSessionRecord: setPlaybackState oldState:1, newState:3, packageName:com.android.app: system_server
11-01 15:06:46.652  5478  5558 D vol.MediaSessions: onPlaybackStateChanged com.android.app STATE_PLAYING PlaybackState {state=3, position=-1, buffered position=0, speed=1.0, updated=231995683, actions=51, custom actions=[], active item id=-1, error=null}: com.android.systemui
11-01 15:06:46.652  5478  5558 D vol.MediaSessions: updateRemoteControllerH null: com.android.systemui
11-01 15:06:46.653  5478  5558 D vol.MediaSessions: onActiveSessionsUpdatedH n=2: com.android.systemui

0 个答案:

没有答案