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

Commit 267afb19 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: do not force legacy burst to callback size

That was causing glitching when PerformanceMode==NONE
because the bufferSize was two bursts, which could be much
smaller than the actual mixer period.

BUG: 165675305
Test: see bug for detailed repro steps
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: I5d9b8d07d8b4dbb81ea2f126444aac6472d3107b
parent 8dff4ae2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ aaudio_result_t AudioStreamTrack::open(const AudioStreamBuilder& builder)
            // that is some multiple of the burst size.
            notificationFrames = 0 - DEFAULT_BURSTS_PER_BUFFER_CAPACITY;
        } else {
            notificationFrames = builder.getFramesPerDataCallback();
            // To avoid glitching, let AudioFlinger pick the optimal burst size.
            notificationFrames = 0;
        }
    }
    mCallbackBufferSize = builder.getFramesPerDataCallback();