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

Commit 4aa1481a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only return early from data processing if it is not using data callback." into main

parents 01b237c8 e6c17b66
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -870,8 +870,9 @@ aaudio_result_t AudioStreamInternal::processData(void *buffer, int32_t numFrames
        framesLeft -= (int32_t) framesProcessed;
        audioData += framesProcessed * getBytesPerFrame();

        if (framesLeft <= 0) {
            // No need to wait, all data has been written.
        if (isDataCallbackSet() && framesLeft <= 0) {
            // The client uses block write and all data has been written. There is no need to
            // wait until the wakeup time.
            break;
        }