Concurrent playback behavior when bit-perfect client is active.
1. Mute system sound on bit-perfect output thread. System sound such as
touch sound can be triggered often. To provide better bit-perfect
playback experience, mute system sound on bit-perfect output thread.
2. Mute bit-perfect track when there are other clients playing. When
there are other clients, such as notification, playing, the
bit-perfect client can no longer be played bit-perfectly. As the
bit-perfect client can turn out to be noise if it cannot be played
bit-perfectly, mute bit-perfect client when there are other clients
playing.
3. Do not allow creating bit-perfect client if there is any other high
priority use case, such as ringtone, alarm, active. The reason is
that the high priority clients will always take the audio focus for
the playback and there is no need for those clients to be played over
bit-perfect path.
Bug: 339515899
Test: atest audiopolicy_tests
Test: Manually
Change-Id: I8483d08085fd4076fa64ed4de278e45e6f6c0af0
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 4e46bea..0adfc8c 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -259,6 +259,10 @@
status_t getAudioMixPort(const struct audio_port_v7* devicePort,
struct audio_port_v7* mixPort) const final EXCLUDES_AudioFlinger_Mutex;
+ status_t setTracksInternalMute(
+ const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) final
+ EXCLUDES_AudioFlinger_Mutex;
+
status_t onTransactWrapper(TransactionCode code, const Parcel& data, uint32_t flags,
const std::function<status_t()>& delegate) final EXCLUDES_AudioFlinger_Mutex;