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

Commit a132c7f6 authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "aaudio: clip setBufferSizeInFrames()"

parents 4f9ad3e8 5c4f8262
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -59,5 +59,10 @@ void FifoControllerBase::advanceWriteIndex(fifo_frames_t numFrames) {
}

void FifoControllerBase::setThreshold(fifo_frames_t threshold) {
    if (threshold > mCapacity) {
        threshold = mCapacity;
    } else if (threshold < 0) {
        threshold = 0;
    }
    mThreshold = threshold;
}
+3 −0
Original line number Diff line number Diff line
@@ -102,6 +102,9 @@ public:
    /**
     * You can request that the buffer not be filled above a maximum
     * number of frames.
     *
     * The threshold will be clipped between zero and the buffer capacity.
     *
     * @param threshold effective size of the buffer
     */
    void setThreshold(fifo_frames_t threshold);