Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e047a7da authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "Audio: only force deep buffer flag for stereo low sampling rate content" into main

parents 28c6b184 5de1243e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1815,6 +1815,13 @@ public class AudioTrack extends PlayerBase
                || format.getChannelCount() < 1) {
            return false;
        }
        // Do not force power saving for multichannel content and high sample rates
        // to match rules in audio policy manager that default to mixer output instead
        // of direct output for these formats
        if (format.getChannelCount() > 2
                || format.getSampleRate() > AudioSystem.SAMPLE_RATE_HZ_MAX) {
            return false;
        }

        // Mode must be streaming
        if (mode != MODE_STREAM) {