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

Commit 5c4f8262 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: clip setBufferSizeInFrames()

Bug: 69469801
Test: test_various.cpp
Change-Id: I8ce9a6ef19ed2bf12aa1d618b6a4095c94797636
parent 0d97cec0
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);