Android流媒体音频停止(暂停)

时间:2022-02-08 19:00:31

I have a Galaxy S5 with Android version 6.0.1 Power saving mode is "off" and ultra power saving mode is "off"

我有一个搭载Android版本6.0.1的Galaxy S5节电模式为“关”,超节电模式为“关”

I've tried three Internet music streaming apps namely: Pandora, SiriusXM and WDET Radio.

我试用了三款网络音乐流媒体应用:Pandora、SiriusXM和WDET Radio。

In each case music/audio material plays for awhile (approximately a few minutes) and then the audio turns off with the app at "pause" (play button appears and audio will continue when play button is pressed). This can occur anytime, in other words it doesn't occur just at the end of an audio track.

在每种情况下,音乐/音频材料都会播放一段时间(大约几分钟),然后在“暂停”(play按钮出现,当play按钮被按下时,音频将继续)时,应用程序会关闭音频。这可以在任何时候发生,换句话说,它不会仅仅发生在音轨的末端。

I've searched on this topic and the only suggestion I could find was to make sure the power savings mode were set to off. I do not have the source code to these apps so I can only log what is enabled by the app.

我搜索了这个话题,唯一能找到的建议是确保省电模式被设置为off。我没有这些应用的源代码,所以我只能记录应用激活的内容。

I captured some logcat traces while filtering on "aud". I had tried various filters (and also no filtering) but I couldn't see a pattern until I filtered on "aud".

我过滤“aud”时捕获了一些logcat的痕迹。我尝试过各种各样的过滤器(也没有过滤),但直到我过滤了“aud”,我才看到一个模式。

I have pasted in a segment of the logcat showing the startup of Pandora which ran from 21:33:53 to 21:39 when the app was closed by me. The entry at:

我粘贴了一段logcat,上面显示了潘多拉从21:53到21:39的启动时间,我关闭了这个应用。入口:

12-29 21:38:03.712 767-1806/? W/MediaFocusControl:   AudioFocus   audio focus client died

indicates when muted audio was detected (by listening to it). There was no user intervention to cause this. The logcat entry follows:

指示何时检测到弱音(通过收听)。没有用户干预导致这种情况。logcat条目如下:

