AUDIO_OUTPUT_FLAG_FAST denied by client
Asked Answered
P

3

25

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 click when tapping on the button so is this anything to worry about?

Note: I'm not getting the mismatching sample rate message as in this question: AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate

Pylorectomy answered 7/1, 2015 at 13:6 Comment(0)
L
29

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).

Lerner answered 7/1, 2015 at 13:21 Comment(2)
Very comprehensive. Thanks.Pylorectomy
The log in that file is different, unless it was changed since you read it ("AUDIO_OUTPUT_FLAG_FAST denied by client; transfer %d, track %u Hz, output %u Hz"). The simple "AUDIO_OUTPUT_FLAG_FAST denied by client" message seems to be something else (which I'm still trying to track down): android.googlesource.com/platform/frameworks/av/+/…Boater
O
3

Try changing the sample rate at "frameworks/base/ frameworks/av/ hardware/libhardware" locations.

default sample rate is 44100 try setting the sample rate you want (your audio files have). it will work.

cheers.

Oakum answered 24/7, 2015 at 8:14 Comment(1)
But sounds will take twice more space that way.Yestreen
S
-6

I had the same problem, my problem was caused because I forgotten type activity define in manifest file. such as : activity android:name=".NFCReaderActivity"

Sanferd answered 15/12, 2017 at 7:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.