Lines Matching refs:buffer

84 status_t ClientProxy::obtainBuffer(Buffer* buffer, const struct timespec *requested,
87 LOG_ALWAYS_FATAL_IF(buffer == NULL || buffer->mFrameCount == 0);
184 if (part1 > buffer->mFrameCount) {
185 part1 = buffer->mFrameCount;
187 buffer->mFrameCount = part1;
188 buffer->mRaw = part1 > 0 ?
190 buffer->mNonContig = avail - part1;
277 buffer->mFrameCount = 0;
278 buffer->mRaw = NULL;
279 buffer->mNonContig = 0;
296 void ClientProxy::releaseBuffer(Buffer* buffer)
298 LOG_ALWAYS_FATAL_IF(buffer == NULL);
299 size_t stepCount = buffer->mFrameCount;
301 // prevent accidental re-use of buffer
302 buffer->mFrameCount = 0;
303 buffer->mRaw = NULL;
304 buffer->mNonContig = 0;
528 // observed buffer position and loop count will freeze until then to give the
549 // observed buffer position and loop count will freeze until then to give the
600 status_t ServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush)
602 LOG_ALWAYS_FATAL_IF(buffer == NULL || buffer->mFrameCount == 0);
618 // effectively obtain then release whatever is in the buffer
685 size_t ask = buffer->mFrameCount;
690 buffer->mFrameCount = part1;
691 buffer->mRaw = part1 > 0 ?
693 buffer->mNonContig = availToServer - part1;
694 // After flush(), allow releaseBuffer() on a previously obtained buffer;
702 buffer->mFrameCount = 0;
703 buffer->mRaw = NULL;
704 buffer->mNonContig = 0;
709 void ServerProxy::releaseBuffer(Buffer* buffer)
711 LOG_ALWAYS_FATAL_IF(buffer == NULL);
712 size_t stepCount = buffer->mFrameCount;
714 // prevent accidental re-use of buffer
715 buffer->mFrameCount = 0;
716 buffer->mRaw = NULL;
717 buffer->mNonContig = 0;
753 buffer->mFrameCount = 0;
754 buffer->mRaw = NULL;
755 buffer->mNonContig = 0;
935 status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush)
938 buffer->mFrameCount = 0;
939 buffer->mRaw = NULL;
940 buffer->mNonContig = 0;
946 buffer->mFrameCount = 0;
947 buffer->mRaw = NULL;
948 buffer->mNonContig = 0;
957 size_t wanted = buffer->mFrameCount;
959 buffer->mFrameCount = avail;
963 buffer->mRaw = &((char *) mBuffers)[position * mFrameSize];
966 buffer->mFrameCount = 0;
967 buffer->mRaw = NULL;
972 buffer->mNonContig = mFramesReady == INT64_MAX ? SIZE_MAX : clampToSize(mFramesReady - avail);
979 void StaticAudioTrackServerProxy::releaseBuffer(Buffer* buffer)
981 size_t stepCount = buffer->mFrameCount;
985 // prevent accidental re-use of buffer
986 buffer->mRaw = NULL;
987 buffer->mNonContig = 0;
1027 buffer->mFrameCount = 0;
1028 buffer->mRaw = NULL;
1029 buffer->mNonContig = 0;
1037 // possible for static buffer tracks other than at end of buffer, so this is not a loss.