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

Commit 71c8e5c9 authored by Andy Hung's avatar Andy Hung
Browse files

NuPlayer: Use deep buffer AudioTrack for video playback

This reduces power requirements and increases robustness against
audio glitches.

Test: Photos
Bug: 36867565
Change-Id: I200728cfc1bfd01301441c8759816415abe58d48
parent 58a220fe
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -762,8 +762,7 @@ void NuPlayer::Decoder::handleOutputFormatChange(const sp<AMessage> &format) {
        int64_t durationUs;
        bool hasVideo = (mSource->getFormat(false /* audio */) != NULL);
        if (getAudioDeepBufferSetting() // override regardless of source duration
                || (!hasVideo
                        && mSource->getDuration(&durationUs) == OK
                || (mSource->getDuration(&durationUs) == OK
                        && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) {
            flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
        } else {