17#ifndef OBOE_LATENCY_TUNER_
18#define OBOE_LATENCY_TUNER_
22#include "oboe/Definitions.h"
23#include "oboe/AudioStream.h"
95 int32_t getMinimumBufferSize()
const {
96 return mMinimumBufferSize;
112 int32_t getBufferSizeIncrement()
const {
113 return mBufferSizeIncrement;
134 static constexpr int32_t kIdleCount = 8;
135 static constexpr int32_t kDefaultNumBursts = 2;
137 AudioStream &mStream;
138 State mState = State::Idle;
139 int32_t mMaxBufferSize = 0;
140 int32_t mPreviousXRuns = 0;
141 int32_t mIdleCountDown = 0;
142 int32_t mMinimumBufferSize;
143 int32_t mBufferSizeIncrement;
144 std::atomic<int32_t> mLatencyTriggerRequests{0};
145 std::atomic<int32_t> mLatencyTriggerResponses{0};
Definition AudioStream.h:42
Definition LatencyTuner.h:41
LatencyTuner(AudioStream &stream)
void setBufferSizeIncrement(int32_t sizeIncrement)
Definition LatencyTuner.h:108
bool isAtMaximumBufferSize()
LatencyTuner(AudioStream &stream, int32_t maximumBufferSize)
void setMinimumBufferSize(int32_t bufferSize)
Definition LatencyTuner.h:91
Definition ResultWithValue.h:47