AUDIO_OUTPUT_FLAG_FAST denied by client

后端 未结 3 1195
不知归路
不知归路 2020-12-03 05:11

I\'m getting this AudioTrack warning

AUDIO_OUTPUT_FLAG_FAST denied by client

in my Android app for a button I\'m subclassing. I can hear a

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 05:23

    Most likely, the tap sound got a AUDIO_OUTPUT_FLAG_FAST in order to use low-latency playback if possible, but the AudioTrack class considered the track settings to be incompatible with the low-latency audio output, so the flag got removed and the track got treated as if the flag hadn't been set to begin with. So I wouldn't consider this to be something to worry about.

    As for the reason why the flag got denied; I'd still say that the most probable reason is a sample rate mismatch. The log in the question you linked to appears to have been added in this commit to the AOSP. But if we look at the master branch of the code base used on many Qualcomm-based devices we see that it still has the "AUDIO_OUTPUT_FLAG_FAST denied by client" log in the case were there was a sample rate mismatch. Which logs you get depends on the exact implemetation running on your device (i.e. which device and Android version you're running).

提交回复
热议问题