12-29 21:33:53.332 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.332 767-1713/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.572 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:54.282 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.272 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.282 767-2423/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.862 767-1807/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1579/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L1
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L2
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ms-wma
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ima
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.232 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.242 6009-6177/? W/AudioCapabilities: Unsupported mime audio/amr-wb-plus
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.472 338-338/? E/OMXNodeInstance: setParameter(8e:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:33:56.492 338-6215/? I/SEC_AAC_DEC:  AudioSpecificConfig 0x 13 90
12-29 21:33:56.582 338-6215/? I/SEC_AAC_DEC:  AudioSpecificConfig 0x 13 90
12-29 21:33:56.912 338-29996/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 113
12-29 21:33:56.912 338-29996/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 113
12-29 21:33:56.922 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:33:56.922 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:33:56.922 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:33:56.922 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:33:56.932 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:33:56.932 338-945/? V/audio_hw_primary: start_output_stream: enter: usecase(0: deep-buffer-playback) devices(0x2)
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: in_snd_device(0: dummy)
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path =  0
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audtable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE


                                            [ 12-29 21:33:56.942   338:  945 D/         ]
                                            ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audvoltable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_snd_device: snd_device(2: speaker, speaker)
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 8
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 79
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 5
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: enter: usecase(0)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: apply mixer path: deep-buffer-playback
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.952 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.952 338-945/? V/audio_hw_primary: enable_audio_route: exit
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: Opening PCM device card_id(0) device_id(0)
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: exit
12-29 21:33:56.992 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 54(effect 0)
12-29 21:33:57.062 767-1435/? I/MediaFocusControl:  AudioFocus  requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:33:57.152 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(120)
12-29 21:34:09.232 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.242 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 1
12-29 21:34:09.252 767-1713/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.252 767-2420/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.682 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.692 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 2
12-29 21:34:09.702 767-1807/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.712 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 2
12-29 21:34:09.732 767-1806/? D/AudioService: active stream is 0x8
12-29 21:34:09.732 767-1726/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.742 767-1294/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:10.102 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.112 767-1435/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:34:10.192 767-786/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.352 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:34:10.362 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:10.712 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.722 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:34:10.732 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.732 767-1726/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.882 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:34:10.902 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:11.242 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:11.602 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:11.612 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.622 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:34:11.622 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.792 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:34:11.812 767-2423/? D/AudioService: active stream is 0x8
12-29 21:34:12.142 767-1709/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:31.632 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:36.822 767-1711/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:57.142 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:17.112 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:17.142 767-1712/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.152 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.162 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:17.172 767-1712/? D/AudioService: active stream is 0x8
12-29 21:36:17.592 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.602 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:36:17.622 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.642 767-2423/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.652 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:36:17.662 767-2424/? D/AudioService: active stream is 0x8
12-29 21:36:17.662 767-1294/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:19.392 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.392 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:19.412 767-1579/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.412 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.612 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:19.622 767-1807/? D/AudioService: active stream is 0x8
12-29 21:36:19.902 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:36:19.912 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.932 767-1579/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.942 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.962 767-1435/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:20.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:36:20.162 767-1435/? D/AudioService: active stream is 0x8
12-29 21:36:27.352 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:45.422 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 32(effect 2)
12-29 21:36:45.452 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(5)
12-29 21:37:11.412 338-29996/? E/OMXNodeInstance: setParameter(91:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:37:11.432 338-7398/? I/SEC_AAC_DEC:  AudioSpecificConfig 0x 13 90
12-29 21:37:11.462 338-7398/? I/SEC_AAC_DEC:  AudioSpecificConfig 0x 13 90
12-29 21:37:40.682 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 113
12-29 21:37:41.042 767-2420/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1806/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-2423/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.612 338-338/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 114
12-29 21:37:41.612 338-338/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 114
12-29 21:37:41.622 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:37:41.622 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:37:41.622 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:37:41.622 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:37:41.622 767-1294/? I/MediaFocusControl:  AudioFocus  requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:37:41.632 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:38:00.032 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 45(effect 2)
12-29 21:38:00.092 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(19)
12-29 21:38:03.712 767-1806/? W/MediaFocusControl:   AudioFocus   audio focus client died
12-29 21:38:03.712 767-1806/? I/MediaFocusControl: AudioFocus  removeFocusStackEntry(): removing entry for android.os.BinderProxy@bb512aa
12-29 21:38:04.932 767-2424/? I/MediaFocusControl:  AudioFocus  requestAudioFocus() from android.media.AudioManager$3900a0 req=1flags=0x0
12-29 21:38:04.942 6009-6009/? D/AudioManager: AudioManager dispatching onAudioFocusChange(-1) for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.142 767-1806/? I/MediaFocusControl:  AudioFocus  abandonAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.152 767-1806/? I/MediaFocusControl: AudioFocus  removeFocusStackEntry(): removing entry for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.482 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 114
12-29 21:38:08.392 338-945/? V/audio_hw_primary: out_standby: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: stop_output_stream: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: enter: usecase(0)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: reset mixer path: deep-buffer-playback
12-29 21:38:08.572 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_audio_route: exit
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_snd_device: snd_device(2: speaker)
12-29 21:38:08.582 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.592 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.592 338-945/? V/audio_hw_primary: stop_output_stream: exit: status(0)
12-29 21:38:08.592 338-945/? V/audio_hw_primary: out_standby: exit
12-29 21:39:41.392 767-786/? W/MediaFocusControl:   AudioFocus   audio focus client died
12-29 21:39:41.392 767-786/? I/MediaFocusControl: AudioFocus  removeFocusStackEntry(): removing entry for android.os.BinderProxy@b2a247a
12-29 21:39:41.402 767-2424/? D/AudioService: getStreamVolume 3 index 50
12-29 21:39:41.402 767-1807/? D/AudioService: getStreamVolume 3 index 50

The second instance of audio focus client died occurred at:

第二例音频焦点客户端死亡发生在:

12-29 21:39:41.392 767-786/? W/MediaFocusControl:   AudioFocus   audio focus client died

This occurred after I hit the back button and then closed the app from the media notification.

这发生在我点击后退按钮,然后从媒体通知中关闭应用程序之后。

Both the SiriusXM and WDET Radio app gave similar behavior insofar as the "audio focus client died" and muting behavior is concerned. I am an end user of these apps but since they all behave in a similar manner I am thinking it must have something to do with my device's configuration. This occurs whether I have Wifi or LTE as my data link. Furthermore the same end behavior occurs (loss of audio when it goes to "pause") whether I have either logging enabled through USB or no USB connection.

SiriusXM和WDET Radio应用程序在“音频焦点客户端死亡”和muting行为方面都有类似的行为。我是这些应用程序的最终用户,但由于它们的行为方式类似,我认为它一定与我的设备的配置有关。这发生在我是否有Wifi或LTE作为我的数据链接。此外,不管我是通过USB还是没有USB连接登录,都会发生相同的最终行为(当它进入“暂停”状态时,音频会丢失)。

I haven't noticed this behavior in the past but I can't really say at what point it started to occur.

我过去没有注意到这种行为,但我不能说它是什么时候开始发生的。

What can cause audio to unilaterally mute like this?

什么能使音频像这样单方哑音?

Is there some setting on my Android that can cause this?

在我的安卓系统上有没有设置可以导致这种情况?

Is there more information I can provide to help resolve this?

我能提供更多的信息来帮助解决这个问题吗?

Thanks much. Jim

谢谢。吉姆

New Information: I ran some more tests and found the following logcat patterns (four out of four test results) when the audio focus client was declared dead:

新信息:当音频焦点客户端被声明为已死时,我进行了更多的测试,发现了以下logcat模式(四分之四的测试结果):

Test 1:

测试1:

12-30 16:14:05.545 809-911/? I/ActivityManager: Killing 13320:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 16:14:05.575 809-911/? V/BroadcastQueue: [background] Process cur broadcast BroadcastRecord{c9a7ef2 u0 null qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{5a54404 2277:com.google.android.gms.persistent/u0a14}
12-30 16:14:05.595 809-2443/? W/MediaFocusControl:   AudioFocus   audio focus client died

Test2:

Test2:

12-30 16:39:59.942 809-832/? I/ActivityManager: Killing 17082:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 600s, lastActivityTime 600s
12-30 16:39:59.972 809-1751/? W/MediaFocusControl:   AudioFocus   audio focus client died

Test3:

Test3:

12-30 16:50:13.251 809-1741/? I/ActivityManager: Killing 19652:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 612s, lastActivityTime 612s
12-30 16:50:13.291 809-1751/? W/MediaFocusControl:   AudioFocus   audio focus client died

Test4:

Test4:

12-30 17:10:18.691 809-1747/? I/ActivityManager: Killing 26325:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 17:10:18.731 809-1502/? W/MediaFocusControl:   AudioFocus   audio focus client died

In each case the audio stopped at essentially the same time as the ActivityManager was killing the Connected BMW app.

在每一种情况下,音频基本上在活动管理器杀死连接宝马应用程序的同时停止。

Does this mean the BMW Connected app has the audio focus even though it is not streaming out audio?

这是否意味着宝马连接应用程序拥有音频焦点,即使它没有流式音频?

The other apps (SiriusXM, Pandora or WDET Radio) are the ones streaming audio.

其他应用程序(SiriusXM, Pandora或WDET Radio)是流媒体音频。

I uninstalled the Connected BMW app and each of the three apps (SiriusXM, Pandora and WDET Radio) played continuously for 20 minutes. I never used the connected app anyway.

我卸载了连接的宝马应用,三个应用(SiriusXM, Pandora, WDET Radio)连续播放了20分钟。我从来没有使用过连接的应用程序。

1 个解决方案

#1


1  

Check this question

检查这个问题

It may be because the Android OS would have killed the service due to lack of resources. You can make your service foreground to avoid it. Here is the snippit:

这可能是因为Android操作系统会因为缺乏资源而终止这项服务。您可以使您的服务前景避免它。这是片断:

private void sendToForeground() {
    Notification note = new Notification(0, null,
        System.currentTimeMillis());
    note.flags |= Notification.FLAG_NO_CLEAR;
    startForeground(0, note);
}

Just call it in onCreate of service.

只需调用onCreate服务。

#1


1  

Check this question

检查这个问题

It may be because the Android OS would have killed the service due to lack of resources. You can make your service foreground to avoid it. Here is the snippit:

这可能是因为Android操作系统会因为缺乏资源而终止这项服务。您可以使您的服务前景避免它。这是片断:

private void sendToForeground() {
    Notification note = new Notification(0, null,
        System.currentTimeMillis());
    note.flags |= Notification.FLAG_NO_CLEAR;
    startForeground(0, note);
}

Just call it in onCreate of service.

只需调用onCreate服务。