AAudio: set audio attributes performance flags
Make sure performance flags in audio attributes are reflecting
the output flags passed to the AudioTrack by AAudioStreamTrack and
ToneGenerator.
Bug: 278412306
Test: make
Change-Id: I70c4f22972cbbb35a183ef362f571481d4dd89ec
diff --git a/media/libaudioclient/ToneGenerator.cpp b/media/libaudioclient/ToneGenerator.cpp
index f0b4d11..7c0ce57 100644
--- a/media/libaudioclient/ToneGenerator.cpp
+++ b/media/libaudioclient/ToneGenerator.cpp
@@ -1306,6 +1306,7 @@
streamType = AUDIO_STREAM_DTMF;
}
attr = AudioSystem::streamTypeToAttributes(streamType);
+ attr.flags = AUDIO_FLAG_LOW_LATENCY;
const size_t frameCount = mProcessSize;
status_t status = mpAudioTrack->set(
@@ -1314,7 +1315,7 @@
AUDIO_FORMAT_PCM_16_BIT,
AUDIO_CHANNEL_OUT_MONO,
frameCount,
- AUDIO_OUTPUT_FLAG_FAST,
+ AUDIO_OUTPUT_FLAG_NONE,
wp<AudioTrack::IAudioTrackCallback>::fromExisting(this),
0, // notificationFrames
0, // sharedBuffer