Lines Matching refs:count
49 ssize_t AudioBufferProviderSource::read(void *buffer, size_t count)
55 mBuffer.frameCount = count;
64 if (CC_UNLIKELY(count > available)) {
65 count = available;
67 // count could be zero, either because count was zero on entry or
69 memcpy(buffer, (char *) mBuffer.raw + (mConsumed * mFrameSize), count * mFrameSize);
70 if (CC_UNLIKELY((mConsumed += count) >= mBuffer.frameCount)) {
75 mFramesRead += count;
76 // For better responsiveness with large values of count,
77 // return a short count rather than continuing with next buffer.
79 return count;
92 size_t count = total - accumulator;
93 if (CC_UNLIKELY(count == 0)) {
96 if (CC_LIKELY(count > block)) {
97 count = block;
99 // 1 <= count <= block
101 mBuffer.frameCount = count;
104 ALOG_ASSERT(mBuffer.raw != NULL && mBuffer.frameCount <= count);
108 // FIXME simplify logic - does the initial count and block checks again for no reason;
116 if (CC_UNLIKELY(count > available)) {
117 count = available;
119 if (CC_LIKELY(count > 0)) {
120 ssize_t ret = via(user, (char *) mBuffer.raw + (mConsumed * mFrameSize), count);
128 ALOG_ASSERT((size_t) ret <= count);