我正在使用 AWS CloudFormation 在 AWS Graviton 上运行 Android Automotive 实例。我发现无论我做什么都没有声音。看看 logcat,我看到了这个:
10-29 04:25:28.328 7171 7171 D CAR.AUDIO.KS: Starting device address audio
10-29 04:25:28.328 7171 7171 I CAR.AUDIO.KS.AudioPlayer: Asking for focus for usage 1
10-29 04:25:28.329 584 2726 I MediaFocusControl: requestAudioFocus() from uid/pid 1010028/7171 AA=USAGE_MEDIA/CONTENT_TYPE_UNKNOWN clientId=android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be callingPack=com.google.android.car.kitchensink req=2 flags=0x0 sdk=32
10-29 04:25:28.329 1422 1422 W CAR.AUDIO: getZoneIdForUid userId 10 does not have a zone. Defaulting to PRIMARY_AUDIO_ZONE:0
10-29 04:25:28.330 1422 1422 I CarAudioFocus: Evaluating GAIN_TRANSIENT request for client android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be with usage USAGE_MEDIA
10-29 04:25:28.330 1422 1422 I CarAudioFocus: Scanning focus holders...
10-29 04:25:28.330 1422 1422 I CarAudioFocus: Scanning those who've already lost focus...
10-29 04:25:28.330 1422 1422 I CarAudioFocus: AUDIOFOCUS_REQUEST_GRANTED
10-29 04:25:28.330 1422 1422 I CarAudioFocus: onAudioFocusRequest for client android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be with gain type GAIN_TRANSIENT resulted in REQUEST_GRANTED
10-29 04:25:28.330 7171 7171 I CAR.AUDIO.KS.AudioPlayer: MediaPlayer got focus for usage 1
10-29 04:25:28.330 7171 7171 I CAR.AUDIO.KS.AudioPlayer: doStart audio
10-29 04:25:28.339 7171 7171 D CAR.AUDIO.KS.AudioPlayer: doStart preferred device address: Speaker
10-29 04:25:28.343 501 7230 D CCodecConfig: read media type: audio/mpeg
10-29 04:25:28.345 501 7230 D CCodecConfig: string input.media-type.value = "audio/mpeg"
10-29 04:25:28.345 501 7230 D CCodecConfig: string output.media-type.value = "audio/raw"
10-29 04:25:28.347 501 7230 D CCodec : string mime = "audio/mpeg"
10-29 04:25:28.347 501 7230 D CCodec : string mime = "audio/raw"
10-29 04:25:28.356 2628 2628 W AudioFlinger: createTrack_l(): mismatch between requested flags (00000008) and output flags (00000002)
10-29 04:25:28.356 2628 2628 D AudioFlinger: Client defaulted notificationFrames to 11224 for frameCount 22448
10-29 04:25:28.356 2628 2628 D AF::TrackHandle: OpPlayAudio: track:58 usage:1 not muted
10-29 04:25:28.358 2628 2661 E AudioFlinger: no wake lock to update, but system ready!
10-29 04:25:28.359 2627 2641 E [email protected]: device/generic/goldfish/audio/stream_out.cpp:updateSourceMetadata:377 failure: Result::NOT_SUPPORTED
10-29 04:25:28.359 501 7228 D AudioTrack: getTimestamp_l(9): device stall time corrected using current time 9964178094107
10-29 04:25:28.382 2627 2641 E [email protected]: device/generic/goldfish/audio/stream_out.cpp:updateSourceMetadata:377 failure: Result::NOT_SUPPORTED
10-29 04:25:28.382 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(110)
10-29 04:25:28.641 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:28.900 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(230)
10-29 04:25:29.147 501 7228 W NuPlayerRenderer: AudioSink stuck. ARE YOU CONNECTED TO AUDIO OUT? Switching to system clock.
10-29 04:25:29.159 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:29.418 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:29.675 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:29.933 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:30.214 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(253)
10-29 04:25:30.472 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:30.729 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:30.987 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:31.245 2628 2661 D AudioFlinger: mixer(0xb40000700bf62a60) throttle end: throttle time(231)
10-29 04:25:31.342 7171 7171 I CAR.AUDIO.KS.AudioPlayer: stop
10-29 04:25:31.347 2627 2641 E [email protected]: device/generic/goldfish/audio/stream_out.cpp:updateSourceMetadata:377 failure: Result::NOT_SUPPORTED
10-29 04:25:31.356 584 1366 I MediaFocusControl: abandonAudioFocus() from uid/pid 1010028/7171 clientId=android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be
10-29 04:25:31.357 1422 1422 W CAR.AUDIO: getZoneIdForUid userId 10 does not have a zone. Defaulting to PRIMARY_AUDIO_ZONE:0
10-29 04:25:31.357 1422 1422 I CarAudioFocus: onAudioFocusAbandon for client android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be
10-29 04:25:31.357 1422 1422 I CarAudioFocus: removeFocusEntry android.media.AudioManager@86fa479com.google.android.car.kitchensink.audio.AudioPlayer$1@a3c15be
这里到底是什么问题,我怎样才能找到更多信息? 我感觉很卡住..谢谢!
您正在尝试解码音频/mpeg 文件并将其发送到支持音频/原始的扬声器。模拟器不会自动支持此翻译。尝试播放一个使用相同源和目标编解码器(如原始 PCM wav 文件)的文件,看看会发生什么