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

Commit fff204c1 authored by Andy Hung's avatar Andy Hung
Browse files

AudioTrack: Control deep buffer from AudioAttributes

Test: AudioTrack CTS test, Play Movies
Bug: 30687201
Change-Id: I6a46a05dbf3fd61c8d47dade5b4baee69b923195
parent 35f537fc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -383,6 +383,10 @@ status_t AudioTrack::set(
        if ((mAttributes.flags & AUDIO_FLAG_LOW_LATENCY) != 0) {
            flags = (audio_output_flags_t) (flags | AUDIO_OUTPUT_FLAG_FAST);
        }
        // check deep buffer after flags have been modified above
        if (flags == AUDIO_OUTPUT_FLAG_NONE && (mAttributes.flags & AUDIO_FLAG_DEEP_BUFFER) != 0) {
            flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
        }
    }

    // these below should probably come from the audioFlinger too...