Lines Matching refs:mFrameCount
45 : mCblk(cblk), mBuffers(buffers), mFrameCount(frameCount), mFrameSize(frameSize),
73 LOG_ALWAYS_FATAL_IF(buffer == NULL || buffer->mFrameCount == 0);
142 if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
144 ALOGE("Shared memory control block is corrupt (filled=%zd, mFrameCount=%zu); "
145 "shutting down", filled, mFrameCount);
156 size_t avail = mIsOut ? mFrameCount - filled : filled;
170 if (part1 > buffer->mFrameCount) {
171 part1 = buffer->mFrameCount;
173 buffer->mFrameCount = part1;
263 buffer->mFrameCount = 0;
285 size_t stepCount = buffer->mFrameCount;
288 buffer->mFrameCount = 0;
293 LOG_ALWAYS_FATAL_IF(!(stepCount <= mUnreleased && mUnreleased <= mFrameCount));
348 if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
521 if (bufferPosition > mFrameCount) {
522 bufferPosition = mFrameCount;
541 LOG_ALWAYS_FATAL_IF(buffer == NULL || buffer->mFrameCount == 0);
562 if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
585 if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
596 mAvailToClient = mFrameCount - filled;
598 availToServer = mFrameCount - filled;
613 size_t ask = buffer->mFrameCount;
618 buffer->mFrameCount = part1;
630 buffer->mFrameCount = 0;
640 size_t stepCount = buffer->mFrameCount;
643 buffer->mFrameCount = 0;
648 LOG_ALWAYS_FATAL_IF(!(stepCount <= mUnreleased && mUnreleased <= mFrameCount));
661 size_t half = mFrameCount / 2;
681 buffer->mFrameCount = 0;
700 return mFrameCount;
706 if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
713 // ignores flush(), so framesReady() may report a larger mFrameCount than obtainBuffer()
774 if (loopStart > mFrameCount) {
775 loopStart = mFrameCount;
779 mFramesReady = mFrameCount - mPosition;
783 if (loopStart < loopEnd && loopEnd <= mFrameCount &&
798 + mFrameCount - mPosition;
804 if (!valid || mPosition > mFrameCount) {
819 buffer->mFrameCount = 0;
827 buffer->mFrameCount = 0;
834 size_t end = mState.mLoopCount != 0 ? mState.mLoopEnd : mFrameCount;
838 size_t wanted = buffer->mFrameCount;
840 buffer->mFrameCount = avail;
847 buffer->mFrameCount = 0;
860 size_t stepCount = buffer->mFrameCount;
874 if (!(position <= newPosition && newPosition <= mFrameCount)) {
875 ALOGW("%s newPosition %zu outside [%zu, %zu]", __func__, newPosition, position, mFrameCount);
876 newPosition = mFrameCount;
885 if (newPosition == mFrameCount) {
902 buffer->mFrameCount = 0;